From 2bd6bd63165076e617fcdbe7cbb95dbd7b807595 Mon Sep 17 00:00:00 2001 From: C Freeman Date: Mon, 29 Nov 2021 12:36:33 -0500 Subject: [PATCH 01/42] Return only operational devices GetConnectedDevice (#11993) * Return only operational devices GetConnectedDevice With the exception of commissioning, all cluster commands should be sent over operational connection. Falling back to the PASE connection is probably not what we actually want here. For commissioning, callers should either use the provided commissioning flow in the SDK or use the provided GetDeviceBeingCommissioned. This also makes it much more obvious in the code which connection is being used. * Fix chip-device-ctrl for BLE connections. chip-device-ctrl BLE commissioning procedure is very manual which means folks are actually sending commands manually over the PASE connection to add and enable the network. This first checks the PASE connection and sends over CASE if we're not currently commissioning the device. * Restyled by autopep8 Co-authored-by: Restyled.io --- examples/chip-tool/commands/clusters/ModelCommand.h | 2 +- .../chip-tool/commands/pairing/PairingCommand.cpp | 2 +- examples/chip-tool/commands/pairing/PairingCommand.h | 2 +- .../chip-tool/commands/reporting/ReportingCommand.cpp | 2 +- .../chip-tool/commands/reporting/ReportingCommand.h | 2 +- examples/chip-tool/commands/tests/TestCommand.cpp | 2 +- examples/chip-tool/commands/tests/TestCommand.h | 2 +- examples/ota-requestor-app/linux/main.cpp | 4 ++-- src/app/OperationalDeviceProxy.h | 2 +- src/controller/CHIPDeviceController.cpp | 8 +------- src/controller/CHIPDeviceController.h | 4 ++-- src/controller/java/AndroidCallbacks.cpp | 2 +- src/controller/java/AndroidCallbacks.h | 2 +- .../python/ChipDeviceController-ScriptBinding.cpp | 10 +++++++++- src/controller/python/chip/ChipDeviceCtrl.py | 11 +++++++++++ .../Framework/CHIP/CHIPDeviceConnectionBridge.h | 2 +- .../Framework/CHIP/CHIPDeviceConnectionBridge.mm | 2 +- 17 files changed, 37 insertions(+), 24 deletions(-) diff --git a/examples/chip-tool/commands/clusters/ModelCommand.h b/examples/chip-tool/commands/clusters/ModelCommand.h index 71f79d4a2b3b08..c99bade1633101 100644 --- a/examples/chip-tool/commands/clusters/ModelCommand.h +++ b/examples/chip-tool/commands/clusters/ModelCommand.h @@ -27,7 +27,7 @@ class ModelCommand : public CHIPCommand { public: - using ChipDevice = ::chip::DeviceProxy; + using ChipDevice = ::chip::OperationalDeviceProxy; ModelCommand(const char * commandName) : CHIPCommand(commandName), mOnDeviceConnectedCallback(OnDeviceConnectedFn, this), diff --git a/examples/chip-tool/commands/pairing/PairingCommand.cpp b/examples/chip-tool/commands/pairing/PairingCommand.cpp index ba8d75bcc28997..55ef8f23e6b8c9 100644 --- a/examples/chip-tool/commands/pairing/PairingCommand.cpp +++ b/examples/chip-tool/commands/pairing/PairingCommand.cpp @@ -96,7 +96,7 @@ CHIP_ERROR PairingCommand::RunInternal(NodeId remoteId) return err; } -void PairingCommand::OnDeviceConnectedFn(void * context, chip::DeviceProxy * device) +void PairingCommand::OnDeviceConnectedFn(void * context, chip::OperationalDeviceProxy * device) { PairingCommand * command = reinterpret_cast(context); command->OpenCommissioningWindow(); diff --git a/examples/chip-tool/commands/pairing/PairingCommand.h b/examples/chip-tool/commands/pairing/PairingCommand.h index 2dc38bac1c35af..92932efe91246c 100644 --- a/examples/chip-tool/commands/pairing/PairingCommand.h +++ b/examples/chip-tool/commands/pairing/PairingCommand.h @@ -214,7 +214,7 @@ class PairingCommand : public CHIPCommand, chip::Controller::NetworkCommissioningCluster mCluster; chip::EndpointId mEndpointId = 0; - static void OnDeviceConnectedFn(void * context, chip::DeviceProxy * device); + static void OnDeviceConnectedFn(void * context, chip::OperationalDeviceProxy * device); static void OnDeviceConnectionFailureFn(void * context, NodeId deviceId, CHIP_ERROR error); static void OnOpenCommissioningWindowResponse(void * context, NodeId deviceId, CHIP_ERROR status, chip::SetupPayload payload); diff --git a/examples/chip-tool/commands/reporting/ReportingCommand.cpp b/examples/chip-tool/commands/reporting/ReportingCommand.cpp index b0be63f6bf5500..8ff30256a42be8 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::DeviceProxy * device) +void ReportingCommand::OnDeviceConnectedFn(void * context, chip::OperationalDeviceProxy * 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 4547f256926167..ca5f32409708bb 100644 --- a/examples/chip-tool/commands/reporting/ReportingCommand.h +++ b/examples/chip-tool/commands/reporting/ReportingCommand.h @@ -44,7 +44,7 @@ class ReportingCommand : public CHIPCommand NodeId mNodeId; uint8_t mEndPointId; - static void OnDeviceConnectedFn(void * context, chip::DeviceProxy * device); + static void OnDeviceConnectedFn(void * context, chip::OperationalDeviceProxy * device); static void OnDeviceConnectionFailureFn(void * context, NodeId deviceId, CHIP_ERROR error); chip::Callback::Callback mOnDeviceConnectedCallback; diff --git a/examples/chip-tool/commands/tests/TestCommand.cpp b/examples/chip-tool/commands/tests/TestCommand.cpp index c6f24989470966..62a86e3e8eea03 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::DeviceProxy * device) +void TestCommand::OnDeviceConnectedFn(void * context, chip::OperationalDeviceProxy * 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 76206a324267c9..7e4d32923e6e01 100644 --- a/examples/chip-tool/commands/tests/TestCommand.h +++ b/examples/chip-tool/commands/tests/TestCommand.h @@ -58,7 +58,7 @@ class TestCommand : public CHIPCommand ChipDevice * mDevice; chip::NodeId mNodeId; - static void OnDeviceConnectedFn(void * context, chip::DeviceProxy * device); + static void OnDeviceConnectedFn(void * context, chip::OperationalDeviceProxy * device); static void OnDeviceConnectionFailureFn(void * context, NodeId deviceId, CHIP_ERROR error); static void OnWaitForMsFn(chip::System::Layer * systemLayer, void * context); diff --git a/examples/ota-requestor-app/linux/main.cpp b/examples/ota-requestor-app/linux/main.cpp index 5d390b5d888f31..08dd38e3d21a64 100644 --- a/examples/ota-requestor-app/linux/main.cpp +++ b/examples/ota-requestor-app/linux/main.cpp @@ -56,7 +56,7 @@ 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, chip::DeviceProxy * deviceProxy); +void OnConnected(void * context, chip::OperationalDeviceProxy * 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); @@ -153,7 +153,7 @@ void OnQueryImageFailure(void * context, EmberAfStatus status) ChipLogDetail(SoftwareUpdate, "QueryImage failure response %" PRIu8, status); } -void OnConnected(void * context, chip::DeviceProxy * deviceProxy) +void OnConnected(void * context, chip::OperationalDeviceProxy * deviceProxy) { CHIP_ERROR err = CHIP_NO_ERROR; chip::Controller::OtaSoftwareUpdateProviderCluster cluster; diff --git a/src/app/OperationalDeviceProxy.h b/src/app/OperationalDeviceProxy.h index ee2496ec614a4b..5e60c30e9aec32 100644 --- a/src/app/OperationalDeviceProxy.h +++ b/src/app/OperationalDeviceProxy.h @@ -66,7 +66,7 @@ struct DeviceProxyInitParams class OperationalDeviceProxy; -typedef void (*OnDeviceConnected)(void * context, DeviceProxy * device); +typedef void (*OnDeviceConnected)(void * context, OperationalDeviceProxy * device); typedef void (*OnDeviceConnectionFailure)(void * context, NodeId deviceId, CHIP_ERROR error); class DLL_EXPORT OperationalDeviceProxy : public DeviceProxy, SessionReleaseDelegate, public SessionEstablishmentDelegate diff --git a/src/controller/CHIPDeviceController.cpp b/src/controller/CHIPDeviceController.cpp index 970a685baa5977..fd35d846fe2ec0 100644 --- a/src/controller/CHIPDeviceController.cpp +++ b/src/controller/CHIPDeviceController.cpp @@ -676,12 +676,6 @@ CHIP_ERROR DeviceCommissioner::GetDeviceBeingCommissioned(NodeId deviceId, Commi CHIP_ERROR DeviceCommissioner::GetConnectedDevice(NodeId deviceId, Callback::Callback * onConnection, Callback::Callback * onFailure) { - if (mDeviceBeingCommissioned != nullptr && mDeviceBeingCommissioned->GetDeviceId() == deviceId && - mDeviceBeingCommissioned->IsSecureConnected()) - { - onConnection->mCall(onConnection->mContext, mDeviceBeingCommissioned); - return CHIP_NO_ERROR; - } return DeviceController::GetConnectedDevice(deviceId, onConnection, onFailure); } @@ -1554,7 +1548,7 @@ void DeviceCommissioner::OnNodeIdResolutionFailed(const chip::PeerId & peer, CHI #endif -void DeviceCommissioner::OnDeviceConnectedFn(void * context, DeviceProxy * device) +void DeviceCommissioner::OnDeviceConnectedFn(void * context, OperationalDeviceProxy * device) { DeviceCommissioner * commissioner = static_cast(context); VerifyOrReturn(commissioner != nullptr, ChipLogProgress(Controller, "Device connected callback with null context. Ignoring")); diff --git a/src/controller/CHIPDeviceController.h b/src/controller/CHIPDeviceController.h index 2d549b74d40d28..c3c12300e42b03 100644 --- a/src/controller/CHIPDeviceController.h +++ b/src/controller/CHIPDeviceController.h @@ -591,7 +591,7 @@ class DLL_EXPORT DeviceCommissioner : public DeviceController, DevicePairingDelegate * mPairingDelegate; CommissioneeDeviceProxy * mDeviceBeingCommissioned = nullptr; - DeviceProxy * mDeviceOperational = nullptr; + OperationalDeviceProxy * mDeviceOperational = nullptr; Credentials::CertificateType mCertificateTypeBeingRequested = Credentials::CertificateType::kUnknown; @@ -688,7 +688,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, DeviceProxy * device); + static void OnDeviceConnectedFn(void * context, OperationalDeviceProxy * 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, diff --git a/src/controller/java/AndroidCallbacks.cpp b/src/controller/java/AndroidCallbacks.cpp index c498c802b187d6..d4b844a6b04a22 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, DeviceProxy * device) +void GetConnectedDeviceCallback::OnDeviceConnectedFn(void * context, OperationalDeviceProxy * 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 123c2fdb10aeb9..9691e77f5fd770 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, DeviceProxy * device); + static void OnDeviceConnectedFn(void * context, OperationalDeviceProxy * device); static void OnDeviceConnectionFailureFn(void * context, NodeId nodeId, CHIP_ERROR error); Callback::Callback mOnSuccess; diff --git a/src/controller/python/ChipDeviceController-ScriptBinding.cpp b/src/controller/python/ChipDeviceController-ScriptBinding.cpp index c7fc136760d8fc..35e85bc3b8a055 100644 --- a/src/controller/python/ChipDeviceController-ScriptBinding.cpp +++ b/src/controller/python/ChipDeviceController-ScriptBinding.cpp @@ -163,6 +163,8 @@ void pychip_Stack_SetLogFunct(LogMessageFunct logFunct); ChipError::StorageType pychip_GetConnectedDeviceByNodeId(chip::Controller::DeviceCommissioner * devCtrl, chip::NodeId nodeId, DeviceAvailableFunc callback); +ChipError::StorageType pychip_GetDeviceBeingCommissioned(chip::Controller::DeviceCommissioner * devCtrl, chip::NodeId nodeId, + CommissioneeDeviceProxy ** proxy); uint64_t pychip_GetCommandSenderHandle(chip::DeviceProxy * device); // CHIP Stack objects ChipError::StorageType pychip_BLEMgrImpl_ConfigureBle(uint32_t bluetoothAdapterId); @@ -534,7 +536,7 @@ struct GetDeviceCallbacks mOnSuccess(OnDeviceConnectedFn, this), mOnFailure(OnConnectionFailureFn, this), mCallback(callback) {} - static void OnDeviceConnectedFn(void * context, DeviceProxy * device) + static void OnDeviceConnectedFn(void * context, OperationalDeviceProxy * device) { auto * self = static_cast(context); self->mCallback(device, CHIP_NO_ERROR.AsInteger()); @@ -562,6 +564,12 @@ ChipError::StorageType pychip_GetConnectedDeviceByNodeId(chip::Controller::Devic return devCtrl->GetConnectedDevice(nodeId, &callbacks->mOnSuccess, &callbacks->mOnFailure).AsInteger(); } +ChipError::StorageType pychip_GetDeviceBeingCommissioned(chip::Controller::DeviceCommissioner * devCtrl, chip::NodeId nodeId, + CommissioneeDeviceProxy ** proxy) +{ + return devCtrl->GetDeviceBeingCommissioned(nodeId, proxy).AsInteger(); +} + ChipError::StorageType pychip_DeviceCommissioner_CloseBleConnection(chip::Controller::DeviceCommissioner * devCtrl) { #if CONFIG_NETWORK_LAYER_BLE diff --git a/src/controller/python/chip/ChipDeviceCtrl.py b/src/controller/python/chip/ChipDeviceCtrl.py index edaf1438fdc7b6..e14941a90f277e 100644 --- a/src/controller/python/chip/ChipDeviceCtrl.py +++ b/src/controller/python/chip/ChipDeviceCtrl.py @@ -339,6 +339,13 @@ def DeviceAvailableCallback(device, err): print("Failed in getting the connected device: {}".format(err)) raise self._ChipStack.ErrorToException(err) + res = self._ChipStack.Call(lambda: self._dmLib.pychip_GetDeviceBeingCommissioned( + self.devCtrl, nodeid, byref(returnDevice))) + if res == 0: + # TODO: give users more contrtol over whether they want to send this command over a PASE established connection + print('Using PASE connection') + return returnDevice + res = self._ChipStack.Call(lambda: self._dmLib.pychip_GetConnectedDeviceByNodeId( self.devCtrl, nodeid, _DeviceAvailableFunct(DeviceAvailableCallback))) if res != 0: @@ -630,6 +637,10 @@ def _InitLib(self): c_void_p, c_uint64, _DeviceAvailableFunct] self._dmLib.pychip_GetConnectedDeviceByNodeId.restype = c_uint32 + self._dmLib.pychip_GetDeviceBeingCommissioned.argtypes = [ + c_void_p, c_uint64, c_void_p] + self._dmLib.pychip_GetDeviceBeingCommissioned.restype = c_uint32 + self._dmLib.pychip_DeviceCommissioner_CloseBleConnection.argtypes = [ c_void_p] self._dmLib.pychip_DeviceCommissioner_CloseBleConnection.restype = c_uint32 diff --git a/src/darwin/Framework/CHIP/CHIPDeviceConnectionBridge.h b/src/darwin/Framework/CHIP/CHIPDeviceConnectionBridge.h index 240dab2523629c..a83cc533ded234 100644 --- a/src/darwin/Framework/CHIP/CHIPDeviceConnectionBridge.h +++ b/src/darwin/Framework/CHIP/CHIPDeviceConnectionBridge.h @@ -48,7 +48,7 @@ class CHIPDeviceConnectionBridge : public chip::ReferenceCounted mOnConnected; chip::Callback::Callback mOnConnectFailed; - static void OnConnected(void * context, chip::DeviceProxy * device); + static void OnConnected(void * context, chip::OperationalDeviceProxy * 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 24e49d325908dc..ac0241a7c614f7 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::DeviceProxy * device) +void CHIPDeviceConnectionBridge::OnConnected(void * context, chip::OperationalDeviceProxy * device) { auto * object = static_cast(context); CHIPDevice * chipDevice = [[CHIPDevice alloc] initWithDevice:device]; From 3cfba14a127c704ce1f67f8681ed691bca86bf66 Mon Sep 17 00:00:00 2001 From: Vivien Nicolas Date: Mon, 29 Nov 2021 20:55:54 +0100 Subject: [PATCH 02/42] [chip-tool] Add a command to list all the available tests (#12322) * [chip-tool] Add a command to list all the available tests * Update generated content --- .../chip-tool/templates/tests-commands.zapt | 13 ++ .../chip-tool/zap-generated/test/Commands.h | 128 ++++++++++++++++++ 2 files changed, 141 insertions(+) diff --git a/examples/chip-tool/templates/tests-commands.zapt b/examples/chip-tool/templates/tests-commands.zapt index 1d4d2fdc2babac..65750d9d19314e 100644 --- a/examples/chip-tool/templates/tests-commands.zapt +++ b/examples/chip-tool/templates/tests-commands.zapt @@ -5,6 +5,18 @@ #include #include +class TestList : public Command +{ +public: + TestList() : Command("list") {}; + CHIP_ERROR Run() override + { + {{#chip_tests (getTests)}}printf("{{filename}}\n");{{/chip_tests}} + + return CHIP_NO_ERROR; + } +}; + {{>test_cluster tests=(getTests)}} void registerCommandsTests(Commands & commands) @@ -12,6 +24,7 @@ void registerCommandsTests(Commands & commands) const char * clusterName = "Tests"; commands_list clusterCommands = { + make_unique(), {{#chip_tests (getTests)}} make_unique<{{filename}}>(), {{/chip_tests}} diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 0480b86773aaf0..05f8d82f8304d3 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -22,6 +22,133 @@ #include #include +class TestList : public Command +{ +public: + TestList() : Command("list"){}; + CHIP_ERROR Run() override + { + printf("Test_TC_BI_1_1\n"); + printf("Test_TC_BI_2_1\n"); + printf("Test_TC_BI_2_2\n"); + printf("Test_TC_BOOL_1_1\n"); + printf("Test_TC_BOOL_2_1\n"); + printf("Test_TC_CC_1_1\n"); + printf("Test_TC_CC_2_1\n"); + printf("Test_TC_CC_3_1\n"); + printf("Test_TC_CC_3_2\n"); + printf("Test_TC_CC_3_3\n"); + printf("Test_TC_CC_4_1\n"); + printf("Test_TC_CC_4_2\n"); + printf("Test_TC_CC_4_3\n"); + printf("Test_TC_CC_4_4\n"); + printf("Test_TC_CC_5_1\n"); + printf("Test_TC_CC_5_2\n"); + printf("Test_TC_CC_5_3\n"); + printf("Test_TC_CC_6_1\n"); + printf("Test_TC_CC_6_2\n"); + printf("Test_TC_CC_6_3\n"); + printf("Test_TC_CC_7_1\n"); + printf("Test_TC_CC_7_2\n"); + printf("Test_TC_CC_7_3\n"); + printf("Test_TC_CC_7_4\n"); + printf("Test_TC_CC_8_1\n"); + printf("Test_TC_CC_9_1\n"); + printf("Test_TC_CC_9_2\n"); + printf("Test_TC_CC_9_3\n"); + printf("Test_TC_DM_1_1\n"); + printf("Test_TC_DM_3_1\n"); + printf("Test_TC_DM_2_2\n"); + printf("Test_TC_EMR_1_1\n"); + printf("Test_TC_FLW_1_1\n"); + printf("Test_TC_FLW_2_1\n"); + printf("Test_TC_FLW_2_2\n"); + printf("Test_TC_ILL_1_1\n"); + printf("Test_TC_LVL_1_1\n"); + printf("Test_TC_LVL_2_1\n"); + printf("Test_TC_LVL_3_1\n"); + printf("Test_TC_LVL_4_1\n"); + printf("Test_TC_LVL_5_1\n"); + printf("Test_TC_MC_1_1\n"); + printf("Test_TC_MC_2_1\n"); + printf("Test_TC_MC_3_1\n"); + printf("Test_TC_MC_3_2\n"); + printf("Test_TC_MC_3_3\n"); + printf("Test_TC_MC_3_4\n"); + printf("Test_TC_MC_3_5\n"); + printf("Test_TC_MC_3_6\n"); + printf("Test_TC_MC_3_7\n"); + printf("Test_TC_MC_3_8\n"); + printf("Test_TC_MC_3_9\n"); + printf("Test_TC_MC_3_10\n"); + printf("Test_TC_MC_3_11\n"); + printf("Test_TC_OCC_1_1\n"); + printf("Test_TC_OCC_2_1\n"); + printf("Test_TC_OCC_2_2\n"); + printf("Test_TC_OO_1_1\n"); + printf("Test_TC_OO_2_1\n"); + printf("Test_TC_OO_2_2\n"); + printf("Test_TC_OO_2_3\n"); + printf("Test_TC_PRS_1_1\n"); + printf("Test_TC_PRS_2_1\n"); + printf("Test_TC_PCC_1_1\n"); + printf("Test_TC_PCC_2_1\n"); + printf("Test_TC_PCC_2_2\n"); + printf("Test_TC_PCC_2_3\n"); + printf("Test_TC_RH_1_1\n"); + printf("Test_TC_RH_2_1\n"); + printf("Test_TC_RH_2_2\n"); + printf("Test_TC_TM_1_1\n"); + printf("Test_TC_TM_2_1\n"); + printf("Test_TC_TM_2_2\n"); + printf("Test_TC_TSTAT_1_1\n"); + printf("Test_TC_TSTAT_2_1\n"); + printf("Test_TC_TSTAT_2_2\n"); + printf("Test_TC_TSUIC_1_1\n"); + printf("Test_TC_TSUIC_2_1\n"); + printf("Test_TC_TSUIC_2_2\n"); + printf("Test_TC_DIAGTH_1_1\n"); + printf("Test_TC_WNCV_1_1\n"); + printf("Test_TC_WNCV_2_1\n"); + printf("Test_TC_WNCV_2_2\n"); + printf("Test_TC_WNCV_2_4\n"); + printf("Test_TC_WNCV_2_5\n"); + printf("Test_TC_WNCV_3_1\n"); + printf("Test_TC_WNCV_3_2\n"); + printf("Test_TC_WNCV_3_3\n"); + printf("TV_TargetNavigatorCluster\n"); + printf("TV_AudioOutputCluster\n"); + printf("TV_ApplicationLauncherCluster\n"); + printf("TV_KeypadInputCluster\n"); + printf("TV_AccountLoginCluster\n"); + printf("TV_WakeOnLanCluster\n"); + printf("TV_ApplicationBasicCluster\n"); + printf("TV_MediaPlaybackCluster\n"); + printf("TV_TvChannelCluster\n"); + printf("TV_LowPowerCluster\n"); + printf("TV_MediaInputCluster\n"); + printf("TestCluster\n"); + printf("TestClusterComplexTypes\n"); + printf("TestConstraints\n"); + printf("TestDelayCommands\n"); + printf("TestLogCommands\n"); + printf("TestSaveAs\n"); + printf("TestDescriptorCluster\n"); + printf("TestBasicInformation\n"); + printf("TestIdentifyCluster\n"); + printf("TestGroupsCluster\n"); + printf("TestOperationalCredentialsCluster\n"); + printf("TestModeSelectCluster\n"); + printf("TestGroupMessaging\n"); + printf("Test_TC_DIAGSW_1_1\n"); + printf("Test_TC_DIAGSW_2_1\n"); + printf("Test_TC_DIAGSW_3_2\n"); + printf("TestSubscribe_OnOff\n"); + + return CHIP_NO_ERROR; + } +}; + class Test_TC_BI_1_1 : public TestCommand { public: @@ -44425,6 +44552,7 @@ void registerCommandsTests(Commands & commands) const char * clusterName = "Tests"; commands_list clusterCommands = { + make_unique(), make_unique(), make_unique(), make_unique(), From 6f535e477b771456da9011eded4d36c1389ff96b Mon Sep 17 00:00:00 2001 From: C Freeman Date: Mon, 29 Nov 2021 14:57:23 -0500 Subject: [PATCH 03/42] OperationalDataset: Add ByteSpan extendedPanID (#12304) ByteSpans are const references, so we should be able to directly reference the extendedPanId to send cluster commands if the sender already owns the OperationalDataset object. This eliminates a copy and doesn't require the calling object to hold separate memory for the extended PAN ID when it's already present in the TLV. --- src/lib/support/ThreadOperationalDataset.cpp | 13 +++++++++++++ src/lib/support/ThreadOperationalDataset.h | 12 ++++++++++++ .../support/tests/TestThreadOperationalDataset.cpp | 5 +++++ 3 files changed, 30 insertions(+) diff --git a/src/lib/support/ThreadOperationalDataset.cpp b/src/lib/support/ThreadOperationalDataset.cpp index b6a88f2aea7332..35dedc8878a8e6 100644 --- a/src/lib/support/ThreadOperationalDataset.cpp +++ b/src/lib/support/ThreadOperationalDataset.cpp @@ -288,6 +288,19 @@ CHIP_ERROR OperationalDataset::GetExtendedPanId(uint8_t (&aExtendedPanId)[kSizeE return CHIP_ERROR_TLV_TAG_NOT_FOUND; } +CHIP_ERROR OperationalDataset::GetExtendedPanIdAsByteSpan(ByteSpan & span) const +{ + const ThreadTLV * tlv = Locate(ThreadTLV::kExtendedPanId); + + if (tlv != nullptr) + { + span = ByteSpan(reinterpret_cast(tlv->GetValue()), tlv->GetLength()); + return CHIP_NO_ERROR; + } + + return CHIP_ERROR_TLV_TAG_NOT_FOUND; +} + CHIP_ERROR OperationalDataset::SetExtendedPanId(const uint8_t (&aExtendedPanId)[kSizeExtendedPanId]) { ThreadTLV * tlv = MakeRoom(ThreadTLV::kExtendedPanId, sizeof(*tlv) + sizeof(aExtendedPanId)); diff --git a/src/lib/support/ThreadOperationalDataset.h b/src/lib/support/ThreadOperationalDataset.h index e91ad5b6361174..3a2d58cf2675d6 100644 --- a/src/lib/support/ThreadOperationalDataset.h +++ b/src/lib/support/ThreadOperationalDataset.h @@ -113,6 +113,18 @@ class OperationalDataset */ CHIP_ERROR GetExtendedPanId(uint8_t (&aExtendedPanId)[kSizeExtendedPanId]) const; + /** + * This method returns a const ByteSpan to the extended PAN ID in the dataset. + * This can be used to pass the extended PAN ID to a cluster command without the use of external memory. + * + * @param[out] span A reference to receive the location of the extended PAN ID. + * + * @retval CHIP_NO_ERROR Successfully retrieved the extended PAN ID. + * @retval CHIP_ERROR_TLV_TAG_NOT_FOUND Thread extended PAN ID is not present in the dataset. + * + */ + CHIP_ERROR GetExtendedPanIdAsByteSpan(ByteSpan & span) const; + /** * This method sets Thread extended PAN ID to the dataset. * diff --git a/src/lib/support/tests/TestThreadOperationalDataset.cpp b/src/lib/support/tests/TestThreadOperationalDataset.cpp index 7d9552f55f4956..47eb062cf04a23 100644 --- a/src/lib/support/tests/TestThreadOperationalDataset.cpp +++ b/src/lib/support/tests/TestThreadOperationalDataset.cpp @@ -80,6 +80,11 @@ void TestExtendedPanId(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT(inSuite, dataset.SetExtendedPanId(kExtendedPanId) == CHIP_NO_ERROR); NL_TEST_ASSERT(inSuite, dataset.GetExtendedPanId(extendedPanId) == CHIP_NO_ERROR); NL_TEST_ASSERT(inSuite, memcmp(extendedPanId, kExtendedPanId, sizeof(kExtendedPanId)) == 0); + + ByteSpan span; + NL_TEST_ASSERT(inSuite, dataset.GetExtendedPanIdAsByteSpan(span) == CHIP_NO_ERROR); + NL_TEST_ASSERT(inSuite, span.size() == sizeof(kExtendedPanId)); + NL_TEST_ASSERT(inSuite, memcmp(extendedPanId, span.data(), sizeof(kExtendedPanId)) == 0); } void TestMasterKey(nlTestSuite * inSuite, void * inContext) From 4bac98f91f1a49adadd8edc1d7080722df739629 Mon Sep 17 00:00:00 2001 From: Martin Turon Date: Mon, 29 Nov 2021 11:59:33 -0800 Subject: [PATCH 04/42] [shell] Fix darwin deadlock with 'server start' command. (#12231) --- src/platform/Darwin/KeyValueStoreManagerImpl.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platform/Darwin/KeyValueStoreManagerImpl.mm b/src/platform/Darwin/KeyValueStoreManagerImpl.mm index 8d0476259f2523..22756b48be7495 100644 --- a/src/platform/Darwin/KeyValueStoreManagerImpl.mm +++ b/src/platform/Darwin/KeyValueStoreManagerImpl.mm @@ -184,7 +184,7 @@ - (instancetype)initWithContext:(nonnull NSManagedObjectContext *)context } // create Managed Object context - gContext = [[NSManagedObjectContext alloc] initWithConcurrencyType:NSMainQueueConcurrencyType]; + gContext = [[NSManagedObjectContext alloc] initWithConcurrencyType:NSPrivateQueueConcurrencyType]; [gContext setPersistentStoreCoordinator:coordinator]; return CHIP_NO_ERROR; From 7dfad425fb14ffc8e29f0f4438f65a460909042b Mon Sep 17 00:00:00 2001 From: nikita-s-wrk Date: Mon, 29 Nov 2021 23:02:05 +0300 Subject: [PATCH 05/42] [qpg] Use static alloc for lwip and FreeRTOS; Move LwIP to qpg_sdk (#11257) --- examples/lighting-app/qpg/include/AppConfig.h | 2 +- examples/lighting-app/qpg/src/AppTask.cpp | 31 +++- examples/lock-app/qpg/include/AppConfig.h | 2 +- examples/lock-app/qpg/src/AppTask.cpp | 27 ++- examples/lock-app/qpg/src/BoltLockManager.cpp | 15 +- examples/persistent-storage/qpg/main.cpp | 7 +- .../qpg/project_include/OpenThreadConfig.h | 11 +- .../GenericPlatformManagerImpl_FreeRTOS.cpp | 7 +- .../GenericPlatformManagerImpl_FreeRTOS.h | 4 + src/lwip/BUILD.gn | 26 ++- src/lwip/qpg/arch/cc.h | 97 ---------- src/lwip/qpg/arch/perf.h | 33 ---- src/lwip/qpg/lwipopts.h | 166 ------------------ src/lwip/qpg/lwippools.h | 17 -- ...GenericThreadStackManagerImpl_FreeRTOS.cpp | 6 +- .../GenericThreadStackManagerImpl_FreeRTOS.h | 4 + src/platform/qpg/BLEManagerImpl.cpp | 13 ++ src/platform/qpg/CHIPPlatformConfig.h | 12 ++ third_party/qpg_sdk/BUILD.gn | 3 +- third_party/qpg_sdk/repo | 2 +- 20 files changed, 142 insertions(+), 343 deletions(-) delete mode 100644 src/lwip/qpg/arch/cc.h delete mode 100644 src/lwip/qpg/arch/perf.h delete mode 100644 src/lwip/qpg/lwipopts.h delete mode 100644 src/lwip/qpg/lwippools.h diff --git a/examples/lighting-app/qpg/include/AppConfig.h b/examples/lighting-app/qpg/include/AppConfig.h index 154e860b73e2a4..400236e09619eb 100644 --- a/examples/lighting-app/qpg/include/AppConfig.h +++ b/examples/lighting-app/qpg/include/AppConfig.h @@ -20,7 +20,7 @@ #define APP_CONFIG_H // ---- Lighting Example App Config ---- - +#define APP_TASK_NAME "APP" #define APP_ON_OFF_BUTTON BTN_SW4 #define APP_FUNCTION_BUTTON BTN_SW5 #define APP_LEVEL_BUTTON BTN_SW1 diff --git a/examples/lighting-app/qpg/src/AppTask.cpp b/examples/lighting-app/qpg/src/AppTask.cpp index 7af78f1dfe1253..f422ee32a7f17b 100644 --- a/examples/lighting-app/qpg/src/AppTask.cpp +++ b/examples/lighting-app/qpg/src/AppTask.cpp @@ -54,18 +54,28 @@ using namespace chip::DeviceLayer; #define APP_TASK_PRIORITY 2 #define APP_EVENT_QUEUE_SIZE 10 -static TaskHandle_t sAppTaskHandle; -static QueueHandle_t sAppEventQueue; +namespace { +TaskHandle_t sAppTaskHandle; +QueueHandle_t sAppEventQueue; -static bool sIsThreadProvisioned = false; -static bool sIsThreadEnabled = false; -static bool sHaveBLEConnections = false; +bool sIsThreadProvisioned = false; +bool sIsThreadEnabled = false; +bool sHaveBLEConnections = false; +bool sHaveServiceConnectivity = false; + +uint8_t sAppEventQueueBuffer[APP_EVENT_QUEUE_SIZE * sizeof(AppEvent)]; + +StaticQueue_t sAppEventQueueStruct; + +StackType_t appStack[APP_TASK_STACK_SIZE / sizeof(StackType_t)]; +StaticTask_t appTaskStruct; +} // namespace AppTask AppTask::sAppTask; CHIP_ERROR AppTask::StartAppTask() { - sAppEventQueue = xQueueCreate(APP_EVENT_QUEUE_SIZE, sizeof(AppEvent)); + sAppEventQueue = xQueueCreateStatic(APP_EVENT_QUEUE_SIZE, sizeof(AppEvent), sAppEventQueueBuffer, &sAppEventQueueStruct); if (sAppEventQueue == NULL) { ChipLogError(NotSpecified, "Failed to allocate app event queue"); @@ -73,9 +83,10 @@ CHIP_ERROR AppTask::StartAppTask() } // Start App task. - if (xTaskCreate(AppTaskMain, "APP", APP_TASK_STACK_SIZE / sizeof(StackType_t), NULL, 1, &sAppTaskHandle) != pdPASS) + sAppTaskHandle = xTaskCreateStatic(AppTaskMain, APP_TASK_NAME, ArraySize(appStack), NULL, 1, appStack, &appTaskStruct); + if (sAppTaskHandle != NULL) { - return CHIP_ERROR_NO_MEMORY; + return CHIP_NO_ERROR; } return CHIP_NO_ERROR; @@ -426,6 +437,10 @@ void AppTask::PostEvent(const AppEvent * aEvent) ChipLogError(NotSpecified, "Failed to post event to app task event queue"); } } + else + { + ChipLogError(NotSpecified, "Event Queue is NULL should never happen"); + } } void AppTask::DispatchEvent(AppEvent * aEvent) diff --git a/examples/lock-app/qpg/include/AppConfig.h b/examples/lock-app/qpg/include/AppConfig.h index 472a6e7d2c364d..24429e873e6ac3 100644 --- a/examples/lock-app/qpg/include/AppConfig.h +++ b/examples/lock-app/qpg/include/AppConfig.h @@ -20,7 +20,7 @@ #define APP_CONFIG_H // ---- Lock Example App Config ---- - +#define APP_TASK_NAME "APP" #define APP_LOCK_BUTTON BTN_SW4 #define APP_FUNCTION_BUTTON BTN_SW5 diff --git a/examples/lock-app/qpg/src/AppTask.cpp b/examples/lock-app/qpg/src/AppTask.cpp index 4b4cb900e9fb8b..95434ff2df70bf 100644 --- a/examples/lock-app/qpg/src/AppTask.cpp +++ b/examples/lock-app/qpg/src/AppTask.cpp @@ -1,7 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors - * Copyright (c) 2019 Google LLC. + * Copyright (c) 2020-2021 Project CHIP Authors * All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -55,18 +54,27 @@ using namespace chip::DeviceLayer; #define APP_TASK_PRIORITY 2 #define APP_EVENT_QUEUE_SIZE 10 -static TaskHandle_t sAppTaskHandle; -static QueueHandle_t sAppEventQueue; +namespace { +TaskHandle_t sAppTaskHandle; +QueueHandle_t sAppEventQueue; -static bool sIsThreadProvisioned = false; -static bool sIsThreadEnabled = false; -static bool sHaveBLEConnections = false; +bool sIsThreadProvisioned = false; +bool sIsThreadEnabled = false; +bool sHaveBLEConnections = false; + +uint8_t sAppEventQueueBuffer[APP_EVENT_QUEUE_SIZE * sizeof(AppEvent)]; + +StaticQueue_t sAppEventQueueStruct; + +StackType_t appStack[APP_TASK_STACK_SIZE / sizeof(StackType_t)]; +StaticTask_t appTaskStruct; +} // namespace AppTask AppTask::sAppTask; CHIP_ERROR AppTask::StartAppTask() { - sAppEventQueue = xQueueCreate(APP_EVENT_QUEUE_SIZE, sizeof(AppEvent)); + sAppEventQueue = xQueueCreateStatic(APP_EVENT_QUEUE_SIZE, sizeof(AppEvent), sAppEventQueueBuffer, &sAppEventQueueStruct); if (sAppEventQueue == NULL) { ChipLogError(NotSpecified, "Failed to allocate app event queue"); @@ -74,7 +82,8 @@ CHIP_ERROR AppTask::StartAppTask() } // Start App task. - if (xTaskCreate(AppTaskMain, "APP", APP_TASK_STACK_SIZE / sizeof(StackType_t), NULL, 1, &sAppTaskHandle) != pdPASS) + sAppTaskHandle = xTaskCreateStatic(AppTaskMain, APP_TASK_NAME, ArraySize(appStack), NULL, 1, appStack, &appTaskStruct); + if (sAppTaskHandle == NULL) { return CHIP_ERROR_NO_MEMORY; } diff --git a/examples/lock-app/qpg/src/BoltLockManager.cpp b/examples/lock-app/qpg/src/BoltLockManager.cpp index b9bb13fd321416..39a48fdbdf1981 100644 --- a/examples/lock-app/qpg/src/BoltLockManager.cpp +++ b/examples/lock-app/qpg/src/BoltLockManager.cpp @@ -26,9 +26,22 @@ BoltLockManager BoltLockManager::sLock; TimerHandle_t sLockTimer; +#if defined(CHIP_CONFIG_FREERTOS_USE_STATIC_TASK) && CHIP_CONFIG_FREERTOS_USE_STATIC_TASK +StaticTimer_t sLockTimerBuffer; +#endif CHIP_ERROR BoltLockManager::Init() { +#if defined(CHIP_CONFIG_FREERTOS_USE_STATIC_TASK) && CHIP_CONFIG_FREERTOS_USE_STATIC_TASK + sLockTimer = xTimerCreateStatic("lockTmr", // Just a text name, not used by the RTOS kernel + 1, // == default timer period (mS) + false, // no timer reload (==one-shot) + (void *) this, // init timer id = ble obj context + TimerEventHandler, // timer callback handler + &sLockTimerBuffer // static buffer for timer + + ); +#else // Create FreeRTOS sw timer for lock timer. sLockTimer = xTimerCreate("lockTmr", // Just a text name, not used by the RTOS kernel 1, // == default timer period (mS) @@ -36,7 +49,7 @@ CHIP_ERROR BoltLockManager::Init() (void *) this, // init timer id = lock obj context TimerEventHandler // timer callback handler ); - +#endif if (sLockTimer == NULL) { ChipLogProgress(NotSpecified, "sLockTimer timer create failed"); diff --git a/examples/persistent-storage/qpg/main.cpp b/examples/persistent-storage/qpg/main.cpp index e4f87f5d5d6572..ee318821fb06be 100644 --- a/examples/persistent-storage/qpg/main.cpp +++ b/examples/persistent-storage/qpg/main.cpp @@ -30,10 +30,15 @@ #include #define APP_NAME "KVS-Test" +#define APP_TASK_STACK_SIZE (3 * 1024) #define LOG_MODULE_ID 1 static TaskHandle_t sTestTaskHandle; + +StackType_t appStack[APP_TASK_STACK_SIZE / sizeof(StackType_t)]; +StaticTask_t appTaskStruct; + void TestTask(void * pvParameter) { while (1) @@ -62,7 +67,7 @@ int main(void) qvCHIP_Printf(LOG_MODULE_ID, "============================"); // Run tests - xTaskCreate(TestTask, "Test", 2048, NULL, 1, &sTestTaskHandle); + xTaskCreateStatic(TestTask, APP_NAME, 2048, NULL, 1, appStack, &appTaskStruct); qvCHIP_Printf(LOG_MODULE_ID, "Starting FreeRTOS scheduler"); vTaskStartScheduler(); diff --git a/examples/platform/qpg/project_include/OpenThreadConfig.h b/examples/platform/qpg/project_include/OpenThreadConfig.h index 559fb5592bfa7e..44610cc1ee5b96 100644 --- a/examples/platform/qpg/project_include/OpenThreadConfig.h +++ b/examples/platform/qpg/project_include/OpenThreadConfig.h @@ -58,16 +58,21 @@ #define OPENTHREAD_CONFIG_CLI_UART_RX_BUFFER_SIZE 384 #define OPENTHREAD_CONFIG_CLI_UART_TX_BUFFER_SIZE 512 -// Enable specific features -#define OPENTHREAD_CONFIG_JOINER_ENABLE 1 #define OPENTHREAD_CONFIG_NCP_HDLC_ENABLE 1 #define OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE 1 #define OPENTHREAD_CONFIG_SRP_CLIENT_ENABLE 1 #define OPENTHREAD_CONFIG_ECDSA_ENABLE 1 -// Disable unneeded features +#define OPENTHREAD_CONFIG_LOG_LEVEL_DYNAMIC_ENABLE 0 +#define OPENTHREAD_CONFIG_COAP_SECURE_API_ENABLE 0 +#define OPENTHREAD_CONFIG_DIAG_ENABLE 0 + +#define OPENTHREAD_CONFIG_CHILD_SUPERVISION_ENABLE 0 +#define OPENTHREAD_CONFIG_COAP_SECURE_API_ENABLE 0 + #define OPENTHREAD_CONFIG_COAP_API_ENABLE 0 +#define OPENTHREAD_CONFIG_JOINER_ENABLE 1 #define OPENTHREAD_CONFIG_COMMISSIONER_ENABLE 0 #define OPENTHREAD_CONFIG_UDP_FORWARD_ENABLE 0 #define OPENTHREAD_CONFIG_BORDER_ROUTER_ENABLE 0 diff --git a/src/include/platform/internal/GenericPlatformManagerImpl_FreeRTOS.cpp b/src/include/platform/internal/GenericPlatformManagerImpl_FreeRTOS.cpp index 06271f1e8d8fbf..58fbb1837d6d6f 100644 --- a/src/include/platform/internal/GenericPlatformManagerImpl_FreeRTOS.cpp +++ b/src/include/platform/internal/GenericPlatformManagerImpl_FreeRTOS.cpp @@ -52,7 +52,12 @@ CHIP_ERROR GenericPlatformManagerImpl_FreeRTOS::_InitChipStack(void) mEventLoopTask = NULL; mChipTimerActive = false; - mChipStackLock = xSemaphoreCreateMutex(); +#if defined(CHIP_CONFIG_FREERTOS_USE_STATIC_SEMAPHORE) && CHIP_CONFIG_FREERTOS_USE_STATIC_SEMAPHORE + mChipStackLock = xSemaphoreCreateMutexStatic(&mChipStackLockMutex); +#else + mChipStackLock = xSemaphoreCreateMutex(); +#endif // CHIP_CONFIG_FREERTOS_USE_STATIC_SEMAPHORE + if (mChipStackLock == NULL) { ChipLogError(DeviceLayer, "Failed to create CHIP stack lock"); diff --git a/src/include/platform/internal/GenericPlatformManagerImpl_FreeRTOS.h b/src/include/platform/internal/GenericPlatformManagerImpl_FreeRTOS.h index 616970d9763af7..4b701546711ae7 100644 --- a/src/include/platform/internal/GenericPlatformManagerImpl_FreeRTOS.h +++ b/src/include/platform/internal/GenericPlatformManagerImpl_FreeRTOS.h @@ -99,6 +99,10 @@ class GenericPlatformManagerImpl_FreeRTOS : public GenericPlatformManagerImpl -#include -#include -#include -#include - -#if CHIP_CONFIG_MEMORY_MGMT_MALLOC -#include -#endif - -#include - -#if __cplusplus -extern "C" { -#endif - -#ifndef LWIP_NOASSERT -#ifdef DEBUG -#define LWIP_PLATFORM_ASSERT(MSG) assert(MSG) -#else -#define LWIP_PLATFORM_ASSERT(MSG) -#endif -#else -#define LWIP_PLATFORM_ASSERT(message) -#endif - -#ifndef BYTE_ORDER -#if defined(__LITTLE_ENDIAN__) -#define BYTE_ORDER LITTLE_ENDIAN -#elif defined(__BIG_ENDIAN__) -#define BYTE_ORDER BIG_ENDIAN -#elif defined(__BYTE_ORDER__) -#define BYTE_ORDER __BYTE_ORDER__ -#endif -#endif // BYTE_ORDER - -#define PACK_STRUCT_STRUCT __attribute__((__packed__)) -#define PACK_STRUCT_FIELD(x) x - -extern void LwIPLog(const char * fmt, ...); -#define LWIP_PLATFORM_DIAG(x) \ - do \ - { \ - LwIPLog x; \ - } while (0) - -// Place LwIP pools into their own subsections of .bss to make it easier to see -// their sizes in the linker map file. -extern uint8_t __attribute__((section(".bss.lwip_ND6_QUEUE"))) memp_memory_ND6_QUEUE_base[]; -extern uint8_t __attribute__((section(".bss.lwip_IP6_REASSDATA"))) memp_memory_IP6_REASSDATA_base[]; -extern uint8_t __attribute__((section(".bss.lwip_RAW_PCB"))) memp_memory_RAW_PCB_base[]; -extern uint8_t __attribute__((section(".bss.lwip_TCP_SEG"))) memp_memory_TCP_SEG_base[]; -extern uint8_t __attribute__((section(".bss.lwip_PBUF_POOL"))) memp_memory_PBUF_POOL_base[]; -extern uint8_t __attribute__((section(".bss.lwip_FRAG_PBUF"))) memp_memory_FRAG_PBUF_base[]; -extern uint8_t __attribute__((section(".bss.lwip_PBUF"))) memp_memory_PBUF_base[]; -extern uint8_t __attribute__((section(".bss.lwip_TCP_PCB_LISTEN"))) memp_memory_TCP_PCB_LISTEN_base[]; -extern uint8_t __attribute__((section(".bss.lwip_REASSDATA"))) memp_memory_REASSDATA_base[]; -extern uint8_t __attribute__((section(".bss.lwip_UDP_PCB"))) memp_memory_UDP_PCB_base[]; -extern uint8_t __attribute__((section(".bss.lwip_MLD6_GROUP"))) memp_memory_MLD6_GROUP_base[]; -extern uint8_t __attribute__((section(".bss.lwip_IGMP_GROUP"))) memp_memory_IGMP_GROUP_base[]; -extern uint8_t __attribute__((section(".bss.lwip_TCP_PCB"))) memp_memory_TCP_PCB_base[]; -extern uint8_t __attribute__((section(".bss.lwip_SYS_TIMEOUT"))) memp_memory_SYS_TIMEOUT_base[]; - -#if __cplusplus -} -#endif - -#endif /* CHIP_LWIP_FREERTOS_ARCH_CC_H */ diff --git a/src/lwip/qpg/arch/perf.h b/src/lwip/qpg/arch/perf.h deleted file mode 100644 index 5c15942730ca8f..00000000000000 --- a/src/lwip/qpg/arch/perf.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2020 Project CHIP Authors - * Copyright (c) 2018-2019 Google LLC. - * - * 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. - */ - -/* - * - * Description: - * This file defines processor-architecture-specific constants, - * interfaces and types required for LwIP performance - * measurement. - * - */ - -#ifndef CHIP_LWIP_FREERTOS_ARCH_PERF_H -#define CHIP_LWIP_FREERTOS_ARCH_PERF_H - -#define PERF_START -#define PERF_STOP(s) - -#endif /* CHIP_LWIP_FREERTOS_ARCH_PERF_H */ diff --git a/src/lwip/qpg/lwipopts.h b/src/lwip/qpg/lwipopts.h deleted file mode 100644 index 6276c099b38bd5..00000000000000 --- a/src/lwip/qpg/lwipopts.h +++ /dev/null @@ -1,166 +0,0 @@ -/* - * - * Copyright (c) 2020 Project CHIP Authors - * Copyright (c) 2018 Nest Labs, Inc. - * - * 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 - * Compile-time configuration for LwIP on QPG platforms. - * - */ - -#ifndef __LWIPOPTS_H__ -#define __LWIPOPTS_H__ - -#include - -#define NO_SYS 0 -#define MEM_ALIGNMENT (4) -#define MEMP_NUM_TCP_SEG (TCP_SND_QUEUELEN + 1) -#define LWIP_TIMEVAL_PRIVATE (0) -#define MEM_LIBC_MALLOC (0) -#define LWIP_COMPAT_MUTEX (0) -#define SYS_LIGHTWEIGHT_PROT (1) -#define LWIP_AUTOIP (0) -#define LWIP_DHCP_AUTOIP_COOP (0) -#define LWIP_SOCKET_SET_ERRNO 0 -#define IP_REASS_MAX_PBUFS 0 -#define IP_REASSEMBLY 0 -#define MEMP_NUM_REASSDATA 0 -#define LWIP_SO_RCVTIMEO 0 -#define SO_REUSE (1) -#define LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS (1) -#define LWIP_STATS (0) -#define LWIP_TCPIP_CORE_LOCKING 1 -#define TCP_QUEUE_OOSEQ 0 -#define ARP_QUEUEING (0) - -#define LWIP_SOCKET 0 - -#define LWIP_RAW 0 -#define MEMP_NUM_RAW_PCB 0 -#ifdef INET_CONFIG_ENABLE_TCP_ENDPOINT -#define LWIP_TCP 1 -#else -#define LWIP_TCP 0 -#define MEMP_NUM_TCP_PCB 0 -#endif // INET_CONFIG_ENABLE_TCP_ENDPOINT - -// TODO: verify count -#define MEMP_NUM_UDP_PCB (7) - -// TODO: not sure why this is disabled -#define LWIP_HAVE_LOOPIF (0) -#define LWIP_NETIF_LOOPBACK (0) - -#define MEMP_NUM_NETCONN (0) - -#define LWIP_IPV4 0 -#define LWIP_IPV6 1 -#define LWIP_ARP (0) -#define LWIP_DNS (0) -#define LWIP_ICMP (0) -#define LWIP_IGMP (0) -#define LWIP_DHCP (0) -#define LWIP_IPV6_REASS (0) -#define LWIP_IPV6_DHCP6 0 -#define LWIP_IPV6_AUTOCONFIG (0) -#define LWIP_IPV6_ROUTER_SUPPORT 0 -#define LWIP_ND6_LISTEN_RA 0 - -#define LWIP_ND6_NUM_NEIGHBORS (0) -#define LWIP_ND6_NUM_DESTINATIONS (0) -#define LWIP_ND6_NUM_PREFIXES (0) -#define LWIP_ND6_NUM_ROUTERS (0) -#define LWIP_ND6_MAX_MULTICAST_SOLICIT (0) -#define LWIP_ND6_MAX_UNICAST_SOLICIT (0) -#define LWIP_ND6_MAX_NEIGHBOR_ADVERTISEMENT (0) -#define LWIP_ND6_TCP_REACHABILITY_HINTS (0) - -#define MEMP_SEPARATE_POOLS (1) -#define LWIP_PBUF_FROM_CUSTOM_POOLS (0) -#define MEMP_USE_CUSTOM_POOLS (0) -#define PBUF_POOL_SIZE (6) -#define PBUF_POOL_BUFSIZE (1280) -#define PBUF_CUSTOM_POOL_IDX_START (MEMP_PBUF_POOL_SMALL) -#define PBUF_CUSTOM_POOL_IDX_END (MEMP_PBUF_POOL_LARGE) - -#define TCP_MSS (1152) -#define TCP_SND_BUF (2 * TCP_MSS) -#define TCP_LISTEN_BACKLOG (1) - -#define ETH_PAD_SIZE (0) -#define SUB_ETHERNET_HEADER_SPACE (0) -#define PBUF_LINK_HLEN (0) - -#define TCPIP_THREAD_STACKSIZE (2048) -#define TCPIP_THREAD_PRIO (2) - -#define NETIF_MAX_HWADDR_LEN 8U - -#define LWIP_IPV6_NUM_ADDRESSES 5 - -#define LWIP_IPV6_ND 0 -#define LWIP_ND6_QUEUEING 0 - -#define LWIP_MULTICAST_PING 0 - -#define TCPIP_MBOX_SIZE 6 -#define DEFAULT_RAW_RECVMBOX_SIZE 6 -#define DEFAULT_UDP_RECVMBOX_SIZE 6 -#define DEFAULT_TCP_RECVMBOX_SIZE 6 - -// TODO: make LWIP_DEBUG conditional on build type - -#ifndef LWIP_DEBUG -#define LWIP_DEBUG 0 -#endif - -#define MEMP_OVERFLOW_CHECK (0) -#define MEMP_SANITY_CHECK (0) -#define MEM_DEBUG (LWIP_DBG_OFF) -#define MEMP_DEBUG (LWIP_DBG_OFF) -#define PBUF_DEBUG (LWIP_DBG_OFF) -#define API_LIB_DEBUG (LWIP_DBG_OFF) -#define API_MSG_DEBUG (LWIP_DBG_OFF) -#define TCPIP_DEBUG (LWIP_DBG_OFF) -#define NETIF_DEBUG (LWIP_DBG_OFF) -#define SOCKETS_DEBUG (LWIP_DBG_OFF) -#define DEMO_DEBUG (LWIP_DBG_OFF) -#define DHCP_DEBUG (LWIP_DBG_OFF) -#define AUTOIP_DEBUG (LWIP_DBG_OFF) -#define ETHARP_DEBUG (LWIP_DBG_OFF) -#define IP_DEBUG (LWIP_DBG_OFF) -#define IP_REASS_DEBUG (LWIP_DBG_OFF) -#define IP6_DEBUG (LWIP_DBG_OFF) -#define RAW_DEBUG (LWIP_DBG_OFF) -#define ICMP_DEBUG (LWIP_DBG_OFF) -#define UDP_DEBUG (LWIP_DBG_OFF) -#define TCP_DEBUG (LWIP_DBG_OFF) -#define TCP_INPUT_DEBUG (LWIP_DBG_OFF) -#define TCP_OUTPUT_DEBUG (LWIP_DBG_OFF) -#define TCP_RTO_DEBUG (LWIP_DBG_OFF) -#define TCP_CWND_DEBUG (LWIP_DBG_OFF) -#define TCP_WND_DEBUG (LWIP_DBG_OFF) -#define TCP_FR_DEBUG (LWIP_DBG_OFF) -#define TCP_QLEN_DEBUG (LWIP_DBG_OFF) -#define TCP_RST_DEBUG (LWIP_DBG_OFF) -#define PPP_DEBUG (LWIP_DBG_OFF) - -#define LWIP_DBG_TYPES_ON \ - (LWIP_DBG_ON | LWIP_DBG_TRACE) /* (LWIP_DBG_ON|LWIP_DBG_TRACE|LWIP_DBG_STATE|LWIP_DBG_FRESH|LWIP_DBG_HALT) */ - -#endif /* __LWIPOPTS_H__ */ diff --git a/src/lwip/qpg/lwippools.h b/src/lwip/qpg/lwippools.h deleted file mode 100644 index 2c42ac043074da..00000000000000 --- a/src/lwip/qpg/lwippools.h +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright (c) 2020 Project CHIP Authors - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ diff --git a/src/platform/FreeRTOS/GenericThreadStackManagerImpl_FreeRTOS.cpp b/src/platform/FreeRTOS/GenericThreadStackManagerImpl_FreeRTOS.cpp index 7440b2739e283f..ab8af54c569dc5 100644 --- a/src/platform/FreeRTOS/GenericThreadStackManagerImpl_FreeRTOS.cpp +++ b/src/platform/FreeRTOS/GenericThreadStackManagerImpl_FreeRTOS.cpp @@ -43,8 +43,12 @@ template class GenericThreadStackManagerImpl_FreeRTOS; template CHIP_ERROR GenericThreadStackManagerImpl_FreeRTOS::DoInit(void) { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; +#if defined(CHIP_CONFIG_FREERTOS_USE_STATIC_SEMAPHORE) && CHIP_CONFIG_FREERTOS_USE_STATIC_SEMAPHORE + mThreadStackLock = xSemaphoreCreateMutexStatic(&mThreadStackLockMutex); +#else mThreadStackLock = xSemaphoreCreateMutex(); +#endif // CHIP_CONFIG_FREERTOS_USE_STATIC_SEMAPHORE if (mThreadStackLock == NULL) { diff --git a/src/platform/FreeRTOS/GenericThreadStackManagerImpl_FreeRTOS.h b/src/platform/FreeRTOS/GenericThreadStackManagerImpl_FreeRTOS.h index 2df83e28fb0ab4..870fcf2ed80657 100644 --- a/src/platform/FreeRTOS/GenericThreadStackManagerImpl_FreeRTOS.h +++ b/src/platform/FreeRTOS/GenericThreadStackManagerImpl_FreeRTOS.h @@ -84,6 +84,10 @@ class GenericThreadStackManagerImpl_FreeRTOS StackType_t mThreadStack[CHIP_DEVICE_CONFIG_THREAD_TASK_STACK_SIZE / sizeof(StackType_t)]; StaticTask_t mThreadTaskStruct; #endif + +#if defined(CHIP_CONFIG_FREERTOS_USE_STATIC_SEMAPHORE) && CHIP_CONFIG_FREERTOS_USE_STATIC_SEMAPHORE + StaticSemaphore_t mThreadStackLockMutex; +#endif }; // Instruct the compiler to instantiate the template only when explicitly told to do so. diff --git a/src/platform/qpg/BLEManagerImpl.cpp b/src/platform/qpg/BLEManagerImpl.cpp index 9b353b5949a1e6..79837d439e2874 100644 --- a/src/platform/qpg/BLEManagerImpl.cpp +++ b/src/platform/qpg/BLEManagerImpl.cpp @@ -53,6 +53,7 @@ namespace { // FreeeRTOS sw timer TimerHandle_t sbleAdvTimeoutTimer; +StaticTimer_t sbleAdvTimeoutTimerBuffer; // Full service UUID - CHIP_BLE_SVC_ID - taken from BleUUID.h header const uint8_t chipUUID_CHIPoBLE_Service[CHIP_ADV_SHORT_UUID_LEN] = { 0xFF, 0xF6 }; @@ -94,12 +95,24 @@ CHIP_ERROR BLEManagerImpl::_Init() qvCHIP_BleInit(&appCbacks); // Create FreeRTOS sw timer for BLE timeouts and interval change. +#if defined(CHIP_CONFIG_FREERTOS_USE_STATIC_TASK) && CHIP_CONFIG_FREERTOS_USE_STATIC_TASK + sbleAdvTimeoutTimer = xTimerCreateStatic("BleAdvTimer", // Just a text name, not used by the RTOS kernel + 1, // == default timer period (mS) + false, // no timer reload (==one-shot) + (void *) this, // init timer id = ble obj context + BleAdvTimeoutHandler, // timer callback handler + &sbleAdvTimeoutTimerBuffer // static buffer for timer + + ); + +#else sbleAdvTimeoutTimer = xTimerCreate("BleAdvTimer", // Just a text name, not used by the RTOS kernel 1, // == default timer period (mS) false, // no timer reload (==one-shot) (void *) this, // init timer id = ble obj context BleAdvTimeoutHandler // timer callback handler ); +#endif VerifyOrExit(sbleAdvTimeoutTimer != NULL, err = CHIP_ERROR_INCORRECT_STATE); PlatformMgr().ScheduleWork(DriveBLEState, 0); diff --git a/src/platform/qpg/CHIPPlatformConfig.h b/src/platform/qpg/CHIPPlatformConfig.h index 5d483e24eadff8..f36d4adecc06a8 100644 --- a/src/platform/qpg/CHIPPlatformConfig.h +++ b/src/platform/qpg/CHIPPlatformConfig.h @@ -121,3 +121,15 @@ #ifndef CHIP_CONFIG_ENABLE_CASE_RESPONDER #define CHIP_CONFIG_ENABLE_CASE_RESPONDER 1 #endif // CHIP_CONFIG_ENABLE_CASE_RESPONDER + +#ifndef CHIP_CONFIG_FREERTOS_USE_STATIC_QUEUE +#define CHIP_CONFIG_FREERTOS_USE_STATIC_QUEUE 1 +#endif + +#ifndef CHIP_CONFIG_FREERTOS_USE_STATIC_TASK +#define CHIP_CONFIG_FREERTOS_USE_STATIC_TASK 1 +#endif + +#ifndef CHIP_CONFIG_FREERTOS_USE_STATIC_SEMAPHORE +#define CHIP_CONFIG_FREERTOS_USE_STATIC_SEMAPHORE 1 +#endif diff --git a/third_party/qpg_sdk/BUILD.gn b/third_party/qpg_sdk/BUILD.gn index 1f3729346b3e54..1de010bfe1364b 100755 --- a/third_party/qpg_sdk/BUILD.gn +++ b/third_party/qpg_sdk/BUILD.gn @@ -34,6 +34,7 @@ group("qpg_sdk") { config("qpg_freertos_config") { include_dirs = [ "${chip_root}/third_party/qpg_sdk/repo/qpg6100/comps/gpFreeRTOS/config", + "${chip_root}/third_party/qpg_sdk/repo/qpg6100/comps/lwip", "${freertos_root}/repo/portable/GCC/ARM_CM3", ] } @@ -41,7 +42,7 @@ config("qpg_freertos_config") { freertos_target("freertos") { sources = [ "${freertos_root}/repo/portable/GCC/ARM_CM3/port.c", - "${freertos_root}/repo/portable/MemMang/heap_3.c", + # "${freertos_root}/repo/portable/MemMang/heap_3.c", ] public_configs = [ ":qpg_freertos_config" ] diff --git a/third_party/qpg_sdk/repo b/third_party/qpg_sdk/repo index 7ca242a064f2db..184c57602e94c7 160000 --- a/third_party/qpg_sdk/repo +++ b/third_party/qpg_sdk/repo @@ -1 +1 @@ -Subproject commit 7ca242a064f2dbe25fec136aa56934aeb0cf418c +Subproject commit 184c57602e94c71ff5bda6f2e2811b1e95773800 From ef9c86c0150d760fe7767dc998b0a0aa0f35154d Mon Sep 17 00:00:00 2001 From: michalbudzon-q <91474873+michalbudzon-q@users.noreply.github.com> Date: Mon, 29 Nov 2021 21:03:43 +0100 Subject: [PATCH 06/42] Fix for 'Verhoeff code is not using tables as const causing unnecessary RAM use #9564' (#11726) --- src/lib/support/verhoeff/Verhoeff.cpp | 2 +- src/lib/support/verhoeff/Verhoeff.h | 26 ++++++++++++------------- src/lib/support/verhoeff/Verhoeff10.cpp | 4 ++-- src/lib/support/verhoeff/Verhoeff16.cpp | 4 ++-- src/lib/support/verhoeff/Verhoeff32.cpp | 8 ++++---- src/lib/support/verhoeff/Verhoeff36.cpp | 10 +++++----- 6 files changed, 27 insertions(+), 27 deletions(-) diff --git a/src/lib/support/verhoeff/Verhoeff.cpp b/src/lib/support/verhoeff/Verhoeff.cpp index 999e081665e16a..90f6869e75cb40 100644 --- a/src/lib/support/verhoeff/Verhoeff.cpp +++ b/src/lib/support/verhoeff/Verhoeff.cpp @@ -52,7 +52,7 @@ int Verhoeff::DihedralInvert(int val, int n) return val; } -int Verhoeff::Permute(int val, uint8_t * permTable, int permTableLen, uint64_t iterCount) +int Verhoeff::Permute(int val, const uint8_t * permTable, int permTableLen, uint64_t iterCount) { val = val % permTableLen; if (iterCount == 0) diff --git a/src/lib/support/verhoeff/Verhoeff.h b/src/lib/support/verhoeff/Verhoeff.h index ed4fe6c194bae5..94beafe556e481 100644 --- a/src/lib/support/verhoeff/Verhoeff.h +++ b/src/lib/support/verhoeff/Verhoeff.h @@ -66,8 +66,8 @@ class DLL_EXPORT Verhoeff10 Verhoeff10() = delete; ~Verhoeff10() = delete; - static uint8_t sMultiplyTable[]; - static uint8_t sPermTable[]; + static const uint8_t sMultiplyTable[]; + static const uint8_t sPermTable[]; }; // Verhoeff16 -- Implements Verhoeff's check-digit algorithm for base-16 (hex) strings. @@ -103,8 +103,8 @@ class DLL_EXPORT Verhoeff16 Verhoeff16() = delete; ~Verhoeff16() = delete; - static uint8_t sMultiplyTable[]; - static uint8_t sPermTable[]; + static const uint8_t sMultiplyTable[]; + static const uint8_t sPermTable[]; }; // Verhoeff32 -- Implements Verhoeff's check-digit algorithm for base-32 strings. @@ -142,10 +142,10 @@ class DLL_EXPORT Verhoeff32 Verhoeff32() = delete; ~Verhoeff32() = delete; - static uint8_t sMultiplyTable[]; - static uint8_t sPermTable[]; - static int8_t sCharToValTable[]; - static char sValToCharTable[]; + static const uint8_t sMultiplyTable[]; + static const uint8_t sPermTable[]; + static const int8_t sCharToValTable[]; + static const char sValToCharTable[]; }; // Verhoeff36 -- Implements Verhoeff's check-digit algorithm for base-36 strings. @@ -177,10 +177,10 @@ class DLL_EXPORT Verhoeff36 Verhoeff36() = delete; ~Verhoeff36() = delete; - static uint8_t sMultiplyTable[]; - static uint8_t sPermTable[]; - static int8_t sCharToValTable[]; - static char sValToCharTable[]; + static const uint8_t sMultiplyTable[]; + static const uint8_t sPermTable[]; + static const int8_t sCharToValTable[]; + static const char sValToCharTable[]; }; // Verhoeff -- Implements core functions for Verhoeff's algorithm. @@ -190,5 +190,5 @@ class Verhoeff public: static int DihedralMultiply(int x, int y, int n); static int DihedralInvert(int val, int n); - static int Permute(int val, uint8_t * permTable, int permTableLen, uint64_t iterCount); + static int Permute(int val, const uint8_t * permTable, int permTableLen, uint64_t iterCount); }; diff --git a/src/lib/support/verhoeff/Verhoeff10.cpp b/src/lib/support/verhoeff/Verhoeff10.cpp index 037d37b43c6361..dd025a28cdabb9 100644 --- a/src/lib/support/verhoeff/Verhoeff10.cpp +++ b/src/lib/support/verhoeff/Verhoeff10.cpp @@ -30,7 +30,7 @@ #ifndef VERHOEFF10_NO_MULTIPLY_TABLE -uint8_t Verhoeff10::sMultiplyTable[] = { +const uint8_t Verhoeff10::sMultiplyTable[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 0, 6, 7, 8, 9, 5, 2, 3, 4, 0, 1, 7, 8, 9, 5, 6, 3, 4, 0, 1, 2, 8, 9, 5, 6, 7, 4, 0, 1, 2, 3, 9, 5, 6, 7, 8, 5, 9, 8, 7, 6, 0, 4, 3, 2, 1, 6, 5, 9, 8, 7, 1, 0, 4, 3, 2, 7, 6, 5, 9, 8, 2, 1, 0, 4, 3, 8, 7, 6, 5, 9, 3, 2, 1, 0, 4, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, @@ -38,7 +38,7 @@ uint8_t Verhoeff10::sMultiplyTable[] = { #endif -uint8_t Verhoeff10::sPermTable[] = { 1, 5, 7, 6, 2, 8, 3, 0, 9, 4 }; +const uint8_t Verhoeff10::sPermTable[] = { 1, 5, 7, 6, 2, 8, 3, 0, 9, 4 }; char Verhoeff10::ComputeCheckChar(const char * str) { diff --git a/src/lib/support/verhoeff/Verhoeff16.cpp b/src/lib/support/verhoeff/Verhoeff16.cpp index 9542aa7924171f..849a89f628f685 100644 --- a/src/lib/support/verhoeff/Verhoeff16.cpp +++ b/src/lib/support/verhoeff/Verhoeff16.cpp @@ -29,7 +29,7 @@ #ifndef VERHOEFF16_NO_MULTIPLY_TABLE -uint8_t Verhoeff16::sMultiplyTable[] = { +const uint8_t Verhoeff16::sMultiplyTable[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 1, 2, 3, 4, 5, 6, 7, 0, 9, 10, 11, 12, 13, 14, 15, 8, 2, 3, 4, 5, 6, 7, 0, 1, 10, 11, 12, 13, 14, 15, 8, 9, 3, 4, 5, 6, 7, 0, 1, 2, 11, 12, 13, 14, 15, 8, 9, 10, 4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15, 8, 9, 10, 11, 5, 6, 7, 0, 1, 2, 3, 4, 13, 14, 15, 8, 9, 10, 11, 12, @@ -42,7 +42,7 @@ uint8_t Verhoeff16::sMultiplyTable[] = { #endif // VERHOEFF16_NO_MULTIPLY_TABLE -uint8_t Verhoeff16::sPermTable[] = { 4, 7, 5, 14, 8, 12, 15, 0, 2, 11, 3, 13, 10, 6, 9, 1 }; +const uint8_t Verhoeff16::sPermTable[] = { 4, 7, 5, 14, 8, 12, 15, 0, 2, 11, 3, 13, 10, 6, 9, 1 }; char Verhoeff16::ComputeCheckChar(const char * str) { diff --git a/src/lib/support/verhoeff/Verhoeff32.cpp b/src/lib/support/verhoeff/Verhoeff32.cpp index a023164cde0c39..dc13a5fa9df955 100644 --- a/src/lib/support/verhoeff/Verhoeff32.cpp +++ b/src/lib/support/verhoeff/Verhoeff32.cpp @@ -32,7 +32,7 @@ #ifndef VERHOEFF32_NO_MULTIPLY_TABLE -uint8_t Verhoeff32::sMultiplyTable[] = { +const uint8_t Verhoeff32::sMultiplyTable[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 16, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 16, 17, @@ -69,19 +69,19 @@ uint8_t Verhoeff32::sMultiplyTable[] = { #endif // VERHOEFF32_NO_MULTIPLY_TABLE -uint8_t Verhoeff32::sPermTable[] = { +const uint8_t Verhoeff32::sPermTable[] = { // Detects all single digit and adjacent transposition errors, and 97.076613% of jump transposition errors. 7, 2, 1, 30, 16, 20, 27, 11, 31, 6, 8, 13, 29, 5, 10, 21, 22, 3, 24, 0, 23, 25, 12, 9, 28, 14, 4, 15, 17, 18, 19, 26, }; -int8_t Verhoeff32::sCharToValTable[] = { +const int8_t Verhoeff32::sCharToValTable[] = { // NOTE: table starts at ASCII 30h 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -1, -1, -1, -1, -1, -1, -1, 10, 11, 12, 13, 14, 15, 16, 17, -1, 18, 19, 20, 21, 22, -1, 23, -1, 24, 25, 26, 27, 28, 29, 30, 31, -1, -1, -1, -1, -1, -1, -1, 10, 11, 12, 13, 14, 15, 16, 17, -1, 18, 19, 20, 21, 22, -1, 23, -1, 24, 25, 26, 27, 28, 29, 30, 31 }; -char Verhoeff32::sValToCharTable[] = "0123456789ABCDEFGHJKLMNPRSTUVWXY"; +const char Verhoeff32::sValToCharTable[] = "0123456789ABCDEFGHJKLMNPRSTUVWXY"; char Verhoeff32::ComputeCheckChar(const char * str) { diff --git a/src/lib/support/verhoeff/Verhoeff36.cpp b/src/lib/support/verhoeff/Verhoeff36.cpp index 0e133c5d110aae..b0131421886fbd 100644 --- a/src/lib/support/verhoeff/Verhoeff36.cpp +++ b/src/lib/support/verhoeff/Verhoeff36.cpp @@ -31,7 +31,7 @@ #ifndef VERHOEFF36_NO_MULTIPLY_TABLE -uint8_t Verhoeff36::sMultiplyTable[] = { +const uint8_t Verhoeff36::sMultiplyTable[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 0, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 18, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 0, 1, 20, 21, 22, 23, 24, 25, @@ -77,17 +77,17 @@ uint8_t Verhoeff36::sMultiplyTable[] = { #endif // VERHOEFF36_NO_MULTIPLY_TABLE -uint8_t Verhoeff36::sPermTable[] = { 29, 0, 32, 11, 35, 20, 7, 27, 2, 4, 19, 28, 30, 1, 5, 12, 3, 9, - 16, 22, 6, 33, 8, 24, 26, 21, 14, 10, 34, 31, 15, 25, 17, 13, 23, 18 }; +const uint8_t Verhoeff36::sPermTable[] = { 29, 0, 32, 11, 35, 20, 7, 27, 2, 4, 19, 28, 30, 1, 5, 12, 3, 9, + 16, 22, 6, 33, 8, 24, 26, 21, 14, 10, 34, 31, 15, 25, 17, 13, 23, 18 }; -int8_t Verhoeff36::sCharToValTable[] = { +const int8_t Verhoeff36::sCharToValTable[] = { // NOTE: table starts at ASCII 30h 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -1, -1, -1, -1, -1, -1, -1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, -1, -1, -1, -1, -1, -1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35 }; -char Verhoeff36::sValToCharTable[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; +const char Verhoeff36::sValToCharTable[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; char Verhoeff36::ComputeCheckChar(const char * str) { From 800bd2309a9712f92c2406b45a463c2dadef8ad1 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Mon, 29 Nov 2021 15:06:29 -0500 Subject: [PATCH 07/42] Add checking for correctness of error codes to YAML tests. (#12306) For now, uses errorWrongValue in tests where the wrong error code is returned by the SDK. --- .../templates/partials/test_cluster.zapt | 16 +- src/app/tests/suites/TestCluster.yaml | 62 +- .../tests/suites/TestModeSelectCluster.yaml | 2 +- .../suites/certification/Test_TC_BI_1_1.yaml | 2 +- .../suites/certification/Test_TC_BI_2_1.yaml | 6 +- .../certification/Test_TC_BOOL_1_1.yaml | 2 +- .../certification/Test_TC_BOOL_2_1.yaml | 2 +- .../suites/certification/Test_TC_CC_1_1.yaml | 4 +- .../suites/certification/Test_TC_CC_2_1.yaml | 78 +- .../certification/Test_TC_DIAGTH_1_1.yaml | 4 +- .../suites/certification/Test_TC_EMR_1_1.yaml | 2 +- .../suites/certification/Test_TC_FLW_1_1.yaml | 2 +- .../suites/certification/Test_TC_FLW_2_1.yaml | 8 +- .../suites/certification/Test_TC_ILL_1_1.yaml | 2 +- .../suites/certification/Test_TC_LVL_1_1.yaml | 4 +- .../suites/certification/Test_TC_MC_1_1.yaml | 4 +- .../suites/certification/Test_TC_MC_3_1.yaml | 2 +- .../suites/certification/Test_TC_MC_3_7.yaml | 2 +- .../suites/certification/Test_TC_OCC_1_1.yaml | 2 +- .../suites/certification/Test_TC_OCC_2_1.yaml | 6 +- .../suites/certification/Test_TC_OO_1_1.yaml | 4 +- .../suites/certification/Test_TC_OO_2_1.yaml | 4 +- .../suites/certification/Test_TC_PCC_1_1.yaml | 4 +- .../suites/certification/Test_TC_PCC_2_1.yaml | 38 +- .../suites/certification/Test_TC_PRS_1_1.yaml | 10 +- .../suites/certification/Test_TC_PRS_2_1.yaml | 18 +- .../suites/certification/Test_TC_RH_1_1.yaml | 4 +- .../suites/certification/Test_TC_TM_1_1.yaml | 2 +- .../certification/Test_TC_TSTAT_1_1.yaml | 4 +- .../certification/Test_TC_TSTAT_2_1.yaml | 38 +- .../certification/Test_TC_TSUIC_1_1.yaml | 4 +- .../certification/Test_TC_WNCV_1_1.yaml | 4 +- .../certification/Test_TC_WNCV_2_1.yaml | 42 +- src/app/util/af-enums.h | 14 +- src/app/util/error-mapping.cpp | 4 +- src/darwin/Framework/CHIP/CHIPError.h | 8 +- src/darwin/Framework/CHIP/CHIPError.mm | 44 + .../CHIP/templates/partials/test_cluster.zapt | 12 +- .../Framework/CHIPTests/CHIPClustersTests.m | 496 +-- .../Framework/CHIPTests/CHIPErrorTestUtils.mm | 12 + .../chip-tool/zap-generated/test/Commands.h | 2763 ++++++++++------- 41 files changed, 2176 insertions(+), 1565 deletions(-) diff --git a/examples/chip-tool/templates/partials/test_cluster.zapt b/examples/chip-tool/templates/partials/test_cluster.zapt index db477a2268768d..7729459b86e4a0 100644 --- a/examples/chip-tool/templates/partials/test_cluster.zapt +++ b/examples/chip-tool/templates/partials/test_cluster.zapt @@ -226,17 +226,23 @@ class {{filename}}: public TestCommand void {{>failureResponse}}({{>failureArguments}}) { - {{~#unless response.error}} - {{#if optional}}(status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : {{/if}}ThrowFailureResponse(); + {{#if response.error}} + VerifyOrReturn(CheckValue("status", status, {{response.error}})); + {{#unless async}}NextTest();{{/unless}} + {{else if response.errorWrongValue}} + VerifyOrReturn(CheckConstraintNotValue("status", status, 0)); + {{#unless async}}NextTest();{{/unless}} {{else}} - {{#unless async}}NextTest();{{/unless}} - {{/unless}} + {{#if optional}}(status == EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE) ? NextTest() : {{/if}}ThrowFailureResponse(); + {{/if}} } void {{>successResponse}}({{>successArguments}}) { {{~#if response.error}} - ThrowSuccessResponse(); + ThrowSuccessResponse(); + {{else if response.errorWrongValue}} + ThrowSuccessResponse(); {{else}} {{! This block can be removed if there is a mechanism to remove the report handler}} {{#if isWaitForReport}} diff --git a/src/app/tests/suites/TestCluster.yaml b/src/app/tests/suites/TestCluster.yaml index e91438c5b4ded4..9c566f158f06fd 100644 --- a/src/app/tests/suites/TestCluster.yaml +++ b/src/app/tests/suites/TestCluster.yaml @@ -25,7 +25,7 @@ tests: - label: "Send Test Not Handled Command" command: "testNotHandled" response: - error: 1 + error: 0x85 # INVALID_COMMAND - label: "Send Test Specific Command" command: "testSpecific" @@ -56,7 +56,7 @@ tests: - name: "arg2" value: 6 response: - error: 1 + error: 0x85 # INVALID_COMMAND # Tests for Boolean attribute @@ -624,7 +624,7 @@ tests: arguments: value: "TestValueLongerThan10" response: - error: true + error: 0x87 # CONSTRAINT_ERROR - label: "Read attribute OCTET_STRING" command: "readAttribute" @@ -690,7 +690,7 @@ tests: arguments: value: "☉TestValueLongerThan10☉" response: - error: true + error: 0x87 # CONSTRAINT_ERROR - label: "Read attribute CHAR_STRING" command: "readAttribute" @@ -814,8 +814,17 @@ tests: command: "test" endpoint: 200 response: - # No cluster on that endpoint, so expect an error. - error: 1 + # No such endpoint, so expect an error. + # SDK returning wrong error code here so far. + errorWrongValue: 0x7F # UNSUPPORTED_ENDPOINT + + - label: "Send Test Command to unsupported cluster" + command: "test" + endpoint: 0 + response: + # No TestCluster on that, so expect an error. + # SDK returning wrong error code here so far. + errorWrongValue: 0xC3 # UNSUPPORTED_CLUSTER # Tests for vendor id @@ -1471,7 +1480,7 @@ tests: arguments: value: 255 response: - error: 1 + error: 0x87 # CONSTRAINT_ERROR - label: "Read attribute NULLABLE_BITMAP8 unchanged Value" command: "readAttribute" @@ -1511,7 +1520,7 @@ tests: arguments: value: 65535 response: - error: 1 + error: 0x87 # CONSTRAINT_ERROR - label: "Read attribute NULLABLE_BITMAP16 unchanged Value" command: "readAttribute" @@ -1551,7 +1560,7 @@ tests: arguments: value: 4294967295 response: - error: 1 + error: 0x87 # CONSTRAINT_ERROR - label: "Read attribute NULLABLE_BITMAP32 unchanged Value" command: "readAttribute" @@ -1591,7 +1600,7 @@ tests: arguments: value: "18446744073709551615" response: - error: 1 + error: 0x87 # CONSTRAINT_ERROR - label: "Read attribute NULLABLE_BITMAP64 unchanged Value" command: "readAttribute" @@ -1631,7 +1640,7 @@ tests: arguments: value: 255 response: - error: 1 + error: 0x87 # CONSTRAINT_ERROR - label: "Read attribute NULLABLE_INT8U unchanged Value" command: "readAttribute" @@ -1671,7 +1680,7 @@ tests: arguments: value: 65535 response: - error: 1 + error: 0x87 # CONSTRAINT_ERROR - label: "Read attribute NULLABLE_INT16U unchanged Value" command: "readAttribute" @@ -1711,7 +1720,7 @@ tests: arguments: value: 4294967295 response: - error: 1 + error: 0x87 # CONSTRAINT_ERROR - label: "Read attribute NULLABLE_INT32U unchanged Value" command: "readAttribute" @@ -1751,7 +1760,7 @@ tests: arguments: value: "18446744073709551615" response: - error: 1 + error: 0x87 # CONSTRAINT_ERROR - label: "Read attribute NULLABLE_INT64U unchanged Value" command: "readAttribute" @@ -1791,7 +1800,7 @@ tests: arguments: value: -128 response: - error: 1 + error: 0x87 # CONSTRAINT_ERROR - label: "Read attribute NULLABLE_INT8S unchanged Value" command: "readAttribute" @@ -1831,7 +1840,7 @@ tests: arguments: value: -32768 response: - error: 1 + error: 0x87 # CONSTRAINT_ERROR - label: "Read attribute NULLABLE_INT16S unchanged Value" command: "readAttribute" @@ -1871,7 +1880,7 @@ tests: arguments: value: -2147483648 response: - error: 1 + error: 0x87 # CONSTRAINT_ERROR - label: "Read attribute NULLABLE_INT32S unchanged Value" command: "readAttribute" @@ -1914,7 +1923,7 @@ tests: # work around that. value: "-9223372036854775807LL - 1" response: - error: 1 + error: 0x87 # CONSTRAINT_ERROR - label: "Read attribute NULLABLE_INT64S unchanged Value" command: "readAttribute" @@ -1954,7 +1963,7 @@ tests: arguments: value: 255 response: - error: 1 + error: 0x87 # CONSTRAINT_ERROR - label: "Read attribute NULLABLE_ENUM8 unchanged Value" command: "readAttribute" @@ -1994,7 +2003,7 @@ tests: arguments: value: 65535 response: - error: 1 + error: 0x87 # CONSTRAINT_ERROR - label: "Read attribute NULLABLE_ENUM16 unchanged Value" command: "readAttribute" @@ -2103,9 +2112,18 @@ tests: response: value: "" - - label: "Read nonexistent attribute." + - label: "Read attribute from nonexistent endpoint." endpoint: 200 command: "readAttribute" attribute: "list_int8u" response: - error: 0x86 # UNSUPPORTED_ATTRIBUTE + # SDK returning wrong error code here so far. + errorWrongValue: 0x7F # UNSUPPORTED_ENDPOINT + + - label: "Read attribute from nonexistent cluster." + endpoint: 0 + command: "readAttribute" + attribute: "list_int8u" + response: + # SDK returning wrong error code here so far. + errorWrongValue: 0xC3 # UNSUPPORTED_CLUSTER diff --git a/src/app/tests/suites/TestModeSelectCluster.yaml b/src/app/tests/suites/TestModeSelectCluster.yaml index 1c63a6826024be..44b3b2fcd61dac 100644 --- a/src/app/tests/suites/TestModeSelectCluster.yaml +++ b/src/app/tests/suites/TestModeSelectCluster.yaml @@ -80,4 +80,4 @@ tests: - name: "NewMode" value: 2 response: - error: 1 + error: 0x87 # CONSTRAINT_ERROR diff --git a/src/app/tests/suites/certification/Test_TC_BI_1_1.yaml b/src/app/tests/suites/certification/Test_TC_BI_1_1.yaml index ebaf03afc462ef..9d389f31c051c6 100644 --- a/src/app/tests/suites/certification/Test_TC_BI_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_BI_1_1.yaml @@ -33,7 +33,7 @@ tests: arguments: value: 1 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "reads back global attribute: ClusterRevision" command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_BI_2_1.yaml b/src/app/tests/suites/certification/Test_TC_BI_2_1.yaml index 4af977b998213a..687f57035305f6 100644 --- a/src/app/tests/suites/certification/Test_TC_BI_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_BI_2_1.yaml @@ -90,7 +90,7 @@ tests: arguments: value: 0 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Reads back the mandatory non-global attribute: StatusFlags" command: "readAttribute" @@ -214,7 +214,7 @@ tests: arguments: value: 0 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Reads back the optional non-global attribute: Polarity" disabled: true @@ -273,7 +273,7 @@ tests: arguments: value: 0 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Reads back the optional non-global attribute: ApplicationType" disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_BOOL_1_1.yaml b/src/app/tests/suites/certification/Test_TC_BOOL_1_1.yaml index e8f9a9bec501ea..899eff727eec19 100644 --- a/src/app/tests/suites/certification/Test_TC_BOOL_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_BOOL_1_1.yaml @@ -33,7 +33,7 @@ tests: arguments: value: 1 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "reads back global attribute: ClusterRevision" command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_BOOL_2_1.yaml b/src/app/tests/suites/certification/Test_TC_BOOL_2_1.yaml index 69a46931581529..b96f166e6ad3bc 100644 --- a/src/app/tests/suites/certification/Test_TC_BOOL_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_BOOL_2_1.yaml @@ -39,7 +39,7 @@ tests: arguments: value: 1 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Reads back the mandatory non-global attribute: StateValue" command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_CC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_CC_1_1.yaml index a9dce4c2d47ddb..6f4e025ea0790e 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_1_1.yaml @@ -34,7 +34,7 @@ tests: arguments: value: 4 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "reads back global attribute: ClusterRevision" disabled: true @@ -57,7 +57,7 @@ tests: arguments: value: 0 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "reads back optional global attribute: FeatureMap" disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_CC_2_1.yaml b/src/app/tests/suites/certification/Test_TC_CC_2_1.yaml index f5d15b7fc93d98..7af07b6feda8f7 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_2_1.yaml @@ -40,7 +40,7 @@ tests: arguments: value: 0 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Reads back mandatory attribute: CurrentHue" command: "readAttribute" @@ -69,7 +69,7 @@ tests: arguments: value: 0 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Reads back mandatory attribute: CurrentSaturation" command: "readAttribute" @@ -98,7 +98,7 @@ tests: arguments: value: 24939 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Reads back mandatory attribute: CurrentX" command: "readAttribute" @@ -127,7 +127,7 @@ tests: arguments: value: 24701 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Reads back mandatory attribute: CurrentY" command: "readAttribute" @@ -160,7 +160,7 @@ tests: arguments: value: 250 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Reads back mandatory attribute: ColorTemperatureMireds" disabled: true @@ -192,7 +192,7 @@ tests: arguments: value: 1 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Reads back mandatory attribute: ColorMode" disabled: true @@ -246,7 +246,7 @@ tests: arguments: value: 0 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Reads back mandatory attribute: EnhancedCurrentHue" command: "readAttribute" @@ -276,7 +276,7 @@ tests: arguments: value: 1 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Reads back mandatory attribute: EnhancedColorMode" disabled: true @@ -304,7 +304,7 @@ tests: arguments: value: 0 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Reads back mandatory attribute: ColorLoopActive" command: "readAttribute" @@ -332,7 +332,7 @@ tests: arguments: value: 0 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Reads back mandatory attribute: ColorLoopDirection" command: "readAttribute" @@ -359,7 +359,7 @@ tests: arguments: value: 25 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Reads back mandatory attribute: ColorLoopTime" command: "readAttribute" @@ -388,7 +388,7 @@ tests: arguments: value: 8960 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Reads back mandatory attribute: ColorLoopStartEnhancedHue" command: "readAttribute" @@ -417,7 +417,7 @@ tests: arguments: value: 0 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Reads back mandatory attribute: ColorLoopStoredEnhancedHue" command: "readAttribute" @@ -447,7 +447,7 @@ tests: arguments: value: 0 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Reads back mandatory attribute: ColorCapabilities" command: "readAttribute" @@ -478,7 +478,7 @@ tests: arguments: value: 0 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Reads back mandatory attribute: ColorTempPhysicalMinMireds" command: "readAttribute" @@ -509,7 +509,7 @@ tests: arguments: value: 65279 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Reads back mandatory attribute: ColorTempPhysicalMaxMireds" command: "readAttribute" @@ -532,7 +532,7 @@ tests: arguments: value: 0 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Reads back optional attribute: CoupleColorTempToLevelMinMireds" command: "readAttribute" @@ -584,7 +584,7 @@ tests: arguments: value: 0 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Reads back optional attribute: RemainingTime" command: "readAttribute" @@ -607,7 +607,7 @@ tests: arguments: value: 0 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Reads back optional attribute: DriftCompensation" command: "readAttribute" @@ -630,7 +630,7 @@ tests: arguments: value: "" response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Reads back optional attribute: CompensationText" disabled: true @@ -656,7 +656,7 @@ tests: arguments: value: 0 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Read back the mandatory attribute: NumberOfPrimaries" command: "readAttribute" @@ -679,7 +679,7 @@ tests: arguments: value: 0 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Read back the mandatory attribute: Primary1X" command: "readAttribute" @@ -702,7 +702,7 @@ tests: arguments: value: 0 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Read back the mandatory attribute: Primary1Y" command: "readAttribute" @@ -724,7 +724,7 @@ tests: arguments: value: 0 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Read back the mandatory attribute: Primary1Intensity" disabled: true @@ -748,7 +748,7 @@ tests: arguments: value: 0 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Read back the mandatory attribute: Primary2X" command: "readAttribute" @@ -771,7 +771,7 @@ tests: arguments: value: 0 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Read back the mandatory attribute: Primary2Y" command: "readAttribute" @@ -793,7 +793,7 @@ tests: arguments: value: 0 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Read back the mandatory attribute: Primary2Intensity" disabled: true @@ -817,7 +817,7 @@ tests: arguments: value: 0 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Read back the mandatory attribute: Primary3X" command: "readAttribute" @@ -840,7 +840,7 @@ tests: arguments: value: 0 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Read back the mandatory attribute: Primary3Y" command: "readAttribute" @@ -862,7 +862,7 @@ tests: arguments: value: 0 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Read back the mandatory attribute: Primary3Intensity" disabled: true @@ -887,7 +887,7 @@ tests: arguments: value: 0 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Read back the mandatory attribute: Primary4X" command: "readAttribute" @@ -910,7 +910,7 @@ tests: arguments: value: 0 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Read back the mandatory attribute: Primary4Y" command: "readAttribute" @@ -932,7 +932,7 @@ tests: arguments: value: 0 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Read back the mandatory attribute: Primary4Intensity" disabled: true @@ -956,7 +956,7 @@ tests: arguments: value: 0 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Read back the mandatory attribute: Primary5X" command: "readAttribute" @@ -979,7 +979,7 @@ tests: arguments: value: 0 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Read back the mandatory attribute: Primary5Y" command: "readAttribute" @@ -1001,7 +1001,7 @@ tests: arguments: value: 0 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Read back the mandatory attribute: Primary5Intensity" disabled: true @@ -1025,7 +1025,7 @@ tests: arguments: value: 0 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Read back the mandatory attribute: Primary6X" command: "readAttribute" @@ -1048,7 +1048,7 @@ tests: arguments: value: 0 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Read back the mandatory attribute: Primary6Y" command: "readAttribute" @@ -1070,7 +1070,7 @@ tests: arguments: value: 0 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Read back the mandatory attribute: Primary6Intensity" disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DIAGTH_1_1.yaml b/src/app/tests/suites/certification/Test_TC_DIAGTH_1_1.yaml index ad82f4f0ac1fed..a8c8de7ebf1093 100644 --- a/src/app/tests/suites/certification/Test_TC_DIAGTH_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DIAGTH_1_1.yaml @@ -33,7 +33,7 @@ tests: arguments: value: 1 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "reads back global attribute: ClusterRevision" command: "readAttribute" @@ -55,7 +55,7 @@ tests: arguments: value: 0 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "reads back optional global attribute: FeatureMap" disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_EMR_1_1.yaml b/src/app/tests/suites/certification/Test_TC_EMR_1_1.yaml index 84183517b32b73..583a2046328cb3 100644 --- a/src/app/tests/suites/certification/Test_TC_EMR_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_EMR_1_1.yaml @@ -33,7 +33,7 @@ tests: arguments: value: 1 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "reads back global attribute: ClusterRevision" command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_FLW_1_1.yaml b/src/app/tests/suites/certification/Test_TC_FLW_1_1.yaml index 5f234c018adf51..d85605f11d621d 100644 --- a/src/app/tests/suites/certification/Test_TC_FLW_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_FLW_1_1.yaml @@ -34,7 +34,7 @@ tests: arguments: value: 2 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "reads back global attribute: ClusterRevision" disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_FLW_2_1.yaml b/src/app/tests/suites/certification/Test_TC_FLW_2_1.yaml index 89fe838951588c..bbcebc7cdf0287 100644 --- a/src/app/tests/suites/certification/Test_TC_FLW_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_FLW_2_1.yaml @@ -47,7 +47,7 @@ tests: arguments: value: 0 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "write the default value to optional attribute: MinMeasuredValue" command: "writeAttribute" @@ -55,7 +55,7 @@ tests: arguments: value: 0 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "write the default value to optional attribute: MaxMeasuredValue" command: "writeAttribute" @@ -63,7 +63,7 @@ tests: arguments: value: 0 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "read the mandatory attribute: MeasuredValue" command: "readAttribute" @@ -110,7 +110,7 @@ tests: arguments: value: 0 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "read the optional attribute: Tolerance" disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_ILL_1_1.yaml b/src/app/tests/suites/certification/Test_TC_ILL_1_1.yaml index 181029d5572e24..9e5eefd04863bb 100644 --- a/src/app/tests/suites/certification/Test_TC_ILL_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_ILL_1_1.yaml @@ -33,7 +33,7 @@ tests: arguments: value: 1 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "reads back global attribute: ClusterRevision" command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_LVL_1_1.yaml b/src/app/tests/suites/certification/Test_TC_LVL_1_1.yaml index 680454ae74ef71..0d2a46c4d93a9a 100644 --- a/src/app/tests/suites/certification/Test_TC_LVL_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LVL_1_1.yaml @@ -34,7 +34,7 @@ tests: arguments: value: 4 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "reads back global attribute: ClusterRevision" disabled: true @@ -57,7 +57,7 @@ tests: arguments: value: 0 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "reads back optional global attribute: FeatureMap" disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_MC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_MC_1_1.yaml index d91e39561c6f25..3f1b1ebf93eac8 100644 --- a/src/app/tests/suites/certification/Test_TC_MC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_MC_1_1.yaml @@ -34,7 +34,7 @@ tests: arguments: value: 1 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "reads back global attribute: ClusterRevision" disabled: true @@ -57,7 +57,7 @@ tests: arguments: value: 0 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "reads back optional global attribute: FeatureMap" disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_MC_3_1.yaml b/src/app/tests/suites/certification/Test_TC_MC_3_1.yaml index 619aca4076148a..868e771606a6d9 100644 --- a/src/app/tests/suites/certification/Test_TC_MC_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_MC_3_1.yaml @@ -138,5 +138,5 @@ tests: - name: "keyCode" value: 0xFF response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE # TODO: Add Step 10 (TH sends Keycode to DUT, when DUT in a processing state) diff --git a/src/app/tests/suites/certification/Test_TC_MC_3_7.yaml b/src/app/tests/suites/certification/Test_TC_MC_3_7.yaml index 310ac4cce8284d..106c34819c10e0 100644 --- a/src/app/tests/suites/certification/Test_TC_MC_3_7.yaml +++ b/src/app/tests/suites/certification/Test_TC_MC_3_7.yaml @@ -54,7 +54,7 @@ tests: - name: "applicationId" value: "NonAvailableApp" response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE # TODO: Update the corresponding values when feature is supported - label: "Launch an app with the provided a application ID" diff --git a/src/app/tests/suites/certification/Test_TC_OCC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_OCC_1_1.yaml index 101f7cade87193..d858b61a3c7d22 100644 --- a/src/app/tests/suites/certification/Test_TC_OCC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_OCC_1_1.yaml @@ -33,7 +33,7 @@ tests: arguments: value: 2 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "reads back global attribute: ClusterRevision" disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_OCC_2_1.yaml b/src/app/tests/suites/certification/Test_TC_OCC_2_1.yaml index 8bf1a7583ac679..c8e37ae6357b24 100644 --- a/src/app/tests/suites/certification/Test_TC_OCC_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_OCC_2_1.yaml @@ -42,7 +42,7 @@ tests: arguments: value: 0 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Reads back mandatory attribute: Occupancy" command: "readAttribute" @@ -74,7 +74,7 @@ tests: arguments: value: 0 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Reads back mandatory attribute: OccupancySensorType" command: "readAttribute" @@ -106,7 +106,7 @@ tests: arguments: value: 1 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Reads back mandatory attribute: OccupancySensorTypeBitmap" command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_OO_1_1.yaml b/src/app/tests/suites/certification/Test_TC_OO_1_1.yaml index 1d7afedb4c421b..531ae03ff568d1 100644 --- a/src/app/tests/suites/certification/Test_TC_OO_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_OO_1_1.yaml @@ -33,7 +33,7 @@ tests: arguments: value: 3 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "reads back global attribute: ClusterRevision" command: "readAttribute" @@ -53,7 +53,7 @@ tests: arguments: value: 0 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "reads back optional global attribute: FeatureMap" command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_OO_2_1.yaml b/src/app/tests/suites/certification/Test_TC_OO_2_1.yaml index 31a71b217dff39..ff86ffd281191e 100644 --- a/src/app/tests/suites/certification/Test_TC_OO_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_OO_2_1.yaml @@ -32,7 +32,7 @@ tests: arguments: value: 0 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "reads back mandatory attribute: OnOff" command: "readAttribute" @@ -71,7 +71,7 @@ tests: arguments: value: 0 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "write the default value to LT attribute: OnTime" command: "writeAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_PCC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_PCC_1_1.yaml index ecec5e755a94c7..221c4706240212 100644 --- a/src/app/tests/suites/certification/Test_TC_PCC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_PCC_1_1.yaml @@ -34,7 +34,7 @@ tests: arguments: value: 3 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "reads back global attribute: ClusterRevision" disabled: true @@ -57,7 +57,7 @@ tests: arguments: value: 0 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "reads back optional global attribute: FeatureMap" disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_PCC_2_1.yaml b/src/app/tests/suites/certification/Test_TC_PCC_2_1.yaml index 722aad1c69e39f..e0b7884b0cc1ca 100644 --- a/src/app/tests/suites/certification/Test_TC_PCC_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_PCC_2_1.yaml @@ -112,7 +112,7 @@ tests: arguments: value: null response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "write to the mandatory attribute: MaxSpeed" disabled: true @@ -121,7 +121,7 @@ tests: arguments: value: null response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "write to the mandatory attribute: MaxFlow" disabled: true @@ -130,7 +130,7 @@ tests: arguments: value: null response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "write to the mandatory attribute: EffectiveOperationMode" disabled: true @@ -139,7 +139,7 @@ tests: arguments: value: desc response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "write to the mandatory attribute: EffectiveControlMode" disabled: true @@ -148,7 +148,7 @@ tests: arguments: value: desc response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "write to the mandatory attribute: Capacity" disabled: true @@ -157,7 +157,7 @@ tests: arguments: value: null response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "read the mandatory attribute: MaxPressure" disabled: true @@ -479,7 +479,7 @@ tests: arguments: value: null response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "write to the optional attribute: MaxConstPressure" disabled: true @@ -488,7 +488,7 @@ tests: arguments: value: null response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "write to the optional attribute: MinCompPressure" disabled: true @@ -497,7 +497,7 @@ tests: arguments: value: null response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "write to the optional attribute: MaxCompPressure" disabled: true @@ -506,7 +506,7 @@ tests: arguments: value: null response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "write to the optional attribute: MinConstSpeed" disabled: true @@ -515,7 +515,7 @@ tests: arguments: value: null response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "write to the optional attribute: MaxConstSpeed" disabled: true @@ -524,7 +524,7 @@ tests: arguments: value: null response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "write to the optional attribute: MinConstFlow" disabled: true @@ -533,7 +533,7 @@ tests: arguments: value: null response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "write to the optional attribute: MaxConstFlow" disabled: true @@ -542,7 +542,7 @@ tests: arguments: value: null response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "write to the optional attribute: MinConstTemp" disabled: true @@ -551,7 +551,7 @@ tests: arguments: value: null response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "write to the optional attribute: MaxConstTemp" disabled: true @@ -560,7 +560,7 @@ tests: arguments: value: null response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "write to the optional attribute: PumpStatus" disabled: true @@ -569,7 +569,7 @@ tests: arguments: value: 0 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "write to the optional attribute: Speed" disabled: true @@ -578,7 +578,7 @@ tests: arguments: value: null response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "write to the optional attribute: LifetimeRunningHours" disabled: true @@ -596,7 +596,7 @@ tests: arguments: value: null response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "write to the optional attribute: LifetimeEnergyConsumed" disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_PRS_1_1.yaml b/src/app/tests/suites/certification/Test_TC_PRS_1_1.yaml index f933fa94faf83d..99972df2a85a5a 100644 --- a/src/app/tests/suites/certification/Test_TC_PRS_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_PRS_1_1.yaml @@ -40,7 +40,7 @@ tests: arguments: value: 2 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Reads back global attribute: ClusterRevision" command: "readAttribute" @@ -71,7 +71,7 @@ tests: arguments: value: 0 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Reads back mandatory global attribute: AttributeList" disabled: true @@ -103,7 +103,7 @@ tests: arguments: value: 0 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Reads back mandatory global attribute: CommandList" disabled: true @@ -134,7 +134,7 @@ tests: arguments: value: 0 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Reads back mandatory global attribute: EventList" disabled: true @@ -165,7 +165,7 @@ tests: arguments: value: 0 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Reads back optional global attribute: FeatureMap" disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_PRS_2_1.yaml b/src/app/tests/suites/certification/Test_TC_PRS_2_1.yaml index 6cd4ff6ec99522..e6a59094d197aa 100644 --- a/src/app/tests/suites/certification/Test_TC_PRS_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_PRS_2_1.yaml @@ -32,7 +32,7 @@ tests: arguments: value: 0 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Reads back mandatory attribute: MeasuredValue" command: "readAttribute" @@ -53,7 +53,7 @@ tests: arguments: value: 0 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Reads back mandatory attribute: MinMeasuredValue" command: "readAttribute" @@ -74,7 +74,7 @@ tests: arguments: value: 0 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Reads back mandatory attribute: MaxMeasuredValue" command: "readAttribute" @@ -96,7 +96,7 @@ tests: arguments: value: 0 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Reads back optional attribute: Tolerance" disabled: true @@ -120,7 +120,7 @@ tests: arguments: value: 0 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Reads back optional attribute: ScaledValue" disabled: true @@ -143,7 +143,7 @@ tests: arguments: value: 0 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Reads back optional attribute: MinScaledValue" disabled: true @@ -166,7 +166,7 @@ tests: arguments: value: 0 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Reads back optional attribute: MaxScaledValue" disabled: true @@ -189,7 +189,7 @@ tests: arguments: value: 0 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Reads back optional attribute: ScaledTolerance" disabled: true @@ -212,7 +212,7 @@ tests: arguments: value: 0 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Reads back optional attribute: Scale" disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_RH_1_1.yaml b/src/app/tests/suites/certification/Test_TC_RH_1_1.yaml index 908d498f2b0216..4bb7859efadf98 100644 --- a/src/app/tests/suites/certification/Test_TC_RH_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_RH_1_1.yaml @@ -34,7 +34,7 @@ tests: arguments: value: 1 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "reads back global attribute: ClusterRevision" disabled: true @@ -57,7 +57,7 @@ tests: arguments: value: 0 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "reads back optional global attribute: FeatureMap" disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_TM_1_1.yaml b/src/app/tests/suites/certification/Test_TC_TM_1_1.yaml index 4985f0d8006f86..210bd0068db40e 100644 --- a/src/app/tests/suites/certification/Test_TC_TM_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_TM_1_1.yaml @@ -33,7 +33,7 @@ tests: arguments: value: 3 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "reads back global attribute: ClusterRevision" command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_TSTAT_1_1.yaml b/src/app/tests/suites/certification/Test_TC_TSTAT_1_1.yaml index d3014413f0a368..c2aef38be7097e 100644 --- a/src/app/tests/suites/certification/Test_TC_TSTAT_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_TSTAT_1_1.yaml @@ -34,7 +34,7 @@ tests: arguments: value: 5 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "reads back global attribute: ClusterRevision" disabled: true @@ -57,7 +57,7 @@ tests: arguments: value: 0 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "reads back optional global attribute: FeatureMap" disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_TSTAT_2_1.yaml b/src/app/tests/suites/certification/Test_TC_TSTAT_2_1.yaml index 128e085d00f0d3..58bdea35932bd6 100644 --- a/src/app/tests/suites/certification/Test_TC_TSTAT_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_TSTAT_2_1.yaml @@ -44,7 +44,7 @@ tests: arguments: value: null response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Read back mandatory attributes from DUT: LocalTemperature" disabled: true @@ -78,7 +78,7 @@ tests: arguments: value: 700 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Read back mandatory attributes from DUT: AbsMinHeatSetpointLimit" command: "readAttribute" @@ -111,7 +111,7 @@ tests: arguments: value: 3000 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Read back mandatory attributes from DUT: AbsMaxHeatSetpointLimit" command: "readAttribute" @@ -144,7 +144,7 @@ tests: arguments: value: 1600 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Read back mandatory attributes from DUT: AbsMinCoolSetpointLimit" command: "readAttribute" @@ -177,7 +177,7 @@ tests: arguments: value: 3200 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Read back mandatory attributes from DUT: AbsMaxCoolSetpointLimit" command: "readAttribute" @@ -205,7 +205,7 @@ tests: arguments: value: 0 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Read back mandatory attributes from DUT: PICoolingDemand" disabled: true @@ -234,7 +234,7 @@ tests: arguments: value: 0 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Read back mandatory attributes from DUT: PIHeatingDemand" disabled: true @@ -787,7 +787,7 @@ tests: arguments: value: 0 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Read back optional attributes from DUT: AlarmMask" disabled: true @@ -824,7 +824,7 @@ tests: arguments: value: 0 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Read back optional attributes from DUT: ThermostatRunningMode" disabled: true @@ -850,7 +850,7 @@ tests: arguments: value: 0 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Read back optional attributes from DUT: StartOfWeek" command: "readAttribute" @@ -883,7 +883,7 @@ tests: arguments: value: 0 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Read back optional attributes from DUT: NumberOfWeeklyTransitions" disabled: true @@ -917,7 +917,7 @@ tests: arguments: value: 0 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Read back optional attributes from DUT: NumberOfDailyTransitions" disabled: true @@ -1059,7 +1059,7 @@ tests: arguments: value: 0 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Read back optional attributes from DUT: ThermostatRunningState" disabled: true @@ -1096,7 +1096,7 @@ tests: arguments: value: 0 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Read back optional attributes from DUT: SetpointChangeSource" disabled: true @@ -1131,7 +1131,7 @@ tests: arguments: value: null response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Read back optional attributes from DUT: SetpointChangeAmount" disabled: true @@ -1166,7 +1166,7 @@ tests: arguments: value: 0 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Read back optional attributes from DUT: SetpointChangeSourceTimestamp" @@ -1203,7 +1203,7 @@ tests: arguments: value: null response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Read back optional attributes from DUT: OccupiedSetback" disabled: true @@ -1307,7 +1307,7 @@ tests: arguments: value: null response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Read back optional attributes from DUT: UnoccupiedSetback" disabled: true @@ -1640,7 +1640,7 @@ tests: arguments: value: null response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "Read back optional attributes from DUT: ACCoilTemperature" disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_TSUIC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_TSUIC_1_1.yaml index 8eab81fcbbeb86..379044e479db86 100644 --- a/src/app/tests/suites/certification/Test_TC_TSUIC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_TSUIC_1_1.yaml @@ -34,7 +34,7 @@ tests: arguments: value: 2 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "reads back global attribute: ClusterRevision" disabled: true @@ -57,7 +57,7 @@ tests: arguments: value: 0 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "reads back optional global attribute: FeatureMap" disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_WNCV_1_1.yaml b/src/app/tests/suites/certification/Test_TC_WNCV_1_1.yaml index 62b53512042997..76d11c08e4ac19 100644 --- a/src/app/tests/suites/certification/Test_TC_WNCV_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_WNCV_1_1.yaml @@ -38,7 +38,7 @@ tests: arguments: value: 201 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "3b: reads back global attribute: ClusterRevision" command: "readAttribute" @@ -65,7 +65,7 @@ tests: arguments: value: 32769 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "3b: reads back global attribute: FeatureMap" command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_WNCV_2_1.yaml b/src/app/tests/suites/certification/Test_TC_WNCV_2_1.yaml index b2a5d01ab915f9..6a76205605021f 100644 --- a/src/app/tests/suites/certification/Test_TC_WNCV_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_WNCV_2_1.yaml @@ -38,7 +38,7 @@ tests: arguments: value: 250 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "3b: reads back the RO mandatory attribute: Type" command: "readAttribute" @@ -64,7 +64,7 @@ tests: arguments: value: 128 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "3b: reads back the RO mandatory attribute: ConfigStatus" command: "readAttribute" @@ -91,7 +91,7 @@ tests: arguments: value: 128 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "3b: reads back the RO mandatory attribute: OperationalStatus" command: "readAttribute" @@ -117,7 +117,7 @@ tests: arguments: value: 250 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "3b: reads back the RO mandatory attribute: EndProductType" command: "readAttribute" @@ -172,7 +172,7 @@ tests: arguments: value: 20000 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "3b: reads back the RO optional attribute: @@ -204,7 +204,7 @@ tests: arguments: value: 20000 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "3b: reads back the RO optional attribute: @@ -236,7 +236,7 @@ tests: arguments: value: 20000 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "3b: reads back the RO optional attribute: @@ -268,7 +268,7 @@ tests: arguments: value: 20000 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "3b: reads back the RO optional attribute: @@ -298,7 +298,7 @@ tests: arguments: value: 255 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "3b: reads back the RO optional attribute: InstalledOpenLimitLift" command: "readAttribute" @@ -328,7 +328,7 @@ tests: arguments: value: 255 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "3b: reads back the RO optional attribute: InstalledClosedLimitLift" @@ -358,7 +358,7 @@ tests: arguments: value: 255 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "3b: reads back the RO optional attribute: InstalledOpenLimitTilt" command: "readAttribute" @@ -388,7 +388,7 @@ tests: arguments: value: 255 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "3b: reads back the RO optional attribute: InstalledClosedLimitTilt" @@ -417,7 +417,7 @@ tests: arguments: value: 4096 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "5b: reads back the RO mandatory attribute: SafetyStatus" command: "readAttribute" @@ -448,7 +448,7 @@ tests: arguments: value: 255 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "5b: reads back the RO optional attribute: PhysicalClosedLimitLift" disabled: true @@ -481,7 +481,7 @@ tests: arguments: value: 255 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "5b: reads back the RO optional attribute: PhysicalClosedLimitTilt" disabled: true @@ -510,7 +510,7 @@ tests: arguments: value: 255 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "5b: reads back the RO optional attribute: CurrentPositionLift" command: "readAttribute" @@ -538,7 +538,7 @@ tests: arguments: value: 255 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "5b: reads back the RO optional attribute: CurrentPositionTilt" command: "readAttribute" @@ -569,7 +569,7 @@ tests: arguments: value: 255 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "5b: reads back the RO optional attribute: NumberOfActuationsLift" disabled: true @@ -601,7 +601,7 @@ tests: arguments: value: 255 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "5b: reads back the RO optional attribute: NumberOfActuationsTilt" disabled: true @@ -633,7 +633,7 @@ tests: arguments: value: 200 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "5b: reads back the RO optional attribute: @@ -665,7 +665,7 @@ tests: arguments: value: 200 response: - error: 1 + error: 0x88 # UNSUPPORTED_WRITE - label: "5b: reads back the RO optional attribute: diff --git a/src/app/util/af-enums.h b/src/app/util/af-enums.h index 93473655c10d83..945c1204d91555 100644 --- a/src/app/util/af-enums.h +++ b/src/app/util/af-enums.h @@ -26,18 +26,22 @@ enum EmberAfStatus : uint8_t { EMBER_ZCL_STATUS_SUCCESS = 0x00, EMBER_ZCL_STATUS_FAILURE = 0x01, - EMBER_ZCL_STATUS_NOT_AUTHORIZED = 0x7E, + EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS = 0x7E, + EMBER_ZCL_STATUS_NOT_AUTHORIZED = 0x7E, // Deprecated; same as UNSUPPORTED_ACCESS + EMBER_ZCL_STATUS_UNSUPPORTED_ENDPOINT = 0x7F, EMBER_ZCL_STATUS_MALFORMED_COMMAND = 0x80, - EMBER_ZCL_STATUS_UNSUP_COMMAND = 0x81, + EMBER_ZCL_STATUS_UNSUPPORTED_COMMAND = 0x81, + EMBER_ZCL_STATUS_UNSUP_COMMAND = 0x81, // Deprecated; same as UNSUPPORTED_COMMAND EMBER_ZCL_STATUS_UNSUP_GENERAL_COMMAND = 0x82, EMBER_ZCL_STATUS_UNSUP_MANUF_CLUSTER_COMMAND = 0x83, EMBER_ZCL_STATUS_UNSUP_MANUF_GENERAL_COMMAND = 0x84, EMBER_ZCL_STATUS_INVALID_COMMAND = 0x85, - EMBER_ZCL_STATUS_INVALID_FIELD = 0x85, // Same as INVALID_COMMAND + EMBER_ZCL_STATUS_INVALID_FIELD = 0x85, // Deprecated; same as INVALID_COMMAND EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE = 0x86, EMBER_ZCL_STATUS_CONSTRAINT_ERROR = 0x87, - EMBER_ZCL_STATUS_INVALID_VALUE = 0x87, // Same as CONSTRAINT_ERROR - EMBER_ZCL_STATUS_READ_ONLY = 0x88, + EMBER_ZCL_STATUS_INVALID_VALUE = 0x87, // Deprecated; same as CONSTRAINT_ERROR + EMBER_ZCL_STATUS_UNSUPPORTED_WRITE = 0x88, + EMBER_ZCL_STATUS_READ_ONLY = 0x88, // Deprecated; same as UNSUPPORTED_WRITE EMBER_ZCL_STATUS_INSUFFICIENT_SPACE = 0x89, EMBER_ZCL_STATUS_DUPLICATE_EXISTS = 0x8A, EMBER_ZCL_STATUS_NOT_FOUND = 0x8B, diff --git a/src/app/util/error-mapping.cpp b/src/app/util/error-mapping.cpp index 7745abf5dd68e7..51a19157104994 100644 --- a/src/app/util/error-mapping.cpp +++ b/src/app/util/error-mapping.cpp @@ -34,7 +34,7 @@ EmberAfStatus ToEmberAfStatus(Protocols::InteractionModel::Status code) case imcode::UnsupportedAccess: // 0x7e return EMBER_ZCL_STATUS_NOT_AUTHORIZED; case imcode::UnsupportedEndpoint: // 0x7f - return EMBER_ZCL_STATUS_UNSUPPORTED_CLUSTER; + return EMBER_ZCL_STATUS_UNSUPPORTED_ENDPOINT; case imcode::InvalidAction: // 0x80 return EMBER_ZCL_STATUS_MALFORMED_COMMAND; case imcode::UnsupportedCommand: // 0x81 @@ -123,6 +123,8 @@ Protocols::InteractionModel::Status ToInteractionModelStatus(EmberAfStatus code) return imcode::Failure; case EMBER_ZCL_STATUS_NOT_AUTHORIZED: // 0x7E return imcode::UnsupportedAccess; + case EMBER_ZCL_STATUS_UNSUPPORTED_ENDPOINT: // 0x7F + return imcode::UnsupportedEndpoint; case EMBER_ZCL_STATUS_MALFORMED_COMMAND: // 0x80 return imcode::InvalidAction; case EMBER_ZCL_STATUS_UNSUP_COMMAND: // 0x81 diff --git a/src/darwin/Framework/CHIP/CHIPError.h b/src/darwin/Framework/CHIP/CHIPError.h index 69c13374293219..ea0c6c32652f21 100644 --- a/src/darwin/Framework/CHIP/CHIPError.h +++ b/src/darwin/Framework/CHIP/CHIPError.h @@ -31,7 +31,13 @@ typedef NS_ERROR_ENUM(CHIPErrorDomain, CHIPErrorCode){ CHIPErrorCodeWrongAddressType = 7, CHIPErrorCodeIntegrityCheckFailed = 8, CHIPErrorCodeDuplicateExists = 9, - CHIPErrorCodeUnsupportedAttribute = 10, + CHIPErrorCodeUnsupportedEndpoint = 0x7F, + CHIPErrorCodeUnsupportedCommand = 0x81, + CHIPErrorCodeInvalidCommand = 0x85, + CHIPErrorCodeUnsupportedAttribute = 0x86, + CHIPErrorCodeConstraintError = 0x87, + CHIPErrorCodeUnsupportedWrite = 0x88, + CHIPErrorCodeUnsupportedCluster = 0xC3, }; NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/CHIPError.mm b/src/darwin/Framework/CHIP/CHIPError.mm index 9e205991884ccf..0cf8db0c967ceb 100644 --- a/src/darwin/Framework/CHIP/CHIPError.mm +++ b/src/darwin/Framework/CHIP/CHIPError.mm @@ -86,10 +86,42 @@ + (NSError *)errorForZCLErrorCode:(uint8_t)errorCode errorWithDomain:CHIPErrorDomain code:CHIPErrorCodeDuplicateExists userInfo:@{ NSLocalizedDescriptionKey : NSLocalizedString(@"A Duplicate entry or setting exists.", nil) }]; + case EMBER_ZCL_STATUS_UNSUPPORTED_ENDPOINT: + return + [NSError errorWithDomain:CHIPErrorDomain + code:CHIPErrorCodeUnsupportedEndpoint + userInfo:@{ NSLocalizedDescriptionKey : NSLocalizedString(@"Target endpoint does not exist.", nil) }]; + case EMBER_ZCL_STATUS_UNSUPPORTED_COMMAND: + return + [NSError errorWithDomain:CHIPErrorDomain + code:CHIPErrorCodeUnsupportedCommand + userInfo:@{ + NSLocalizedDescriptionKey : NSLocalizedString(@"Command is not supported on target cluster.", nil) + }]; + case EMBER_ZCL_STATUS_INVALID_COMMAND: + return [NSError errorWithDomain:CHIPErrorDomain + code:CHIPErrorCodeInvalidCommand + userInfo:@{ NSLocalizedDescriptionKey : NSLocalizedString(@"Command payload is invalid.", nil) }]; case EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE: return [NSError errorWithDomain:CHIPErrorDomain code:CHIPErrorCodeUnsupportedAttribute userInfo:@{ NSLocalizedDescriptionKey : NSLocalizedString(@"Attribute is not supported.", nil) }]; + case EMBER_ZCL_STATUS_CONSTRAINT_ERROR: + return [NSError errorWithDomain:CHIPErrorDomain + code:CHIPErrorCodeConstraintError + userInfo:@{ NSLocalizedDescriptionKey : NSLocalizedString(@"Value out of range.", nil) }]; + case EMBER_ZCL_STATUS_UNSUPPORTED_WRITE: + return [NSError + errorWithDomain:CHIPErrorDomain + code:CHIPErrorCodeUnsupportedWrite + userInfo:@{ NSLocalizedDescriptionKey : NSLocalizedString(@"Attempt to write read-only attribute.", nil) }]; + case EMBER_ZCL_STATUS_UNSUPPORTED_CLUSTER: + return + [NSError errorWithDomain:CHIPErrorDomain + code:CHIPErrorCodeUnsupportedCluster + userInfo:@{ + NSLocalizedDescriptionKey : NSLocalizedString(@"Cluster is not supported on target endpoint.", nil) + }]; default: return [NSError errorWithDomain:CHIPErrorDomain code:CHIPErrorCodeUndefinedError @@ -140,8 +172,20 @@ + (uint8_t)errorToZCLErrorCode:(NSError * _Nullable)error switch (error.code) { case CHIPErrorCodeDuplicateExists: return EMBER_ZCL_STATUS_DUPLICATE_EXISTS; + case CHIPErrorCodeUnsupportedEndpoint: + return EMBER_ZCL_STATUS_UNSUPPORTED_ENDPOINT; + case CHIPErrorCodeUnsupportedCommand: + return EMBER_ZCL_STATUS_UNSUPPORTED_COMMAND; + case CHIPErrorCodeInvalidCommand: + return EMBER_ZCL_STATUS_INVALID_COMMAND; case CHIPErrorCodeUnsupportedAttribute: return EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE; + case CHIPErrorCodeConstraintError: + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + case CHIPErrorCodeUnsupportedWrite: + return EMBER_ZCL_STATUS_UNSUPPORTED_WRITE; + case CHIPErrorCodeUnsupportedCluster: + return EMBER_ZCL_STATUS_UNSUPPORTED_CLUSTER; case CHIPSuccess: return EMBER_ZCL_STATUS_SUCCESS; default: diff --git a/src/darwin/Framework/CHIP/templates/partials/test_cluster.zapt b/src/darwin/Framework/CHIP/templates/partials/test_cluster.zapt index 820969ceb68f64..163650e05e568e 100644 --- a/src/darwin/Framework/CHIP/templates/partials/test_cluster.zapt +++ b/src/darwin/Framework/CHIP/templates/partials/test_cluster.zapt @@ -76,10 +76,14 @@ bool testSendCluster{{parent.filename}}_{{asTestIndex index}}_{{asUpperCamelCase } {{/if}} - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], {{response.error}}); - {{#unless (isStrEqual "0" response.error)}} - [expectation fulfill]; + {{#if response.error}} + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], {{response.error}}); + [expectation fulfill]; + {{else if response.errorWrongValue}} + XCTAssertNotEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + [expectation fulfill]; {{else}} + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); {{#unless isSubscribeAttribute}} {{#chip_tests_item_response_parameters}} @@ -153,7 +157,7 @@ bool testSendCluster{{parent.filename}}_{{asTestIndex index}}_{{asUpperCamelCase {{else}} testSendCluster{{parent.filename}}_{{asTestIndex index}}_{{asUpperCamelCase command}}_Fulfilled = true; {{/unless}} - {{/unless}} + {{/if}} }]; {{/if}} diff --git a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m index d9fc391c3743a2..97cb01ca6fa604 100644 --- a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m +++ b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m @@ -221,7 +221,7 @@ - (void)testSendClusterTest_TC_BI_1_1_000001_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"write the default values to mandatory global attribute: ClusterRevision Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -479,7 +479,7 @@ - (void)testSendClusterTest_TC_BI_2_1_000009_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write the default values to mandatory non-global attribute: StatusFlags Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -745,7 +745,7 @@ - (void)testSendClusterTest_TC_BOOL_1_1_000001_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"write the default values to mandatory global attribute: ClusterRevision Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -836,7 +836,7 @@ - (void)testSendClusterTest_TC_BOOL_2_1_000002_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write the default value to mandatory non-global attribute: StateValue Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -885,7 +885,7 @@ - (void)testSendClusterTest_TC_CC_1_1_000000_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"write the default values to mandatory global attribute: ClusterRevision Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -956,7 +956,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000002_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write the default value to mandatory attribute: CurrentHue Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -1050,7 +1050,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000006_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write the default value to mandatory attribute: CurrentSaturation Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -1143,7 +1143,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000010_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write the default value to mandatory attribute: CurrentX Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -1237,7 +1237,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000014_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write the default values to mandatory attribute: CurrentY Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -1465,7 +1465,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000024_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write the default values to mandatory attribute: EnhancedCurrentHue Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -1573,7 +1573,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000029_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write the default values to mandatory attribute: ColorLoopActive Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -1663,7 +1663,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000033_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write the default values to mandatory attribute: ColorLoopDirection Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -1752,7 +1752,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000037_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write the default values to mandatory attribute: ColorLoopTime Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -1844,7 +1844,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000041_WriteAttribute @"Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -1937,7 +1937,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000045_WriteAttribute @"ColorLoopStoredEnhancedHue Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -2032,7 +2032,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000049_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write the default values to mandatory attribute: ColorCapabilities Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -2130,7 +2130,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000053_WriteAttribute @"Write the default values to mandatory attribute: ColorTempPhysicalMinMireds Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -2229,7 +2229,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000057_WriteAttribute @"Write the default values to mandatory attribute: ColorTempPhysicalMaxMireds Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -2299,7 +2299,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000060_WriteAttribute @"CoupleColorTempToLevelMinMireds Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -2472,7 +2472,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000067_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write the default values to optional attribute: RemainingTime Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -2542,7 +2542,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000070_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write the default values to optional attribute: DriftCompensation Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -2635,7 +2635,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000074_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write the default mandatory attribute: NumberOfPrimaries Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -2704,7 +2704,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000077_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write the default mandatory attribute: Primary1X Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -2773,7 +2773,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000080_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write the default mandatory attribute: Primary1Y Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -2861,7 +2861,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000084_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write the default mandatory attribute: Primary2X Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -2930,7 +2930,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000087_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write the default mandatory attribute: Primary2Y Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -3018,7 +3018,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000091_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write the default mandatory attribute: Primary3X Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -3087,7 +3087,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000094_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write the default mandatory attribute: Primary3Y Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -3175,7 +3175,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000098_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write the default mandatory attribute: Primary4X Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -3244,7 +3244,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000101_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write the default mandatory attribute: Primary4Y Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -3332,7 +3332,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000105_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write the default mandatory attribute: Primary5X Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -3401,7 +3401,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000108_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write the default mandatory attribute: Primary5Y Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -3489,7 +3489,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000112_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write the default mandatory attribute: Primary6X Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -3558,7 +3558,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000115_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write the default mandatory attribute: Primary6Y Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -9100,7 +9100,7 @@ - (void)testSendClusterTest_TC_EMR_1_1_000001_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"write the default values to mandatory global attribute: ClusterRevision Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -9148,7 +9148,7 @@ - (void)testSendClusterTest_TC_FLW_1_1_000000_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"write the default values to mandatory global attribute: ClusterRevision Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -9228,7 +9228,7 @@ - (void)testSendClusterTest_TC_FLW_2_1_000003_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"write the default value to optional attribute: MinMeasuredValue Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -9250,7 +9250,7 @@ - (void)testSendClusterTest_TC_FLW_2_1_000004_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"write the default value to optional attribute: MaxMeasuredValue Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -9398,7 +9398,7 @@ - (void)testSendClusterTest_TC_ILL_1_1_000001_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"write the default values to mandatory global attribute: ClusterRevision Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -9448,7 +9448,7 @@ - (void)testSendClusterTest_TC_LVL_1_1_000000_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"write the default values to mandatory global attribute: ClusterRevision Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -10359,7 +10359,7 @@ - (void)testSendClusterTest_TC_MC_1_1_000000_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"write the default values to mandatory global attribute: ClusterRevision Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -10427,7 +10427,7 @@ - (void)testSendClusterTest_TC_OCC_1_1_000001_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"write the default values to mandatory global attribute: ClusterRevision Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -10474,7 +10474,7 @@ - (void)testSendClusterTest_TC_OCC_2_1_000001_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Writes the respective default value to mandatory attribute: Occupancy Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -10547,7 +10547,7 @@ - (void)testSendClusterTest_TC_OCC_2_1_000004_WriteAttribute @"Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -10624,7 +10624,7 @@ - (void)testSendClusterTest_TC_OCC_2_1_000007_WriteAttribute @"OccupancySensorTypeBitmap Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -10736,7 +10736,7 @@ - (void)testSendClusterTest_TC_OO_1_1_000001_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"write the default values to mandatory global attribute: ClusterRevision Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -10806,7 +10806,7 @@ - (void)testSendClusterTest_TC_OO_1_1_000004_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"write the default values to optional global attribute: FeatureMap Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -12491,7 +12491,7 @@ - (void)testSendClusterTest_TC_PRS_1_1_000002_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write the default values to mandatory global attribute: ClusterRevision Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -12557,7 +12557,7 @@ - (void)testSendClusterTest_TC_PRS_2_1_000001_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write the default values to mandatory attribute: MeasuredValue Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -12623,7 +12623,7 @@ - (void)testSendClusterTest_TC_PRS_2_1_000004_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write the default values to mandatory attribute: MinMeasuredValue Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -12689,7 +12689,7 @@ - (void)testSendClusterTest_TC_PRS_2_1_000007_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write the default values to mandatory attribute: MaxMeasuredValue Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -12739,7 +12739,7 @@ - (void)testSendClusterTest_TC_PCC_1_1_000000_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"write the default values to mandatory global attribute: ClusterRevision Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -13061,7 +13061,7 @@ - (void)testSendClusterTest_TC_RH_1_1_000000_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"write the default values to mandatory global attribute: ClusterRevision Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -13204,7 +13204,7 @@ - (void)testSendClusterTest_TC_TM_1_1_000001_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"write the default values to mandatory global attribute: ClusterRevision Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -13319,7 +13319,7 @@ - (void)testSendClusterTest_TC_TSTAT_1_1_000000_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"write the default values to mandatory global attribute: ClusterRevision Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -13418,7 +13418,7 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000003_WriteAttribute @"AbsMinHeatSetpointLimit Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -13521,7 +13521,7 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000007_WriteAttribute @"AbsMaxHeatSetpointLimit Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -13624,7 +13624,7 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000011_WriteAttribute @"AbsMinCoolSetpointLimit Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -13727,7 +13727,7 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000015_WriteAttribute @"AbsMaxCoolSetpointLimit Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -14721,7 +14721,7 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000054_WriteAttribute NSLog(@"Writes the respective default value to optional attributes to DUT: StartOfWeek Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -14789,7 +14789,7 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000057_WriteAttribute @"NumberOfWeeklyTransitions Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -14833,7 +14833,7 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000059_WriteAttribute @"NumberOfDailyTransitions Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -16067,7 +16067,7 @@ - (void)testSendClusterTest_TC_TSUIC_1_1_000000_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"write the default values to mandatory global attribute: ClusterRevision Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -16711,7 +16711,7 @@ - (void)testSendClusterTest_TC_DIAGTH_1_1_000001_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"write the default values to mandatory global attribute: ClusterRevision Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -16789,7 +16789,7 @@ - (void)testSendClusterTest_TC_WNCV_1_1_000001_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"3a: write a value into the RO mandatory global attribute: ClusterRevision Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -16859,7 +16859,7 @@ - (void)testSendClusterTest_TC_WNCV_1_1_000004_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"3a: write the default value to optional global attribute: FeatureMap Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -16929,7 +16929,7 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000001_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"3a: write a value into the RO mandatory attribute: Type Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -16999,7 +16999,7 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000004_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"3a: write a value into the RO mandatory attribute: ConfigStatus Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -17071,7 +17071,7 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000007_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"3a: write a value into the RO mandatory attribute: OperationalStatus Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -17143,7 +17143,7 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000010_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"3a: write a value into the RO mandatory attribute: EndProductType Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -17288,7 +17288,7 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000016_WriteAttribute @"TargetPositionLiftPercent100ths Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -17364,7 +17364,7 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000019_WriteAttribute @"TargetPositionTiltPercent100ths Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -17440,7 +17440,7 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000022_WriteAttribute @"CurrentPositionLiftPercent100ths Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -17516,7 +17516,7 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000025_WriteAttribute @"CurrentPositionTiltPercent100ths Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -17591,7 +17591,7 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000028_WriteAttribute NSLog(@"3a: write a value into the RO optional attribute: InstalledOpenLimitLift Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -17665,7 +17665,7 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000031_WriteAttribute @"Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -17739,7 +17739,7 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000034_WriteAttribute NSLog(@"3a: write a value into the RO optional attribute: InstalledOpenLimitTilt Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -17813,7 +17813,7 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000037_WriteAttribute @"Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -17884,7 +17884,7 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000040_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"5a: write a value into the RO mandatory attribute: SafetyStatus Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -17956,7 +17956,7 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000043_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"5a: write a value into the RO optional attribute: CurrentPositionLift Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -18029,7 +18029,7 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000046_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"5a: write a value into the RO optional attribute: CurrentPositionTilt Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -18104,7 +18104,7 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000049_WriteAttribute @"CurrentPositionLiftPercentage Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -18180,7 +18180,7 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000052_WriteAttribute @"CurrentPositionTiltPercentage Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); [expectation fulfill]; }]; @@ -18531,7 +18531,7 @@ - (void)testSendClusterTestCluster_000001_TestNotHandled [cluster testNotHandledWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"Send Test Not Handled Command Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 133); [expectation fulfill]; }]; @@ -18608,7 +18608,7 @@ - (void)testSendClusterTestCluster_000004_TestAddArguments CHIPTestClusterClusterTestAddArgumentsResponseParams * _Nullable values, NSError * _Nullable err) { NSLog(@"Send failing Test Add Arguments Command Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 133); [expectation fulfill]; }]; @@ -20669,7 +20669,7 @@ - (void)testSendClusterTestCluster_000093_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write attribute OCTET_STRING Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], true); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 135); [expectation fulfill]; }]; @@ -20908,7 +20908,7 @@ - (void)testSendClusterTestCluster_000103_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write attribute CHAR_STRING - Value too long Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], true); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 135); [expectation fulfill]; }]; @@ -21359,13 +21359,31 @@ - (void)testSendClusterTestCluster_000122_Test [cluster testWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"Send Test Command to unsupported endpoint Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertNotEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); [expectation fulfill]; }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000123_ReadAttribute +- (void)testSendClusterTestCluster_000123_Test +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Send Test Command to unsupported cluster"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:0 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster testWithCompletionHandler:^(NSError * _Nullable err) { + NSLog(@"Send Test Command to unsupported cluster Error: %@", err); + + XCTAssertNotEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000124_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute vendor_id Default Value"]; @@ -21389,7 +21407,7 @@ - (void)testSendClusterTestCluster_000123_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000124_WriteAttribute +- (void)testSendClusterTestCluster_000125_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute vendor_id"]; @@ -21411,7 +21429,7 @@ - (void)testSendClusterTestCluster_000124_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000125_ReadAttribute +- (void)testSendClusterTestCluster_000126_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute vendor_id"]; @@ -21435,7 +21453,7 @@ - (void)testSendClusterTestCluster_000125_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000126_WriteAttribute +- (void)testSendClusterTestCluster_000127_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Restore attribute vendor_id"]; @@ -21457,7 +21475,7 @@ - (void)testSendClusterTestCluster_000126_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000127_TestEnumsRequest +- (void)testSendClusterTestCluster_000128_TestEnumsRequest { XCTestExpectation * expectation = [self expectationWithDescription:@"Send a command with a vendor_id and enum"]; @@ -21490,7 +21508,7 @@ - (void)testSendClusterTestCluster_000127_TestEnumsRequest [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000128_TestStructArgumentRequest +- (void)testSendClusterTestCluster_000129_TestStructArgumentRequest { XCTestExpectation * expectation = [self expectationWithDescription:@"Send Test Command With Struct Argument and arg1.b is true"]; @@ -21528,7 +21546,7 @@ - (void)testSendClusterTestCluster_000128_TestStructArgumentRequest [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000129_TestStructArgumentRequest +- (void)testSendClusterTestCluster_000130_TestStructArgumentRequest { XCTestExpectation * expectation = [self expectationWithDescription:@"Send Test Command With Struct Argument and arg1.b is false"]; @@ -21566,7 +21584,7 @@ - (void)testSendClusterTestCluster_000129_TestStructArgumentRequest [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000130_SimpleStructEchoRequest +- (void)testSendClusterTestCluster_000131_SimpleStructEchoRequest { XCTestExpectation * expectation = [self expectationWithDescription:@"Send Test Command With Struct Argument and see what we get back"]; @@ -21613,7 +21631,7 @@ - (void)testSendClusterTestCluster_000130_SimpleStructEchoRequest [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000131_TestListInt8UArgumentRequest +- (void)testSendClusterTestCluster_000132_TestListInt8UArgumentRequest { XCTestExpectation * expectation = [self expectationWithDescription:@"Send Test Command With List of INT8U and none of them is set to 0"]; @@ -21654,7 +21672,7 @@ - (void)testSendClusterTestCluster_000131_TestListInt8UArgumentRequest [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000132_TestListInt8UArgumentRequest +- (void)testSendClusterTestCluster_000133_TestListInt8UArgumentRequest { XCTestExpectation * expectation = [self expectationWithDescription:@"Send Test Command With List of INT8U and one of them is set to 0"]; @@ -21696,7 +21714,7 @@ - (void)testSendClusterTestCluster_000132_TestListInt8UArgumentRequest [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000133_TestListInt8UReverseRequest +- (void)testSendClusterTestCluster_000134_TestListInt8UReverseRequest { XCTestExpectation * expectation = [self expectationWithDescription:@"Send Test Command With List of INT8U and get it reversed"]; @@ -21745,7 +21763,7 @@ - (void)testSendClusterTestCluster_000133_TestListInt8UReverseRequest [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000134_TestListInt8UReverseRequest +- (void)testSendClusterTestCluster_000135_TestListInt8UReverseRequest { XCTestExpectation * expectation = [self expectationWithDescription:@"Send Test Command With empty List of INT8U and get an empty list back"]; @@ -21777,7 +21795,7 @@ - (void)testSendClusterTestCluster_000134_TestListInt8UReverseRequest [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000135_TestListStructArgumentRequest +- (void)testSendClusterTestCluster_000136_TestListStructArgumentRequest { XCTestExpectation * expectation = [self expectationWithDescription:@"Send Test Command With List of Struct Argument and arg1.b of first item is true"]; @@ -21832,7 +21850,7 @@ - (void)testSendClusterTestCluster_000135_TestListStructArgumentRequest [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000136_TestListStructArgumentRequest +- (void)testSendClusterTestCluster_000137_TestListStructArgumentRequest { XCTestExpectation * expectation = [self expectationWithDescription:@"Send Test Command With List of Struct Argument and arg1.b of first item is false"]; @@ -21887,7 +21905,7 @@ - (void)testSendClusterTestCluster_000136_TestListStructArgumentRequest [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000137_WriteAttribute +- (void)testSendClusterTestCluster_000138_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute LIST With List of INT8U and none of them is set to 0"]; @@ -21917,7 +21935,7 @@ - (void)testSendClusterTestCluster_000137_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000138_ReadAttribute +- (void)testSendClusterTestCluster_000139_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute LIST With List of INT8U"]; @@ -21945,7 +21963,7 @@ - (void)testSendClusterTestCluster_000138_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000139_WriteAttribute +- (void)testSendClusterTestCluster_000140_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute LIST With List of OCTET_STRING"]; @@ -21974,7 +21992,7 @@ - (void)testSendClusterTestCluster_000139_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000140_ReadAttribute +- (void)testSendClusterTestCluster_000141_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute LIST With List of OCTET_STRING"]; @@ -22002,7 +22020,7 @@ - (void)testSendClusterTestCluster_000140_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000141_WriteAttribute +- (void)testSendClusterTestCluster_000142_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute LIST With List of LIST_STRUCT_OCTET_STRING"]; @@ -22044,7 +22062,7 @@ - (void)testSendClusterTestCluster_000141_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000142_ReadAttribute +- (void)testSendClusterTestCluster_000143_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute LIST With List of LIST_STRUCT_OCTET_STRING"]; @@ -22085,7 +22103,7 @@ - (void)testSendClusterTestCluster_000142_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000143_TestNullableOptionalRequest +- (void)testSendClusterTestCluster_000144_TestNullableOptionalRequest { XCTestExpectation * expectation = [self expectationWithDescription:@"Send Test Command with optional arg set."]; @@ -22126,7 +22144,7 @@ - (void)testSendClusterTestCluster_000143_TestNullableOptionalRequest [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000144_TestNullableOptionalRequest +- (void)testSendClusterTestCluster_000145_TestNullableOptionalRequest { XCTestExpectation * expectation = [self expectationWithDescription:@"Send Test Command without its optional arg."]; @@ -22153,7 +22171,7 @@ - (void)testSendClusterTestCluster_000144_TestNullableOptionalRequest [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000145_WriteAttribute +- (void)testSendClusterTestCluster_000146_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_BOOLEAN null"]; @@ -22175,7 +22193,7 @@ - (void)testSendClusterTestCluster_000145_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000146_ReadAttribute +- (void)testSendClusterTestCluster_000147_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_BOOLEAN null"]; @@ -22199,7 +22217,7 @@ - (void)testSendClusterTestCluster_000146_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000147_WriteAttribute +- (void)testSendClusterTestCluster_000148_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_BOOLEAN True"]; @@ -22221,7 +22239,7 @@ - (void)testSendClusterTestCluster_000147_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000148_ReadAttribute +- (void)testSendClusterTestCluster_000149_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_BOOLEAN True"]; @@ -22246,7 +22264,7 @@ - (void)testSendClusterTestCluster_000148_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000149_WriteAttribute +- (void)testSendClusterTestCluster_000150_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_BITMAP8 Max Value"]; @@ -22268,7 +22286,7 @@ - (void)testSendClusterTestCluster_000149_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000150_ReadAttribute +- (void)testSendClusterTestCluster_000151_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_BITMAP8 Max Value"]; @@ -22293,7 +22311,7 @@ - (void)testSendClusterTestCluster_000150_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000151_WriteAttribute +- (void)testSendClusterTestCluster_000152_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_BITMAP8 Invalid Value"]; @@ -22308,13 +22326,13 @@ - (void)testSendClusterTestCluster_000151_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write attribute NULLABLE_BITMAP8 Invalid Value Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 135); [expectation fulfill]; }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000152_ReadAttribute +- (void)testSendClusterTestCluster_000153_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_BITMAP8 unchanged Value"]; @@ -22339,7 +22357,7 @@ - (void)testSendClusterTestCluster_000152_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000153_WriteAttribute +- (void)testSendClusterTestCluster_000154_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_BITMAP8 null Value"]; @@ -22361,7 +22379,7 @@ - (void)testSendClusterTestCluster_000153_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000154_ReadAttribute +- (void)testSendClusterTestCluster_000155_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_BITMAP8 null Value"]; @@ -22385,7 +22403,7 @@ - (void)testSendClusterTestCluster_000154_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000155_WriteAttribute +- (void)testSendClusterTestCluster_000156_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_BITMAP16 Max Value"]; @@ -22407,7 +22425,7 @@ - (void)testSendClusterTestCluster_000155_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000156_ReadAttribute +- (void)testSendClusterTestCluster_000157_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_BITMAP16 Max Value"]; @@ -22432,7 +22450,7 @@ - (void)testSendClusterTestCluster_000156_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000157_WriteAttribute +- (void)testSendClusterTestCluster_000158_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_BITMAP16 Invalid Value"]; @@ -22447,13 +22465,13 @@ - (void)testSendClusterTestCluster_000157_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write attribute NULLABLE_BITMAP16 Invalid Value Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 135); [expectation fulfill]; }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000158_ReadAttribute +- (void)testSendClusterTestCluster_000159_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_BITMAP16 unchanged Value"]; @@ -22478,7 +22496,7 @@ - (void)testSendClusterTestCluster_000158_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000159_WriteAttribute +- (void)testSendClusterTestCluster_000160_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_BITMAP16 null Value"]; @@ -22500,7 +22518,7 @@ - (void)testSendClusterTestCluster_000159_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000160_ReadAttribute +- (void)testSendClusterTestCluster_000161_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_BITMAP16 null Value"]; @@ -22524,7 +22542,7 @@ - (void)testSendClusterTestCluster_000160_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000161_WriteAttribute +- (void)testSendClusterTestCluster_000162_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_BITMAP32 Max Value"]; @@ -22546,7 +22564,7 @@ - (void)testSendClusterTestCluster_000161_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000162_ReadAttribute +- (void)testSendClusterTestCluster_000163_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_BITMAP32 Max Value"]; @@ -22571,7 +22589,7 @@ - (void)testSendClusterTestCluster_000162_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000163_WriteAttribute +- (void)testSendClusterTestCluster_000164_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_BITMAP32 Invalid Value"]; @@ -22586,13 +22604,13 @@ - (void)testSendClusterTestCluster_000163_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write attribute NULLABLE_BITMAP32 Invalid Value Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 135); [expectation fulfill]; }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000164_ReadAttribute +- (void)testSendClusterTestCluster_000165_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_BITMAP32 unchanged Value"]; @@ -22617,7 +22635,7 @@ - (void)testSendClusterTestCluster_000164_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000165_WriteAttribute +- (void)testSendClusterTestCluster_000166_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_BITMAP32 null Value"]; @@ -22639,7 +22657,7 @@ - (void)testSendClusterTestCluster_000165_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000166_ReadAttribute +- (void)testSendClusterTestCluster_000167_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_BITMAP32 null Value"]; @@ -22663,7 +22681,7 @@ - (void)testSendClusterTestCluster_000166_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000167_WriteAttribute +- (void)testSendClusterTestCluster_000168_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_BITMAP64 Max Value"]; @@ -22685,7 +22703,7 @@ - (void)testSendClusterTestCluster_000167_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000168_ReadAttribute +- (void)testSendClusterTestCluster_000169_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_BITMAP64 Max Value"]; @@ -22710,7 +22728,7 @@ - (void)testSendClusterTestCluster_000168_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000169_WriteAttribute +- (void)testSendClusterTestCluster_000170_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_BITMAP64 Invalid Value"]; @@ -22725,13 +22743,13 @@ - (void)testSendClusterTestCluster_000169_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write attribute NULLABLE_BITMAP64 Invalid Value Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 135); [expectation fulfill]; }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000170_ReadAttribute +- (void)testSendClusterTestCluster_000171_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_BITMAP64 unchanged Value"]; @@ -22756,7 +22774,7 @@ - (void)testSendClusterTestCluster_000170_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000171_WriteAttribute +- (void)testSendClusterTestCluster_000172_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_BITMAP64 null Value"]; @@ -22778,7 +22796,7 @@ - (void)testSendClusterTestCluster_000171_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000172_ReadAttribute +- (void)testSendClusterTestCluster_000173_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_BITMAP64 null Value"]; @@ -22802,7 +22820,7 @@ - (void)testSendClusterTestCluster_000172_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000173_WriteAttribute +- (void)testSendClusterTestCluster_000174_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_INT8U Max Value"]; @@ -22824,7 +22842,7 @@ - (void)testSendClusterTestCluster_000173_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000174_ReadAttribute +- (void)testSendClusterTestCluster_000175_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_INT8U Max Value"]; @@ -22849,7 +22867,7 @@ - (void)testSendClusterTestCluster_000174_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000175_WriteAttribute +- (void)testSendClusterTestCluster_000176_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_INT8U Invalid Value"]; @@ -22864,13 +22882,13 @@ - (void)testSendClusterTestCluster_000175_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write attribute NULLABLE_INT8U Invalid Value Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 135); [expectation fulfill]; }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000176_ReadAttribute +- (void)testSendClusterTestCluster_000177_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_INT8U unchanged Value"]; @@ -22895,7 +22913,7 @@ - (void)testSendClusterTestCluster_000176_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000177_WriteAttribute +- (void)testSendClusterTestCluster_000178_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_INT8U null Value"]; @@ -22917,7 +22935,7 @@ - (void)testSendClusterTestCluster_000177_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000178_ReadAttribute +- (void)testSendClusterTestCluster_000179_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_INT8U null Value"]; @@ -22941,7 +22959,7 @@ - (void)testSendClusterTestCluster_000178_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000179_WriteAttribute +- (void)testSendClusterTestCluster_000180_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_INT16U Max Value"]; @@ -22963,7 +22981,7 @@ - (void)testSendClusterTestCluster_000179_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000180_ReadAttribute +- (void)testSendClusterTestCluster_000181_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_INT16U Max Value"]; @@ -22988,7 +23006,7 @@ - (void)testSendClusterTestCluster_000180_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000181_WriteAttribute +- (void)testSendClusterTestCluster_000182_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_INT16U Invalid Value"]; @@ -23003,13 +23021,13 @@ - (void)testSendClusterTestCluster_000181_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write attribute NULLABLE_INT16U Invalid Value Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 135); [expectation fulfill]; }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000182_ReadAttribute +- (void)testSendClusterTestCluster_000183_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_INT16U unchanged Value"]; @@ -23034,7 +23052,7 @@ - (void)testSendClusterTestCluster_000182_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000183_WriteAttribute +- (void)testSendClusterTestCluster_000184_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_INT16U null Value"]; @@ -23056,7 +23074,7 @@ - (void)testSendClusterTestCluster_000183_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000184_ReadAttribute +- (void)testSendClusterTestCluster_000185_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_INT16U null Value"]; @@ -23080,7 +23098,7 @@ - (void)testSendClusterTestCluster_000184_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000185_WriteAttribute +- (void)testSendClusterTestCluster_000186_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_INT32U Max Value"]; @@ -23102,7 +23120,7 @@ - (void)testSendClusterTestCluster_000185_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000186_ReadAttribute +- (void)testSendClusterTestCluster_000187_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_INT32U Max Value"]; @@ -23127,7 +23145,7 @@ - (void)testSendClusterTestCluster_000186_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000187_WriteAttribute +- (void)testSendClusterTestCluster_000188_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_INT32U Invalid Value"]; @@ -23142,13 +23160,13 @@ - (void)testSendClusterTestCluster_000187_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write attribute NULLABLE_INT32U Invalid Value Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 135); [expectation fulfill]; }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000188_ReadAttribute +- (void)testSendClusterTestCluster_000189_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_INT32U unchanged Value"]; @@ -23173,7 +23191,7 @@ - (void)testSendClusterTestCluster_000188_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000189_WriteAttribute +- (void)testSendClusterTestCluster_000190_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_INT32U null Value"]; @@ -23195,7 +23213,7 @@ - (void)testSendClusterTestCluster_000189_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000190_ReadAttribute +- (void)testSendClusterTestCluster_000191_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_INT32U null Value"]; @@ -23219,7 +23237,7 @@ - (void)testSendClusterTestCluster_000190_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000191_WriteAttribute +- (void)testSendClusterTestCluster_000192_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_INT64U Max Value"]; @@ -23241,7 +23259,7 @@ - (void)testSendClusterTestCluster_000191_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000192_ReadAttribute +- (void)testSendClusterTestCluster_000193_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_INT64U Max Value"]; @@ -23266,7 +23284,7 @@ - (void)testSendClusterTestCluster_000192_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000193_WriteAttribute +- (void)testSendClusterTestCluster_000194_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_INT64U Invalid Value"]; @@ -23281,13 +23299,13 @@ - (void)testSendClusterTestCluster_000193_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write attribute NULLABLE_INT64U Invalid Value Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 135); [expectation fulfill]; }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000194_ReadAttribute +- (void)testSendClusterTestCluster_000195_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_INT64U unchanged Value"]; @@ -23312,7 +23330,7 @@ - (void)testSendClusterTestCluster_000194_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000195_WriteAttribute +- (void)testSendClusterTestCluster_000196_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_INT64U null Value"]; @@ -23334,7 +23352,7 @@ - (void)testSendClusterTestCluster_000195_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000196_ReadAttribute +- (void)testSendClusterTestCluster_000197_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_INT64U null Value"]; @@ -23358,7 +23376,7 @@ - (void)testSendClusterTestCluster_000196_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000197_WriteAttribute +- (void)testSendClusterTestCluster_000198_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_INT8S Min Value"]; @@ -23380,7 +23398,7 @@ - (void)testSendClusterTestCluster_000197_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000198_ReadAttribute +- (void)testSendClusterTestCluster_000199_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_INT8S Min Value"]; @@ -23405,7 +23423,7 @@ - (void)testSendClusterTestCluster_000198_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000199_WriteAttribute +- (void)testSendClusterTestCluster_000200_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_INT8S Invalid Value"]; @@ -23420,13 +23438,13 @@ - (void)testSendClusterTestCluster_000199_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write attribute NULLABLE_INT8S Invalid Value Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 135); [expectation fulfill]; }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000200_ReadAttribute +- (void)testSendClusterTestCluster_000201_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_INT8S unchanged Value"]; @@ -23451,7 +23469,7 @@ - (void)testSendClusterTestCluster_000200_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000201_WriteAttribute +- (void)testSendClusterTestCluster_000202_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_INT8S null Value"]; @@ -23473,7 +23491,7 @@ - (void)testSendClusterTestCluster_000201_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000202_ReadAttribute +- (void)testSendClusterTestCluster_000203_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_INT8S null Value"]; @@ -23497,7 +23515,7 @@ - (void)testSendClusterTestCluster_000202_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000203_WriteAttribute +- (void)testSendClusterTestCluster_000204_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_INT16S Min Value"]; @@ -23519,7 +23537,7 @@ - (void)testSendClusterTestCluster_000203_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000204_ReadAttribute +- (void)testSendClusterTestCluster_000205_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_INT16S Min Value"]; @@ -23544,7 +23562,7 @@ - (void)testSendClusterTestCluster_000204_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000205_WriteAttribute +- (void)testSendClusterTestCluster_000206_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_INT16S Invalid Value"]; @@ -23559,13 +23577,13 @@ - (void)testSendClusterTestCluster_000205_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write attribute NULLABLE_INT16S Invalid Value Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 135); [expectation fulfill]; }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000206_ReadAttribute +- (void)testSendClusterTestCluster_000207_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_INT16S unchanged Value"]; @@ -23590,7 +23608,7 @@ - (void)testSendClusterTestCluster_000206_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000207_WriteAttribute +- (void)testSendClusterTestCluster_000208_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_INT16S null Value"]; @@ -23612,7 +23630,7 @@ - (void)testSendClusterTestCluster_000207_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000208_ReadAttribute +- (void)testSendClusterTestCluster_000209_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_INT16S null Value"]; @@ -23636,7 +23654,7 @@ - (void)testSendClusterTestCluster_000208_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000209_WriteAttribute +- (void)testSendClusterTestCluster_000210_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_INT32S Min Value"]; @@ -23658,7 +23676,7 @@ - (void)testSendClusterTestCluster_000209_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000210_ReadAttribute +- (void)testSendClusterTestCluster_000211_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_INT32S Min Value"]; @@ -23683,7 +23701,7 @@ - (void)testSendClusterTestCluster_000210_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000211_WriteAttribute +- (void)testSendClusterTestCluster_000212_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_INT32S Invalid Value"]; @@ -23698,13 +23716,13 @@ - (void)testSendClusterTestCluster_000211_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write attribute NULLABLE_INT32S Invalid Value Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 135); [expectation fulfill]; }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000212_ReadAttribute +- (void)testSendClusterTestCluster_000213_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_INT32S unchanged Value"]; @@ -23729,7 +23747,7 @@ - (void)testSendClusterTestCluster_000212_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000213_WriteAttribute +- (void)testSendClusterTestCluster_000214_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_INT32S null Value"]; @@ -23751,7 +23769,7 @@ - (void)testSendClusterTestCluster_000213_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000214_ReadAttribute +- (void)testSendClusterTestCluster_000215_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_INT32S null Value"]; @@ -23775,7 +23793,7 @@ - (void)testSendClusterTestCluster_000214_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000215_WriteAttribute +- (void)testSendClusterTestCluster_000216_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_INT64S Min Value"]; @@ -23797,7 +23815,7 @@ - (void)testSendClusterTestCluster_000215_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000216_ReadAttribute +- (void)testSendClusterTestCluster_000217_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_INT64S Min Value"]; @@ -23822,7 +23840,7 @@ - (void)testSendClusterTestCluster_000216_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000217_WriteAttribute +- (void)testSendClusterTestCluster_000218_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_INT64S Invalid Value"]; @@ -23837,13 +23855,13 @@ - (void)testSendClusterTestCluster_000217_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write attribute NULLABLE_INT64S Invalid Value Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 135); [expectation fulfill]; }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000218_ReadAttribute +- (void)testSendClusterTestCluster_000219_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_INT64S unchanged Value"]; @@ -23868,7 +23886,7 @@ - (void)testSendClusterTestCluster_000218_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000219_WriteAttribute +- (void)testSendClusterTestCluster_000220_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_INT64S null Value"]; @@ -23890,7 +23908,7 @@ - (void)testSendClusterTestCluster_000219_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000220_ReadAttribute +- (void)testSendClusterTestCluster_000221_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_INT64S null Value"]; @@ -23914,7 +23932,7 @@ - (void)testSendClusterTestCluster_000220_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000221_WriteAttribute +- (void)testSendClusterTestCluster_000222_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_ENUM8 Max Value"]; @@ -23936,7 +23954,7 @@ - (void)testSendClusterTestCluster_000221_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000222_ReadAttribute +- (void)testSendClusterTestCluster_000223_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_ENUM8 Max Value"]; @@ -23961,7 +23979,7 @@ - (void)testSendClusterTestCluster_000222_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000223_WriteAttribute +- (void)testSendClusterTestCluster_000224_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_ENUM8 Invalid Value"]; @@ -23976,13 +23994,13 @@ - (void)testSendClusterTestCluster_000223_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write attribute NULLABLE_ENUM8 Invalid Value Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 135); [expectation fulfill]; }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000224_ReadAttribute +- (void)testSendClusterTestCluster_000225_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_ENUM8 unchanged Value"]; @@ -24007,7 +24025,7 @@ - (void)testSendClusterTestCluster_000224_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000225_WriteAttribute +- (void)testSendClusterTestCluster_000226_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_ENUM8 null Value"]; @@ -24029,7 +24047,7 @@ - (void)testSendClusterTestCluster_000225_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000226_ReadAttribute +- (void)testSendClusterTestCluster_000227_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_ENUM8 null Value"]; @@ -24053,7 +24071,7 @@ - (void)testSendClusterTestCluster_000226_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000227_WriteAttribute +- (void)testSendClusterTestCluster_000228_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_ENUM16 Max Value"]; @@ -24075,7 +24093,7 @@ - (void)testSendClusterTestCluster_000227_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000228_ReadAttribute +- (void)testSendClusterTestCluster_000229_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_ENUM16 Max Value"]; @@ -24100,7 +24118,7 @@ - (void)testSendClusterTestCluster_000228_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000229_WriteAttribute +- (void)testSendClusterTestCluster_000230_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_ENUM16 Invalid Value"]; @@ -24115,13 +24133,13 @@ - (void)testSendClusterTestCluster_000229_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write attribute NULLABLE_ENUM16 Invalid Value Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 135); [expectation fulfill]; }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000230_ReadAttribute +- (void)testSendClusterTestCluster_000231_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_ENUM16 unchanged Value"]; @@ -24146,7 +24164,7 @@ - (void)testSendClusterTestCluster_000230_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000231_WriteAttribute +- (void)testSendClusterTestCluster_000232_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_ENUM16 null Value"]; @@ -24168,7 +24186,7 @@ - (void)testSendClusterTestCluster_000231_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000232_ReadAttribute +- (void)testSendClusterTestCluster_000233_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_ENUM16 null Value"]; @@ -24192,7 +24210,7 @@ - (void)testSendClusterTestCluster_000232_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000233_ReadAttribute +- (void)testSendClusterTestCluster_000234_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_OCTET_STRING Default Value"]; @@ -24217,7 +24235,7 @@ - (void)testSendClusterTestCluster_000233_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000234_WriteAttribute +- (void)testSendClusterTestCluster_000235_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_OCTET_STRING"]; @@ -24239,7 +24257,7 @@ - (void)testSendClusterTestCluster_000234_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000235_ReadAttribute +- (void)testSendClusterTestCluster_000236_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_OCTET_STRING"]; @@ -24264,7 +24282,7 @@ - (void)testSendClusterTestCluster_000235_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000236_WriteAttribute +- (void)testSendClusterTestCluster_000237_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_OCTET_STRING"]; @@ -24286,7 +24304,7 @@ - (void)testSendClusterTestCluster_000236_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000237_ReadAttribute +- (void)testSendClusterTestCluster_000238_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_OCTET_STRING"]; @@ -24310,7 +24328,7 @@ - (void)testSendClusterTestCluster_000237_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000238_WriteAttribute +- (void)testSendClusterTestCluster_000239_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_OCTET_STRING"]; @@ -24332,7 +24350,7 @@ - (void)testSendClusterTestCluster_000238_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000239_ReadAttribute +- (void)testSendClusterTestCluster_000240_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_OCTET_STRING"]; @@ -24357,7 +24375,7 @@ - (void)testSendClusterTestCluster_000239_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000240_ReadAttribute +- (void)testSendClusterTestCluster_000241_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_CHAR_STRING Default Value"]; @@ -24382,7 +24400,7 @@ - (void)testSendClusterTestCluster_000240_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000241_WriteAttribute +- (void)testSendClusterTestCluster_000242_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_CHAR_STRING"]; @@ -24404,7 +24422,7 @@ - (void)testSendClusterTestCluster_000241_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000242_WriteAttribute +- (void)testSendClusterTestCluster_000243_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_CHAR_STRING - Value too long"]; @@ -24426,7 +24444,7 @@ - (void)testSendClusterTestCluster_000242_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000243_ReadAttribute +- (void)testSendClusterTestCluster_000244_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_CHAR_STRING"]; @@ -24450,7 +24468,7 @@ - (void)testSendClusterTestCluster_000243_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000244_WriteAttribute +- (void)testSendClusterTestCluster_000245_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_CHAR_STRING - Empty"]; @@ -24472,7 +24490,7 @@ - (void)testSendClusterTestCluster_000244_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000245_ReadAttribute +- (void)testSendClusterTestCluster_000246_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_CHAR_STRING"]; @@ -24497,9 +24515,9 @@ - (void)testSendClusterTestCluster_000245_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000246_ReadAttribute +- (void)testSendClusterTestCluster_000247_ReadAttribute { - XCTestExpectation * expectation = [self expectationWithDescription:@"Read nonexistent attribute."]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute from nonexistent endpoint."]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); @@ -24507,9 +24525,27 @@ - (void)testSendClusterTestCluster_000246_ReadAttribute XCTAssertNotNil(cluster); [cluster readAttributeListInt8uWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read nonexistent attribute. Error: %@", err); + NSLog(@"Read attribute from nonexistent endpoint. Error: %@", err); + + XCTAssertNotEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000248_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute from nonexistent cluster."]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:0 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeListInt8uWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute from nonexistent cluster. Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 134); + XCTAssertNotEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); [expectation fulfill]; }]; @@ -27967,7 +28003,7 @@ - (void)testSendClusterTestModeSelectCluster_000007_ChangeToMode completionHandler:^(NSError * _Nullable err) { NSLog(@"Change to Unsupported Mode Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 1); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 135); [expectation fulfill]; }]; diff --git a/src/darwin/Framework/CHIPTests/CHIPErrorTestUtils.mm b/src/darwin/Framework/CHIPTests/CHIPErrorTestUtils.mm index 26be1ef232aab4..4a24cf04a351f6 100644 --- a/src/darwin/Framework/CHIPTests/CHIPErrorTestUtils.mm +++ b/src/darwin/Framework/CHIPTests/CHIPErrorTestUtils.mm @@ -40,8 +40,20 @@ + (uint8_t)errorToZCLErrorCode:(NSError * _Nullable)error switch (error.code) { case CHIPErrorCodeDuplicateExists: return EMBER_ZCL_STATUS_DUPLICATE_EXISTS; + case CHIPErrorCodeUnsupportedEndpoint: + return EMBER_ZCL_STATUS_UNSUPPORTED_ENDPOINT; + case CHIPErrorCodeUnsupportedCommand: + return EMBER_ZCL_STATUS_UNSUPPORTED_COMMAND; + case CHIPErrorCodeInvalidCommand: + return EMBER_ZCL_STATUS_INVALID_COMMAND; case CHIPErrorCodeUnsupportedAttribute: return EMBER_ZCL_STATUS_UNSUPPORTED_ATTRIBUTE; + case CHIPErrorCodeConstraintError: + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + case CHIPErrorCodeUnsupportedWrite: + return EMBER_ZCL_STATUS_UNSUPPORTED_WRITE; + case CHIPErrorCodeUnsupportedCluster: + return EMBER_ZCL_STATUS_UNSUPPORTED_CLUSTER; case CHIPSuccess: return EMBER_ZCL_STATUS_SUCCESS; default: diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 05f8d82f8304d3..50f530863c7e2d 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -268,7 +268,11 @@ class Test_TC_BI_1_1 : public TestCommand clusterRevisionArgument, this, OnSuccessCallback_1, OnFailureCallback_1); } - void OnFailureResponse_1(uint8_t status) { NextTest(); } + void OnFailureResponse_1(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_1() { ThrowSuccessResponse(); } @@ -668,7 +672,11 @@ class Test_TC_BI_2_1 : public TestCommand statusFlagsArgument, this, OnSuccessCallback_9, OnFailureCallback_9); } - void OnFailureResponse_9(uint8_t status) { NextTest(); } + void OnFailureResponse_9(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_9() { ThrowSuccessResponse(); } @@ -1123,7 +1131,11 @@ class Test_TC_BOOL_1_1 : public TestCommand clusterRevisionArgument, this, OnSuccessCallback_1, OnFailureCallback_1); } - void OnFailureResponse_1(uint8_t status) { NextTest(); } + void OnFailureResponse_1(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_1() { ThrowSuccessResponse(); } @@ -1299,7 +1311,11 @@ class Test_TC_BOOL_2_1 : public TestCommand stateValueArgument, this, OnSuccessCallback_2, OnFailureCallback_2); } - void OnFailureResponse_2(uint8_t status) { NextTest(); } + void OnFailureResponse_2(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_2() { ThrowSuccessResponse(); } @@ -1395,7 +1411,11 @@ class Test_TC_CC_1_1 : public TestCommand clusterRevisionArgument, this, OnSuccessCallback_0, OnFailureCallback_0); } - void OnFailureResponse_0(uint8_t status) { NextTest(); } + void OnFailureResponse_0(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_0() { ThrowSuccessResponse(); } }; @@ -3421,7 +3441,11 @@ class Test_TC_CC_2_1 : public TestCommand currentHueArgument, this, OnSuccessCallback_2, OnFailureCallback_2); } - void OnFailureResponse_2(uint8_t status) { NextTest(); } + void OnFailureResponse_2(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_2() { ThrowSuccessResponse(); } @@ -3496,7 +3520,11 @@ class Test_TC_CC_2_1 : public TestCommand currentSaturationArgument, this, OnSuccessCallback_6, OnFailureCallback_6); } - void OnFailureResponse_6(uint8_t status) { NextTest(); } + void OnFailureResponse_6(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_6() { ThrowSuccessResponse(); } @@ -3571,7 +3599,11 @@ class Test_TC_CC_2_1 : public TestCommand currentXArgument, this, OnSuccessCallback_10, OnFailureCallback_10); } - void OnFailureResponse_10(uint8_t status) { NextTest(); } + void OnFailureResponse_10(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_10() { ThrowSuccessResponse(); } @@ -3646,7 +3678,11 @@ class Test_TC_CC_2_1 : public TestCommand currentYArgument, this, OnSuccessCallback_14, OnFailureCallback_14); } - void OnFailureResponse_14(uint8_t status) { NextTest(); } + void OnFailureResponse_14(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_14() { ThrowSuccessResponse(); } @@ -3834,7 +3870,11 @@ class Test_TC_CC_2_1 : public TestCommand enhancedCurrentHueArgument, this, OnSuccessCallback_24, OnFailureCallback_24); } - void OnFailureResponse_24(uint8_t status) { NextTest(); } + void OnFailureResponse_24(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_24() { ThrowSuccessResponse(); } @@ -3927,7 +3967,11 @@ class Test_TC_CC_2_1 : public TestCommand colorLoopActiveArgument, this, OnSuccessCallback_29, OnFailureCallback_29); } - void OnFailureResponse_29(uint8_t status) { NextTest(); } + void OnFailureResponse_29(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_29() { ThrowSuccessResponse(); } @@ -4001,7 +4045,11 @@ class Test_TC_CC_2_1 : public TestCommand colorLoopDirectionArgument, this, OnSuccessCallback_33, OnFailureCallback_33); } - void OnFailureResponse_33(uint8_t status) { NextTest(); } + void OnFailureResponse_33(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_33() { ThrowSuccessResponse(); } @@ -4075,7 +4123,11 @@ class Test_TC_CC_2_1 : public TestCommand colorLoopTimeArgument, this, OnSuccessCallback_37, OnFailureCallback_37); } - void OnFailureResponse_37(uint8_t status) { NextTest(); } + void OnFailureResponse_37(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_37() { ThrowSuccessResponse(); } @@ -4149,7 +4201,11 @@ class Test_TC_CC_2_1 : public TestCommand colorLoopStartEnhancedHueArgument, this, OnSuccessCallback_41, OnFailureCallback_41); } - void OnFailureResponse_41(uint8_t status) { NextTest(); } + void OnFailureResponse_41(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_41() { ThrowSuccessResponse(); } @@ -4223,7 +4279,11 @@ class Test_TC_CC_2_1 : public TestCommand colorLoopStoredEnhancedHueArgument, this, OnSuccessCallback_45, OnFailureCallback_45); } - void OnFailureResponse_45(uint8_t status) { NextTest(); } + void OnFailureResponse_45(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_45() { ThrowSuccessResponse(); } @@ -4298,7 +4358,11 @@ class Test_TC_CC_2_1 : public TestCommand colorCapabilitiesArgument, this, OnSuccessCallback_49, OnFailureCallback_49); } - void OnFailureResponse_49(uint8_t status) { NextTest(); } + void OnFailureResponse_49(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_49() { ThrowSuccessResponse(); } @@ -4373,7 +4437,11 @@ class Test_TC_CC_2_1 : public TestCommand colorTempPhysicalMinArgument, this, OnSuccessCallback_53, OnFailureCallback_53); } - void OnFailureResponse_53(uint8_t status) { NextTest(); } + void OnFailureResponse_53(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_53() { ThrowSuccessResponse(); } @@ -4448,7 +4516,11 @@ class Test_TC_CC_2_1 : public TestCommand colorTempPhysicalMaxArgument, this, OnSuccessCallback_57, OnFailureCallback_57); } - void OnFailureResponse_57(uint8_t status) { NextTest(); } + void OnFailureResponse_57(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_57() { ThrowSuccessResponse(); } @@ -4503,7 +4575,11 @@ class Test_TC_CC_2_1 : public TestCommand coupleColorTempToLevelMinMiredsArgument, this, OnSuccessCallback_60, OnFailureCallback_60); } - void OnFailureResponse_60(uint8_t status) { NextTest(); } + void OnFailureResponse_60(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_60() { ThrowSuccessResponse(); } @@ -4634,7 +4710,11 @@ class Test_TC_CC_2_1 : public TestCommand remainingTimeArgument, this, OnSuccessCallback_67, OnFailureCallback_67); } - void OnFailureResponse_67(uint8_t status) { NextTest(); } + void OnFailureResponse_67(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_67() { ThrowSuccessResponse(); } @@ -4690,7 +4770,11 @@ class Test_TC_CC_2_1 : public TestCommand driftCompensationArgument, this, OnSuccessCallback_70, OnFailureCallback_70); } - void OnFailureResponse_70(uint8_t status) { NextTest(); } + void OnFailureResponse_70(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_70() { ThrowSuccessResponse(); } @@ -4766,7 +4850,11 @@ class Test_TC_CC_2_1 : public TestCommand numberOfPrimariesArgument, this, OnSuccessCallback_74, OnFailureCallback_74); } - void OnFailureResponse_74(uint8_t status) { NextTest(); } + void OnFailureResponse_74(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_74() { ThrowSuccessResponse(); } @@ -4822,7 +4910,11 @@ class Test_TC_CC_2_1 : public TestCommand primary1XArgument, this, OnSuccessCallback_77, OnFailureCallback_77); } - void OnFailureResponse_77(uint8_t status) { NextTest(); } + void OnFailureResponse_77(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_77() { ThrowSuccessResponse(); } @@ -4878,7 +4970,11 @@ class Test_TC_CC_2_1 : public TestCommand primary1YArgument, this, OnSuccessCallback_80, OnFailureCallback_80); } - void OnFailureResponse_80(uint8_t status) { NextTest(); } + void OnFailureResponse_80(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_80() { ThrowSuccessResponse(); } @@ -4953,7 +5049,11 @@ class Test_TC_CC_2_1 : public TestCommand primary2XArgument, this, OnSuccessCallback_84, OnFailureCallback_84); } - void OnFailureResponse_84(uint8_t status) { NextTest(); } + void OnFailureResponse_84(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_84() { ThrowSuccessResponse(); } @@ -5009,7 +5109,11 @@ class Test_TC_CC_2_1 : public TestCommand primary2YArgument, this, OnSuccessCallback_87, OnFailureCallback_87); } - void OnFailureResponse_87(uint8_t status) { NextTest(); } + void OnFailureResponse_87(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_87() { ThrowSuccessResponse(); } @@ -5084,7 +5188,11 @@ class Test_TC_CC_2_1 : public TestCommand primary3XArgument, this, OnSuccessCallback_91, OnFailureCallback_91); } - void OnFailureResponse_91(uint8_t status) { NextTest(); } + void OnFailureResponse_91(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_91() { ThrowSuccessResponse(); } @@ -5140,7 +5248,11 @@ class Test_TC_CC_2_1 : public TestCommand primary3YArgument, this, OnSuccessCallback_94, OnFailureCallback_94); } - void OnFailureResponse_94(uint8_t status) { NextTest(); } + void OnFailureResponse_94(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_94() { ThrowSuccessResponse(); } @@ -5215,7 +5327,11 @@ class Test_TC_CC_2_1 : public TestCommand primary4XArgument, this, OnSuccessCallback_98, OnFailureCallback_98); } - void OnFailureResponse_98(uint8_t status) { NextTest(); } + void OnFailureResponse_98(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_98() { ThrowSuccessResponse(); } @@ -5271,7 +5387,11 @@ class Test_TC_CC_2_1 : public TestCommand primary4YArgument, this, OnSuccessCallback_101, OnFailureCallback_101); } - void OnFailureResponse_101(uint8_t status) { NextTest(); } + void OnFailureResponse_101(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_101() { ThrowSuccessResponse(); } @@ -5346,7 +5466,11 @@ class Test_TC_CC_2_1 : public TestCommand primary5XArgument, this, OnSuccessCallback_105, OnFailureCallback_105); } - void OnFailureResponse_105(uint8_t status) { NextTest(); } + void OnFailureResponse_105(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_105() { ThrowSuccessResponse(); } @@ -5402,7 +5526,11 @@ class Test_TC_CC_2_1 : public TestCommand primary5YArgument, this, OnSuccessCallback_108, OnFailureCallback_108); } - void OnFailureResponse_108(uint8_t status) { NextTest(); } + void OnFailureResponse_108(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_108() { ThrowSuccessResponse(); } @@ -5477,7 +5605,11 @@ class Test_TC_CC_2_1 : public TestCommand primary6XArgument, this, OnSuccessCallback_112, OnFailureCallback_112); } - void OnFailureResponse_112(uint8_t status) { NextTest(); } + void OnFailureResponse_112(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_112() { ThrowSuccessResponse(); } @@ -5533,7 +5665,11 @@ class Test_TC_CC_2_1 : public TestCommand primary6YArgument, this, OnSuccessCallback_115, OnFailureCallback_115); } - void OnFailureResponse_115(uint8_t status) { NextTest(); } + void OnFailureResponse_115(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_115() { ThrowSuccessResponse(); } @@ -13905,7 +14041,11 @@ class Test_TC_EMR_1_1 : public TestCommand clusterRevisionArgument, this, OnSuccessCallback_1, OnFailureCallback_1); } - void OnFailureResponse_1(uint8_t status) { NextTest(); } + void OnFailureResponse_1(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_1() { ThrowSuccessResponse(); } @@ -14001,7 +14141,11 @@ class Test_TC_FLW_1_1 : public TestCommand clusterRevisionArgument, this, OnSuccessCallback_0, OnFailureCallback_0); } - void OnFailureResponse_0(uint8_t status) { NextTest(); } + void OnFailureResponse_0(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_0() { ThrowSuccessResponse(); } }; @@ -14229,7 +14373,11 @@ class Test_TC_FLW_2_1 : public TestCommand minMeasuredValueArgument, this, OnSuccessCallback_3, OnFailureCallback_3); } - void OnFailureResponse_3(uint8_t status) { NextTest(); } + void OnFailureResponse_3(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_3() { ThrowSuccessResponse(); } @@ -14246,7 +14394,11 @@ class Test_TC_FLW_2_1 : public TestCommand maxMeasuredValueArgument, this, OnSuccessCallback_4, OnFailureCallback_4); } - void OnFailureResponse_4(uint8_t status) { NextTest(); } + void OnFailureResponse_4(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_4() { ThrowSuccessResponse(); } @@ -14541,7 +14693,11 @@ class Test_TC_ILL_1_1 : public TestCommand clusterRevisionArgument, this, OnSuccessCallback_1, OnFailureCallback_1); } - void OnFailureResponse_1(uint8_t status) { NextTest(); } + void OnFailureResponse_1(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_1() { ThrowSuccessResponse(); } @@ -14637,7 +14793,11 @@ class Test_TC_LVL_1_1 : public TestCommand clusterRevisionArgument, this, OnSuccessCallback_0, OnFailureCallback_0); } - void OnFailureResponse_0(uint8_t status) { NextTest(); } + void OnFailureResponse_0(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_0() { ThrowSuccessResponse(); } }; @@ -16014,7 +16174,11 @@ class Test_TC_MC_1_1 : public TestCommand clusterRevisionArgument, this, OnSuccessCallback_0, OnFailureCallback_0); } - void OnFailureResponse_0(uint8_t status) { NextTest(); } + void OnFailureResponse_0(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_0() { ThrowSuccessResponse(); } }; @@ -16727,7 +16891,11 @@ class Test_TC_OCC_1_1 : public TestCommand clusterRevisionArgument, this, OnSuccessCallback_1, OnFailureCallback_1); } - void OnFailureResponse_1(uint8_t status) { NextTest(); } + void OnFailureResponse_1(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_1() { ThrowSuccessResponse(); } }; @@ -16933,7 +17101,11 @@ class Test_TC_OCC_2_1 : public TestCommand occupancyArgument, this, OnSuccessCallback_1, OnFailureCallback_1); } - void OnFailureResponse_1(uint8_t status) { NextTest(); } + void OnFailureResponse_1(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_1() { ThrowSuccessResponse(); } @@ -16989,7 +17161,11 @@ class Test_TC_OCC_2_1 : public TestCommand occupancySensorTypeArgument, this, OnSuccessCallback_4, OnFailureCallback_4); } - void OnFailureResponse_4(uint8_t status) { NextTest(); } + void OnFailureResponse_4(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_4() { ThrowSuccessResponse(); } @@ -17046,7 +17222,11 @@ class Test_TC_OCC_2_1 : public TestCommand occupancySensorTypeBitmapArgument, this, OnSuccessCallback_7, OnFailureCallback_7); } - void OnFailureResponse_7(uint8_t status) { NextTest(); } + void OnFailureResponse_7(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_7() { ThrowSuccessResponse(); } @@ -17342,7 +17522,11 @@ class Test_TC_OO_1_1 : public TestCommand clusterRevisionArgument, this, OnSuccessCallback_1, OnFailureCallback_1); } - void OnFailureResponse_1(uint8_t status) { NextTest(); } + void OnFailureResponse_1(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_1() { ThrowSuccessResponse(); } @@ -17397,7 +17581,11 @@ class Test_TC_OO_1_1 : public TestCommand featureMapArgument, this, OnSuccessCallback_4, OnFailureCallback_4); } - void OnFailureResponse_4(uint8_t status) { NextTest(); } + void OnFailureResponse_4(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_4() { ThrowSuccessResponse(); } @@ -19895,7 +20083,11 @@ class Test_TC_PRS_1_1 : public TestCommand clusterRevisionArgument, this, OnSuccessCallback_2, OnFailureCallback_2); } - void OnFailureResponse_2(uint8_t status) { NextTest(); } + void OnFailureResponse_2(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_2() { ThrowSuccessResponse(); } @@ -20115,7 +20307,11 @@ class Test_TC_PRS_2_1 : public TestCommand measuredValueArgument, this, OnSuccessCallback_1, OnFailureCallback_1); } - void OnFailureResponse_1(uint8_t status) { NextTest(); } + void OnFailureResponse_1(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_1() { ThrowSuccessResponse(); } @@ -20170,7 +20366,11 @@ class Test_TC_PRS_2_1 : public TestCommand minMeasuredValueArgument, this, OnSuccessCallback_4, OnFailureCallback_4); } - void OnFailureResponse_4(uint8_t status) { NextTest(); } + void OnFailureResponse_4(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_4() { ThrowSuccessResponse(); } @@ -20225,7 +20425,11 @@ class Test_TC_PRS_2_1 : public TestCommand maxMeasuredValueArgument, this, OnSuccessCallback_7, OnFailureCallback_7); } - void OnFailureResponse_7(uint8_t status) { NextTest(); } + void OnFailureResponse_7(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_7() { ThrowSuccessResponse(); } @@ -20321,7 +20525,11 @@ class Test_TC_PCC_1_1 : public TestCommand clusterRevisionArgument, this, OnSuccessCallback_0, OnFailureCallback_0); } - void OnFailureResponse_0(uint8_t status) { NextTest(); } + void OnFailureResponse_0(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_0() { ThrowSuccessResponse(); } }; @@ -20954,7 +21162,11 @@ class Test_TC_RH_1_1 : public TestCommand clusterRevisionArgument, this, OnSuccessCallback_0, OnFailureCallback_0); } - void OnFailureResponse_0(uint8_t status) { NextTest(); } + void OnFailureResponse_0(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_0() { ThrowSuccessResponse(); } }; @@ -21307,7 +21519,11 @@ class Test_TC_TM_1_1 : public TestCommand clusterRevisionArgument, this, OnSuccessCallback_1, OnFailureCallback_1); } - void OnFailureResponse_1(uint8_t status) { NextTest(); } + void OnFailureResponse_1(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_1() { ThrowSuccessResponse(); } @@ -21598,7 +21814,11 @@ class Test_TC_TSTAT_1_1 : public TestCommand clusterRevisionArgument, this, OnSuccessCallback_0, OnFailureCallback_0); } - void OnFailureResponse_0(uint8_t status) { NextTest(); } + void OnFailureResponse_0(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_0() { ThrowSuccessResponse(); } }; @@ -22560,7 +22780,11 @@ class Test_TC_TSTAT_2_1 : public TestCommand absMinHeatSetpointLimitArgument, this, OnSuccessCallback_3, OnFailureCallback_3); } - void OnFailureResponse_3(uint8_t status) { NextTest(); } + void OnFailureResponse_3(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_3() { ThrowSuccessResponse(); } @@ -22636,7 +22860,11 @@ class Test_TC_TSTAT_2_1 : public TestCommand absMaxHeatSetpointLimitArgument, this, OnSuccessCallback_7, OnFailureCallback_7); } - void OnFailureResponse_7(uint8_t status) { NextTest(); } + void OnFailureResponse_7(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_7() { ThrowSuccessResponse(); } @@ -22712,7 +22940,11 @@ class Test_TC_TSTAT_2_1 : public TestCommand absMinCoolSetpointLimitArgument, this, OnSuccessCallback_11, OnFailureCallback_11); } - void OnFailureResponse_11(uint8_t status) { NextTest(); } + void OnFailureResponse_11(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_11() { ThrowSuccessResponse(); } @@ -22788,7 +23020,11 @@ class Test_TC_TSTAT_2_1 : public TestCommand absMaxCoolSetpointLimitArgument, this, OnSuccessCallback_15, OnFailureCallback_15); } - void OnFailureResponse_15(uint8_t status) { NextTest(); } + void OnFailureResponse_15(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_15() { ThrowSuccessResponse(); } @@ -23525,7 +23761,11 @@ class Test_TC_TSTAT_2_1 : public TestCommand startOfWeekArgument, this, OnSuccessCallback_54, OnFailureCallback_54); } - void OnFailureResponse_54(uint8_t status) { NextTest(); } + void OnFailureResponse_54(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_54() { ThrowSuccessResponse(); } @@ -23580,7 +23820,11 @@ class Test_TC_TSTAT_2_1 : public TestCommand numberOfWeeklyTransitionsArgument, this, OnSuccessCallback_57, OnFailureCallback_57); } - void OnFailureResponse_57(uint8_t status) { NextTest(); } + void OnFailureResponse_57(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_57() { ThrowSuccessResponse(); } @@ -23616,7 +23860,11 @@ class Test_TC_TSTAT_2_1 : public TestCommand numberOfDailyTransitionsArgument, this, OnSuccessCallback_59, OnFailureCallback_59); } - void OnFailureResponse_59(uint8_t status) { NextTest(); } + void OnFailureResponse_59(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_59() { ThrowSuccessResponse(); } }; @@ -25251,7 +25499,11 @@ class Test_TC_TSUIC_1_1 : public TestCommand clusterRevisionArgument, this, OnSuccessCallback_0, OnFailureCallback_0); } - void OnFailureResponse_0(uint8_t status) { NextTest(); } + void OnFailureResponse_0(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_0() { ThrowSuccessResponse(); } }; @@ -26258,7 +26510,11 @@ class Test_TC_DIAGTH_1_1 : public TestCommand clusterRevisionArgument, this, OnSuccessCallback_1, OnFailureCallback_1); } - void OnFailureResponse_1(uint8_t status) { NextTest(); } + void OnFailureResponse_1(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_1() { ThrowSuccessResponse(); } @@ -26443,7 +26699,11 @@ class Test_TC_WNCV_1_1 : public TestCommand clusterRevisionArgument, this, OnSuccessCallback_1, OnFailureCallback_1); } - void OnFailureResponse_1(uint8_t status) { NextTest(); } + void OnFailureResponse_1(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_1() { ThrowSuccessResponse(); } @@ -26500,7 +26760,11 @@ class Test_TC_WNCV_1_1 : public TestCommand featureMapArgument, this, OnSuccessCallback_4, OnFailureCallback_4); } - void OnFailureResponse_4(uint8_t status) { NextTest(); } + void OnFailureResponse_4(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_4() { ThrowSuccessResponse(); } @@ -27340,7 +27604,11 @@ class Test_TC_WNCV_2_1 : public TestCommand typeArgument, this, OnSuccessCallback_1, OnFailureCallback_1); } - void OnFailureResponse_1(uint8_t status) { NextTest(); } + void OnFailureResponse_1(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_1() { ThrowSuccessResponse(); } @@ -27397,7 +27665,11 @@ class Test_TC_WNCV_2_1 : public TestCommand configStatusArgument, this, OnSuccessCallback_4, OnFailureCallback_4); } - void OnFailureResponse_4(uint8_t status) { NextTest(); } + void OnFailureResponse_4(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_4() { ThrowSuccessResponse(); } @@ -27454,7 +27726,11 @@ class Test_TC_WNCV_2_1 : public TestCommand operationalStatusArgument, this, OnSuccessCallback_7, OnFailureCallback_7); } - void OnFailureResponse_7(uint8_t status) { NextTest(); } + void OnFailureResponse_7(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_7() { ThrowSuccessResponse(); } @@ -27511,7 +27787,11 @@ class Test_TC_WNCV_2_1 : public TestCommand endProductTypeArgument, this, OnSuccessCallback_10, OnFailureCallback_10); } - void OnFailureResponse_10(uint8_t status) { NextTest(); } + void OnFailureResponse_10(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_10() { ThrowSuccessResponse(); } @@ -27625,7 +27905,11 @@ class Test_TC_WNCV_2_1 : public TestCommand targetPositionLiftPercent100thsArgument, this, OnSuccessCallback_16, OnFailureCallback_16); } - void OnFailureResponse_16(uint8_t status) { NextTest(); } + void OnFailureResponse_16(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_16() { ThrowSuccessResponse(); } @@ -27683,7 +27967,11 @@ class Test_TC_WNCV_2_1 : public TestCommand targetPositionTiltPercent100thsArgument, this, OnSuccessCallback_19, OnFailureCallback_19); } - void OnFailureResponse_19(uint8_t status) { NextTest(); } + void OnFailureResponse_19(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_19() { ThrowSuccessResponse(); } @@ -27741,7 +28029,11 @@ class Test_TC_WNCV_2_1 : public TestCommand currentPositionLiftPercent100thsArgument, this, OnSuccessCallback_22, OnFailureCallback_22); } - void OnFailureResponse_22(uint8_t status) { NextTest(); } + void OnFailureResponse_22(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_22() { ThrowSuccessResponse(); } @@ -27799,7 +28091,11 @@ class Test_TC_WNCV_2_1 : public TestCommand currentPositionTiltPercent100thsArgument, this, OnSuccessCallback_25, OnFailureCallback_25); } - void OnFailureResponse_25(uint8_t status) { NextTest(); } + void OnFailureResponse_25(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_25() { ThrowSuccessResponse(); } @@ -27856,7 +28152,11 @@ class Test_TC_WNCV_2_1 : public TestCommand installedOpenLimitLiftArgument, this, OnSuccessCallback_28, OnFailureCallback_28); } - void OnFailureResponse_28(uint8_t status) { NextTest(); } + void OnFailureResponse_28(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_28() { ThrowSuccessResponse(); } @@ -27913,7 +28213,11 @@ class Test_TC_WNCV_2_1 : public TestCommand installedClosedLimitLiftArgument, this, OnSuccessCallback_31, OnFailureCallback_31); } - void OnFailureResponse_31(uint8_t status) { NextTest(); } + void OnFailureResponse_31(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_31() { ThrowSuccessResponse(); } @@ -27970,7 +28274,11 @@ class Test_TC_WNCV_2_1 : public TestCommand installedOpenLimitTiltArgument, this, OnSuccessCallback_34, OnFailureCallback_34); } - void OnFailureResponse_34(uint8_t status) { NextTest(); } + void OnFailureResponse_34(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_34() { ThrowSuccessResponse(); } @@ -28027,7 +28335,11 @@ class Test_TC_WNCV_2_1 : public TestCommand installedClosedLimitTiltArgument, this, OnSuccessCallback_37, OnFailureCallback_37); } - void OnFailureResponse_37(uint8_t status) { NextTest(); } + void OnFailureResponse_37(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_37() { ThrowSuccessResponse(); } @@ -28084,7 +28396,11 @@ class Test_TC_WNCV_2_1 : public TestCommand safetyStatusArgument, this, OnSuccessCallback_40, OnFailureCallback_40); } - void OnFailureResponse_40(uint8_t status) { NextTest(); } + void OnFailureResponse_40(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_40() { ThrowSuccessResponse(); } @@ -28141,7 +28457,11 @@ class Test_TC_WNCV_2_1 : public TestCommand currentPositionLiftArgument, this, OnSuccessCallback_43, OnFailureCallback_43); } - void OnFailureResponse_43(uint8_t status) { NextTest(); } + void OnFailureResponse_43(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_43() { ThrowSuccessResponse(); } @@ -28198,7 +28518,11 @@ class Test_TC_WNCV_2_1 : public TestCommand currentPositionTiltArgument, this, OnSuccessCallback_46, OnFailureCallback_46); } - void OnFailureResponse_46(uint8_t status) { NextTest(); } + void OnFailureResponse_46(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_46() { ThrowSuccessResponse(); } @@ -28255,7 +28579,11 @@ class Test_TC_WNCV_2_1 : public TestCommand currentPositionLiftPercentageArgument, this, OnSuccessCallback_49, OnFailureCallback_49); } - void OnFailureResponse_49(uint8_t status) { NextTest(); } + void OnFailureResponse_49(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_49() { ThrowSuccessResponse(); } @@ -28312,7 +28640,11 @@ class Test_TC_WNCV_2_1 : public TestCommand currentPositionTiltPercentageArgument, this, OnSuccessCallback_52, OnFailureCallback_52); } - void OnFailureResponse_52(uint8_t status) { NextTest(); } + void OnFailureResponse_52(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 136)); + NextTest(); + } void OnSuccessResponse_52() { ThrowSuccessResponse(); } @@ -31325,506 +31657,514 @@ class TestCluster : public TestCommand err = TestSendTestCommandToUnsupportedEndpoint_122(); break; case 123: - ChipLogProgress(chipTool, " ***** Test Step 123 : Read attribute vendor_id Default Value\n"); - err = TestReadAttributeVendorIdDefaultValue_123(); + ChipLogProgress(chipTool, " ***** Test Step 123 : Send Test Command to unsupported cluster\n"); + err = TestSendTestCommandToUnsupportedCluster_123(); break; case 124: - ChipLogProgress(chipTool, " ***** Test Step 124 : Write attribute vendor_id\n"); - err = TestWriteAttributeVendorId_124(); + ChipLogProgress(chipTool, " ***** Test Step 124 : Read attribute vendor_id Default Value\n"); + err = TestReadAttributeVendorIdDefaultValue_124(); break; case 125: - ChipLogProgress(chipTool, " ***** Test Step 125 : Read attribute vendor_id\n"); - err = TestReadAttributeVendorId_125(); + ChipLogProgress(chipTool, " ***** Test Step 125 : Write attribute vendor_id\n"); + err = TestWriteAttributeVendorId_125(); break; case 126: - ChipLogProgress(chipTool, " ***** Test Step 126 : Restore attribute vendor_id\n"); - err = TestRestoreAttributeVendorId_126(); + ChipLogProgress(chipTool, " ***** Test Step 126 : Read attribute vendor_id\n"); + err = TestReadAttributeVendorId_126(); break; case 127: - ChipLogProgress(chipTool, " ***** Test Step 127 : Send a command with a vendor_id and enum\n"); - err = TestSendACommandWithAVendorIdAndEnum_127(); + ChipLogProgress(chipTool, " ***** Test Step 127 : Restore attribute vendor_id\n"); + err = TestRestoreAttributeVendorId_127(); break; case 128: - ChipLogProgress(chipTool, " ***** Test Step 128 : Send Test Command With Struct Argument and arg1.b is true\n"); - err = TestSendTestCommandWithStructArgumentAndArg1bIsTrue_128(); + ChipLogProgress(chipTool, " ***** Test Step 128 : Send a command with a vendor_id and enum\n"); + err = TestSendACommandWithAVendorIdAndEnum_128(); break; case 129: - ChipLogProgress(chipTool, " ***** Test Step 129 : Send Test Command With Struct Argument and arg1.b is false\n"); - err = TestSendTestCommandWithStructArgumentAndArg1bIsFalse_129(); + ChipLogProgress(chipTool, " ***** Test Step 129 : Send Test Command With Struct Argument and arg1.b is true\n"); + err = TestSendTestCommandWithStructArgumentAndArg1bIsTrue_129(); break; case 130: - ChipLogProgress(chipTool, " ***** Test Step 130 : Send Test Command With Struct Argument and see what we get back\n"); - err = TestSendTestCommandWithStructArgumentAndSeeWhatWeGetBack_130(); + ChipLogProgress(chipTool, " ***** Test Step 130 : Send Test Command With Struct Argument and arg1.b is false\n"); + err = TestSendTestCommandWithStructArgumentAndArg1bIsFalse_130(); break; case 131: - ChipLogProgress(chipTool, " ***** Test Step 131 : Send Test Command With List of INT8U and none of them is set to 0\n"); - err = TestSendTestCommandWithListOfInt8uAndNoneOfThemIsSetTo0_131(); + ChipLogProgress(chipTool, " ***** Test Step 131 : Send Test Command With Struct Argument and see what we get back\n"); + err = TestSendTestCommandWithStructArgumentAndSeeWhatWeGetBack_131(); break; case 132: - ChipLogProgress(chipTool, " ***** Test Step 132 : Send Test Command With List of INT8U and one of them is set to 0\n"); - err = TestSendTestCommandWithListOfInt8uAndOneOfThemIsSetTo0_132(); + ChipLogProgress(chipTool, " ***** Test Step 132 : Send Test Command With List of INT8U and none of them is set to 0\n"); + err = TestSendTestCommandWithListOfInt8uAndNoneOfThemIsSetTo0_132(); break; case 133: - ChipLogProgress(chipTool, " ***** Test Step 133 : Send Test Command With List of INT8U and get it reversed\n"); - err = TestSendTestCommandWithListOfInt8uAndGetItReversed_133(); + ChipLogProgress(chipTool, " ***** Test Step 133 : Send Test Command With List of INT8U and one of them is set to 0\n"); + err = TestSendTestCommandWithListOfInt8uAndOneOfThemIsSetTo0_133(); break; case 134: - ChipLogProgress(chipTool, - " ***** Test Step 134 : Send Test Command With empty List of INT8U and get an empty list back\n"); - err = TestSendTestCommandWithEmptyListOfInt8uAndGetAnEmptyListBack_134(); + ChipLogProgress(chipTool, " ***** Test Step 134 : Send Test Command With List of INT8U and get it reversed\n"); + err = TestSendTestCommandWithListOfInt8uAndGetItReversed_134(); break; case 135: - ChipLogProgress( - chipTool, - " ***** Test Step 135 : Send Test Command With List of Struct Argument and arg1.b of first item is true\n"); - err = TestSendTestCommandWithListOfStructArgumentAndArg1bOfFirstItemIsTrue_135(); + ChipLogProgress(chipTool, + " ***** Test Step 135 : Send Test Command With empty List of INT8U and get an empty list back\n"); + err = TestSendTestCommandWithEmptyListOfInt8uAndGetAnEmptyListBack_135(); break; case 136: ChipLogProgress( chipTool, - " ***** Test Step 136 : Send Test Command With List of Struct Argument and arg1.b of first item is false\n"); - err = TestSendTestCommandWithListOfStructArgumentAndArg1bOfFirstItemIsFalse_136(); + " ***** Test Step 136 : Send Test Command With List of Struct Argument and arg1.b of first item is true\n"); + err = TestSendTestCommandWithListOfStructArgumentAndArg1bOfFirstItemIsTrue_136(); break; case 137: - ChipLogProgress(chipTool, - " ***** Test Step 137 : Write attribute LIST With List of INT8U and none of them is set to 0\n"); - err = TestWriteAttributeListWithListOfInt8uAndNoneOfThemIsSetTo0_137(); + ChipLogProgress( + chipTool, + " ***** Test Step 137 : Send Test Command With List of Struct Argument and arg1.b of first item is false\n"); + err = TestSendTestCommandWithListOfStructArgumentAndArg1bOfFirstItemIsFalse_137(); break; case 138: - ChipLogProgress(chipTool, " ***** Test Step 138 : Read attribute LIST With List of INT8U\n"); - err = TestReadAttributeListWithListOfInt8u_138(); + ChipLogProgress(chipTool, + " ***** Test Step 138 : Write attribute LIST With List of INT8U and none of them is set to 0\n"); + err = TestWriteAttributeListWithListOfInt8uAndNoneOfThemIsSetTo0_138(); break; case 139: - ChipLogProgress(chipTool, " ***** Test Step 139 : Write attribute LIST With List of OCTET_STRING\n"); - err = TestWriteAttributeListWithListOfOctetString_139(); + ChipLogProgress(chipTool, " ***** Test Step 139 : Read attribute LIST With List of INT8U\n"); + err = TestReadAttributeListWithListOfInt8u_139(); break; case 140: - ChipLogProgress(chipTool, " ***** Test Step 140 : Read attribute LIST With List of OCTET_STRING\n"); - err = TestReadAttributeListWithListOfOctetString_140(); + ChipLogProgress(chipTool, " ***** Test Step 140 : Write attribute LIST With List of OCTET_STRING\n"); + err = TestWriteAttributeListWithListOfOctetString_140(); break; case 141: - ChipLogProgress(chipTool, " ***** Test Step 141 : Write attribute LIST With List of LIST_STRUCT_OCTET_STRING\n"); - err = TestWriteAttributeListWithListOfListStructOctetString_141(); + ChipLogProgress(chipTool, " ***** Test Step 141 : Read attribute LIST With List of OCTET_STRING\n"); + err = TestReadAttributeListWithListOfOctetString_141(); break; case 142: - ChipLogProgress(chipTool, " ***** Test Step 142 : Read attribute LIST With List of LIST_STRUCT_OCTET_STRING\n"); - err = TestReadAttributeListWithListOfListStructOctetString_142(); + ChipLogProgress(chipTool, " ***** Test Step 142 : Write attribute LIST With List of LIST_STRUCT_OCTET_STRING\n"); + err = TestWriteAttributeListWithListOfListStructOctetString_142(); break; case 143: - ChipLogProgress(chipTool, " ***** Test Step 143 : Send Test Command with optional arg set.\n"); - err = TestSendTestCommandWithOptionalArgSet_143(); + ChipLogProgress(chipTool, " ***** Test Step 143 : Read attribute LIST With List of LIST_STRUCT_OCTET_STRING\n"); + err = TestReadAttributeListWithListOfListStructOctetString_143(); break; case 144: - ChipLogProgress(chipTool, " ***** Test Step 144 : Send Test Command without its optional arg.\n"); - err = TestSendTestCommandWithoutItsOptionalArg_144(); + ChipLogProgress(chipTool, " ***** Test Step 144 : Send Test Command with optional arg set.\n"); + err = TestSendTestCommandWithOptionalArgSet_144(); break; case 145: - ChipLogProgress(chipTool, " ***** Test Step 145 : Write attribute NULLABLE_BOOLEAN null\n"); - err = TestWriteAttributeNullableBooleanNull_145(); + ChipLogProgress(chipTool, " ***** Test Step 145 : Send Test Command without its optional arg.\n"); + err = TestSendTestCommandWithoutItsOptionalArg_145(); break; case 146: - ChipLogProgress(chipTool, " ***** Test Step 146 : Read attribute NULLABLE_BOOLEAN null\n"); - err = TestReadAttributeNullableBooleanNull_146(); + ChipLogProgress(chipTool, " ***** Test Step 146 : Write attribute NULLABLE_BOOLEAN null\n"); + err = TestWriteAttributeNullableBooleanNull_146(); break; case 147: - ChipLogProgress(chipTool, " ***** Test Step 147 : Write attribute NULLABLE_BOOLEAN True\n"); - err = TestWriteAttributeNullableBooleanTrue_147(); + ChipLogProgress(chipTool, " ***** Test Step 147 : Read attribute NULLABLE_BOOLEAN null\n"); + err = TestReadAttributeNullableBooleanNull_147(); break; case 148: - ChipLogProgress(chipTool, " ***** Test Step 148 : Read attribute NULLABLE_BOOLEAN True\n"); - err = TestReadAttributeNullableBooleanTrue_148(); + ChipLogProgress(chipTool, " ***** Test Step 148 : Write attribute NULLABLE_BOOLEAN True\n"); + err = TestWriteAttributeNullableBooleanTrue_148(); break; case 149: - ChipLogProgress(chipTool, " ***** Test Step 149 : Write attribute NULLABLE_BITMAP8 Max Value\n"); - err = TestWriteAttributeNullableBitmap8MaxValue_149(); + ChipLogProgress(chipTool, " ***** Test Step 149 : Read attribute NULLABLE_BOOLEAN True\n"); + err = TestReadAttributeNullableBooleanTrue_149(); break; case 150: - ChipLogProgress(chipTool, " ***** Test Step 150 : Read attribute NULLABLE_BITMAP8 Max Value\n"); - err = TestReadAttributeNullableBitmap8MaxValue_150(); + ChipLogProgress(chipTool, " ***** Test Step 150 : Write attribute NULLABLE_BITMAP8 Max Value\n"); + err = TestWriteAttributeNullableBitmap8MaxValue_150(); break; case 151: - ChipLogProgress(chipTool, " ***** Test Step 151 : Write attribute NULLABLE_BITMAP8 Invalid Value\n"); - err = TestWriteAttributeNullableBitmap8InvalidValue_151(); + ChipLogProgress(chipTool, " ***** Test Step 151 : Read attribute NULLABLE_BITMAP8 Max Value\n"); + err = TestReadAttributeNullableBitmap8MaxValue_151(); break; case 152: - ChipLogProgress(chipTool, " ***** Test Step 152 : Read attribute NULLABLE_BITMAP8 unchanged Value\n"); - err = TestReadAttributeNullableBitmap8UnchangedValue_152(); + ChipLogProgress(chipTool, " ***** Test Step 152 : Write attribute NULLABLE_BITMAP8 Invalid Value\n"); + err = TestWriteAttributeNullableBitmap8InvalidValue_152(); break; case 153: - ChipLogProgress(chipTool, " ***** Test Step 153 : Write attribute NULLABLE_BITMAP8 null Value\n"); - err = TestWriteAttributeNullableBitmap8NullValue_153(); + ChipLogProgress(chipTool, " ***** Test Step 153 : Read attribute NULLABLE_BITMAP8 unchanged Value\n"); + err = TestReadAttributeNullableBitmap8UnchangedValue_153(); break; case 154: - ChipLogProgress(chipTool, " ***** Test Step 154 : Read attribute NULLABLE_BITMAP8 null Value\n"); - err = TestReadAttributeNullableBitmap8NullValue_154(); + ChipLogProgress(chipTool, " ***** Test Step 154 : Write attribute NULLABLE_BITMAP8 null Value\n"); + err = TestWriteAttributeNullableBitmap8NullValue_154(); break; case 155: - ChipLogProgress(chipTool, " ***** Test Step 155 : Write attribute NULLABLE_BITMAP16 Max Value\n"); - err = TestWriteAttributeNullableBitmap16MaxValue_155(); + ChipLogProgress(chipTool, " ***** Test Step 155 : Read attribute NULLABLE_BITMAP8 null Value\n"); + err = TestReadAttributeNullableBitmap8NullValue_155(); break; case 156: - ChipLogProgress(chipTool, " ***** Test Step 156 : Read attribute NULLABLE_BITMAP16 Max Value\n"); - err = TestReadAttributeNullableBitmap16MaxValue_156(); + ChipLogProgress(chipTool, " ***** Test Step 156 : Write attribute NULLABLE_BITMAP16 Max Value\n"); + err = TestWriteAttributeNullableBitmap16MaxValue_156(); break; case 157: - ChipLogProgress(chipTool, " ***** Test Step 157 : Write attribute NULLABLE_BITMAP16 Invalid Value\n"); - err = TestWriteAttributeNullableBitmap16InvalidValue_157(); + ChipLogProgress(chipTool, " ***** Test Step 157 : Read attribute NULLABLE_BITMAP16 Max Value\n"); + err = TestReadAttributeNullableBitmap16MaxValue_157(); break; case 158: - ChipLogProgress(chipTool, " ***** Test Step 158 : Read attribute NULLABLE_BITMAP16 unchanged Value\n"); - err = TestReadAttributeNullableBitmap16UnchangedValue_158(); + ChipLogProgress(chipTool, " ***** Test Step 158 : Write attribute NULLABLE_BITMAP16 Invalid Value\n"); + err = TestWriteAttributeNullableBitmap16InvalidValue_158(); break; case 159: - ChipLogProgress(chipTool, " ***** Test Step 159 : Write attribute NULLABLE_BITMAP16 null Value\n"); - err = TestWriteAttributeNullableBitmap16NullValue_159(); + ChipLogProgress(chipTool, " ***** Test Step 159 : Read attribute NULLABLE_BITMAP16 unchanged Value\n"); + err = TestReadAttributeNullableBitmap16UnchangedValue_159(); break; case 160: - ChipLogProgress(chipTool, " ***** Test Step 160 : Read attribute NULLABLE_BITMAP16 null Value\n"); - err = TestReadAttributeNullableBitmap16NullValue_160(); + ChipLogProgress(chipTool, " ***** Test Step 160 : Write attribute NULLABLE_BITMAP16 null Value\n"); + err = TestWriteAttributeNullableBitmap16NullValue_160(); break; case 161: - ChipLogProgress(chipTool, " ***** Test Step 161 : Write attribute NULLABLE_BITMAP32 Max Value\n"); - err = TestWriteAttributeNullableBitmap32MaxValue_161(); + ChipLogProgress(chipTool, " ***** Test Step 161 : Read attribute NULLABLE_BITMAP16 null Value\n"); + err = TestReadAttributeNullableBitmap16NullValue_161(); break; case 162: - ChipLogProgress(chipTool, " ***** Test Step 162 : Read attribute NULLABLE_BITMAP32 Max Value\n"); - err = TestReadAttributeNullableBitmap32MaxValue_162(); + ChipLogProgress(chipTool, " ***** Test Step 162 : Write attribute NULLABLE_BITMAP32 Max Value\n"); + err = TestWriteAttributeNullableBitmap32MaxValue_162(); break; case 163: - ChipLogProgress(chipTool, " ***** Test Step 163 : Write attribute NULLABLE_BITMAP32 Invalid Value\n"); - err = TestWriteAttributeNullableBitmap32InvalidValue_163(); + ChipLogProgress(chipTool, " ***** Test Step 163 : Read attribute NULLABLE_BITMAP32 Max Value\n"); + err = TestReadAttributeNullableBitmap32MaxValue_163(); break; case 164: - ChipLogProgress(chipTool, " ***** Test Step 164 : Read attribute NULLABLE_BITMAP32 unchanged Value\n"); - err = TestReadAttributeNullableBitmap32UnchangedValue_164(); + ChipLogProgress(chipTool, " ***** Test Step 164 : Write attribute NULLABLE_BITMAP32 Invalid Value\n"); + err = TestWriteAttributeNullableBitmap32InvalidValue_164(); break; case 165: - ChipLogProgress(chipTool, " ***** Test Step 165 : Write attribute NULLABLE_BITMAP32 null Value\n"); - err = TestWriteAttributeNullableBitmap32NullValue_165(); + ChipLogProgress(chipTool, " ***** Test Step 165 : Read attribute NULLABLE_BITMAP32 unchanged Value\n"); + err = TestReadAttributeNullableBitmap32UnchangedValue_165(); break; case 166: - ChipLogProgress(chipTool, " ***** Test Step 166 : Read attribute NULLABLE_BITMAP32 null Value\n"); - err = TestReadAttributeNullableBitmap32NullValue_166(); + ChipLogProgress(chipTool, " ***** Test Step 166 : Write attribute NULLABLE_BITMAP32 null Value\n"); + err = TestWriteAttributeNullableBitmap32NullValue_166(); break; case 167: - ChipLogProgress(chipTool, " ***** Test Step 167 : Write attribute NULLABLE_BITMAP64 Max Value\n"); - err = TestWriteAttributeNullableBitmap64MaxValue_167(); + ChipLogProgress(chipTool, " ***** Test Step 167 : Read attribute NULLABLE_BITMAP32 null Value\n"); + err = TestReadAttributeNullableBitmap32NullValue_167(); break; case 168: - ChipLogProgress(chipTool, " ***** Test Step 168 : Read attribute NULLABLE_BITMAP64 Max Value\n"); - err = TestReadAttributeNullableBitmap64MaxValue_168(); + ChipLogProgress(chipTool, " ***** Test Step 168 : Write attribute NULLABLE_BITMAP64 Max Value\n"); + err = TestWriteAttributeNullableBitmap64MaxValue_168(); break; case 169: - ChipLogProgress(chipTool, " ***** Test Step 169 : Write attribute NULLABLE_BITMAP64 Invalid Value\n"); - err = TestWriteAttributeNullableBitmap64InvalidValue_169(); + ChipLogProgress(chipTool, " ***** Test Step 169 : Read attribute NULLABLE_BITMAP64 Max Value\n"); + err = TestReadAttributeNullableBitmap64MaxValue_169(); break; case 170: - ChipLogProgress(chipTool, " ***** Test Step 170 : Read attribute NULLABLE_BITMAP64 unchanged Value\n"); - err = TestReadAttributeNullableBitmap64UnchangedValue_170(); + ChipLogProgress(chipTool, " ***** Test Step 170 : Write attribute NULLABLE_BITMAP64 Invalid Value\n"); + err = TestWriteAttributeNullableBitmap64InvalidValue_170(); break; case 171: - ChipLogProgress(chipTool, " ***** Test Step 171 : Write attribute NULLABLE_BITMAP64 null Value\n"); - err = TestWriteAttributeNullableBitmap64NullValue_171(); + ChipLogProgress(chipTool, " ***** Test Step 171 : Read attribute NULLABLE_BITMAP64 unchanged Value\n"); + err = TestReadAttributeNullableBitmap64UnchangedValue_171(); break; case 172: - ChipLogProgress(chipTool, " ***** Test Step 172 : Read attribute NULLABLE_BITMAP64 null Value\n"); - err = TestReadAttributeNullableBitmap64NullValue_172(); + ChipLogProgress(chipTool, " ***** Test Step 172 : Write attribute NULLABLE_BITMAP64 null Value\n"); + err = TestWriteAttributeNullableBitmap64NullValue_172(); break; case 173: - ChipLogProgress(chipTool, " ***** Test Step 173 : Write attribute NULLABLE_INT8U Max Value\n"); - err = TestWriteAttributeNullableInt8uMaxValue_173(); + ChipLogProgress(chipTool, " ***** Test Step 173 : Read attribute NULLABLE_BITMAP64 null Value\n"); + err = TestReadAttributeNullableBitmap64NullValue_173(); break; case 174: - ChipLogProgress(chipTool, " ***** Test Step 174 : Read attribute NULLABLE_INT8U Max Value\n"); - err = TestReadAttributeNullableInt8uMaxValue_174(); + ChipLogProgress(chipTool, " ***** Test Step 174 : Write attribute NULLABLE_INT8U Max Value\n"); + err = TestWriteAttributeNullableInt8uMaxValue_174(); break; case 175: - ChipLogProgress(chipTool, " ***** Test Step 175 : Write attribute NULLABLE_INT8U Invalid Value\n"); - err = TestWriteAttributeNullableInt8uInvalidValue_175(); + ChipLogProgress(chipTool, " ***** Test Step 175 : Read attribute NULLABLE_INT8U Max Value\n"); + err = TestReadAttributeNullableInt8uMaxValue_175(); break; case 176: - ChipLogProgress(chipTool, " ***** Test Step 176 : Read attribute NULLABLE_INT8U unchanged Value\n"); - err = TestReadAttributeNullableInt8uUnchangedValue_176(); + ChipLogProgress(chipTool, " ***** Test Step 176 : Write attribute NULLABLE_INT8U Invalid Value\n"); + err = TestWriteAttributeNullableInt8uInvalidValue_176(); break; case 177: - ChipLogProgress(chipTool, " ***** Test Step 177 : Write attribute NULLABLE_INT8U null Value\n"); - err = TestWriteAttributeNullableInt8uNullValue_177(); + ChipLogProgress(chipTool, " ***** Test Step 177 : Read attribute NULLABLE_INT8U unchanged Value\n"); + err = TestReadAttributeNullableInt8uUnchangedValue_177(); break; case 178: - ChipLogProgress(chipTool, " ***** Test Step 178 : Read attribute NULLABLE_INT8U null Value\n"); - err = TestReadAttributeNullableInt8uNullValue_178(); + ChipLogProgress(chipTool, " ***** Test Step 178 : Write attribute NULLABLE_INT8U null Value\n"); + err = TestWriteAttributeNullableInt8uNullValue_178(); break; case 179: - ChipLogProgress(chipTool, " ***** Test Step 179 : Write attribute NULLABLE_INT16U Max Value\n"); - err = TestWriteAttributeNullableInt16uMaxValue_179(); + ChipLogProgress(chipTool, " ***** Test Step 179 : Read attribute NULLABLE_INT8U null Value\n"); + err = TestReadAttributeNullableInt8uNullValue_179(); break; case 180: - ChipLogProgress(chipTool, " ***** Test Step 180 : Read attribute NULLABLE_INT16U Max Value\n"); - err = TestReadAttributeNullableInt16uMaxValue_180(); + ChipLogProgress(chipTool, " ***** Test Step 180 : Write attribute NULLABLE_INT16U Max Value\n"); + err = TestWriteAttributeNullableInt16uMaxValue_180(); break; case 181: - ChipLogProgress(chipTool, " ***** Test Step 181 : Write attribute NULLABLE_INT16U Invalid Value\n"); - err = TestWriteAttributeNullableInt16uInvalidValue_181(); + ChipLogProgress(chipTool, " ***** Test Step 181 : Read attribute NULLABLE_INT16U Max Value\n"); + err = TestReadAttributeNullableInt16uMaxValue_181(); break; case 182: - ChipLogProgress(chipTool, " ***** Test Step 182 : Read attribute NULLABLE_INT16U unchanged Value\n"); - err = TestReadAttributeNullableInt16uUnchangedValue_182(); + ChipLogProgress(chipTool, " ***** Test Step 182 : Write attribute NULLABLE_INT16U Invalid Value\n"); + err = TestWriteAttributeNullableInt16uInvalidValue_182(); break; case 183: - ChipLogProgress(chipTool, " ***** Test Step 183 : Write attribute NULLABLE_INT16U null Value\n"); - err = TestWriteAttributeNullableInt16uNullValue_183(); + ChipLogProgress(chipTool, " ***** Test Step 183 : Read attribute NULLABLE_INT16U unchanged Value\n"); + err = TestReadAttributeNullableInt16uUnchangedValue_183(); break; case 184: - ChipLogProgress(chipTool, " ***** Test Step 184 : Read attribute NULLABLE_INT16U null Value\n"); - err = TestReadAttributeNullableInt16uNullValue_184(); + ChipLogProgress(chipTool, " ***** Test Step 184 : Write attribute NULLABLE_INT16U null Value\n"); + err = TestWriteAttributeNullableInt16uNullValue_184(); break; case 185: - ChipLogProgress(chipTool, " ***** Test Step 185 : Write attribute NULLABLE_INT32U Max Value\n"); - err = TestWriteAttributeNullableInt32uMaxValue_185(); + ChipLogProgress(chipTool, " ***** Test Step 185 : Read attribute NULLABLE_INT16U null Value\n"); + err = TestReadAttributeNullableInt16uNullValue_185(); break; case 186: - ChipLogProgress(chipTool, " ***** Test Step 186 : Read attribute NULLABLE_INT32U Max Value\n"); - err = TestReadAttributeNullableInt32uMaxValue_186(); + ChipLogProgress(chipTool, " ***** Test Step 186 : Write attribute NULLABLE_INT32U Max Value\n"); + err = TestWriteAttributeNullableInt32uMaxValue_186(); break; case 187: - ChipLogProgress(chipTool, " ***** Test Step 187 : Write attribute NULLABLE_INT32U Invalid Value\n"); - err = TestWriteAttributeNullableInt32uInvalidValue_187(); + ChipLogProgress(chipTool, " ***** Test Step 187 : Read attribute NULLABLE_INT32U Max Value\n"); + err = TestReadAttributeNullableInt32uMaxValue_187(); break; case 188: - ChipLogProgress(chipTool, " ***** Test Step 188 : Read attribute NULLABLE_INT32U unchanged Value\n"); - err = TestReadAttributeNullableInt32uUnchangedValue_188(); + ChipLogProgress(chipTool, " ***** Test Step 188 : Write attribute NULLABLE_INT32U Invalid Value\n"); + err = TestWriteAttributeNullableInt32uInvalidValue_188(); break; case 189: - ChipLogProgress(chipTool, " ***** Test Step 189 : Write attribute NULLABLE_INT32U null Value\n"); - err = TestWriteAttributeNullableInt32uNullValue_189(); + ChipLogProgress(chipTool, " ***** Test Step 189 : Read attribute NULLABLE_INT32U unchanged Value\n"); + err = TestReadAttributeNullableInt32uUnchangedValue_189(); break; case 190: - ChipLogProgress(chipTool, " ***** Test Step 190 : Read attribute NULLABLE_INT32U null Value\n"); - err = TestReadAttributeNullableInt32uNullValue_190(); + ChipLogProgress(chipTool, " ***** Test Step 190 : Write attribute NULLABLE_INT32U null Value\n"); + err = TestWriteAttributeNullableInt32uNullValue_190(); break; case 191: - ChipLogProgress(chipTool, " ***** Test Step 191 : Write attribute NULLABLE_INT64U Max Value\n"); - err = TestWriteAttributeNullableInt64uMaxValue_191(); + ChipLogProgress(chipTool, " ***** Test Step 191 : Read attribute NULLABLE_INT32U null Value\n"); + err = TestReadAttributeNullableInt32uNullValue_191(); break; case 192: - ChipLogProgress(chipTool, " ***** Test Step 192 : Read attribute NULLABLE_INT64U Max Value\n"); - err = TestReadAttributeNullableInt64uMaxValue_192(); + ChipLogProgress(chipTool, " ***** Test Step 192 : Write attribute NULLABLE_INT64U Max Value\n"); + err = TestWriteAttributeNullableInt64uMaxValue_192(); break; case 193: - ChipLogProgress(chipTool, " ***** Test Step 193 : Write attribute NULLABLE_INT64U Invalid Value\n"); - err = TestWriteAttributeNullableInt64uInvalidValue_193(); + ChipLogProgress(chipTool, " ***** Test Step 193 : Read attribute NULLABLE_INT64U Max Value\n"); + err = TestReadAttributeNullableInt64uMaxValue_193(); break; case 194: - ChipLogProgress(chipTool, " ***** Test Step 194 : Read attribute NULLABLE_INT64U unchanged Value\n"); - err = TestReadAttributeNullableInt64uUnchangedValue_194(); + ChipLogProgress(chipTool, " ***** Test Step 194 : Write attribute NULLABLE_INT64U Invalid Value\n"); + err = TestWriteAttributeNullableInt64uInvalidValue_194(); break; case 195: - ChipLogProgress(chipTool, " ***** Test Step 195 : Write attribute NULLABLE_INT64U null Value\n"); - err = TestWriteAttributeNullableInt64uNullValue_195(); + ChipLogProgress(chipTool, " ***** Test Step 195 : Read attribute NULLABLE_INT64U unchanged Value\n"); + err = TestReadAttributeNullableInt64uUnchangedValue_195(); break; case 196: - ChipLogProgress(chipTool, " ***** Test Step 196 : Read attribute NULLABLE_INT64U null Value\n"); - err = TestReadAttributeNullableInt64uNullValue_196(); + ChipLogProgress(chipTool, " ***** Test Step 196 : Write attribute NULLABLE_INT64U null Value\n"); + err = TestWriteAttributeNullableInt64uNullValue_196(); break; case 197: - ChipLogProgress(chipTool, " ***** Test Step 197 : Write attribute NULLABLE_INT8S Min Value\n"); - err = TestWriteAttributeNullableInt8sMinValue_197(); + ChipLogProgress(chipTool, " ***** Test Step 197 : Read attribute NULLABLE_INT64U null Value\n"); + err = TestReadAttributeNullableInt64uNullValue_197(); break; case 198: - ChipLogProgress(chipTool, " ***** Test Step 198 : Read attribute NULLABLE_INT8S Min Value\n"); - err = TestReadAttributeNullableInt8sMinValue_198(); + ChipLogProgress(chipTool, " ***** Test Step 198 : Write attribute NULLABLE_INT8S Min Value\n"); + err = TestWriteAttributeNullableInt8sMinValue_198(); break; case 199: - ChipLogProgress(chipTool, " ***** Test Step 199 : Write attribute NULLABLE_INT8S Invalid Value\n"); - err = TestWriteAttributeNullableInt8sInvalidValue_199(); + ChipLogProgress(chipTool, " ***** Test Step 199 : Read attribute NULLABLE_INT8S Min Value\n"); + err = TestReadAttributeNullableInt8sMinValue_199(); break; case 200: - ChipLogProgress(chipTool, " ***** Test Step 200 : Read attribute NULLABLE_INT8S unchanged Value\n"); - err = TestReadAttributeNullableInt8sUnchangedValue_200(); + ChipLogProgress(chipTool, " ***** Test Step 200 : Write attribute NULLABLE_INT8S Invalid Value\n"); + err = TestWriteAttributeNullableInt8sInvalidValue_200(); break; case 201: - ChipLogProgress(chipTool, " ***** Test Step 201 : Write attribute NULLABLE_INT8S null Value\n"); - err = TestWriteAttributeNullableInt8sNullValue_201(); + ChipLogProgress(chipTool, " ***** Test Step 201 : Read attribute NULLABLE_INT8S unchanged Value\n"); + err = TestReadAttributeNullableInt8sUnchangedValue_201(); break; case 202: - ChipLogProgress(chipTool, " ***** Test Step 202 : Read attribute NULLABLE_INT8S null Value\n"); - err = TestReadAttributeNullableInt8sNullValue_202(); + ChipLogProgress(chipTool, " ***** Test Step 202 : Write attribute NULLABLE_INT8S null Value\n"); + err = TestWriteAttributeNullableInt8sNullValue_202(); break; case 203: - ChipLogProgress(chipTool, " ***** Test Step 203 : Write attribute NULLABLE_INT16S Min Value\n"); - err = TestWriteAttributeNullableInt16sMinValue_203(); + ChipLogProgress(chipTool, " ***** Test Step 203 : Read attribute NULLABLE_INT8S null Value\n"); + err = TestReadAttributeNullableInt8sNullValue_203(); break; case 204: - ChipLogProgress(chipTool, " ***** Test Step 204 : Read attribute NULLABLE_INT16S Min Value\n"); - err = TestReadAttributeNullableInt16sMinValue_204(); + ChipLogProgress(chipTool, " ***** Test Step 204 : Write attribute NULLABLE_INT16S Min Value\n"); + err = TestWriteAttributeNullableInt16sMinValue_204(); break; case 205: - ChipLogProgress(chipTool, " ***** Test Step 205 : Write attribute NULLABLE_INT16S Invalid Value\n"); - err = TestWriteAttributeNullableInt16sInvalidValue_205(); + ChipLogProgress(chipTool, " ***** Test Step 205 : Read attribute NULLABLE_INT16S Min Value\n"); + err = TestReadAttributeNullableInt16sMinValue_205(); break; case 206: - ChipLogProgress(chipTool, " ***** Test Step 206 : Read attribute NULLABLE_INT16S unchanged Value\n"); - err = TestReadAttributeNullableInt16sUnchangedValue_206(); + ChipLogProgress(chipTool, " ***** Test Step 206 : Write attribute NULLABLE_INT16S Invalid Value\n"); + err = TestWriteAttributeNullableInt16sInvalidValue_206(); break; case 207: - ChipLogProgress(chipTool, " ***** Test Step 207 : Write attribute NULLABLE_INT16S null Value\n"); - err = TestWriteAttributeNullableInt16sNullValue_207(); + ChipLogProgress(chipTool, " ***** Test Step 207 : Read attribute NULLABLE_INT16S unchanged Value\n"); + err = TestReadAttributeNullableInt16sUnchangedValue_207(); break; case 208: - ChipLogProgress(chipTool, " ***** Test Step 208 : Read attribute NULLABLE_INT16S null Value\n"); - err = TestReadAttributeNullableInt16sNullValue_208(); + ChipLogProgress(chipTool, " ***** Test Step 208 : Write attribute NULLABLE_INT16S null Value\n"); + err = TestWriteAttributeNullableInt16sNullValue_208(); break; case 209: - ChipLogProgress(chipTool, " ***** Test Step 209 : Write attribute NULLABLE_INT32S Min Value\n"); - err = TestWriteAttributeNullableInt32sMinValue_209(); + ChipLogProgress(chipTool, " ***** Test Step 209 : Read attribute NULLABLE_INT16S null Value\n"); + err = TestReadAttributeNullableInt16sNullValue_209(); break; case 210: - ChipLogProgress(chipTool, " ***** Test Step 210 : Read attribute NULLABLE_INT32S Min Value\n"); - err = TestReadAttributeNullableInt32sMinValue_210(); + ChipLogProgress(chipTool, " ***** Test Step 210 : Write attribute NULLABLE_INT32S Min Value\n"); + err = TestWriteAttributeNullableInt32sMinValue_210(); break; case 211: - ChipLogProgress(chipTool, " ***** Test Step 211 : Write attribute NULLABLE_INT32S Invalid Value\n"); - err = TestWriteAttributeNullableInt32sInvalidValue_211(); + ChipLogProgress(chipTool, " ***** Test Step 211 : Read attribute NULLABLE_INT32S Min Value\n"); + err = TestReadAttributeNullableInt32sMinValue_211(); break; case 212: - ChipLogProgress(chipTool, " ***** Test Step 212 : Read attribute NULLABLE_INT32S unchanged Value\n"); - err = TestReadAttributeNullableInt32sUnchangedValue_212(); + ChipLogProgress(chipTool, " ***** Test Step 212 : Write attribute NULLABLE_INT32S Invalid Value\n"); + err = TestWriteAttributeNullableInt32sInvalidValue_212(); break; case 213: - ChipLogProgress(chipTool, " ***** Test Step 213 : Write attribute NULLABLE_INT32S null Value\n"); - err = TestWriteAttributeNullableInt32sNullValue_213(); + ChipLogProgress(chipTool, " ***** Test Step 213 : Read attribute NULLABLE_INT32S unchanged Value\n"); + err = TestReadAttributeNullableInt32sUnchangedValue_213(); break; case 214: - ChipLogProgress(chipTool, " ***** Test Step 214 : Read attribute NULLABLE_INT32S null Value\n"); - err = TestReadAttributeNullableInt32sNullValue_214(); + ChipLogProgress(chipTool, " ***** Test Step 214 : Write attribute NULLABLE_INT32S null Value\n"); + err = TestWriteAttributeNullableInt32sNullValue_214(); break; case 215: - ChipLogProgress(chipTool, " ***** Test Step 215 : Write attribute NULLABLE_INT64S Min Value\n"); - err = TestWriteAttributeNullableInt64sMinValue_215(); + ChipLogProgress(chipTool, " ***** Test Step 215 : Read attribute NULLABLE_INT32S null Value\n"); + err = TestReadAttributeNullableInt32sNullValue_215(); break; case 216: - ChipLogProgress(chipTool, " ***** Test Step 216 : Read attribute NULLABLE_INT64S Min Value\n"); - err = TestReadAttributeNullableInt64sMinValue_216(); + ChipLogProgress(chipTool, " ***** Test Step 216 : Write attribute NULLABLE_INT64S Min Value\n"); + err = TestWriteAttributeNullableInt64sMinValue_216(); break; case 217: - ChipLogProgress(chipTool, " ***** Test Step 217 : Write attribute NULLABLE_INT64S Invalid Value\n"); - err = TestWriteAttributeNullableInt64sInvalidValue_217(); + ChipLogProgress(chipTool, " ***** Test Step 217 : Read attribute NULLABLE_INT64S Min Value\n"); + err = TestReadAttributeNullableInt64sMinValue_217(); break; case 218: - ChipLogProgress(chipTool, " ***** Test Step 218 : Read attribute NULLABLE_INT64S unchanged Value\n"); - err = TestReadAttributeNullableInt64sUnchangedValue_218(); + ChipLogProgress(chipTool, " ***** Test Step 218 : Write attribute NULLABLE_INT64S Invalid Value\n"); + err = TestWriteAttributeNullableInt64sInvalidValue_218(); break; case 219: - ChipLogProgress(chipTool, " ***** Test Step 219 : Write attribute NULLABLE_INT64S null Value\n"); - err = TestWriteAttributeNullableInt64sNullValue_219(); + ChipLogProgress(chipTool, " ***** Test Step 219 : Read attribute NULLABLE_INT64S unchanged Value\n"); + err = TestReadAttributeNullableInt64sUnchangedValue_219(); break; case 220: - ChipLogProgress(chipTool, " ***** Test Step 220 : Read attribute NULLABLE_INT64S null Value\n"); - err = TestReadAttributeNullableInt64sNullValue_220(); + ChipLogProgress(chipTool, " ***** Test Step 220 : Write attribute NULLABLE_INT64S null Value\n"); + err = TestWriteAttributeNullableInt64sNullValue_220(); break; case 221: - ChipLogProgress(chipTool, " ***** Test Step 221 : Write attribute NULLABLE_ENUM8 Max Value\n"); - err = TestWriteAttributeNullableEnum8MaxValue_221(); + ChipLogProgress(chipTool, " ***** Test Step 221 : Read attribute NULLABLE_INT64S null Value\n"); + err = TestReadAttributeNullableInt64sNullValue_221(); break; case 222: - ChipLogProgress(chipTool, " ***** Test Step 222 : Read attribute NULLABLE_ENUM8 Max Value\n"); - err = TestReadAttributeNullableEnum8MaxValue_222(); + ChipLogProgress(chipTool, " ***** Test Step 222 : Write attribute NULLABLE_ENUM8 Max Value\n"); + err = TestWriteAttributeNullableEnum8MaxValue_222(); break; case 223: - ChipLogProgress(chipTool, " ***** Test Step 223 : Write attribute NULLABLE_ENUM8 Invalid Value\n"); - err = TestWriteAttributeNullableEnum8InvalidValue_223(); + ChipLogProgress(chipTool, " ***** Test Step 223 : Read attribute NULLABLE_ENUM8 Max Value\n"); + err = TestReadAttributeNullableEnum8MaxValue_223(); break; case 224: - ChipLogProgress(chipTool, " ***** Test Step 224 : Read attribute NULLABLE_ENUM8 unchanged Value\n"); - err = TestReadAttributeNullableEnum8UnchangedValue_224(); + ChipLogProgress(chipTool, " ***** Test Step 224 : Write attribute NULLABLE_ENUM8 Invalid Value\n"); + err = TestWriteAttributeNullableEnum8InvalidValue_224(); break; case 225: - ChipLogProgress(chipTool, " ***** Test Step 225 : Write attribute NULLABLE_ENUM8 null Value\n"); - err = TestWriteAttributeNullableEnum8NullValue_225(); + ChipLogProgress(chipTool, " ***** Test Step 225 : Read attribute NULLABLE_ENUM8 unchanged Value\n"); + err = TestReadAttributeNullableEnum8UnchangedValue_225(); break; case 226: - ChipLogProgress(chipTool, " ***** Test Step 226 : Read attribute NULLABLE_ENUM8 null Value\n"); - err = TestReadAttributeNullableEnum8NullValue_226(); + ChipLogProgress(chipTool, " ***** Test Step 226 : Write attribute NULLABLE_ENUM8 null Value\n"); + err = TestWriteAttributeNullableEnum8NullValue_226(); break; case 227: - ChipLogProgress(chipTool, " ***** Test Step 227 : Write attribute NULLABLE_ENUM16 Max Value\n"); - err = TestWriteAttributeNullableEnum16MaxValue_227(); + ChipLogProgress(chipTool, " ***** Test Step 227 : Read attribute NULLABLE_ENUM8 null Value\n"); + err = TestReadAttributeNullableEnum8NullValue_227(); break; case 228: - ChipLogProgress(chipTool, " ***** Test Step 228 : Read attribute NULLABLE_ENUM16 Max Value\n"); - err = TestReadAttributeNullableEnum16MaxValue_228(); + ChipLogProgress(chipTool, " ***** Test Step 228 : Write attribute NULLABLE_ENUM16 Max Value\n"); + err = TestWriteAttributeNullableEnum16MaxValue_228(); break; case 229: - ChipLogProgress(chipTool, " ***** Test Step 229 : Write attribute NULLABLE_ENUM16 Invalid Value\n"); - err = TestWriteAttributeNullableEnum16InvalidValue_229(); + ChipLogProgress(chipTool, " ***** Test Step 229 : Read attribute NULLABLE_ENUM16 Max Value\n"); + err = TestReadAttributeNullableEnum16MaxValue_229(); break; case 230: - ChipLogProgress(chipTool, " ***** Test Step 230 : Read attribute NULLABLE_ENUM16 unchanged Value\n"); - err = TestReadAttributeNullableEnum16UnchangedValue_230(); + ChipLogProgress(chipTool, " ***** Test Step 230 : Write attribute NULLABLE_ENUM16 Invalid Value\n"); + err = TestWriteAttributeNullableEnum16InvalidValue_230(); break; case 231: - ChipLogProgress(chipTool, " ***** Test Step 231 : Write attribute NULLABLE_ENUM16 null Value\n"); - err = TestWriteAttributeNullableEnum16NullValue_231(); + ChipLogProgress(chipTool, " ***** Test Step 231 : Read attribute NULLABLE_ENUM16 unchanged Value\n"); + err = TestReadAttributeNullableEnum16UnchangedValue_231(); break; case 232: - ChipLogProgress(chipTool, " ***** Test Step 232 : Read attribute NULLABLE_ENUM16 null Value\n"); - err = TestReadAttributeNullableEnum16NullValue_232(); + ChipLogProgress(chipTool, " ***** Test Step 232 : Write attribute NULLABLE_ENUM16 null Value\n"); + err = TestWriteAttributeNullableEnum16NullValue_232(); break; case 233: - ChipLogProgress(chipTool, " ***** Test Step 233 : Read attribute NULLABLE_OCTET_STRING Default Value\n"); - err = TestReadAttributeNullableOctetStringDefaultValue_233(); + ChipLogProgress(chipTool, " ***** Test Step 233 : Read attribute NULLABLE_ENUM16 null Value\n"); + err = TestReadAttributeNullableEnum16NullValue_233(); break; case 234: - ChipLogProgress(chipTool, " ***** Test Step 234 : Write attribute NULLABLE_OCTET_STRING\n"); - err = TestWriteAttributeNullableOctetString_234(); + ChipLogProgress(chipTool, " ***** Test Step 234 : Read attribute NULLABLE_OCTET_STRING Default Value\n"); + err = TestReadAttributeNullableOctetStringDefaultValue_234(); break; case 235: - ChipLogProgress(chipTool, " ***** Test Step 235 : Read attribute NULLABLE_OCTET_STRING\n"); - err = TestReadAttributeNullableOctetString_235(); + ChipLogProgress(chipTool, " ***** Test Step 235 : Write attribute NULLABLE_OCTET_STRING\n"); + err = TestWriteAttributeNullableOctetString_235(); break; case 236: - ChipLogProgress(chipTool, " ***** Test Step 236 : Write attribute NULLABLE_OCTET_STRING\n"); - err = TestWriteAttributeNullableOctetString_236(); + ChipLogProgress(chipTool, " ***** Test Step 236 : Read attribute NULLABLE_OCTET_STRING\n"); + err = TestReadAttributeNullableOctetString_236(); break; case 237: - ChipLogProgress(chipTool, " ***** Test Step 237 : Read attribute NULLABLE_OCTET_STRING\n"); - err = TestReadAttributeNullableOctetString_237(); + ChipLogProgress(chipTool, " ***** Test Step 237 : Write attribute NULLABLE_OCTET_STRING\n"); + err = TestWriteAttributeNullableOctetString_237(); break; case 238: - ChipLogProgress(chipTool, " ***** Test Step 238 : Write attribute NULLABLE_OCTET_STRING\n"); - err = TestWriteAttributeNullableOctetString_238(); + ChipLogProgress(chipTool, " ***** Test Step 238 : Read attribute NULLABLE_OCTET_STRING\n"); + err = TestReadAttributeNullableOctetString_238(); break; case 239: - ChipLogProgress(chipTool, " ***** Test Step 239 : Read attribute NULLABLE_OCTET_STRING\n"); - err = TestReadAttributeNullableOctetString_239(); + ChipLogProgress(chipTool, " ***** Test Step 239 : Write attribute NULLABLE_OCTET_STRING\n"); + err = TestWriteAttributeNullableOctetString_239(); break; case 240: - ChipLogProgress(chipTool, " ***** Test Step 240 : Read attribute NULLABLE_CHAR_STRING Default Value\n"); - err = TestReadAttributeNullableCharStringDefaultValue_240(); + ChipLogProgress(chipTool, " ***** Test Step 240 : Read attribute NULLABLE_OCTET_STRING\n"); + err = TestReadAttributeNullableOctetString_240(); break; case 241: - ChipLogProgress(chipTool, " ***** Test Step 241 : Write attribute NULLABLE_CHAR_STRING\n"); - err = TestWriteAttributeNullableCharString_241(); + ChipLogProgress(chipTool, " ***** Test Step 241 : Read attribute NULLABLE_CHAR_STRING Default Value\n"); + err = TestReadAttributeNullableCharStringDefaultValue_241(); break; case 242: - ChipLogProgress(chipTool, " ***** Test Step 242 : Write attribute NULLABLE_CHAR_STRING - Value too long\n"); - err = TestWriteAttributeNullableCharStringValueTooLong_242(); + ChipLogProgress(chipTool, " ***** Test Step 242 : Write attribute NULLABLE_CHAR_STRING\n"); + err = TestWriteAttributeNullableCharString_242(); break; case 243: - ChipLogProgress(chipTool, " ***** Test Step 243 : Read attribute NULLABLE_CHAR_STRING\n"); - err = TestReadAttributeNullableCharString_243(); + ChipLogProgress(chipTool, " ***** Test Step 243 : Write attribute NULLABLE_CHAR_STRING - Value too long\n"); + err = TestWriteAttributeNullableCharStringValueTooLong_243(); break; case 244: - ChipLogProgress(chipTool, " ***** Test Step 244 : Write attribute NULLABLE_CHAR_STRING - Empty\n"); - err = TestWriteAttributeNullableCharStringEmpty_244(); + ChipLogProgress(chipTool, " ***** Test Step 244 : Read attribute NULLABLE_CHAR_STRING\n"); + err = TestReadAttributeNullableCharString_244(); break; case 245: - ChipLogProgress(chipTool, " ***** Test Step 245 : Read attribute NULLABLE_CHAR_STRING\n"); - err = TestReadAttributeNullableCharString_245(); + ChipLogProgress(chipTool, " ***** Test Step 245 : Write attribute NULLABLE_CHAR_STRING - Empty\n"); + err = TestWriteAttributeNullableCharStringEmpty_245(); break; case 246: - ChipLogProgress(chipTool, " ***** Test Step 246 : Read nonexistent attribute.\n"); - err = TestReadNonexistentAttribute_246(); + ChipLogProgress(chipTool, " ***** Test Step 246 : Read attribute NULLABLE_CHAR_STRING\n"); + err = TestReadAttributeNullableCharString_246(); + break; + case 247: + ChipLogProgress(chipTool, " ***** Test Step 247 : Read attribute from nonexistent endpoint.\n"); + err = TestReadAttributeFromNonexistentEndpoint_247(); + break; + case 248: + ChipLogProgress(chipTool, " ***** Test Step 248 : Read attribute from nonexistent cluster.\n"); + err = TestReadAttributeFromNonexistentCluster_248(); break; } @@ -31837,7 +32177,7 @@ class TestCluster : public TestCommand private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 247; + const uint16_t mTestCount = 249; static void OnFailureCallback_5(void * context, EmberAfStatus status) { @@ -32859,850 +33199,840 @@ class TestCluster : public TestCommand static void OnSuccessCallback_121(void * context) { (static_cast(context))->OnSuccessResponse_121(); } - static void OnFailureCallback_123(void * context, EmberAfStatus status) - { - (static_cast(context))->OnFailureResponse_123(chip::to_underlying(status)); - } - - static void OnSuccessCallback_123(void * context, chip::VendorId vendorId) - { - (static_cast(context))->OnSuccessResponse_123(vendorId); - } - static void OnFailureCallback_124(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_124(chip::to_underlying(status)); } - static void OnSuccessCallback_124(void * context) { (static_cast(context))->OnSuccessResponse_124(); } + static void OnSuccessCallback_124(void * context, chip::VendorId vendorId) + { + (static_cast(context))->OnSuccessResponse_124(vendorId); + } static void OnFailureCallback_125(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_125(chip::to_underlying(status)); } - static void OnSuccessCallback_125(void * context, chip::VendorId vendorId) - { - (static_cast(context))->OnSuccessResponse_125(vendorId); - } + static void OnSuccessCallback_125(void * context) { (static_cast(context))->OnSuccessResponse_125(); } static void OnFailureCallback_126(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_126(chip::to_underlying(status)); } - static void OnSuccessCallback_126(void * context) { (static_cast(context))->OnSuccessResponse_126(); } + static void OnSuccessCallback_126(void * context, chip::VendorId vendorId) + { + (static_cast(context))->OnSuccessResponse_126(vendorId); + } - static void OnFailureCallback_137(void * context, EmberAfStatus status) + static void OnFailureCallback_127(void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_137(chip::to_underlying(status)); + (static_cast(context))->OnFailureResponse_127(chip::to_underlying(status)); } - static void OnSuccessCallback_137(void * context) { (static_cast(context))->OnSuccessResponse_137(); } + static void OnSuccessCallback_127(void * context) { (static_cast(context))->OnSuccessResponse_127(); } static void OnFailureCallback_138(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_138(chip::to_underlying(status)); } - static void OnSuccessCallback_138(void * context, const chip::app::DataModel::DecodableList & listInt8u) - { - (static_cast(context))->OnSuccessResponse_138(listInt8u); - } + static void OnSuccessCallback_138(void * context) { (static_cast(context))->OnSuccessResponse_138(); } static void OnFailureCallback_139(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_139(chip::to_underlying(status)); } - static void OnSuccessCallback_139(void * context) { (static_cast(context))->OnSuccessResponse_139(); } + static void OnSuccessCallback_139(void * context, const chip::app::DataModel::DecodableList & listInt8u) + { + (static_cast(context))->OnSuccessResponse_139(listInt8u); + } static void OnFailureCallback_140(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_140(chip::to_underlying(status)); } - static void OnSuccessCallback_140(void * context, const chip::app::DataModel::DecodableList & listOctetString) - { - (static_cast(context))->OnSuccessResponse_140(listOctetString); - } + static void OnSuccessCallback_140(void * context) { (static_cast(context))->OnSuccessResponse_140(); } static void OnFailureCallback_141(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_141(chip::to_underlying(status)); } - static void OnSuccessCallback_141(void * context) { (static_cast(context))->OnSuccessResponse_141(); } + static void OnSuccessCallback_141(void * context, const chip::app::DataModel::DecodableList & listOctetString) + { + (static_cast(context))->OnSuccessResponse_141(listOctetString); + } static void OnFailureCallback_142(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_142(chip::to_underlying(status)); } - static void OnSuccessCallback_142( - void * context, - const chip::app::DataModel::DecodableList & - listStructOctetString) + static void OnSuccessCallback_142(void * context) { (static_cast(context))->OnSuccessResponse_142(); } + + static void OnFailureCallback_143(void * context, EmberAfStatus status) { - (static_cast(context))->OnSuccessResponse_142(listStructOctetString); + (static_cast(context))->OnFailureResponse_143(chip::to_underlying(status)); } - static void OnFailureCallback_145(void * context, EmberAfStatus status) + static void OnSuccessCallback_143( + void * context, + const chip::app::DataModel::DecodableList & + listStructOctetString) { - (static_cast(context))->OnFailureResponse_145(chip::to_underlying(status)); + (static_cast(context))->OnSuccessResponse_143(listStructOctetString); } - static void OnSuccessCallback_145(void * context) { (static_cast(context))->OnSuccessResponse_145(); } - static void OnFailureCallback_146(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_146(chip::to_underlying(status)); } - static void OnSuccessCallback_146(void * context, const chip::app::DataModel::Nullable & nullableBoolean) - { - (static_cast(context))->OnSuccessResponse_146(nullableBoolean); - } + static void OnSuccessCallback_146(void * context) { (static_cast(context))->OnSuccessResponse_146(); } static void OnFailureCallback_147(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_147(chip::to_underlying(status)); } - static void OnSuccessCallback_147(void * context) { (static_cast(context))->OnSuccessResponse_147(); } + static void OnSuccessCallback_147(void * context, const chip::app::DataModel::Nullable & nullableBoolean) + { + (static_cast(context))->OnSuccessResponse_147(nullableBoolean); + } static void OnFailureCallback_148(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_148(chip::to_underlying(status)); } - static void OnSuccessCallback_148(void * context, const chip::app::DataModel::Nullable & nullableBoolean) - { - (static_cast(context))->OnSuccessResponse_148(nullableBoolean); - } + static void OnSuccessCallback_148(void * context) { (static_cast(context))->OnSuccessResponse_148(); } static void OnFailureCallback_149(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_149(chip::to_underlying(status)); } - static void OnSuccessCallback_149(void * context) { (static_cast(context))->OnSuccessResponse_149(); } + static void OnSuccessCallback_149(void * context, const chip::app::DataModel::Nullable & nullableBoolean) + { + (static_cast(context))->OnSuccessResponse_149(nullableBoolean); + } static void OnFailureCallback_150(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_150(chip::to_underlying(status)); } - static void OnSuccessCallback_150(void * context, const chip::app::DataModel::Nullable & nullableBitmap8) - { - (static_cast(context))->OnSuccessResponse_150(nullableBitmap8); - } + static void OnSuccessCallback_150(void * context) { (static_cast(context))->OnSuccessResponse_150(); } static void OnFailureCallback_151(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_151(chip::to_underlying(status)); } - static void OnSuccessCallback_151(void * context) { (static_cast(context))->OnSuccessResponse_151(); } + static void OnSuccessCallback_151(void * context, const chip::app::DataModel::Nullable & nullableBitmap8) + { + (static_cast(context))->OnSuccessResponse_151(nullableBitmap8); + } static void OnFailureCallback_152(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_152(chip::to_underlying(status)); } - static void OnSuccessCallback_152(void * context, const chip::app::DataModel::Nullable & nullableBitmap8) - { - (static_cast(context))->OnSuccessResponse_152(nullableBitmap8); - } + static void OnSuccessCallback_152(void * context) { (static_cast(context))->OnSuccessResponse_152(); } static void OnFailureCallback_153(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_153(chip::to_underlying(status)); } - static void OnSuccessCallback_153(void * context) { (static_cast(context))->OnSuccessResponse_153(); } + static void OnSuccessCallback_153(void * context, const chip::app::DataModel::Nullable & nullableBitmap8) + { + (static_cast(context))->OnSuccessResponse_153(nullableBitmap8); + } static void OnFailureCallback_154(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_154(chip::to_underlying(status)); } - static void OnSuccessCallback_154(void * context, const chip::app::DataModel::Nullable & nullableBitmap8) - { - (static_cast(context))->OnSuccessResponse_154(nullableBitmap8); - } + static void OnSuccessCallback_154(void * context) { (static_cast(context))->OnSuccessResponse_154(); } static void OnFailureCallback_155(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_155(chip::to_underlying(status)); } - static void OnSuccessCallback_155(void * context) { (static_cast(context))->OnSuccessResponse_155(); } + static void OnSuccessCallback_155(void * context, const chip::app::DataModel::Nullable & nullableBitmap8) + { + (static_cast(context))->OnSuccessResponse_155(nullableBitmap8); + } static void OnFailureCallback_156(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_156(chip::to_underlying(status)); } - static void OnSuccessCallback_156(void * context, const chip::app::DataModel::Nullable & nullableBitmap16) - { - (static_cast(context))->OnSuccessResponse_156(nullableBitmap16); - } + static void OnSuccessCallback_156(void * context) { (static_cast(context))->OnSuccessResponse_156(); } static void OnFailureCallback_157(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_157(chip::to_underlying(status)); } - static void OnSuccessCallback_157(void * context) { (static_cast(context))->OnSuccessResponse_157(); } + static void OnSuccessCallback_157(void * context, const chip::app::DataModel::Nullable & nullableBitmap16) + { + (static_cast(context))->OnSuccessResponse_157(nullableBitmap16); + } static void OnFailureCallback_158(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_158(chip::to_underlying(status)); } - static void OnSuccessCallback_158(void * context, const chip::app::DataModel::Nullable & nullableBitmap16) - { - (static_cast(context))->OnSuccessResponse_158(nullableBitmap16); - } + static void OnSuccessCallback_158(void * context) { (static_cast(context))->OnSuccessResponse_158(); } static void OnFailureCallback_159(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_159(chip::to_underlying(status)); } - static void OnSuccessCallback_159(void * context) { (static_cast(context))->OnSuccessResponse_159(); } + static void OnSuccessCallback_159(void * context, const chip::app::DataModel::Nullable & nullableBitmap16) + { + (static_cast(context))->OnSuccessResponse_159(nullableBitmap16); + } static void OnFailureCallback_160(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_160(chip::to_underlying(status)); } - static void OnSuccessCallback_160(void * context, const chip::app::DataModel::Nullable & nullableBitmap16) - { - (static_cast(context))->OnSuccessResponse_160(nullableBitmap16); - } + static void OnSuccessCallback_160(void * context) { (static_cast(context))->OnSuccessResponse_160(); } static void OnFailureCallback_161(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_161(chip::to_underlying(status)); } - static void OnSuccessCallback_161(void * context) { (static_cast(context))->OnSuccessResponse_161(); } + static void OnSuccessCallback_161(void * context, const chip::app::DataModel::Nullable & nullableBitmap16) + { + (static_cast(context))->OnSuccessResponse_161(nullableBitmap16); + } static void OnFailureCallback_162(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_162(chip::to_underlying(status)); } - static void OnSuccessCallback_162(void * context, const chip::app::DataModel::Nullable & nullableBitmap32) - { - (static_cast(context))->OnSuccessResponse_162(nullableBitmap32); - } + static void OnSuccessCallback_162(void * context) { (static_cast(context))->OnSuccessResponse_162(); } static void OnFailureCallback_163(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_163(chip::to_underlying(status)); } - static void OnSuccessCallback_163(void * context) { (static_cast(context))->OnSuccessResponse_163(); } + static void OnSuccessCallback_163(void * context, const chip::app::DataModel::Nullable & nullableBitmap32) + { + (static_cast(context))->OnSuccessResponse_163(nullableBitmap32); + } static void OnFailureCallback_164(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_164(chip::to_underlying(status)); } - static void OnSuccessCallback_164(void * context, const chip::app::DataModel::Nullable & nullableBitmap32) - { - (static_cast(context))->OnSuccessResponse_164(nullableBitmap32); - } + static void OnSuccessCallback_164(void * context) { (static_cast(context))->OnSuccessResponse_164(); } static void OnFailureCallback_165(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_165(chip::to_underlying(status)); } - static void OnSuccessCallback_165(void * context) { (static_cast(context))->OnSuccessResponse_165(); } + static void OnSuccessCallback_165(void * context, const chip::app::DataModel::Nullable & nullableBitmap32) + { + (static_cast(context))->OnSuccessResponse_165(nullableBitmap32); + } static void OnFailureCallback_166(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_166(chip::to_underlying(status)); } - static void OnSuccessCallback_166(void * context, const chip::app::DataModel::Nullable & nullableBitmap32) - { - (static_cast(context))->OnSuccessResponse_166(nullableBitmap32); - } + static void OnSuccessCallback_166(void * context) { (static_cast(context))->OnSuccessResponse_166(); } static void OnFailureCallback_167(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_167(chip::to_underlying(status)); } - static void OnSuccessCallback_167(void * context) { (static_cast(context))->OnSuccessResponse_167(); } + static void OnSuccessCallback_167(void * context, const chip::app::DataModel::Nullable & nullableBitmap32) + { + (static_cast(context))->OnSuccessResponse_167(nullableBitmap32); + } static void OnFailureCallback_168(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_168(chip::to_underlying(status)); } - static void OnSuccessCallback_168(void * context, const chip::app::DataModel::Nullable & nullableBitmap64) - { - (static_cast(context))->OnSuccessResponse_168(nullableBitmap64); - } + static void OnSuccessCallback_168(void * context) { (static_cast(context))->OnSuccessResponse_168(); } static void OnFailureCallback_169(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_169(chip::to_underlying(status)); } - static void OnSuccessCallback_169(void * context) { (static_cast(context))->OnSuccessResponse_169(); } + static void OnSuccessCallback_169(void * context, const chip::app::DataModel::Nullable & nullableBitmap64) + { + (static_cast(context))->OnSuccessResponse_169(nullableBitmap64); + } static void OnFailureCallback_170(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_170(chip::to_underlying(status)); } - static void OnSuccessCallback_170(void * context, const chip::app::DataModel::Nullable & nullableBitmap64) - { - (static_cast(context))->OnSuccessResponse_170(nullableBitmap64); - } + static void OnSuccessCallback_170(void * context) { (static_cast(context))->OnSuccessResponse_170(); } static void OnFailureCallback_171(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_171(chip::to_underlying(status)); } - static void OnSuccessCallback_171(void * context) { (static_cast(context))->OnSuccessResponse_171(); } + static void OnSuccessCallback_171(void * context, const chip::app::DataModel::Nullable & nullableBitmap64) + { + (static_cast(context))->OnSuccessResponse_171(nullableBitmap64); + } static void OnFailureCallback_172(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_172(chip::to_underlying(status)); } - static void OnSuccessCallback_172(void * context, const chip::app::DataModel::Nullable & nullableBitmap64) - { - (static_cast(context))->OnSuccessResponse_172(nullableBitmap64); - } + static void OnSuccessCallback_172(void * context) { (static_cast(context))->OnSuccessResponse_172(); } static void OnFailureCallback_173(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_173(chip::to_underlying(status)); } - static void OnSuccessCallback_173(void * context) { (static_cast(context))->OnSuccessResponse_173(); } + static void OnSuccessCallback_173(void * context, const chip::app::DataModel::Nullable & nullableBitmap64) + { + (static_cast(context))->OnSuccessResponse_173(nullableBitmap64); + } static void OnFailureCallback_174(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_174(chip::to_underlying(status)); } - static void OnSuccessCallback_174(void * context, const chip::app::DataModel::Nullable & nullableInt8u) - { - (static_cast(context))->OnSuccessResponse_174(nullableInt8u); - } + static void OnSuccessCallback_174(void * context) { (static_cast(context))->OnSuccessResponse_174(); } static void OnFailureCallback_175(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_175(chip::to_underlying(status)); } - static void OnSuccessCallback_175(void * context) { (static_cast(context))->OnSuccessResponse_175(); } + static void OnSuccessCallback_175(void * context, const chip::app::DataModel::Nullable & nullableInt8u) + { + (static_cast(context))->OnSuccessResponse_175(nullableInt8u); + } static void OnFailureCallback_176(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_176(chip::to_underlying(status)); } - static void OnSuccessCallback_176(void * context, const chip::app::DataModel::Nullable & nullableInt8u) - { - (static_cast(context))->OnSuccessResponse_176(nullableInt8u); - } + static void OnSuccessCallback_176(void * context) { (static_cast(context))->OnSuccessResponse_176(); } static void OnFailureCallback_177(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_177(chip::to_underlying(status)); } - static void OnSuccessCallback_177(void * context) { (static_cast(context))->OnSuccessResponse_177(); } + static void OnSuccessCallback_177(void * context, const chip::app::DataModel::Nullable & nullableInt8u) + { + (static_cast(context))->OnSuccessResponse_177(nullableInt8u); + } static void OnFailureCallback_178(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_178(chip::to_underlying(status)); } - static void OnSuccessCallback_178(void * context, const chip::app::DataModel::Nullable & nullableInt8u) - { - (static_cast(context))->OnSuccessResponse_178(nullableInt8u); - } + static void OnSuccessCallback_178(void * context) { (static_cast(context))->OnSuccessResponse_178(); } static void OnFailureCallback_179(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_179(chip::to_underlying(status)); } - static void OnSuccessCallback_179(void * context) { (static_cast(context))->OnSuccessResponse_179(); } + static void OnSuccessCallback_179(void * context, const chip::app::DataModel::Nullable & nullableInt8u) + { + (static_cast(context))->OnSuccessResponse_179(nullableInt8u); + } static void OnFailureCallback_180(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_180(chip::to_underlying(status)); } - static void OnSuccessCallback_180(void * context, const chip::app::DataModel::Nullable & nullableInt16u) - { - (static_cast(context))->OnSuccessResponse_180(nullableInt16u); - } + static void OnSuccessCallback_180(void * context) { (static_cast(context))->OnSuccessResponse_180(); } static void OnFailureCallback_181(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_181(chip::to_underlying(status)); } - static void OnSuccessCallback_181(void * context) { (static_cast(context))->OnSuccessResponse_181(); } + static void OnSuccessCallback_181(void * context, const chip::app::DataModel::Nullable & nullableInt16u) + { + (static_cast(context))->OnSuccessResponse_181(nullableInt16u); + } static void OnFailureCallback_182(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_182(chip::to_underlying(status)); } - static void OnSuccessCallback_182(void * context, const chip::app::DataModel::Nullable & nullableInt16u) - { - (static_cast(context))->OnSuccessResponse_182(nullableInt16u); - } + static void OnSuccessCallback_182(void * context) { (static_cast(context))->OnSuccessResponse_182(); } static void OnFailureCallback_183(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_183(chip::to_underlying(status)); } - static void OnSuccessCallback_183(void * context) { (static_cast(context))->OnSuccessResponse_183(); } + static void OnSuccessCallback_183(void * context, const chip::app::DataModel::Nullable & nullableInt16u) + { + (static_cast(context))->OnSuccessResponse_183(nullableInt16u); + } static void OnFailureCallback_184(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_184(chip::to_underlying(status)); } - static void OnSuccessCallback_184(void * context, const chip::app::DataModel::Nullable & nullableInt16u) - { - (static_cast(context))->OnSuccessResponse_184(nullableInt16u); - } + static void OnSuccessCallback_184(void * context) { (static_cast(context))->OnSuccessResponse_184(); } static void OnFailureCallback_185(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_185(chip::to_underlying(status)); } - static void OnSuccessCallback_185(void * context) { (static_cast(context))->OnSuccessResponse_185(); } + static void OnSuccessCallback_185(void * context, const chip::app::DataModel::Nullable & nullableInt16u) + { + (static_cast(context))->OnSuccessResponse_185(nullableInt16u); + } static void OnFailureCallback_186(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_186(chip::to_underlying(status)); } - static void OnSuccessCallback_186(void * context, const chip::app::DataModel::Nullable & nullableInt32u) - { - (static_cast(context))->OnSuccessResponse_186(nullableInt32u); - } + static void OnSuccessCallback_186(void * context) { (static_cast(context))->OnSuccessResponse_186(); } static void OnFailureCallback_187(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_187(chip::to_underlying(status)); } - static void OnSuccessCallback_187(void * context) { (static_cast(context))->OnSuccessResponse_187(); } + static void OnSuccessCallback_187(void * context, const chip::app::DataModel::Nullable & nullableInt32u) + { + (static_cast(context))->OnSuccessResponse_187(nullableInt32u); + } static void OnFailureCallback_188(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_188(chip::to_underlying(status)); } - static void OnSuccessCallback_188(void * context, const chip::app::DataModel::Nullable & nullableInt32u) - { - (static_cast(context))->OnSuccessResponse_188(nullableInt32u); - } + static void OnSuccessCallback_188(void * context) { (static_cast(context))->OnSuccessResponse_188(); } static void OnFailureCallback_189(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_189(chip::to_underlying(status)); } - static void OnSuccessCallback_189(void * context) { (static_cast(context))->OnSuccessResponse_189(); } + static void OnSuccessCallback_189(void * context, const chip::app::DataModel::Nullable & nullableInt32u) + { + (static_cast(context))->OnSuccessResponse_189(nullableInt32u); + } static void OnFailureCallback_190(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_190(chip::to_underlying(status)); } - static void OnSuccessCallback_190(void * context, const chip::app::DataModel::Nullable & nullableInt32u) - { - (static_cast(context))->OnSuccessResponse_190(nullableInt32u); - } + static void OnSuccessCallback_190(void * context) { (static_cast(context))->OnSuccessResponse_190(); } static void OnFailureCallback_191(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_191(chip::to_underlying(status)); } - static void OnSuccessCallback_191(void * context) { (static_cast(context))->OnSuccessResponse_191(); } + static void OnSuccessCallback_191(void * context, const chip::app::DataModel::Nullable & nullableInt32u) + { + (static_cast(context))->OnSuccessResponse_191(nullableInt32u); + } static void OnFailureCallback_192(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_192(chip::to_underlying(status)); } - static void OnSuccessCallback_192(void * context, const chip::app::DataModel::Nullable & nullableInt64u) - { - (static_cast(context))->OnSuccessResponse_192(nullableInt64u); - } + static void OnSuccessCallback_192(void * context) { (static_cast(context))->OnSuccessResponse_192(); } static void OnFailureCallback_193(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_193(chip::to_underlying(status)); } - static void OnSuccessCallback_193(void * context) { (static_cast(context))->OnSuccessResponse_193(); } + static void OnSuccessCallback_193(void * context, const chip::app::DataModel::Nullable & nullableInt64u) + { + (static_cast(context))->OnSuccessResponse_193(nullableInt64u); + } static void OnFailureCallback_194(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_194(chip::to_underlying(status)); } - static void OnSuccessCallback_194(void * context, const chip::app::DataModel::Nullable & nullableInt64u) - { - (static_cast(context))->OnSuccessResponse_194(nullableInt64u); - } + static void OnSuccessCallback_194(void * context) { (static_cast(context))->OnSuccessResponse_194(); } static void OnFailureCallback_195(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_195(chip::to_underlying(status)); } - static void OnSuccessCallback_195(void * context) { (static_cast(context))->OnSuccessResponse_195(); } + static void OnSuccessCallback_195(void * context, const chip::app::DataModel::Nullable & nullableInt64u) + { + (static_cast(context))->OnSuccessResponse_195(nullableInt64u); + } static void OnFailureCallback_196(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_196(chip::to_underlying(status)); } - static void OnSuccessCallback_196(void * context, const chip::app::DataModel::Nullable & nullableInt64u) - { - (static_cast(context))->OnSuccessResponse_196(nullableInt64u); - } + static void OnSuccessCallback_196(void * context) { (static_cast(context))->OnSuccessResponse_196(); } static void OnFailureCallback_197(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_197(chip::to_underlying(status)); } - static void OnSuccessCallback_197(void * context) { (static_cast(context))->OnSuccessResponse_197(); } + static void OnSuccessCallback_197(void * context, const chip::app::DataModel::Nullable & nullableInt64u) + { + (static_cast(context))->OnSuccessResponse_197(nullableInt64u); + } static void OnFailureCallback_198(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_198(chip::to_underlying(status)); } - static void OnSuccessCallback_198(void * context, const chip::app::DataModel::Nullable & nullableInt8s) - { - (static_cast(context))->OnSuccessResponse_198(nullableInt8s); - } + static void OnSuccessCallback_198(void * context) { (static_cast(context))->OnSuccessResponse_198(); } static void OnFailureCallback_199(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_199(chip::to_underlying(status)); } - static void OnSuccessCallback_199(void * context) { (static_cast(context))->OnSuccessResponse_199(); } + static void OnSuccessCallback_199(void * context, const chip::app::DataModel::Nullable & nullableInt8s) + { + (static_cast(context))->OnSuccessResponse_199(nullableInt8s); + } static void OnFailureCallback_200(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_200(chip::to_underlying(status)); } - static void OnSuccessCallback_200(void * context, const chip::app::DataModel::Nullable & nullableInt8s) - { - (static_cast(context))->OnSuccessResponse_200(nullableInt8s); - } + static void OnSuccessCallback_200(void * context) { (static_cast(context))->OnSuccessResponse_200(); } static void OnFailureCallback_201(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_201(chip::to_underlying(status)); } - static void OnSuccessCallback_201(void * context) { (static_cast(context))->OnSuccessResponse_201(); } + static void OnSuccessCallback_201(void * context, const chip::app::DataModel::Nullable & nullableInt8s) + { + (static_cast(context))->OnSuccessResponse_201(nullableInt8s); + } static void OnFailureCallback_202(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_202(chip::to_underlying(status)); } - static void OnSuccessCallback_202(void * context, const chip::app::DataModel::Nullable & nullableInt8s) - { - (static_cast(context))->OnSuccessResponse_202(nullableInt8s); - } + static void OnSuccessCallback_202(void * context) { (static_cast(context))->OnSuccessResponse_202(); } static void OnFailureCallback_203(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_203(chip::to_underlying(status)); } - static void OnSuccessCallback_203(void * context) { (static_cast(context))->OnSuccessResponse_203(); } + static void OnSuccessCallback_203(void * context, const chip::app::DataModel::Nullable & nullableInt8s) + { + (static_cast(context))->OnSuccessResponse_203(nullableInt8s); + } static void OnFailureCallback_204(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_204(chip::to_underlying(status)); } - static void OnSuccessCallback_204(void * context, const chip::app::DataModel::Nullable & nullableInt16s) - { - (static_cast(context))->OnSuccessResponse_204(nullableInt16s); - } + static void OnSuccessCallback_204(void * context) { (static_cast(context))->OnSuccessResponse_204(); } static void OnFailureCallback_205(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_205(chip::to_underlying(status)); } - static void OnSuccessCallback_205(void * context) { (static_cast(context))->OnSuccessResponse_205(); } + static void OnSuccessCallback_205(void * context, const chip::app::DataModel::Nullable & nullableInt16s) + { + (static_cast(context))->OnSuccessResponse_205(nullableInt16s); + } static void OnFailureCallback_206(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_206(chip::to_underlying(status)); } - static void OnSuccessCallback_206(void * context, const chip::app::DataModel::Nullable & nullableInt16s) - { - (static_cast(context))->OnSuccessResponse_206(nullableInt16s); - } + static void OnSuccessCallback_206(void * context) { (static_cast(context))->OnSuccessResponse_206(); } static void OnFailureCallback_207(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_207(chip::to_underlying(status)); } - static void OnSuccessCallback_207(void * context) { (static_cast(context))->OnSuccessResponse_207(); } + static void OnSuccessCallback_207(void * context, const chip::app::DataModel::Nullable & nullableInt16s) + { + (static_cast(context))->OnSuccessResponse_207(nullableInt16s); + } static void OnFailureCallback_208(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_208(chip::to_underlying(status)); } - static void OnSuccessCallback_208(void * context, const chip::app::DataModel::Nullable & nullableInt16s) - { - (static_cast(context))->OnSuccessResponse_208(nullableInt16s); - } + static void OnSuccessCallback_208(void * context) { (static_cast(context))->OnSuccessResponse_208(); } static void OnFailureCallback_209(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_209(chip::to_underlying(status)); } - static void OnSuccessCallback_209(void * context) { (static_cast(context))->OnSuccessResponse_209(); } + static void OnSuccessCallback_209(void * context, const chip::app::DataModel::Nullable & nullableInt16s) + { + (static_cast(context))->OnSuccessResponse_209(nullableInt16s); + } static void OnFailureCallback_210(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_210(chip::to_underlying(status)); } - static void OnSuccessCallback_210(void * context, const chip::app::DataModel::Nullable & nullableInt32s) - { - (static_cast(context))->OnSuccessResponse_210(nullableInt32s); - } + static void OnSuccessCallback_210(void * context) { (static_cast(context))->OnSuccessResponse_210(); } static void OnFailureCallback_211(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_211(chip::to_underlying(status)); } - static void OnSuccessCallback_211(void * context) { (static_cast(context))->OnSuccessResponse_211(); } + static void OnSuccessCallback_211(void * context, const chip::app::DataModel::Nullable & nullableInt32s) + { + (static_cast(context))->OnSuccessResponse_211(nullableInt32s); + } static void OnFailureCallback_212(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_212(chip::to_underlying(status)); } - static void OnSuccessCallback_212(void * context, const chip::app::DataModel::Nullable & nullableInt32s) - { - (static_cast(context))->OnSuccessResponse_212(nullableInt32s); - } + static void OnSuccessCallback_212(void * context) { (static_cast(context))->OnSuccessResponse_212(); } static void OnFailureCallback_213(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_213(chip::to_underlying(status)); } - static void OnSuccessCallback_213(void * context) { (static_cast(context))->OnSuccessResponse_213(); } + static void OnSuccessCallback_213(void * context, const chip::app::DataModel::Nullable & nullableInt32s) + { + (static_cast(context))->OnSuccessResponse_213(nullableInt32s); + } static void OnFailureCallback_214(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_214(chip::to_underlying(status)); } - static void OnSuccessCallback_214(void * context, const chip::app::DataModel::Nullable & nullableInt32s) - { - (static_cast(context))->OnSuccessResponse_214(nullableInt32s); - } + static void OnSuccessCallback_214(void * context) { (static_cast(context))->OnSuccessResponse_214(); } static void OnFailureCallback_215(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_215(chip::to_underlying(status)); } - static void OnSuccessCallback_215(void * context) { (static_cast(context))->OnSuccessResponse_215(); } + static void OnSuccessCallback_215(void * context, const chip::app::DataModel::Nullable & nullableInt32s) + { + (static_cast(context))->OnSuccessResponse_215(nullableInt32s); + } static void OnFailureCallback_216(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_216(chip::to_underlying(status)); } - static void OnSuccessCallback_216(void * context, const chip::app::DataModel::Nullable & nullableInt64s) - { - (static_cast(context))->OnSuccessResponse_216(nullableInt64s); - } + static void OnSuccessCallback_216(void * context) { (static_cast(context))->OnSuccessResponse_216(); } static void OnFailureCallback_217(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_217(chip::to_underlying(status)); } - static void OnSuccessCallback_217(void * context) { (static_cast(context))->OnSuccessResponse_217(); } + static void OnSuccessCallback_217(void * context, const chip::app::DataModel::Nullable & nullableInt64s) + { + (static_cast(context))->OnSuccessResponse_217(nullableInt64s); + } static void OnFailureCallback_218(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_218(chip::to_underlying(status)); } - static void OnSuccessCallback_218(void * context, const chip::app::DataModel::Nullable & nullableInt64s) - { - (static_cast(context))->OnSuccessResponse_218(nullableInt64s); - } + static void OnSuccessCallback_218(void * context) { (static_cast(context))->OnSuccessResponse_218(); } static void OnFailureCallback_219(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_219(chip::to_underlying(status)); } - static void OnSuccessCallback_219(void * context) { (static_cast(context))->OnSuccessResponse_219(); } + static void OnSuccessCallback_219(void * context, const chip::app::DataModel::Nullable & nullableInt64s) + { + (static_cast(context))->OnSuccessResponse_219(nullableInt64s); + } static void OnFailureCallback_220(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_220(chip::to_underlying(status)); } - static void OnSuccessCallback_220(void * context, const chip::app::DataModel::Nullable & nullableInt64s) - { - (static_cast(context))->OnSuccessResponse_220(nullableInt64s); - } + static void OnSuccessCallback_220(void * context) { (static_cast(context))->OnSuccessResponse_220(); } static void OnFailureCallback_221(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_221(chip::to_underlying(status)); } - static void OnSuccessCallback_221(void * context) { (static_cast(context))->OnSuccessResponse_221(); } + static void OnSuccessCallback_221(void * context, const chip::app::DataModel::Nullable & nullableInt64s) + { + (static_cast(context))->OnSuccessResponse_221(nullableInt64s); + } static void OnFailureCallback_222(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_222(chip::to_underlying(status)); } - static void OnSuccessCallback_222(void * context, const chip::app::DataModel::Nullable & nullableEnum8) - { - (static_cast(context))->OnSuccessResponse_222(nullableEnum8); - } + static void OnSuccessCallback_222(void * context) { (static_cast(context))->OnSuccessResponse_222(); } static void OnFailureCallback_223(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_223(chip::to_underlying(status)); } - static void OnSuccessCallback_223(void * context) { (static_cast(context))->OnSuccessResponse_223(); } + static void OnSuccessCallback_223(void * context, const chip::app::DataModel::Nullable & nullableEnum8) + { + (static_cast(context))->OnSuccessResponse_223(nullableEnum8); + } static void OnFailureCallback_224(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_224(chip::to_underlying(status)); } - static void OnSuccessCallback_224(void * context, const chip::app::DataModel::Nullable & nullableEnum8) - { - (static_cast(context))->OnSuccessResponse_224(nullableEnum8); - } + static void OnSuccessCallback_224(void * context) { (static_cast(context))->OnSuccessResponse_224(); } static void OnFailureCallback_225(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_225(chip::to_underlying(status)); } - static void OnSuccessCallback_225(void * context) { (static_cast(context))->OnSuccessResponse_225(); } + static void OnSuccessCallback_225(void * context, const chip::app::DataModel::Nullable & nullableEnum8) + { + (static_cast(context))->OnSuccessResponse_225(nullableEnum8); + } static void OnFailureCallback_226(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_226(chip::to_underlying(status)); } - static void OnSuccessCallback_226(void * context, const chip::app::DataModel::Nullable & nullableEnum8) - { - (static_cast(context))->OnSuccessResponse_226(nullableEnum8); - } + static void OnSuccessCallback_226(void * context) { (static_cast(context))->OnSuccessResponse_226(); } static void OnFailureCallback_227(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_227(chip::to_underlying(status)); } - static void OnSuccessCallback_227(void * context) { (static_cast(context))->OnSuccessResponse_227(); } + static void OnSuccessCallback_227(void * context, const chip::app::DataModel::Nullable & nullableEnum8) + { + (static_cast(context))->OnSuccessResponse_227(nullableEnum8); + } static void OnFailureCallback_228(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_228(chip::to_underlying(status)); } - static void OnSuccessCallback_228(void * context, const chip::app::DataModel::Nullable & nullableEnum16) - { - (static_cast(context))->OnSuccessResponse_228(nullableEnum16); - } + static void OnSuccessCallback_228(void * context) { (static_cast(context))->OnSuccessResponse_228(); } static void OnFailureCallback_229(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_229(chip::to_underlying(status)); } - static void OnSuccessCallback_229(void * context) { (static_cast(context))->OnSuccessResponse_229(); } + static void OnSuccessCallback_229(void * context, const chip::app::DataModel::Nullable & nullableEnum16) + { + (static_cast(context))->OnSuccessResponse_229(nullableEnum16); + } static void OnFailureCallback_230(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_230(chip::to_underlying(status)); } - static void OnSuccessCallback_230(void * context, const chip::app::DataModel::Nullable & nullableEnum16) - { - (static_cast(context))->OnSuccessResponse_230(nullableEnum16); - } + static void OnSuccessCallback_230(void * context) { (static_cast(context))->OnSuccessResponse_230(); } static void OnFailureCallback_231(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_231(chip::to_underlying(status)); } - static void OnSuccessCallback_231(void * context) { (static_cast(context))->OnSuccessResponse_231(); } + static void OnSuccessCallback_231(void * context, const chip::app::DataModel::Nullable & nullableEnum16) + { + (static_cast(context))->OnSuccessResponse_231(nullableEnum16); + } static void OnFailureCallback_232(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_232(chip::to_underlying(status)); } - static void OnSuccessCallback_232(void * context, const chip::app::DataModel::Nullable & nullableEnum16) - { - (static_cast(context))->OnSuccessResponse_232(nullableEnum16); - } + static void OnSuccessCallback_232(void * context) { (static_cast(context))->OnSuccessResponse_232(); } static void OnFailureCallback_233(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_233(chip::to_underlying(status)); } - static void OnSuccessCallback_233(void * context, const chip::app::DataModel::Nullable & nullableOctetString) + static void OnSuccessCallback_233(void * context, const chip::app::DataModel::Nullable & nullableEnum16) { - (static_cast(context))->OnSuccessResponse_233(nullableOctetString); + (static_cast(context))->OnSuccessResponse_233(nullableEnum16); } static void OnFailureCallback_234(void * context, EmberAfStatus status) @@ -33710,60 +34040,60 @@ class TestCluster : public TestCommand (static_cast(context))->OnFailureResponse_234(chip::to_underlying(status)); } - static void OnSuccessCallback_234(void * context) { (static_cast(context))->OnSuccessResponse_234(); } + static void OnSuccessCallback_234(void * context, const chip::app::DataModel::Nullable & nullableOctetString) + { + (static_cast(context))->OnSuccessResponse_234(nullableOctetString); + } static void OnFailureCallback_235(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_235(chip::to_underlying(status)); } - static void OnSuccessCallback_235(void * context, const chip::app::DataModel::Nullable & nullableOctetString) - { - (static_cast(context))->OnSuccessResponse_235(nullableOctetString); - } + static void OnSuccessCallback_235(void * context) { (static_cast(context))->OnSuccessResponse_235(); } static void OnFailureCallback_236(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_236(chip::to_underlying(status)); } - static void OnSuccessCallback_236(void * context) { (static_cast(context))->OnSuccessResponse_236(); } + static void OnSuccessCallback_236(void * context, const chip::app::DataModel::Nullable & nullableOctetString) + { + (static_cast(context))->OnSuccessResponse_236(nullableOctetString); + } static void OnFailureCallback_237(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_237(chip::to_underlying(status)); } - static void OnSuccessCallback_237(void * context, const chip::app::DataModel::Nullable & nullableOctetString) - { - (static_cast(context))->OnSuccessResponse_237(nullableOctetString); - } + static void OnSuccessCallback_237(void * context) { (static_cast(context))->OnSuccessResponse_237(); } static void OnFailureCallback_238(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_238(chip::to_underlying(status)); } - static void OnSuccessCallback_238(void * context) { (static_cast(context))->OnSuccessResponse_238(); } + static void OnSuccessCallback_238(void * context, const chip::app::DataModel::Nullable & nullableOctetString) + { + (static_cast(context))->OnSuccessResponse_238(nullableOctetString); + } static void OnFailureCallback_239(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_239(chip::to_underlying(status)); } - static void OnSuccessCallback_239(void * context, const chip::app::DataModel::Nullable & nullableOctetString) - { - (static_cast(context))->OnSuccessResponse_239(nullableOctetString); - } + static void OnSuccessCallback_239(void * context) { (static_cast(context))->OnSuccessResponse_239(); } static void OnFailureCallback_240(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_240(chip::to_underlying(status)); } - static void OnSuccessCallback_240(void * context, const chip::app::DataModel::Nullable & nullableCharString) + static void OnSuccessCallback_240(void * context, const chip::app::DataModel::Nullable & nullableOctetString) { - (static_cast(context))->OnSuccessResponse_240(nullableCharString); + (static_cast(context))->OnSuccessResponse_240(nullableOctetString); } static void OnFailureCallback_241(void * context, EmberAfStatus status) @@ -33771,7 +34101,10 @@ class TestCluster : public TestCommand (static_cast(context))->OnFailureResponse_241(chip::to_underlying(status)); } - static void OnSuccessCallback_241(void * context) { (static_cast(context))->OnSuccessResponse_241(); } + static void OnSuccessCallback_241(void * context, const chip::app::DataModel::Nullable & nullableCharString) + { + (static_cast(context))->OnSuccessResponse_241(nullableCharString); + } static void OnFailureCallback_242(void * context, EmberAfStatus status) { @@ -33785,36 +34118,53 @@ class TestCluster : public TestCommand (static_cast(context))->OnFailureResponse_243(chip::to_underlying(status)); } - static void OnSuccessCallback_243(void * context, const chip::app::DataModel::Nullable & nullableCharString) - { - (static_cast(context))->OnSuccessResponse_243(nullableCharString); - } + static void OnSuccessCallback_243(void * context) { (static_cast(context))->OnSuccessResponse_243(); } static void OnFailureCallback_244(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_244(chip::to_underlying(status)); } - static void OnSuccessCallback_244(void * context) { (static_cast(context))->OnSuccessResponse_244(); } + static void OnSuccessCallback_244(void * context, const chip::app::DataModel::Nullable & nullableCharString) + { + (static_cast(context))->OnSuccessResponse_244(nullableCharString); + } static void OnFailureCallback_245(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_245(chip::to_underlying(status)); } - static void OnSuccessCallback_245(void * context, const chip::app::DataModel::Nullable & nullableCharString) - { - (static_cast(context))->OnSuccessResponse_245(nullableCharString); - } + static void OnSuccessCallback_245(void * context) { (static_cast(context))->OnSuccessResponse_245(); } static void OnFailureCallback_246(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_246(chip::to_underlying(status)); } - static void OnSuccessCallback_246(void * context, const chip::app::DataModel::DecodableList & listInt8u) + static void OnSuccessCallback_246(void * context, const chip::app::DataModel::Nullable & nullableCharString) + { + (static_cast(context))->OnSuccessResponse_246(nullableCharString); + } + + static void OnFailureCallback_247(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_247(chip::to_underlying(status)); + } + + static void OnSuccessCallback_247(void * context, const chip::app::DataModel::DecodableList & listInt8u) + { + (static_cast(context))->OnSuccessResponse_247(listInt8u); + } + + static void OnFailureCallback_248(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_248(chip::to_underlying(status)); + } + + static void OnSuccessCallback_248(void * context, const chip::app::DataModel::DecodableList & listInt8u) { - (static_cast(context))->OnSuccessResponse_246(listInt8u); + (static_cast(context))->OnSuccessResponse_248(listInt8u); } // @@ -33863,7 +34213,11 @@ class TestCluster : public TestCommand return CHIP_NO_ERROR; } - void OnFailureResponse_1(uint8_t status) { NextTest(); } + void OnFailureResponse_1(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 133)); + NextTest(); + } void OnSuccessResponse_1() { ThrowSuccessResponse(); } @@ -33946,7 +34300,11 @@ class TestCluster : public TestCommand return CHIP_NO_ERROR; } - void OnFailureResponse_4(uint8_t status) { NextTest(); } + void OnFailureResponse_4(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 133)); + NextTest(); + } void OnSuccessResponse_4(uint8_t returnValue) { ThrowSuccessResponse(); } @@ -35566,7 +35924,11 @@ class TestCluster : public TestCommand octetStringArgument, this, OnSuccessCallback_93, OnFailureCallback_93); } - void OnFailureResponse_93(uint8_t status) { NextTest(); } + void OnFailureResponse_93(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 135)); + NextTest(); + } void OnSuccessResponse_93() { ThrowSuccessResponse(); } @@ -35759,7 +36121,11 @@ class TestCluster : public TestCommand charStringArgument, this, OnSuccessCallback_103, OnFailureCallback_103); } - void OnFailureResponse_103(uint8_t status) { NextTest(); } + void OnFailureResponse_103(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 135)); + NextTest(); + } void OnSuccessResponse_103() { ThrowSuccessResponse(); } @@ -36123,30 +36489,61 @@ class TestCluster : public TestCommand return CHIP_NO_ERROR; } - void OnFailureResponse_122(uint8_t status) { NextTest(); } + void OnFailureResponse_122(uint8_t status) + { + VerifyOrReturn(CheckConstraintNotValue("status", status, 0)); + NextTest(); + } void OnSuccessResponse_122() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadAttributeVendorIdDefaultValue_123() + CHIP_ERROR TestSendTestCommandToUnsupportedCluster_123() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + using RequestType = chip::app::Clusters::TestCluster::Commands::Test::Type; + + RequestType request; + + auto success = [](void * context, const typename RequestType::ResponseType & data) { + (static_cast(context))->OnSuccessResponse_123(); + }; + + auto failure = [](void * context, EmberAfStatus status) { + (static_cast(context))->OnFailureResponse_123(status); + }; + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_123(uint8_t status) + { + VerifyOrReturn(CheckConstraintNotValue("status", status, 0)); + NextTest(); + } + + void OnSuccessResponse_123() { ThrowSuccessResponse(); } + + CHIP_ERROR TestReadAttributeVendorIdDefaultValue_124() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); - return cluster.ReadAttribute(this, OnSuccessCallback_123, - OnFailureCallback_123); + return cluster.ReadAttribute(this, OnSuccessCallback_124, + OnFailureCallback_124); } - void OnFailureResponse_123(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_124(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_123(chip::VendorId vendorId) + void OnSuccessResponse_124(chip::VendorId vendorId) { VerifyOrReturn(CheckValue("vendorId", vendorId, 0U)); NextTest(); } - CHIP_ERROR TestWriteAttributeVendorId_124() + CHIP_ERROR TestWriteAttributeVendorId_125() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -36156,33 +36553,33 @@ class TestCluster : public TestCommand vendorIdArgument = static_cast(17); return cluster.WriteAttribute( - vendorIdArgument, this, OnSuccessCallback_124, OnFailureCallback_124); + vendorIdArgument, this, OnSuccessCallback_125, OnFailureCallback_125); } - void OnFailureResponse_124(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_125(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_124() { NextTest(); } + void OnSuccessResponse_125() { NextTest(); } - CHIP_ERROR TestReadAttributeVendorId_125() + CHIP_ERROR TestReadAttributeVendorId_126() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); - return cluster.ReadAttribute(this, OnSuccessCallback_125, - OnFailureCallback_125); + return cluster.ReadAttribute(this, OnSuccessCallback_126, + OnFailureCallback_126); } - void OnFailureResponse_125(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_126(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_125(chip::VendorId vendorId) + void OnSuccessResponse_126(chip::VendorId vendorId) { VerifyOrReturn(CheckValue("vendorId", vendorId, 17U)); NextTest(); } - CHIP_ERROR TestRestoreAttributeVendorId_126() + CHIP_ERROR TestRestoreAttributeVendorId_127() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -36192,14 +36589,14 @@ class TestCluster : public TestCommand vendorIdArgument = static_cast(0); return cluster.WriteAttribute( - vendorIdArgument, this, OnSuccessCallback_126, OnFailureCallback_126); + vendorIdArgument, this, OnSuccessCallback_127, OnFailureCallback_127); } - void OnFailureResponse_126(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_127(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_126() { NextTest(); } + void OnSuccessResponse_127() { NextTest(); } - CHIP_ERROR TestSendACommandWithAVendorIdAndEnum_127() + CHIP_ERROR TestSendACommandWithAVendorIdAndEnum_128() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; using RequestType = chip::app::Clusters::TestCluster::Commands::TestEnumsRequest::Type; @@ -36209,20 +36606,20 @@ class TestCluster : public TestCommand request.arg2 = static_cast(101); auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context))->OnSuccessResponse_127(data.arg1, data.arg2); + (static_cast(context))->OnSuccessResponse_128(data.arg1, data.arg2); }; auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_127(status); + (static_cast(context))->OnFailureResponse_128(status); }; ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, endpoint, request)); return CHIP_NO_ERROR; } - void OnFailureResponse_127(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_128(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_127(chip::VendorId arg1, chip::app::Clusters::TestCluster::SimpleEnum arg2) + void OnSuccessResponse_128(chip::VendorId arg1, chip::app::Clusters::TestCluster::SimpleEnum arg2) { VerifyOrReturn(CheckValue("arg1", arg1, 20003U)); @@ -36231,7 +36628,7 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestSendTestCommandWithStructArgumentAndArg1bIsTrue_128() + CHIP_ERROR TestSendTestCommandWithStructArgumentAndArg1bIsTrue_129() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; using RequestType = chip::app::Clusters::TestCluster::Commands::TestStructArgumentRequest::Type; @@ -36248,27 +36645,27 @@ class TestCluster : public TestCommand request.arg1.h = 0; auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context))->OnSuccessResponse_128(data.value); + (static_cast(context))->OnSuccessResponse_129(data.value); }; auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_128(status); + (static_cast(context))->OnFailureResponse_129(status); }; ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, endpoint, request)); return CHIP_NO_ERROR; } - void OnFailureResponse_128(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_129(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_128(bool value) + void OnSuccessResponse_129(bool value) { VerifyOrReturn(CheckValue("value", value, true)); NextTest(); } - CHIP_ERROR TestSendTestCommandWithStructArgumentAndArg1bIsFalse_129() + CHIP_ERROR TestSendTestCommandWithStructArgumentAndArg1bIsFalse_130() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; using RequestType = chip::app::Clusters::TestCluster::Commands::TestStructArgumentRequest::Type; @@ -36285,27 +36682,27 @@ class TestCluster : public TestCommand request.arg1.h = 0; auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context))->OnSuccessResponse_129(data.value); + (static_cast(context))->OnSuccessResponse_130(data.value); }; auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_129(status); + (static_cast(context))->OnFailureResponse_130(status); }; ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, endpoint, request)); return CHIP_NO_ERROR; } - void OnFailureResponse_129(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_130(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_129(bool value) + void OnSuccessResponse_130(bool value) { VerifyOrReturn(CheckValue("value", value, false)); NextTest(); } - CHIP_ERROR TestSendTestCommandWithStructArgumentAndSeeWhatWeGetBack_130() + CHIP_ERROR TestSendTestCommandWithStructArgumentAndSeeWhatWeGetBack_131() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; using RequestType = chip::app::Clusters::TestCluster::Commands::SimpleStructEchoRequest::Type; @@ -36322,20 +36719,20 @@ class TestCluster : public TestCommand request.arg1.h = 0.1; auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context))->OnSuccessResponse_130(data.arg1); + (static_cast(context))->OnSuccessResponse_131(data.arg1); }; auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_130(status); + (static_cast(context))->OnFailureResponse_131(status); }; ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, endpoint, request)); return CHIP_NO_ERROR; } - void OnFailureResponse_130(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_131(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_130(const chip::app::Clusters::TestCluster::Structs::SimpleStruct::DecodableType & arg1) + void OnSuccessResponse_131(const chip::app::Clusters::TestCluster::Structs::SimpleStruct::DecodableType & arg1) { VerifyOrReturn(CheckValue("arg1.a", arg1.a, 17)); VerifyOrReturn(CheckValue("arg1.b", arg1.b, false)); @@ -36349,7 +36746,7 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestSendTestCommandWithListOfInt8uAndNoneOfThemIsSetTo0_131() + CHIP_ERROR TestSendTestCommandWithListOfInt8uAndNoneOfThemIsSetTo0_132() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; using RequestType = chip::app::Clusters::TestCluster::Commands::TestListInt8UArgumentRequest::Type; @@ -36369,27 +36766,27 @@ class TestCluster : public TestCommand request.arg1 = arg1List; auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context))->OnSuccessResponse_131(data.value); + (static_cast(context))->OnSuccessResponse_132(data.value); }; auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_131(status); + (static_cast(context))->OnFailureResponse_132(status); }; ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, endpoint, request)); return CHIP_NO_ERROR; } - void OnFailureResponse_131(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_132(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_131(bool value) + void OnSuccessResponse_132(bool value) { VerifyOrReturn(CheckValue("value", value, true)); NextTest(); } - CHIP_ERROR TestSendTestCommandWithListOfInt8uAndOneOfThemIsSetTo0_132() + CHIP_ERROR TestSendTestCommandWithListOfInt8uAndOneOfThemIsSetTo0_133() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; using RequestType = chip::app::Clusters::TestCluster::Commands::TestListInt8UArgumentRequest::Type; @@ -36410,27 +36807,27 @@ class TestCluster : public TestCommand request.arg1 = arg1List; auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context))->OnSuccessResponse_132(data.value); + (static_cast(context))->OnSuccessResponse_133(data.value); }; auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_132(status); + (static_cast(context))->OnFailureResponse_133(status); }; ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, endpoint, request)); return CHIP_NO_ERROR; } - void OnFailureResponse_132(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_133(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_132(bool value) + void OnSuccessResponse_133(bool value) { VerifyOrReturn(CheckValue("value", value, false)); NextTest(); } - CHIP_ERROR TestSendTestCommandWithListOfInt8uAndGetItReversed_133() + CHIP_ERROR TestSendTestCommandWithListOfInt8uAndGetItReversed_134() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; using RequestType = chip::app::Clusters::TestCluster::Commands::TestListInt8UReverseRequest::Type; @@ -36450,20 +36847,20 @@ class TestCluster : public TestCommand request.arg1 = arg1List; auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context))->OnSuccessResponse_133(data.arg1); + (static_cast(context))->OnSuccessResponse_134(data.arg1); }; auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_133(status); + (static_cast(context))->OnFailureResponse_134(status); }; ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, endpoint, request)); return CHIP_NO_ERROR; } - void OnFailureResponse_133(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_134(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_133(const chip::app::DataModel::DecodableList & arg1) + void OnSuccessResponse_134(const chip::app::DataModel::DecodableList & arg1) { auto iter = arg1.begin(); VerifyOrReturn(CheckNextListItemDecodes("arg1", iter, 0)); @@ -36489,7 +36886,7 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestSendTestCommandWithEmptyListOfInt8uAndGetAnEmptyListBack_134() + CHIP_ERROR TestSendTestCommandWithEmptyListOfInt8uAndGetAnEmptyListBack_135() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; using RequestType = chip::app::Clusters::TestCluster::Commands::TestListInt8UReverseRequest::Type; @@ -36499,20 +36896,20 @@ class TestCluster : public TestCommand request.arg1 = chip::app::DataModel::List(); auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context))->OnSuccessResponse_134(data.arg1); + (static_cast(context))->OnSuccessResponse_135(data.arg1); }; auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_134(status); + (static_cast(context))->OnFailureResponse_135(status); }; ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, endpoint, request)); return CHIP_NO_ERROR; } - void OnFailureResponse_134(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_135(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_134(const chip::app::DataModel::DecodableList & arg1) + void OnSuccessResponse_135(const chip::app::DataModel::DecodableList & arg1) { auto iter = arg1.begin(); VerifyOrReturn(CheckNoMoreListItems("arg1", iter, 0)); @@ -36520,7 +36917,7 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestSendTestCommandWithListOfStructArgumentAndArg1bOfFirstItemIsTrue_135() + CHIP_ERROR TestSendTestCommandWithListOfStructArgumentAndArg1bOfFirstItemIsTrue_136() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; using RequestType = chip::app::Clusters::TestCluster::Commands::TestListStructArgumentRequest::Type; @@ -36550,27 +36947,27 @@ class TestCluster : public TestCommand request.arg1 = arg1List; auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context))->OnSuccessResponse_135(data.value); + (static_cast(context))->OnSuccessResponse_136(data.value); }; auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_135(status); + (static_cast(context))->OnFailureResponse_136(status); }; ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, endpoint, request)); return CHIP_NO_ERROR; } - void OnFailureResponse_135(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_136(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_135(bool value) + void OnSuccessResponse_136(bool value) { VerifyOrReturn(CheckValue("value", value, true)); NextTest(); } - CHIP_ERROR TestSendTestCommandWithListOfStructArgumentAndArg1bOfFirstItemIsFalse_136() + CHIP_ERROR TestSendTestCommandWithListOfStructArgumentAndArg1bOfFirstItemIsFalse_137() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; using RequestType = chip::app::Clusters::TestCluster::Commands::TestListStructArgumentRequest::Type; @@ -36600,27 +36997,27 @@ class TestCluster : public TestCommand request.arg1 = arg1List; auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context))->OnSuccessResponse_136(data.value); + (static_cast(context))->OnSuccessResponse_137(data.value); }; auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_136(status); + (static_cast(context))->OnFailureResponse_137(status); }; ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, endpoint, request)); return CHIP_NO_ERROR; } - void OnFailureResponse_136(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_137(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_136(bool value) + void OnSuccessResponse_137(bool value) { VerifyOrReturn(CheckValue("value", value, false)); NextTest(); } - CHIP_ERROR TestWriteAttributeListWithListOfInt8uAndNoneOfThemIsSetTo0_137() + CHIP_ERROR TestWriteAttributeListWithListOfInt8uAndNoneOfThemIsSetTo0_138() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -36636,26 +37033,26 @@ class TestCluster : public TestCommand listInt8uArgument = listInt8uList; return cluster.WriteAttribute( - listInt8uArgument, this, OnSuccessCallback_137, OnFailureCallback_137); + listInt8uArgument, this, OnSuccessCallback_138, OnFailureCallback_138); } - void OnFailureResponse_137(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_138(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_137() { NextTest(); } + void OnSuccessResponse_138() { NextTest(); } - CHIP_ERROR TestReadAttributeListWithListOfInt8u_138() + CHIP_ERROR TestReadAttributeListWithListOfInt8u_139() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); - return cluster.ReadAttribute(this, OnSuccessCallback_138, - OnFailureCallback_138); + return cluster.ReadAttribute(this, OnSuccessCallback_139, + OnFailureCallback_139); } - void OnFailureResponse_138(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_139(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_138(const chip::app::DataModel::DecodableList & listInt8u) + void OnSuccessResponse_139(const chip::app::DataModel::DecodableList & listInt8u) { auto iter = listInt8u.begin(); VerifyOrReturn(CheckNextListItemDecodes("listInt8u", iter, 0)); @@ -36671,7 +37068,7 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestWriteAttributeListWithListOfOctetString_139() + CHIP_ERROR TestWriteAttributeListWithListOfOctetString_140() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -36687,26 +37084,26 @@ class TestCluster : public TestCommand listOctetStringArgument = listOctetStringList; return cluster.WriteAttribute( - listOctetStringArgument, this, OnSuccessCallback_139, OnFailureCallback_139); + listOctetStringArgument, this, OnSuccessCallback_140, OnFailureCallback_140); } - void OnFailureResponse_139(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_140(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_139() { NextTest(); } + void OnSuccessResponse_140() { NextTest(); } - CHIP_ERROR TestReadAttributeListWithListOfOctetString_140() + CHIP_ERROR TestReadAttributeListWithListOfOctetString_141() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_140, OnFailureCallback_140); + this, OnSuccessCallback_141, OnFailureCallback_141); } - void OnFailureResponse_140(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_141(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_140(const chip::app::DataModel::DecodableList & listOctetString) + void OnSuccessResponse_141(const chip::app::DataModel::DecodableList & listOctetString) { auto iter = listOctetString.begin(); VerifyOrReturn(CheckNextListItemDecodes("listOctetString", iter, 0)); @@ -36726,7 +37123,7 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestWriteAttributeListWithListOfListStructOctetString_141() + CHIP_ERROR TestWriteAttributeListWithListOfListStructOctetString_142() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -36756,26 +37153,26 @@ class TestCluster : public TestCommand listStructOctetStringArgument = listStructOctetStringList; return cluster.WriteAttribute( - listStructOctetStringArgument, this, OnSuccessCallback_141, OnFailureCallback_141); + listStructOctetStringArgument, this, OnSuccessCallback_142, OnFailureCallback_142); } - void OnFailureResponse_141(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_142(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_141() { NextTest(); } + void OnSuccessResponse_142() { NextTest(); } - CHIP_ERROR TestReadAttributeListWithListOfListStructOctetString_142() + CHIP_ERROR TestReadAttributeListWithListOfListStructOctetString_143() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_142, OnFailureCallback_142); + this, OnSuccessCallback_143, OnFailureCallback_143); } - void OnFailureResponse_142(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_143(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_142( + void OnSuccessResponse_143( const chip::app::DataModel::DecodableList & listStructOctetString) { @@ -36801,7 +37198,7 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestSendTestCommandWithOptionalArgSet_143() + CHIP_ERROR TestSendTestCommandWithOptionalArgSet_144() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; using RequestType = chip::app::Clusters::TestCluster::Commands::TestNullableOptionalRequest::Type; @@ -36811,20 +37208,20 @@ class TestCluster : public TestCommand auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context)) - ->OnSuccessResponse_143(data.wasPresent, data.wasNull, data.value, data.originalValue); + ->OnSuccessResponse_144(data.wasPresent, data.wasNull, data.value, data.originalValue); }; auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_143(status); + (static_cast(context))->OnFailureResponse_144(status); }; ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, endpoint, request)); return CHIP_NO_ERROR; } - void OnFailureResponse_143(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_144(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_143(bool wasPresent, const chip::Optional & wasNull, const chip::Optional & value, + void OnSuccessResponse_144(bool wasPresent, const chip::Optional & wasNull, const chip::Optional & value, const chip::Optional> & originalValue) { VerifyOrReturn(CheckValue("wasPresent", wasPresent, true)); @@ -36842,7 +37239,7 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestSendTestCommandWithoutItsOptionalArg_144() + CHIP_ERROR TestSendTestCommandWithoutItsOptionalArg_145() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; using RequestType = chip::app::Clusters::TestCluster::Commands::TestNullableOptionalRequest::Type; @@ -36851,20 +37248,20 @@ class TestCluster : public TestCommand auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context)) - ->OnSuccessResponse_144(data.wasPresent, data.wasNull, data.value, data.originalValue); + ->OnSuccessResponse_145(data.wasPresent, data.wasNull, data.value, data.originalValue); }; auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_144(status); + (static_cast(context))->OnFailureResponse_145(status); }; ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, endpoint, request)); return CHIP_NO_ERROR; } - void OnFailureResponse_144(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_145(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_144(bool wasPresent, const chip::Optional & wasNull, const chip::Optional & value, + void OnSuccessResponse_145(bool wasPresent, const chip::Optional & wasNull, const chip::Optional & value, const chip::Optional> & originalValue) { VerifyOrReturn(CheckValue("wasPresent", wasPresent, false)); @@ -36872,7 +37269,7 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestWriteAttributeNullableBooleanNull_145() + CHIP_ERROR TestWriteAttributeNullableBooleanNull_146() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -36882,33 +37279,33 @@ class TestCluster : public TestCommand nullableBooleanArgument.SetNull(); return cluster.WriteAttribute( - nullableBooleanArgument, this, OnSuccessCallback_145, OnFailureCallback_145); + nullableBooleanArgument, this, OnSuccessCallback_146, OnFailureCallback_146); } - void OnFailureResponse_145(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_146(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_145() { NextTest(); } + void OnSuccessResponse_146() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableBooleanNull_146() + CHIP_ERROR TestReadAttributeNullableBooleanNull_147() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_146, OnFailureCallback_146); + this, OnSuccessCallback_147, OnFailureCallback_147); } - void OnFailureResponse_146(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_147(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_146(const chip::app::DataModel::Nullable & nullableBoolean) + void OnSuccessResponse_147(const chip::app::DataModel::Nullable & nullableBoolean) { VerifyOrReturn(CheckValueNull("nullableBoolean", nullableBoolean)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableBooleanTrue_147() + CHIP_ERROR TestWriteAttributeNullableBooleanTrue_148() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -36918,26 +37315,26 @@ class TestCluster : public TestCommand nullableBooleanArgument.SetNonNull() = true; return cluster.WriteAttribute( - nullableBooleanArgument, this, OnSuccessCallback_147, OnFailureCallback_147); + nullableBooleanArgument, this, OnSuccessCallback_148, OnFailureCallback_148); } - void OnFailureResponse_147(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_148(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_147() { NextTest(); } + void OnSuccessResponse_148() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableBooleanTrue_148() + CHIP_ERROR TestReadAttributeNullableBooleanTrue_149() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_148, OnFailureCallback_148); + this, OnSuccessCallback_149, OnFailureCallback_149); } - void OnFailureResponse_148(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_149(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_148(const chip::app::DataModel::Nullable & nullableBoolean) + void OnSuccessResponse_149(const chip::app::DataModel::Nullable & nullableBoolean) { VerifyOrReturn(CheckValueNonNull("nullableBoolean", nullableBoolean)); VerifyOrReturn(CheckValue("nullableBoolean.Value()", nullableBoolean.Value(), true)); @@ -36945,7 +37342,7 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestWriteAttributeNullableBitmap8MaxValue_149() + CHIP_ERROR TestWriteAttributeNullableBitmap8MaxValue_150() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -36955,26 +37352,26 @@ class TestCluster : public TestCommand nullableBitmap8Argument.SetNonNull() = 254; return cluster.WriteAttribute( - nullableBitmap8Argument, this, OnSuccessCallback_149, OnFailureCallback_149); + nullableBitmap8Argument, this, OnSuccessCallback_150, OnFailureCallback_150); } - void OnFailureResponse_149(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_150(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_149() { NextTest(); } + void OnSuccessResponse_150() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableBitmap8MaxValue_150() + CHIP_ERROR TestReadAttributeNullableBitmap8MaxValue_151() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_150, OnFailureCallback_150); + this, OnSuccessCallback_151, OnFailureCallback_151); } - void OnFailureResponse_150(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_151(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_150(const chip::app::DataModel::Nullable & nullableBitmap8) + void OnSuccessResponse_151(const chip::app::DataModel::Nullable & nullableBitmap8) { VerifyOrReturn(CheckValueNonNull("nullableBitmap8", nullableBitmap8)); VerifyOrReturn(CheckValue("nullableBitmap8.Value()", nullableBitmap8.Value(), 254)); @@ -36982,7 +37379,7 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestWriteAttributeNullableBitmap8InvalidValue_151() + CHIP_ERROR TestWriteAttributeNullableBitmap8InvalidValue_152() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -36992,26 +37389,30 @@ class TestCluster : public TestCommand nullableBitmap8Argument.SetNonNull() = 255; return cluster.WriteAttribute( - nullableBitmap8Argument, this, OnSuccessCallback_151, OnFailureCallback_151); + nullableBitmap8Argument, this, OnSuccessCallback_152, OnFailureCallback_152); } - void OnFailureResponse_151(uint8_t status) { NextTest(); } + void OnFailureResponse_152(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 135)); + NextTest(); + } - void OnSuccessResponse_151() { ThrowSuccessResponse(); } + void OnSuccessResponse_152() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadAttributeNullableBitmap8UnchangedValue_152() + CHIP_ERROR TestReadAttributeNullableBitmap8UnchangedValue_153() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_152, OnFailureCallback_152); + this, OnSuccessCallback_153, OnFailureCallback_153); } - void OnFailureResponse_152(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_153(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_152(const chip::app::DataModel::Nullable & nullableBitmap8) + void OnSuccessResponse_153(const chip::app::DataModel::Nullable & nullableBitmap8) { VerifyOrReturn(CheckValueNonNull("nullableBitmap8", nullableBitmap8)); VerifyOrReturn(CheckValue("nullableBitmap8.Value()", nullableBitmap8.Value(), 254)); @@ -37019,7 +37420,7 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestWriteAttributeNullableBitmap8NullValue_153() + CHIP_ERROR TestWriteAttributeNullableBitmap8NullValue_154() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -37029,33 +37430,33 @@ class TestCluster : public TestCommand nullableBitmap8Argument.SetNull(); return cluster.WriteAttribute( - nullableBitmap8Argument, this, OnSuccessCallback_153, OnFailureCallback_153); + nullableBitmap8Argument, this, OnSuccessCallback_154, OnFailureCallback_154); } - void OnFailureResponse_153(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_154(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_153() { NextTest(); } + void OnSuccessResponse_154() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableBitmap8NullValue_154() + CHIP_ERROR TestReadAttributeNullableBitmap8NullValue_155() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_154, OnFailureCallback_154); + this, OnSuccessCallback_155, OnFailureCallback_155); } - void OnFailureResponse_154(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_155(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_154(const chip::app::DataModel::Nullable & nullableBitmap8) + void OnSuccessResponse_155(const chip::app::DataModel::Nullable & nullableBitmap8) { VerifyOrReturn(CheckValueNull("nullableBitmap8", nullableBitmap8)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableBitmap16MaxValue_155() + CHIP_ERROR TestWriteAttributeNullableBitmap16MaxValue_156() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -37065,26 +37466,26 @@ class TestCluster : public TestCommand nullableBitmap16Argument.SetNonNull() = 65534U; return cluster.WriteAttribute( - nullableBitmap16Argument, this, OnSuccessCallback_155, OnFailureCallback_155); + nullableBitmap16Argument, this, OnSuccessCallback_156, OnFailureCallback_156); } - void OnFailureResponse_155(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_156(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_155() { NextTest(); } + void OnSuccessResponse_156() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableBitmap16MaxValue_156() + CHIP_ERROR TestReadAttributeNullableBitmap16MaxValue_157() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_156, OnFailureCallback_156); + this, OnSuccessCallback_157, OnFailureCallback_157); } - void OnFailureResponse_156(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_157(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_156(const chip::app::DataModel::Nullable & nullableBitmap16) + void OnSuccessResponse_157(const chip::app::DataModel::Nullable & nullableBitmap16) { VerifyOrReturn(CheckValueNonNull("nullableBitmap16", nullableBitmap16)); VerifyOrReturn(CheckValue("nullableBitmap16.Value()", nullableBitmap16.Value(), 65534U)); @@ -37092,7 +37493,7 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestWriteAttributeNullableBitmap16InvalidValue_157() + CHIP_ERROR TestWriteAttributeNullableBitmap16InvalidValue_158() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -37102,26 +37503,30 @@ class TestCluster : public TestCommand nullableBitmap16Argument.SetNonNull() = 65535U; return cluster.WriteAttribute( - nullableBitmap16Argument, this, OnSuccessCallback_157, OnFailureCallback_157); + nullableBitmap16Argument, this, OnSuccessCallback_158, OnFailureCallback_158); } - void OnFailureResponse_157(uint8_t status) { NextTest(); } + void OnFailureResponse_158(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 135)); + NextTest(); + } - void OnSuccessResponse_157() { ThrowSuccessResponse(); } + void OnSuccessResponse_158() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadAttributeNullableBitmap16UnchangedValue_158() + CHIP_ERROR TestReadAttributeNullableBitmap16UnchangedValue_159() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_158, OnFailureCallback_158); + this, OnSuccessCallback_159, OnFailureCallback_159); } - void OnFailureResponse_158(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_159(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_158(const chip::app::DataModel::Nullable & nullableBitmap16) + void OnSuccessResponse_159(const chip::app::DataModel::Nullable & nullableBitmap16) { VerifyOrReturn(CheckValueNonNull("nullableBitmap16", nullableBitmap16)); VerifyOrReturn(CheckValue("nullableBitmap16.Value()", nullableBitmap16.Value(), 65534U)); @@ -37129,7 +37534,7 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestWriteAttributeNullableBitmap16NullValue_159() + CHIP_ERROR TestWriteAttributeNullableBitmap16NullValue_160() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -37139,33 +37544,33 @@ class TestCluster : public TestCommand nullableBitmap16Argument.SetNull(); return cluster.WriteAttribute( - nullableBitmap16Argument, this, OnSuccessCallback_159, OnFailureCallback_159); + nullableBitmap16Argument, this, OnSuccessCallback_160, OnFailureCallback_160); } - void OnFailureResponse_159(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_160(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_159() { NextTest(); } + void OnSuccessResponse_160() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableBitmap16NullValue_160() + CHIP_ERROR TestReadAttributeNullableBitmap16NullValue_161() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_160, OnFailureCallback_160); + this, OnSuccessCallback_161, OnFailureCallback_161); } - void OnFailureResponse_160(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_161(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_160(const chip::app::DataModel::Nullable & nullableBitmap16) + void OnSuccessResponse_161(const chip::app::DataModel::Nullable & nullableBitmap16) { VerifyOrReturn(CheckValueNull("nullableBitmap16", nullableBitmap16)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableBitmap32MaxValue_161() + CHIP_ERROR TestWriteAttributeNullableBitmap32MaxValue_162() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -37175,26 +37580,26 @@ class TestCluster : public TestCommand nullableBitmap32Argument.SetNonNull() = 4294967294UL; return cluster.WriteAttribute( - nullableBitmap32Argument, this, OnSuccessCallback_161, OnFailureCallback_161); + nullableBitmap32Argument, this, OnSuccessCallback_162, OnFailureCallback_162); } - void OnFailureResponse_161(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_162(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_161() { NextTest(); } + void OnSuccessResponse_162() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableBitmap32MaxValue_162() + CHIP_ERROR TestReadAttributeNullableBitmap32MaxValue_163() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_162, OnFailureCallback_162); + this, OnSuccessCallback_163, OnFailureCallback_163); } - void OnFailureResponse_162(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_163(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_162(const chip::app::DataModel::Nullable & nullableBitmap32) + void OnSuccessResponse_163(const chip::app::DataModel::Nullable & nullableBitmap32) { VerifyOrReturn(CheckValueNonNull("nullableBitmap32", nullableBitmap32)); VerifyOrReturn(CheckValue("nullableBitmap32.Value()", nullableBitmap32.Value(), 4294967294UL)); @@ -37202,7 +37607,7 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestWriteAttributeNullableBitmap32InvalidValue_163() + CHIP_ERROR TestWriteAttributeNullableBitmap32InvalidValue_164() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -37212,26 +37617,30 @@ class TestCluster : public TestCommand nullableBitmap32Argument.SetNonNull() = 4294967295UL; return cluster.WriteAttribute( - nullableBitmap32Argument, this, OnSuccessCallback_163, OnFailureCallback_163); + nullableBitmap32Argument, this, OnSuccessCallback_164, OnFailureCallback_164); } - void OnFailureResponse_163(uint8_t status) { NextTest(); } + void OnFailureResponse_164(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 135)); + NextTest(); + } - void OnSuccessResponse_163() { ThrowSuccessResponse(); } + void OnSuccessResponse_164() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadAttributeNullableBitmap32UnchangedValue_164() + CHIP_ERROR TestReadAttributeNullableBitmap32UnchangedValue_165() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_164, OnFailureCallback_164); + this, OnSuccessCallback_165, OnFailureCallback_165); } - void OnFailureResponse_164(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_165(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_164(const chip::app::DataModel::Nullable & nullableBitmap32) + void OnSuccessResponse_165(const chip::app::DataModel::Nullable & nullableBitmap32) { VerifyOrReturn(CheckValueNonNull("nullableBitmap32", nullableBitmap32)); VerifyOrReturn(CheckValue("nullableBitmap32.Value()", nullableBitmap32.Value(), 4294967294UL)); @@ -37239,7 +37648,7 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestWriteAttributeNullableBitmap32NullValue_165() + CHIP_ERROR TestWriteAttributeNullableBitmap32NullValue_166() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -37249,33 +37658,33 @@ class TestCluster : public TestCommand nullableBitmap32Argument.SetNull(); return cluster.WriteAttribute( - nullableBitmap32Argument, this, OnSuccessCallback_165, OnFailureCallback_165); + nullableBitmap32Argument, this, OnSuccessCallback_166, OnFailureCallback_166); } - void OnFailureResponse_165(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_166(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_165() { NextTest(); } + void OnSuccessResponse_166() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableBitmap32NullValue_166() + CHIP_ERROR TestReadAttributeNullableBitmap32NullValue_167() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_166, OnFailureCallback_166); + this, OnSuccessCallback_167, OnFailureCallback_167); } - void OnFailureResponse_166(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_167(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_166(const chip::app::DataModel::Nullable & nullableBitmap32) + void OnSuccessResponse_167(const chip::app::DataModel::Nullable & nullableBitmap32) { VerifyOrReturn(CheckValueNull("nullableBitmap32", nullableBitmap32)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableBitmap64MaxValue_167() + CHIP_ERROR TestWriteAttributeNullableBitmap64MaxValue_168() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -37285,26 +37694,26 @@ class TestCluster : public TestCommand nullableBitmap64Argument.SetNonNull() = 18446744073709551614ULL; return cluster.WriteAttribute( - nullableBitmap64Argument, this, OnSuccessCallback_167, OnFailureCallback_167); + nullableBitmap64Argument, this, OnSuccessCallback_168, OnFailureCallback_168); } - void OnFailureResponse_167(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_168(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_167() { NextTest(); } + void OnSuccessResponse_168() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableBitmap64MaxValue_168() + CHIP_ERROR TestReadAttributeNullableBitmap64MaxValue_169() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_168, OnFailureCallback_168); + this, OnSuccessCallback_169, OnFailureCallback_169); } - void OnFailureResponse_168(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_169(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_168(const chip::app::DataModel::Nullable & nullableBitmap64) + void OnSuccessResponse_169(const chip::app::DataModel::Nullable & nullableBitmap64) { VerifyOrReturn(CheckValueNonNull("nullableBitmap64", nullableBitmap64)); VerifyOrReturn(CheckValue("nullableBitmap64.Value()", nullableBitmap64.Value(), 18446744073709551614ULL)); @@ -37312,7 +37721,7 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestWriteAttributeNullableBitmap64InvalidValue_169() + CHIP_ERROR TestWriteAttributeNullableBitmap64InvalidValue_170() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -37322,26 +37731,30 @@ class TestCluster : public TestCommand nullableBitmap64Argument.SetNonNull() = 18446744073709551615ULL; return cluster.WriteAttribute( - nullableBitmap64Argument, this, OnSuccessCallback_169, OnFailureCallback_169); + nullableBitmap64Argument, this, OnSuccessCallback_170, OnFailureCallback_170); } - void OnFailureResponse_169(uint8_t status) { NextTest(); } + void OnFailureResponse_170(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 135)); + NextTest(); + } - void OnSuccessResponse_169() { ThrowSuccessResponse(); } + void OnSuccessResponse_170() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadAttributeNullableBitmap64UnchangedValue_170() + CHIP_ERROR TestReadAttributeNullableBitmap64UnchangedValue_171() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_170, OnFailureCallback_170); + this, OnSuccessCallback_171, OnFailureCallback_171); } - void OnFailureResponse_170(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_171(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_170(const chip::app::DataModel::Nullable & nullableBitmap64) + void OnSuccessResponse_171(const chip::app::DataModel::Nullable & nullableBitmap64) { VerifyOrReturn(CheckValueNonNull("nullableBitmap64", nullableBitmap64)); VerifyOrReturn(CheckValue("nullableBitmap64.Value()", nullableBitmap64.Value(), 18446744073709551614ULL)); @@ -37349,7 +37762,7 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestWriteAttributeNullableBitmap64NullValue_171() + CHIP_ERROR TestWriteAttributeNullableBitmap64NullValue_172() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -37359,33 +37772,33 @@ class TestCluster : public TestCommand nullableBitmap64Argument.SetNull(); return cluster.WriteAttribute( - nullableBitmap64Argument, this, OnSuccessCallback_171, OnFailureCallback_171); + nullableBitmap64Argument, this, OnSuccessCallback_172, OnFailureCallback_172); } - void OnFailureResponse_171(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_172(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_171() { NextTest(); } + void OnSuccessResponse_172() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableBitmap64NullValue_172() + CHIP_ERROR TestReadAttributeNullableBitmap64NullValue_173() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_172, OnFailureCallback_172); + this, OnSuccessCallback_173, OnFailureCallback_173); } - void OnFailureResponse_172(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_173(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_172(const chip::app::DataModel::Nullable & nullableBitmap64) + void OnSuccessResponse_173(const chip::app::DataModel::Nullable & nullableBitmap64) { VerifyOrReturn(CheckValueNull("nullableBitmap64", nullableBitmap64)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt8uMaxValue_173() + CHIP_ERROR TestWriteAttributeNullableInt8uMaxValue_174() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -37395,26 +37808,26 @@ class TestCluster : public TestCommand nullableInt8uArgument.SetNonNull() = 254; return cluster.WriteAttribute( - nullableInt8uArgument, this, OnSuccessCallback_173, OnFailureCallback_173); + nullableInt8uArgument, this, OnSuccessCallback_174, OnFailureCallback_174); } - void OnFailureResponse_173(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_174(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_173() { NextTest(); } + void OnSuccessResponse_174() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt8uMaxValue_174() + CHIP_ERROR TestReadAttributeNullableInt8uMaxValue_175() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_174, OnFailureCallback_174); + this, OnSuccessCallback_175, OnFailureCallback_175); } - void OnFailureResponse_174(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_175(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_174(const chip::app::DataModel::Nullable & nullableInt8u) + void OnSuccessResponse_175(const chip::app::DataModel::Nullable & nullableInt8u) { VerifyOrReturn(CheckValueNonNull("nullableInt8u", nullableInt8u)); VerifyOrReturn(CheckValue("nullableInt8u.Value()", nullableInt8u.Value(), 254)); @@ -37422,7 +37835,7 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt8uInvalidValue_175() + CHIP_ERROR TestWriteAttributeNullableInt8uInvalidValue_176() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -37432,26 +37845,30 @@ class TestCluster : public TestCommand nullableInt8uArgument.SetNonNull() = 255; return cluster.WriteAttribute( - nullableInt8uArgument, this, OnSuccessCallback_175, OnFailureCallback_175); + nullableInt8uArgument, this, OnSuccessCallback_176, OnFailureCallback_176); } - void OnFailureResponse_175(uint8_t status) { NextTest(); } + void OnFailureResponse_176(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 135)); + NextTest(); + } - void OnSuccessResponse_175() { ThrowSuccessResponse(); } + void OnSuccessResponse_176() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadAttributeNullableInt8uUnchangedValue_176() + CHIP_ERROR TestReadAttributeNullableInt8uUnchangedValue_177() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_176, OnFailureCallback_176); + this, OnSuccessCallback_177, OnFailureCallback_177); } - void OnFailureResponse_176(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_177(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_176(const chip::app::DataModel::Nullable & nullableInt8u) + void OnSuccessResponse_177(const chip::app::DataModel::Nullable & nullableInt8u) { VerifyOrReturn(CheckValueNonNull("nullableInt8u", nullableInt8u)); VerifyOrReturn(CheckValue("nullableInt8u.Value()", nullableInt8u.Value(), 254)); @@ -37459,7 +37876,7 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt8uNullValue_177() + CHIP_ERROR TestWriteAttributeNullableInt8uNullValue_178() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -37469,33 +37886,33 @@ class TestCluster : public TestCommand nullableInt8uArgument.SetNull(); return cluster.WriteAttribute( - nullableInt8uArgument, this, OnSuccessCallback_177, OnFailureCallback_177); + nullableInt8uArgument, this, OnSuccessCallback_178, OnFailureCallback_178); } - void OnFailureResponse_177(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_178(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_177() { NextTest(); } + void OnSuccessResponse_178() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt8uNullValue_178() + CHIP_ERROR TestReadAttributeNullableInt8uNullValue_179() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_178, OnFailureCallback_178); + this, OnSuccessCallback_179, OnFailureCallback_179); } - void OnFailureResponse_178(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_179(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_178(const chip::app::DataModel::Nullable & nullableInt8u) + void OnSuccessResponse_179(const chip::app::DataModel::Nullable & nullableInt8u) { VerifyOrReturn(CheckValueNull("nullableInt8u", nullableInt8u)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt16uMaxValue_179() + CHIP_ERROR TestWriteAttributeNullableInt16uMaxValue_180() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -37505,26 +37922,26 @@ class TestCluster : public TestCommand nullableInt16uArgument.SetNonNull() = 65534U; return cluster.WriteAttribute( - nullableInt16uArgument, this, OnSuccessCallback_179, OnFailureCallback_179); + nullableInt16uArgument, this, OnSuccessCallback_180, OnFailureCallback_180); } - void OnFailureResponse_179(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_180(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_179() { NextTest(); } + void OnSuccessResponse_180() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt16uMaxValue_180() + CHIP_ERROR TestReadAttributeNullableInt16uMaxValue_181() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_180, OnFailureCallback_180); + this, OnSuccessCallback_181, OnFailureCallback_181); } - void OnFailureResponse_180(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_181(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_180(const chip::app::DataModel::Nullable & nullableInt16u) + void OnSuccessResponse_181(const chip::app::DataModel::Nullable & nullableInt16u) { VerifyOrReturn(CheckValueNonNull("nullableInt16u", nullableInt16u)); VerifyOrReturn(CheckValue("nullableInt16u.Value()", nullableInt16u.Value(), 65534U)); @@ -37532,7 +37949,7 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt16uInvalidValue_181() + CHIP_ERROR TestWriteAttributeNullableInt16uInvalidValue_182() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -37542,26 +37959,30 @@ class TestCluster : public TestCommand nullableInt16uArgument.SetNonNull() = 65535U; return cluster.WriteAttribute( - nullableInt16uArgument, this, OnSuccessCallback_181, OnFailureCallback_181); + nullableInt16uArgument, this, OnSuccessCallback_182, OnFailureCallback_182); } - void OnFailureResponse_181(uint8_t status) { NextTest(); } + void OnFailureResponse_182(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 135)); + NextTest(); + } - void OnSuccessResponse_181() { ThrowSuccessResponse(); } + void OnSuccessResponse_182() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadAttributeNullableInt16uUnchangedValue_182() + CHIP_ERROR TestReadAttributeNullableInt16uUnchangedValue_183() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_182, OnFailureCallback_182); + this, OnSuccessCallback_183, OnFailureCallback_183); } - void OnFailureResponse_182(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_183(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_182(const chip::app::DataModel::Nullable & nullableInt16u) + void OnSuccessResponse_183(const chip::app::DataModel::Nullable & nullableInt16u) { VerifyOrReturn(CheckValueNonNull("nullableInt16u", nullableInt16u)); VerifyOrReturn(CheckValue("nullableInt16u.Value()", nullableInt16u.Value(), 65534U)); @@ -37569,7 +37990,7 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt16uNullValue_183() + CHIP_ERROR TestWriteAttributeNullableInt16uNullValue_184() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -37579,33 +38000,33 @@ class TestCluster : public TestCommand nullableInt16uArgument.SetNull(); return cluster.WriteAttribute( - nullableInt16uArgument, this, OnSuccessCallback_183, OnFailureCallback_183); + nullableInt16uArgument, this, OnSuccessCallback_184, OnFailureCallback_184); } - void OnFailureResponse_183(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_184(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_183() { NextTest(); } + void OnSuccessResponse_184() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt16uNullValue_184() + CHIP_ERROR TestReadAttributeNullableInt16uNullValue_185() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_184, OnFailureCallback_184); + this, OnSuccessCallback_185, OnFailureCallback_185); } - void OnFailureResponse_184(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_185(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_184(const chip::app::DataModel::Nullable & nullableInt16u) + void OnSuccessResponse_185(const chip::app::DataModel::Nullable & nullableInt16u) { VerifyOrReturn(CheckValueNull("nullableInt16u", nullableInt16u)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt32uMaxValue_185() + CHIP_ERROR TestWriteAttributeNullableInt32uMaxValue_186() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -37615,26 +38036,26 @@ class TestCluster : public TestCommand nullableInt32uArgument.SetNonNull() = 4294967294UL; return cluster.WriteAttribute( - nullableInt32uArgument, this, OnSuccessCallback_185, OnFailureCallback_185); + nullableInt32uArgument, this, OnSuccessCallback_186, OnFailureCallback_186); } - void OnFailureResponse_185(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_186(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_185() { NextTest(); } + void OnSuccessResponse_186() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt32uMaxValue_186() + CHIP_ERROR TestReadAttributeNullableInt32uMaxValue_187() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_186, OnFailureCallback_186); + this, OnSuccessCallback_187, OnFailureCallback_187); } - void OnFailureResponse_186(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_187(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_186(const chip::app::DataModel::Nullable & nullableInt32u) + void OnSuccessResponse_187(const chip::app::DataModel::Nullable & nullableInt32u) { VerifyOrReturn(CheckValueNonNull("nullableInt32u", nullableInt32u)); VerifyOrReturn(CheckValue("nullableInt32u.Value()", nullableInt32u.Value(), 4294967294UL)); @@ -37642,7 +38063,7 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt32uInvalidValue_187() + CHIP_ERROR TestWriteAttributeNullableInt32uInvalidValue_188() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -37652,26 +38073,30 @@ class TestCluster : public TestCommand nullableInt32uArgument.SetNonNull() = 4294967295UL; return cluster.WriteAttribute( - nullableInt32uArgument, this, OnSuccessCallback_187, OnFailureCallback_187); + nullableInt32uArgument, this, OnSuccessCallback_188, OnFailureCallback_188); } - void OnFailureResponse_187(uint8_t status) { NextTest(); } + void OnFailureResponse_188(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 135)); + NextTest(); + } - void OnSuccessResponse_187() { ThrowSuccessResponse(); } + void OnSuccessResponse_188() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadAttributeNullableInt32uUnchangedValue_188() + CHIP_ERROR TestReadAttributeNullableInt32uUnchangedValue_189() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_188, OnFailureCallback_188); + this, OnSuccessCallback_189, OnFailureCallback_189); } - void OnFailureResponse_188(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_189(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_188(const chip::app::DataModel::Nullable & nullableInt32u) + void OnSuccessResponse_189(const chip::app::DataModel::Nullable & nullableInt32u) { VerifyOrReturn(CheckValueNonNull("nullableInt32u", nullableInt32u)); VerifyOrReturn(CheckValue("nullableInt32u.Value()", nullableInt32u.Value(), 4294967294UL)); @@ -37679,7 +38104,7 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt32uNullValue_189() + CHIP_ERROR TestWriteAttributeNullableInt32uNullValue_190() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -37689,33 +38114,33 @@ class TestCluster : public TestCommand nullableInt32uArgument.SetNull(); return cluster.WriteAttribute( - nullableInt32uArgument, this, OnSuccessCallback_189, OnFailureCallback_189); + nullableInt32uArgument, this, OnSuccessCallback_190, OnFailureCallback_190); } - void OnFailureResponse_189(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_190(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_189() { NextTest(); } + void OnSuccessResponse_190() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt32uNullValue_190() + CHIP_ERROR TestReadAttributeNullableInt32uNullValue_191() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_190, OnFailureCallback_190); + this, OnSuccessCallback_191, OnFailureCallback_191); } - void OnFailureResponse_190(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_191(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_190(const chip::app::DataModel::Nullable & nullableInt32u) + void OnSuccessResponse_191(const chip::app::DataModel::Nullable & nullableInt32u) { VerifyOrReturn(CheckValueNull("nullableInt32u", nullableInt32u)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt64uMaxValue_191() + CHIP_ERROR TestWriteAttributeNullableInt64uMaxValue_192() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -37725,26 +38150,26 @@ class TestCluster : public TestCommand nullableInt64uArgument.SetNonNull() = 18446744073709551614ULL; return cluster.WriteAttribute( - nullableInt64uArgument, this, OnSuccessCallback_191, OnFailureCallback_191); + nullableInt64uArgument, this, OnSuccessCallback_192, OnFailureCallback_192); } - void OnFailureResponse_191(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_192(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_191() { NextTest(); } + void OnSuccessResponse_192() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt64uMaxValue_192() + CHIP_ERROR TestReadAttributeNullableInt64uMaxValue_193() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_192, OnFailureCallback_192); + this, OnSuccessCallback_193, OnFailureCallback_193); } - void OnFailureResponse_192(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_193(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_192(const chip::app::DataModel::Nullable & nullableInt64u) + void OnSuccessResponse_193(const chip::app::DataModel::Nullable & nullableInt64u) { VerifyOrReturn(CheckValueNonNull("nullableInt64u", nullableInt64u)); VerifyOrReturn(CheckValue("nullableInt64u.Value()", nullableInt64u.Value(), 18446744073709551614ULL)); @@ -37752,7 +38177,7 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt64uInvalidValue_193() + CHIP_ERROR TestWriteAttributeNullableInt64uInvalidValue_194() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -37762,26 +38187,30 @@ class TestCluster : public TestCommand nullableInt64uArgument.SetNonNull() = 18446744073709551615ULL; return cluster.WriteAttribute( - nullableInt64uArgument, this, OnSuccessCallback_193, OnFailureCallback_193); + nullableInt64uArgument, this, OnSuccessCallback_194, OnFailureCallback_194); } - void OnFailureResponse_193(uint8_t status) { NextTest(); } + void OnFailureResponse_194(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 135)); + NextTest(); + } - void OnSuccessResponse_193() { ThrowSuccessResponse(); } + void OnSuccessResponse_194() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadAttributeNullableInt64uUnchangedValue_194() + CHIP_ERROR TestReadAttributeNullableInt64uUnchangedValue_195() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_194, OnFailureCallback_194); + this, OnSuccessCallback_195, OnFailureCallback_195); } - void OnFailureResponse_194(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_195(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_194(const chip::app::DataModel::Nullable & nullableInt64u) + void OnSuccessResponse_195(const chip::app::DataModel::Nullable & nullableInt64u) { VerifyOrReturn(CheckValueNonNull("nullableInt64u", nullableInt64u)); VerifyOrReturn(CheckValue("nullableInt64u.Value()", nullableInt64u.Value(), 18446744073709551614ULL)); @@ -37789,7 +38218,7 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt64uNullValue_195() + CHIP_ERROR TestWriteAttributeNullableInt64uNullValue_196() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -37799,33 +38228,33 @@ class TestCluster : public TestCommand nullableInt64uArgument.SetNull(); return cluster.WriteAttribute( - nullableInt64uArgument, this, OnSuccessCallback_195, OnFailureCallback_195); + nullableInt64uArgument, this, OnSuccessCallback_196, OnFailureCallback_196); } - void OnFailureResponse_195(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_196(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_195() { NextTest(); } + void OnSuccessResponse_196() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt64uNullValue_196() + CHIP_ERROR TestReadAttributeNullableInt64uNullValue_197() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_196, OnFailureCallback_196); + this, OnSuccessCallback_197, OnFailureCallback_197); } - void OnFailureResponse_196(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_197(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_196(const chip::app::DataModel::Nullable & nullableInt64u) + void OnSuccessResponse_197(const chip::app::DataModel::Nullable & nullableInt64u) { VerifyOrReturn(CheckValueNull("nullableInt64u", nullableInt64u)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt8sMinValue_197() + CHIP_ERROR TestWriteAttributeNullableInt8sMinValue_198() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -37835,26 +38264,26 @@ class TestCluster : public TestCommand nullableInt8sArgument.SetNonNull() = -127; return cluster.WriteAttribute( - nullableInt8sArgument, this, OnSuccessCallback_197, OnFailureCallback_197); + nullableInt8sArgument, this, OnSuccessCallback_198, OnFailureCallback_198); } - void OnFailureResponse_197(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_198(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_197() { NextTest(); } + void OnSuccessResponse_198() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt8sMinValue_198() + CHIP_ERROR TestReadAttributeNullableInt8sMinValue_199() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_198, OnFailureCallback_198); + this, OnSuccessCallback_199, OnFailureCallback_199); } - void OnFailureResponse_198(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_199(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_198(const chip::app::DataModel::Nullable & nullableInt8s) + void OnSuccessResponse_199(const chip::app::DataModel::Nullable & nullableInt8s) { VerifyOrReturn(CheckValueNonNull("nullableInt8s", nullableInt8s)); VerifyOrReturn(CheckValue("nullableInt8s.Value()", nullableInt8s.Value(), -127)); @@ -37862,7 +38291,7 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt8sInvalidValue_199() + CHIP_ERROR TestWriteAttributeNullableInt8sInvalidValue_200() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -37872,26 +38301,30 @@ class TestCluster : public TestCommand nullableInt8sArgument.SetNonNull() = -128; return cluster.WriteAttribute( - nullableInt8sArgument, this, OnSuccessCallback_199, OnFailureCallback_199); + nullableInt8sArgument, this, OnSuccessCallback_200, OnFailureCallback_200); } - void OnFailureResponse_199(uint8_t status) { NextTest(); } + void OnFailureResponse_200(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 135)); + NextTest(); + } - void OnSuccessResponse_199() { ThrowSuccessResponse(); } + void OnSuccessResponse_200() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadAttributeNullableInt8sUnchangedValue_200() + CHIP_ERROR TestReadAttributeNullableInt8sUnchangedValue_201() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_200, OnFailureCallback_200); + this, OnSuccessCallback_201, OnFailureCallback_201); } - void OnFailureResponse_200(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_201(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_200(const chip::app::DataModel::Nullable & nullableInt8s) + void OnSuccessResponse_201(const chip::app::DataModel::Nullable & nullableInt8s) { VerifyOrReturn(CheckValueNonNull("nullableInt8s", nullableInt8s)); VerifyOrReturn(CheckValue("nullableInt8s.Value()", nullableInt8s.Value(), -127)); @@ -37899,7 +38332,7 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt8sNullValue_201() + CHIP_ERROR TestWriteAttributeNullableInt8sNullValue_202() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -37909,33 +38342,33 @@ class TestCluster : public TestCommand nullableInt8sArgument.SetNull(); return cluster.WriteAttribute( - nullableInt8sArgument, this, OnSuccessCallback_201, OnFailureCallback_201); + nullableInt8sArgument, this, OnSuccessCallback_202, OnFailureCallback_202); } - void OnFailureResponse_201(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_202(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_201() { NextTest(); } + void OnSuccessResponse_202() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt8sNullValue_202() + CHIP_ERROR TestReadAttributeNullableInt8sNullValue_203() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_202, OnFailureCallback_202); + this, OnSuccessCallback_203, OnFailureCallback_203); } - void OnFailureResponse_202(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_203(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_202(const chip::app::DataModel::Nullable & nullableInt8s) + void OnSuccessResponse_203(const chip::app::DataModel::Nullable & nullableInt8s) { VerifyOrReturn(CheckValueNull("nullableInt8s", nullableInt8s)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt16sMinValue_203() + CHIP_ERROR TestWriteAttributeNullableInt16sMinValue_204() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -37945,26 +38378,26 @@ class TestCluster : public TestCommand nullableInt16sArgument.SetNonNull() = -32767; return cluster.WriteAttribute( - nullableInt16sArgument, this, OnSuccessCallback_203, OnFailureCallback_203); + nullableInt16sArgument, this, OnSuccessCallback_204, OnFailureCallback_204); } - void OnFailureResponse_203(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_204(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_203() { NextTest(); } + void OnSuccessResponse_204() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt16sMinValue_204() + CHIP_ERROR TestReadAttributeNullableInt16sMinValue_205() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_204, OnFailureCallback_204); + this, OnSuccessCallback_205, OnFailureCallback_205); } - void OnFailureResponse_204(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_205(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_204(const chip::app::DataModel::Nullable & nullableInt16s) + void OnSuccessResponse_205(const chip::app::DataModel::Nullable & nullableInt16s) { VerifyOrReturn(CheckValueNonNull("nullableInt16s", nullableInt16s)); VerifyOrReturn(CheckValue("nullableInt16s.Value()", nullableInt16s.Value(), -32767)); @@ -37972,7 +38405,7 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt16sInvalidValue_205() + CHIP_ERROR TestWriteAttributeNullableInt16sInvalidValue_206() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -37982,26 +38415,30 @@ class TestCluster : public TestCommand nullableInt16sArgument.SetNonNull() = -32768; return cluster.WriteAttribute( - nullableInt16sArgument, this, OnSuccessCallback_205, OnFailureCallback_205); + nullableInt16sArgument, this, OnSuccessCallback_206, OnFailureCallback_206); } - void OnFailureResponse_205(uint8_t status) { NextTest(); } + void OnFailureResponse_206(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 135)); + NextTest(); + } - void OnSuccessResponse_205() { ThrowSuccessResponse(); } + void OnSuccessResponse_206() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadAttributeNullableInt16sUnchangedValue_206() + CHIP_ERROR TestReadAttributeNullableInt16sUnchangedValue_207() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_206, OnFailureCallback_206); + this, OnSuccessCallback_207, OnFailureCallback_207); } - void OnFailureResponse_206(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_207(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_206(const chip::app::DataModel::Nullable & nullableInt16s) + void OnSuccessResponse_207(const chip::app::DataModel::Nullable & nullableInt16s) { VerifyOrReturn(CheckValueNonNull("nullableInt16s", nullableInt16s)); VerifyOrReturn(CheckValue("nullableInt16s.Value()", nullableInt16s.Value(), -32767)); @@ -38009,7 +38446,7 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt16sNullValue_207() + CHIP_ERROR TestWriteAttributeNullableInt16sNullValue_208() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -38019,33 +38456,33 @@ class TestCluster : public TestCommand nullableInt16sArgument.SetNull(); return cluster.WriteAttribute( - nullableInt16sArgument, this, OnSuccessCallback_207, OnFailureCallback_207); + nullableInt16sArgument, this, OnSuccessCallback_208, OnFailureCallback_208); } - void OnFailureResponse_207(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_208(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_207() { NextTest(); } + void OnSuccessResponse_208() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt16sNullValue_208() + CHIP_ERROR TestReadAttributeNullableInt16sNullValue_209() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_208, OnFailureCallback_208); + this, OnSuccessCallback_209, OnFailureCallback_209); } - void OnFailureResponse_208(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_209(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_208(const chip::app::DataModel::Nullable & nullableInt16s) + void OnSuccessResponse_209(const chip::app::DataModel::Nullable & nullableInt16s) { VerifyOrReturn(CheckValueNull("nullableInt16s", nullableInt16s)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt32sMinValue_209() + CHIP_ERROR TestWriteAttributeNullableInt32sMinValue_210() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -38055,26 +38492,26 @@ class TestCluster : public TestCommand nullableInt32sArgument.SetNonNull() = -2147483647L; return cluster.WriteAttribute( - nullableInt32sArgument, this, OnSuccessCallback_209, OnFailureCallback_209); + nullableInt32sArgument, this, OnSuccessCallback_210, OnFailureCallback_210); } - void OnFailureResponse_209(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_210(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_209() { NextTest(); } + void OnSuccessResponse_210() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt32sMinValue_210() + CHIP_ERROR TestReadAttributeNullableInt32sMinValue_211() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_210, OnFailureCallback_210); + this, OnSuccessCallback_211, OnFailureCallback_211); } - void OnFailureResponse_210(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_211(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_210(const chip::app::DataModel::Nullable & nullableInt32s) + void OnSuccessResponse_211(const chip::app::DataModel::Nullable & nullableInt32s) { VerifyOrReturn(CheckValueNonNull("nullableInt32s", nullableInt32s)); VerifyOrReturn(CheckValue("nullableInt32s.Value()", nullableInt32s.Value(), -2147483647L)); @@ -38082,7 +38519,7 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt32sInvalidValue_211() + CHIP_ERROR TestWriteAttributeNullableInt32sInvalidValue_212() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -38092,26 +38529,30 @@ class TestCluster : public TestCommand nullableInt32sArgument.SetNonNull() = -2147483648L; return cluster.WriteAttribute( - nullableInt32sArgument, this, OnSuccessCallback_211, OnFailureCallback_211); + nullableInt32sArgument, this, OnSuccessCallback_212, OnFailureCallback_212); } - void OnFailureResponse_211(uint8_t status) { NextTest(); } + void OnFailureResponse_212(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 135)); + NextTest(); + } - void OnSuccessResponse_211() { ThrowSuccessResponse(); } + void OnSuccessResponse_212() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadAttributeNullableInt32sUnchangedValue_212() + CHIP_ERROR TestReadAttributeNullableInt32sUnchangedValue_213() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_212, OnFailureCallback_212); + this, OnSuccessCallback_213, OnFailureCallback_213); } - void OnFailureResponse_212(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_213(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_212(const chip::app::DataModel::Nullable & nullableInt32s) + void OnSuccessResponse_213(const chip::app::DataModel::Nullable & nullableInt32s) { VerifyOrReturn(CheckValueNonNull("nullableInt32s", nullableInt32s)); VerifyOrReturn(CheckValue("nullableInt32s.Value()", nullableInt32s.Value(), -2147483647L)); @@ -38119,7 +38560,7 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt32sNullValue_213() + CHIP_ERROR TestWriteAttributeNullableInt32sNullValue_214() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -38129,33 +38570,33 @@ class TestCluster : public TestCommand nullableInt32sArgument.SetNull(); return cluster.WriteAttribute( - nullableInt32sArgument, this, OnSuccessCallback_213, OnFailureCallback_213); + nullableInt32sArgument, this, OnSuccessCallback_214, OnFailureCallback_214); } - void OnFailureResponse_213(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_214(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_213() { NextTest(); } + void OnSuccessResponse_214() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt32sNullValue_214() + CHIP_ERROR TestReadAttributeNullableInt32sNullValue_215() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_214, OnFailureCallback_214); + this, OnSuccessCallback_215, OnFailureCallback_215); } - void OnFailureResponse_214(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_215(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_214(const chip::app::DataModel::Nullable & nullableInt32s) + void OnSuccessResponse_215(const chip::app::DataModel::Nullable & nullableInt32s) { VerifyOrReturn(CheckValueNull("nullableInt32s", nullableInt32s)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt64sMinValue_215() + CHIP_ERROR TestWriteAttributeNullableInt64sMinValue_216() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -38165,26 +38606,26 @@ class TestCluster : public TestCommand nullableInt64sArgument.SetNonNull() = -9223372036854775807LL; return cluster.WriteAttribute( - nullableInt64sArgument, this, OnSuccessCallback_215, OnFailureCallback_215); + nullableInt64sArgument, this, OnSuccessCallback_216, OnFailureCallback_216); } - void OnFailureResponse_215(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_216(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_215() { NextTest(); } + void OnSuccessResponse_216() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt64sMinValue_216() + CHIP_ERROR TestReadAttributeNullableInt64sMinValue_217() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_216, OnFailureCallback_216); + this, OnSuccessCallback_217, OnFailureCallback_217); } - void OnFailureResponse_216(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_217(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_216(const chip::app::DataModel::Nullable & nullableInt64s) + void OnSuccessResponse_217(const chip::app::DataModel::Nullable & nullableInt64s) { VerifyOrReturn(CheckValueNonNull("nullableInt64s", nullableInt64s)); VerifyOrReturn(CheckValue("nullableInt64s.Value()", nullableInt64s.Value(), -9223372036854775807LL)); @@ -38192,7 +38633,7 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt64sInvalidValue_217() + CHIP_ERROR TestWriteAttributeNullableInt64sInvalidValue_218() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -38202,26 +38643,30 @@ class TestCluster : public TestCommand nullableInt64sArgument.SetNonNull() = -9223372036854775807LL - 1; return cluster.WriteAttribute( - nullableInt64sArgument, this, OnSuccessCallback_217, OnFailureCallback_217); + nullableInt64sArgument, this, OnSuccessCallback_218, OnFailureCallback_218); } - void OnFailureResponse_217(uint8_t status) { NextTest(); } + void OnFailureResponse_218(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 135)); + NextTest(); + } - void OnSuccessResponse_217() { ThrowSuccessResponse(); } + void OnSuccessResponse_218() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadAttributeNullableInt64sUnchangedValue_218() + CHIP_ERROR TestReadAttributeNullableInt64sUnchangedValue_219() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_218, OnFailureCallback_218); + this, OnSuccessCallback_219, OnFailureCallback_219); } - void OnFailureResponse_218(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_219(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_218(const chip::app::DataModel::Nullable & nullableInt64s) + void OnSuccessResponse_219(const chip::app::DataModel::Nullable & nullableInt64s) { VerifyOrReturn(CheckValueNonNull("nullableInt64s", nullableInt64s)); VerifyOrReturn(CheckValue("nullableInt64s.Value()", nullableInt64s.Value(), -9223372036854775807LL)); @@ -38229,7 +38674,7 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt64sNullValue_219() + CHIP_ERROR TestWriteAttributeNullableInt64sNullValue_220() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -38239,33 +38684,33 @@ class TestCluster : public TestCommand nullableInt64sArgument.SetNull(); return cluster.WriteAttribute( - nullableInt64sArgument, this, OnSuccessCallback_219, OnFailureCallback_219); + nullableInt64sArgument, this, OnSuccessCallback_220, OnFailureCallback_220); } - void OnFailureResponse_219(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_220(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_219() { NextTest(); } + void OnSuccessResponse_220() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt64sNullValue_220() + CHIP_ERROR TestReadAttributeNullableInt64sNullValue_221() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_220, OnFailureCallback_220); + this, OnSuccessCallback_221, OnFailureCallback_221); } - void OnFailureResponse_220(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_221(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_220(const chip::app::DataModel::Nullable & nullableInt64s) + void OnSuccessResponse_221(const chip::app::DataModel::Nullable & nullableInt64s) { VerifyOrReturn(CheckValueNull("nullableInt64s", nullableInt64s)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableEnum8MaxValue_221() + CHIP_ERROR TestWriteAttributeNullableEnum8MaxValue_222() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -38275,26 +38720,26 @@ class TestCluster : public TestCommand nullableEnum8Argument.SetNonNull() = static_cast(254); return cluster.WriteAttribute( - nullableEnum8Argument, this, OnSuccessCallback_221, OnFailureCallback_221); + nullableEnum8Argument, this, OnSuccessCallback_222, OnFailureCallback_222); } - void OnFailureResponse_221(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_222(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_221() { NextTest(); } + void OnSuccessResponse_222() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableEnum8MaxValue_222() + CHIP_ERROR TestReadAttributeNullableEnum8MaxValue_223() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_222, OnFailureCallback_222); + this, OnSuccessCallback_223, OnFailureCallback_223); } - void OnFailureResponse_222(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_223(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_222(const chip::app::DataModel::Nullable & nullableEnum8) + void OnSuccessResponse_223(const chip::app::DataModel::Nullable & nullableEnum8) { VerifyOrReturn(CheckValueNonNull("nullableEnum8", nullableEnum8)); VerifyOrReturn(CheckValue("nullableEnum8.Value()", nullableEnum8.Value(), 254)); @@ -38302,7 +38747,7 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestWriteAttributeNullableEnum8InvalidValue_223() + CHIP_ERROR TestWriteAttributeNullableEnum8InvalidValue_224() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -38312,26 +38757,30 @@ class TestCluster : public TestCommand nullableEnum8Argument.SetNonNull() = static_cast(255); return cluster.WriteAttribute( - nullableEnum8Argument, this, OnSuccessCallback_223, OnFailureCallback_223); + nullableEnum8Argument, this, OnSuccessCallback_224, OnFailureCallback_224); } - void OnFailureResponse_223(uint8_t status) { NextTest(); } + void OnFailureResponse_224(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 135)); + NextTest(); + } - void OnSuccessResponse_223() { ThrowSuccessResponse(); } + void OnSuccessResponse_224() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadAttributeNullableEnum8UnchangedValue_224() + CHIP_ERROR TestReadAttributeNullableEnum8UnchangedValue_225() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_224, OnFailureCallback_224); + this, OnSuccessCallback_225, OnFailureCallback_225); } - void OnFailureResponse_224(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_225(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_224(const chip::app::DataModel::Nullable & nullableEnum8) + void OnSuccessResponse_225(const chip::app::DataModel::Nullable & nullableEnum8) { VerifyOrReturn(CheckValueNonNull("nullableEnum8", nullableEnum8)); VerifyOrReturn(CheckValue("nullableEnum8.Value()", nullableEnum8.Value(), 254)); @@ -38339,7 +38788,7 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestWriteAttributeNullableEnum8NullValue_225() + CHIP_ERROR TestWriteAttributeNullableEnum8NullValue_226() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -38349,33 +38798,33 @@ class TestCluster : public TestCommand nullableEnum8Argument.SetNull(); return cluster.WriteAttribute( - nullableEnum8Argument, this, OnSuccessCallback_225, OnFailureCallback_225); + nullableEnum8Argument, this, OnSuccessCallback_226, OnFailureCallback_226); } - void OnFailureResponse_225(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_226(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_225() { NextTest(); } + void OnSuccessResponse_226() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableEnum8NullValue_226() + CHIP_ERROR TestReadAttributeNullableEnum8NullValue_227() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_226, OnFailureCallback_226); + this, OnSuccessCallback_227, OnFailureCallback_227); } - void OnFailureResponse_226(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_227(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_226(const chip::app::DataModel::Nullable & nullableEnum8) + void OnSuccessResponse_227(const chip::app::DataModel::Nullable & nullableEnum8) { VerifyOrReturn(CheckValueNull("nullableEnum8", nullableEnum8)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableEnum16MaxValue_227() + CHIP_ERROR TestWriteAttributeNullableEnum16MaxValue_228() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -38385,26 +38834,26 @@ class TestCluster : public TestCommand nullableEnum16Argument.SetNonNull() = static_cast(65534); return cluster.WriteAttribute( - nullableEnum16Argument, this, OnSuccessCallback_227, OnFailureCallback_227); + nullableEnum16Argument, this, OnSuccessCallback_228, OnFailureCallback_228); } - void OnFailureResponse_227(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_228(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_227() { NextTest(); } + void OnSuccessResponse_228() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableEnum16MaxValue_228() + CHIP_ERROR TestReadAttributeNullableEnum16MaxValue_229() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_228, OnFailureCallback_228); + this, OnSuccessCallback_229, OnFailureCallback_229); } - void OnFailureResponse_228(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_229(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_228(const chip::app::DataModel::Nullable & nullableEnum16) + void OnSuccessResponse_229(const chip::app::DataModel::Nullable & nullableEnum16) { VerifyOrReturn(CheckValueNonNull("nullableEnum16", nullableEnum16)); VerifyOrReturn(CheckValue("nullableEnum16.Value()", nullableEnum16.Value(), 65534U)); @@ -38412,7 +38861,7 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestWriteAttributeNullableEnum16InvalidValue_229() + CHIP_ERROR TestWriteAttributeNullableEnum16InvalidValue_230() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -38422,26 +38871,30 @@ class TestCluster : public TestCommand nullableEnum16Argument.SetNonNull() = static_cast(65535); return cluster.WriteAttribute( - nullableEnum16Argument, this, OnSuccessCallback_229, OnFailureCallback_229); + nullableEnum16Argument, this, OnSuccessCallback_230, OnFailureCallback_230); } - void OnFailureResponse_229(uint8_t status) { NextTest(); } + void OnFailureResponse_230(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 135)); + NextTest(); + } - void OnSuccessResponse_229() { ThrowSuccessResponse(); } + void OnSuccessResponse_230() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadAttributeNullableEnum16UnchangedValue_230() + CHIP_ERROR TestReadAttributeNullableEnum16UnchangedValue_231() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_230, OnFailureCallback_230); + this, OnSuccessCallback_231, OnFailureCallback_231); } - void OnFailureResponse_230(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_231(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_230(const chip::app::DataModel::Nullable & nullableEnum16) + void OnSuccessResponse_231(const chip::app::DataModel::Nullable & nullableEnum16) { VerifyOrReturn(CheckValueNonNull("nullableEnum16", nullableEnum16)); VerifyOrReturn(CheckValue("nullableEnum16.Value()", nullableEnum16.Value(), 65534U)); @@ -38449,7 +38902,7 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestWriteAttributeNullableEnum16NullValue_231() + CHIP_ERROR TestWriteAttributeNullableEnum16NullValue_232() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -38459,45 +38912,45 @@ class TestCluster : public TestCommand nullableEnum16Argument.SetNull(); return cluster.WriteAttribute( - nullableEnum16Argument, this, OnSuccessCallback_231, OnFailureCallback_231); + nullableEnum16Argument, this, OnSuccessCallback_232, OnFailureCallback_232); } - void OnFailureResponse_231(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_232(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_231() { NextTest(); } + void OnSuccessResponse_232() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableEnum16NullValue_232() + CHIP_ERROR TestReadAttributeNullableEnum16NullValue_233() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_232, OnFailureCallback_232); + this, OnSuccessCallback_233, OnFailureCallback_233); } - void OnFailureResponse_232(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_233(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_232(const chip::app::DataModel::Nullable & nullableEnum16) + void OnSuccessResponse_233(const chip::app::DataModel::Nullable & nullableEnum16) { VerifyOrReturn(CheckValueNull("nullableEnum16", nullableEnum16)); NextTest(); } - CHIP_ERROR TestReadAttributeNullableOctetStringDefaultValue_233() + CHIP_ERROR TestReadAttributeNullableOctetStringDefaultValue_234() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_233, OnFailureCallback_233); + this, OnSuccessCallback_234, OnFailureCallback_234); } - void OnFailureResponse_233(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_234(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_233(const chip::app::DataModel::Nullable & nullableOctetString) + void OnSuccessResponse_234(const chip::app::DataModel::Nullable & nullableOctetString) { VerifyOrReturn(CheckValueNonNull("nullableOctetString", nullableOctetString)); VerifyOrReturn(CheckValueAsString("nullableOctetString.Value()", nullableOctetString.Value(), @@ -38506,7 +38959,7 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestWriteAttributeNullableOctetString_234() + CHIP_ERROR TestWriteAttributeNullableOctetString_235() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -38517,26 +38970,26 @@ class TestCluster : public TestCommand chip::ByteSpan(chip::Uint8::from_const_char("TestValuegarbage: not in length on purpose"), 9); return cluster.WriteAttribute( - nullableOctetStringArgument, this, OnSuccessCallback_234, OnFailureCallback_234); + nullableOctetStringArgument, this, OnSuccessCallback_235, OnFailureCallback_235); } - void OnFailureResponse_234(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_235(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_234() { NextTest(); } + void OnSuccessResponse_235() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableOctetString_235() + CHIP_ERROR TestReadAttributeNullableOctetString_236() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_235, OnFailureCallback_235); + this, OnSuccessCallback_236, OnFailureCallback_236); } - void OnFailureResponse_235(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_236(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_235(const chip::app::DataModel::Nullable & nullableOctetString) + void OnSuccessResponse_236(const chip::app::DataModel::Nullable & nullableOctetString) { VerifyOrReturn(CheckValueNonNull("nullableOctetString", nullableOctetString)); VerifyOrReturn(CheckValueAsString("nullableOctetString.Value()", nullableOctetString.Value(), @@ -38545,7 +38998,7 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestWriteAttributeNullableOctetString_236() + CHIP_ERROR TestWriteAttributeNullableOctetString_237() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -38555,33 +39008,33 @@ class TestCluster : public TestCommand nullableOctetStringArgument.SetNull(); return cluster.WriteAttribute( - nullableOctetStringArgument, this, OnSuccessCallback_236, OnFailureCallback_236); + nullableOctetStringArgument, this, OnSuccessCallback_237, OnFailureCallback_237); } - void OnFailureResponse_236(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_237(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_236() { NextTest(); } + void OnSuccessResponse_237() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableOctetString_237() + CHIP_ERROR TestReadAttributeNullableOctetString_238() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_237, OnFailureCallback_237); + this, OnSuccessCallback_238, OnFailureCallback_238); } - void OnFailureResponse_237(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_238(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_237(const chip::app::DataModel::Nullable & nullableOctetString) + void OnSuccessResponse_238(const chip::app::DataModel::Nullable & nullableOctetString) { VerifyOrReturn(CheckValueNull("nullableOctetString", nullableOctetString)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableOctetString_238() + CHIP_ERROR TestWriteAttributeNullableOctetString_239() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -38592,26 +39045,26 @@ class TestCluster : public TestCommand chip::ByteSpan(chip::Uint8::from_const_char("garbage: not in length on purpose"), 0); return cluster.WriteAttribute( - nullableOctetStringArgument, this, OnSuccessCallback_238, OnFailureCallback_238); + nullableOctetStringArgument, this, OnSuccessCallback_239, OnFailureCallback_239); } - void OnFailureResponse_238(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_239(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_238() { NextTest(); } + void OnSuccessResponse_239() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableOctetString_239() + CHIP_ERROR TestReadAttributeNullableOctetString_240() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_239, OnFailureCallback_239); + this, OnSuccessCallback_240, OnFailureCallback_240); } - void OnFailureResponse_239(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_240(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_239(const chip::app::DataModel::Nullable & nullableOctetString) + void OnSuccessResponse_240(const chip::app::DataModel::Nullable & nullableOctetString) { VerifyOrReturn(CheckValueNonNull("nullableOctetString", nullableOctetString)); VerifyOrReturn(CheckValueAsString("nullableOctetString.Value()", nullableOctetString.Value(), @@ -38620,19 +39073,19 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestReadAttributeNullableCharStringDefaultValue_240() + CHIP_ERROR TestReadAttributeNullableCharStringDefaultValue_241() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_240, OnFailureCallback_240); + this, OnSuccessCallback_241, OnFailureCallback_241); } - void OnFailureResponse_240(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_241(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_240(const chip::app::DataModel::Nullable & nullableCharString) + void OnSuccessResponse_241(const chip::app::DataModel::Nullable & nullableCharString) { VerifyOrReturn(CheckValueNonNull("nullableCharString", nullableCharString)); VerifyOrReturn(CheckValueAsString("nullableCharString.Value()", nullableCharString.Value(), chip::CharSpan("", 0))); @@ -38640,7 +39093,7 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestWriteAttributeNullableCharString_241() + CHIP_ERROR TestWriteAttributeNullableCharString_242() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -38650,14 +39103,14 @@ class TestCluster : public TestCommand nullableCharStringArgument.SetNonNull() = chip::Span("☉T☉garbage: not in length on purpose", 7); return cluster.WriteAttribute( - nullableCharStringArgument, this, OnSuccessCallback_241, OnFailureCallback_241); + nullableCharStringArgument, this, OnSuccessCallback_242, OnFailureCallback_242); } - void OnFailureResponse_241(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_242(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_241() { NextTest(); } + void OnSuccessResponse_242() { NextTest(); } - CHIP_ERROR TestWriteAttributeNullableCharStringValueTooLong_242() + CHIP_ERROR TestWriteAttributeNullableCharStringValueTooLong_243() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -38667,33 +39120,33 @@ class TestCluster : public TestCommand nullableCharStringArgument.SetNull(); return cluster.WriteAttribute( - nullableCharStringArgument, this, OnSuccessCallback_242, OnFailureCallback_242); + nullableCharStringArgument, this, OnSuccessCallback_243, OnFailureCallback_243); } - void OnFailureResponse_242(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_243(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_242() { NextTest(); } + void OnSuccessResponse_243() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableCharString_243() + CHIP_ERROR TestReadAttributeNullableCharString_244() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_243, OnFailureCallback_243); + this, OnSuccessCallback_244, OnFailureCallback_244); } - void OnFailureResponse_243(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_244(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_243(const chip::app::DataModel::Nullable & nullableCharString) + void OnSuccessResponse_244(const chip::app::DataModel::Nullable & nullableCharString) { VerifyOrReturn(CheckValueNull("nullableCharString", nullableCharString)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableCharStringEmpty_244() + CHIP_ERROR TestWriteAttributeNullableCharStringEmpty_245() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -38703,26 +39156,26 @@ class TestCluster : public TestCommand nullableCharStringArgument.SetNonNull() = chip::Span("garbage: not in length on purpose", 0); return cluster.WriteAttribute( - nullableCharStringArgument, this, OnSuccessCallback_244, OnFailureCallback_244); + nullableCharStringArgument, this, OnSuccessCallback_245, OnFailureCallback_245); } - void OnFailureResponse_244(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_245(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_244() { NextTest(); } + void OnSuccessResponse_245() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableCharString_245() + CHIP_ERROR TestReadAttributeNullableCharString_246() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_245, OnFailureCallback_245); + this, OnSuccessCallback_246, OnFailureCallback_246); } - void OnFailureResponse_245(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_246(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_245(const chip::app::DataModel::Nullable & nullableCharString) + void OnSuccessResponse_246(const chip::app::DataModel::Nullable & nullableCharString) { VerifyOrReturn(CheckValueNonNull("nullableCharString", nullableCharString)); VerifyOrReturn(CheckValueAsString("nullableCharString.Value()", nullableCharString.Value(), chip::CharSpan("", 0))); @@ -38730,19 +39183,41 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestReadNonexistentAttribute_246() + CHIP_ERROR TestReadAttributeFromNonexistentEndpoint_247() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 200; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); - return cluster.ReadAttribute(this, OnSuccessCallback_246, - OnFailureCallback_246); + return cluster.ReadAttribute(this, OnSuccessCallback_247, + OnFailureCallback_247); + } + + void OnFailureResponse_247(uint8_t status) + { + VerifyOrReturn(CheckConstraintNotValue("status", status, 0)); + NextTest(); + } + + void OnSuccessResponse_247(const chip::app::DataModel::DecodableList & listInt8u) { ThrowSuccessResponse(); } + + CHIP_ERROR TestReadAttributeFromNonexistentCluster_248() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, endpoint); + + return cluster.ReadAttribute(this, OnSuccessCallback_248, + OnFailureCallback_248); } - void OnFailureResponse_246(uint8_t status) { NextTest(); } + void OnFailureResponse_248(uint8_t status) + { + VerifyOrReturn(CheckConstraintNotValue("status", status, 0)); + NextTest(); + } - void OnSuccessResponse_246(const chip::app::DataModel::DecodableList & listInt8u) { ThrowSuccessResponse(); } + void OnSuccessResponse_248(const chip::app::DataModel::DecodableList & listInt8u) { ThrowSuccessResponse(); } }; class TestClusterComplexTypes : public TestCommand @@ -43825,7 +44300,11 @@ class TestModeSelectCluster : public TestCommand return CHIP_NO_ERROR; } - void OnFailureResponse_7(uint8_t status) { NextTest(); } + void OnFailureResponse_7(uint8_t status) + { + VerifyOrReturn(CheckValue("status", status, 135)); + NextTest(); + } void OnSuccessResponse_7() { ThrowSuccessResponse(); } }; From 3db57312f4625dfd608da48b4e36ef13448b0818 Mon Sep 17 00:00:00 2001 From: Song GUO Date: Tue, 30 Nov 2021 04:32:19 +0800 Subject: [PATCH 08/42] [Python] Cluster Object based Subscription & Remove Generated C++ code for python (#12285) * [Python] Add subscription support to ClusterObject API * Remove unused code * Run Codegen --- src/controller/python/BUILD.gn | 1 - src/controller/python/chip-device-ctrl.py | 4 +- src/controller/python/chip/ChipDeviceCtrl.py | 41 +- .../python/chip/clusters/Attribute.py | 134 +- .../python/chip/clusters/CHIPClusters.cpp | 11639 ---------------- .../python/chip/clusters/CHIPClusters.py | 6747 --------- .../python/chip/clusters/attribute.cpp | 50 +- .../templates/python-CHIPClusters-cpp.zapt | 168 - .../templates/python-CHIPClusters-py.zapt | 82 - .../python/templates/templates.json | 5 - .../python/test/test_scripts/base.py | 50 +- .../test/test_scripts/cluster_objects.py | 24 + 12 files changed, 226 insertions(+), 18719 deletions(-) delete mode 100644 src/controller/python/chip/clusters/CHIPClusters.cpp delete mode 100644 src/controller/python/templates/python-CHIPClusters-cpp.zapt diff --git a/src/controller/python/BUILD.gn b/src/controller/python/BUILD.gn index 34aa0b4b20e006..5bc715fdd802a4 100644 --- a/src/controller/python/BUILD.gn +++ b/src/controller/python/BUILD.gn @@ -44,7 +44,6 @@ shared_library("ChipDeviceCtrl") { "ChipDeviceController-ScriptDevicePairingDelegate.h", "ChipDeviceController-StorageDelegate.cpp", "ChipDeviceController-StorageDelegate.h", - "chip/clusters/CHIPClusters.cpp", "chip/clusters/attribute.cpp", "chip/clusters/command.cpp", "chip/discovery/NodeResolution.cpp", diff --git a/src/controller/python/chip-device-ctrl.py b/src/controller/python/chip-device-ctrl.py index 0ee6c2d359c601..03b31548d1c2e0 100755 --- a/src/controller/python/chip-device-ctrl.py +++ b/src/controller/python/chip-device-ctrl.py @@ -824,8 +824,10 @@ def do_zclsubscribe(self, line): elif len(args) == 6: if args[0] not in all_attrs: raise exceptions.UnknownCluster(args[0]) - self.devCtrl.ZCLSubscribeAttribute(args[0], args[1], int( + res = self.devCtrl.ZCLSubscribeAttribute(args[0], args[1], int( args[2]), int(args[3]), int(args[4]), int(args[5])) + print(res.GetAllValues()) + print(f"Subscription Established: {res}") elif len(args) == 2 and args[0] == '-shutdown': subscriptionId = int(args[1], base=0) self.devCtrl.ZCLShutdownSubscription(subscriptionId) diff --git a/src/controller/python/chip/ChipDeviceCtrl.py b/src/controller/python/chip/ChipDeviceCtrl.py index e14941a90f277e..acfea12d733ddc 100644 --- a/src/controller/python/chip/ChipDeviceCtrl.py +++ b/src/controller/python/chip/ChipDeviceCtrl.py @@ -29,6 +29,7 @@ from __future__ import print_function import asyncio from ctypes import * + from .ChipStack import * from .interaction_model import InteractionModelError, delegate as im from .exceptions import * @@ -110,7 +111,6 @@ def HandleKeyExchangeComplete(err): err) else: print("Secure Session to Device Established") - self._ChipStack.callbackRes = True self.state = DCState.IDLE self._ChipStack.completeEvent.set() @@ -423,7 +423,7 @@ async def ReadAttribute(self, nodeid: int, attributes: typing.List[typing.Union[ typing.Tuple[int, typing.Type[ClusterObjects.Cluster]], # Concrete path typing.Tuple[int, typing.Type[ClusterObjects.ClusterAttributeDescriptor]] - ]]): + ]], reportInterval: typing.Tuple[int, int] = None): ''' Read a list of attributes from a target node @@ -438,10 +438,13 @@ async def ReadAttribute(self, nodeid: int, attributes: typing.List[typing.Union[ The cluster and attributes specified above are to be selected from the generated cluster objects. - e.g + e.g. ReadAttribute(1, [ 1 ] ) -- case 4 above. ReadAttribute(1, [ Clusters.Basic ] ) -- case 5 above. ReadAttribute(1, [ (1, Clusters.Basic.Attributes.Location ] ) -- case 1 above. + + reportInterval: A tuple of two int-s for (MinIntervalFloor, MaxIntervalCeiling). Used by establishing subscriptions. + When not provided, a read request will be sent. ''' eventLoop = asyncio.get_running_loop() @@ -478,7 +481,7 @@ async def ReadAttribute(self, nodeid: int, attributes: typing.List[typing.Union[ attrs.append(ClusterAttribute.AttributePath( EndpointId=endpoint, Cluster=cluster, Attribute=attribute)) res = self._ChipStack.Call( - lambda: ClusterAttribute.ReadAttributes(future, eventLoop, device, attrs)) + lambda: ClusterAttribute.ReadAttributes(future, eventLoop, device, self, attrs, ClusterAttribute.SubscriptionParameters(reportInterval[0], reportInterval[1]) if reportInterval else None)) if res != 0: raise self._ChipStack.ErrorToException(res) return await future @@ -498,13 +501,16 @@ def ZCLSend(self, cluster, command, nodeid, endpoint, groupid, args, blocking=Fa return (int(ex.state), None) def ZCLReadAttribute(self, cluster, attribute, nodeid, endpoint, groupid, blocking=True): - device = self.GetConnectedDeviceSync(nodeid) + req = None + try: + req = eval(f"GeneratedObjects.{cluster}.Attributes.{attribute}") + except: + raise UnknownAttribute(cluster, attribute) - # We are not using IM for Attributes. - self._Cluster.ReadAttribute( - device, cluster, attribute, endpoint, groupid, False) - if blocking: - return im.GetAttributeReadResponse(im.DEFAULT_ATTRIBUTEREAD_APPID) + result = asyncio.run(self.ReadAttribute(nodeid, [(endpoint, req)])) + path = ClusterAttribute.AttributePath( + EndpointId=endpoint, Attribute=req) + return im.AttributeReadResult(path=im.AttributePath(nodeId=nodeid, endpointId=path.EndpointId, clusterId=path.ClusterId, attributeId=path.AttributeId), status=0, value=result[path].Data.value) def ZCLWriteAttribute(self, cluster: str, attribute: str, nodeid, endpoint, groupid, value, blocking=True): req = None @@ -517,15 +523,12 @@ def ZCLWriteAttribute(self, cluster: str, attribute: str, nodeid, endpoint, grou return asyncio.run(self.WriteAttribute(nodeid, [(endpoint, req)])) def ZCLSubscribeAttribute(self, cluster, attribute, nodeid, endpoint, minInterval, maxInterval, blocking=True): - device = self.GetConnectedDeviceSync(nodeid) - - commandSenderHandle = self._dmLib.pychip_GetCommandSenderHandle(device) - im.ClearCommandStatus(commandSenderHandle) - self._Cluster.SubscribeAttribute( - device, cluster, attribute, endpoint, minInterval, maxInterval, commandSenderHandle != 0) - if blocking: - # We only send 1 command by this function, so index is always 0 - return im.WaitCommandIndexStatus(commandSenderHandle, 1) + req = None + try: + req = eval(f"GeneratedObjects.{cluster}.Attributes.{attribute}") + except: + raise UnknownAttribute(cluster, attribute) + return asyncio.run(self.ReadAttribute(nodeid, [(endpoint, req)], reportInterval=(minInterval, maxInterval))) def ZCLShutdownSubscription(self, subscriptionId: int): res = self._ChipStack.Call( diff --git a/src/controller/python/chip/clusters/Attribute.py b/src/controller/python/chip/clusters/Attribute.py index bbd9f23c90db1b..4832494d0e515e 100644 --- a/src/controller/python/chip/clusters/Attribute.py +++ b/src/controller/python/chip/clusters/Attribute.py @@ -18,10 +18,10 @@ from asyncio.futures import Future import ctypes from dataclasses import dataclass -from typing import Type, Union, List, Any -from ctypes import CFUNCTYPE, c_char_p, c_size_t, c_void_p, c_uint32, c_uint16, py_object +from typing import Tuple, Type, Union, List, Any, Callable +from ctypes import CFUNCTYPE, c_char_p, c_size_t, c_void_p, c_uint32, c_uint16, py_object, c_uint64 -from .ClusterObjects import ClusterAttributeDescriptor +from .ClusterObjects import Cluster, ClusterAttributeDescriptor import chip.exceptions import chip.interaction_model import chip.tlv @@ -29,6 +29,7 @@ import inspect import sys import logging +import threading @dataclass @@ -59,6 +60,14 @@ def __init__(self, EndpointId: int = None, Cluster=None, Attribute=None, Cluster def __str__(self) -> str: return f"{self.EndpointId}/{self.ClusterId}/{self.AttributeId}" + def __hash__(self): + return str(self).__hash__() + + +@dataclass +class AttributePathWithListIndex(AttributePath): + ListIndex: int = None + @dataclass class AttributeStatus: @@ -114,13 +123,73 @@ def _BuildAttributeIndex(): 'chip.clusters.Objects.' + clusterName + '.Attributes.' + attributeName) +def _on_update_noop(path: AttributePath, value: Any): + ''' + Default OnUpdate callback, simplily does nothing. + ''' + pass + + +@dataclass +class SubscriptionParameters: + MinReportIntervalFloorSeconds: int + MaxReportIntervalCeilingSeconds: int + + +class SubscriptionTransaction: + def __init__(self, transaction: 'AsyncReadTransaction', subscriptionId, devCtrl): + self._on_update = _on_update_noop + self._read_transaction = transaction + self._subscriptionId = subscriptionId + self._devCtrl = devCtrl + + def GetValue(self, path: Tuple[int, Type[ClusterAttributeDescriptor]]): + ''' + Gets the attribute from cache, returns the value and the timestamp when it was updated last time. + ''' + return self._read_transaction.GetValue(AttributePath(path[0], Attribute=path[1])) + + def GetAllValues(self): + return self._read_transaction.GetAllValues() + + def SetAttributeUpdateCallback(self, callback: Callable[[AttributePath, Any], None]): + ''' + Sets the callback function for the attribute value change event, accepts a Callable accpets an attribute path and its updated value. + ''' + if callback is None: + self._on_update = _on_update_noop + else: + self._on_update = callback + + @property + def OnUpdate(self) -> Callable[[AttributePath, Any], None]: + return self._on_update + + def Shutdown(self): + self._devCtrl.ZCLShutdownSubscription(self._subscriptionId) + + def __repr__(self): + return f'' + + class AsyncReadTransaction: - def __init__(self, future: Future, eventLoop): + def __init__(self, future: Future, eventLoop, devCtrl): self._event_loop = eventLoop self._future = future - self._res = [] + self._subscription_handler = None + self._res = {} + self._devCtrl = devCtrl + # For subscriptions, the data comes from CHIP Thread, whild the value will be accessed from Python's thread, so a lock is required here. + self._resLock = threading.Lock() + + def GetValue(self, path: AttributePath): + with self._resLock: + return self._res.get(path) - def _handleAttributeData(self, path: AttributePath, status: int, data: bytes): + def GetAllValues(self): + return self._res + + def _handleAttributeData(self, path: AttributePathWithListIndex, status: int, data: bytes): try: imStatus = status try: @@ -142,14 +211,21 @@ def _handleAttributeData(self, path: AttributePath, status: int, data: bytes): f"Failed Cluster Object: {str(attributeType)}") raise - self._res.append(AttributeReadResult( - Path=path, Status=imStatus, Data=attributeType(attributeValue))) + with self._resLock: + self._res[path] = AttributeReadResult( + Path=path, Status=imStatus, Data=attributeType(attributeValue)) + if self._subscription_handler is not None: + self._subscription_handler.OnUpdate( + path, attributeType(attributeValue)) except Exception as ex: logging.exception(ex) def handleAttributeData(self, path: AttributePath, status: int, data: bytes): - self._event_loop.call_soon_threadsafe( - self._handleAttributeData, path, status, data) + if self._subscription_handler is not None: + self._handleAttributeData(path, status, data) + else: + self._event_loop.call_soon_threadsafe( + self._handleAttributeData, path, status, data) def _handleError(self, chipError: int): self._future.set_exception( @@ -160,12 +236,22 @@ def handleError(self, chipError: int): self._handleError, chipError ) - def _handleDone(self, asd): + def _handleSubscriptionEstablished(self, subscriptionId): + if not self._future.done(): + self._subscription_handler = SubscriptionTransaction( + self, subscriptionId, self._devCtrl) + self._future.set_result(self._subscription_handler) + + def handleSubscriptionEstablished(self, subscriptionId): + self._event_loop.call_soon_threadsafe( + self._handleSubscriptionEstablished, subscriptionId) + + def _handleDone(self): if not self._future.done(): self._future.set_result(self._res) def handleDone(self): - self._event_loop.call_soon_threadsafe(self._handleDone, "asdasa") + self._event_loop.call_soon_threadsafe(self._handleDone) class AsyncWriteTransaction: @@ -204,6 +290,7 @@ def handleDone(self): _OnReadAttributeDataCallbackFunct = CFUNCTYPE( None, py_object, c_uint16, c_uint32, c_uint32, c_uint32, c_void_p, c_size_t) +_OnSubscriptionEstablishedCallbackFunct = CFUNCTYPE(None, py_object, c_uint64) _OnReadErrorCallbackFunct = CFUNCTYPE( None, py_object, c_uint32) _OnReadDoneCallbackFunct = CFUNCTYPE( @@ -217,6 +304,11 @@ def _OnReadAttributeDataCallback(closure, endpoint: int, cluster: int, attribute EndpointId=endpoint, ClusterId=cluster, AttributeId=attribute), status, dataBytes[:]) +@_OnSubscriptionEstablishedCallbackFunct +def _OnSubscriptionEstablishedCallback(closure, subscriptionId): + closure.handleSubscriptionEstablished(subscriptionId) + + @_OnReadErrorCallbackFunct def _OnReadErrorCallback(closure, chiperror: int): closure.handleError(chiperror) @@ -278,9 +370,9 @@ def WriteAttributes(future: Future, eventLoop, device, attributes: List[Attribut return res -def ReadAttributes(future: Future, eventLoop, device, attributes: List[AttributePath]) -> int: +def ReadAttributes(future: Future, eventLoop, device, devCtrl, attributes: List[AttributePath], subscriptionParameters: SubscriptionParameters = None) -> int: handle = chip.native.GetLibraryHandle() - transaction = AsyncReadTransaction(future, eventLoop) + transaction = AsyncReadTransaction(future, eventLoop, devCtrl) readargs = [] for attr in attributes: @@ -296,8 +388,16 @@ def ReadAttributes(future: Future, eventLoop, device, attributes: List[Attribute readargs.append(ctypes.c_char_p(path)) ctypes.pythonapi.Py_IncRef(ctypes.py_object(transaction)) + minInterval = 0 + maxInterval = 0 + if subscriptionParameters is not None: + minInterval = subscriptionParameters.MinReportIntervalFloorSeconds + maxInterval = subscriptionParameters.MaxReportIntervalCeilingSeconds res = handle.pychip_ReadClient_ReadAttributes( - ctypes.py_object(transaction), device, ctypes.c_size_t(len(attributes)), *readargs) + ctypes.py_object(transaction), device, + ctypes.c_bool(subscriptionParameters is not None), + ctypes.c_uint32(minInterval), ctypes.c_uint32(maxInterval), + ctypes.c_size_t(len(attributes)), *readargs) if res != 0: ctypes.pythonapi.Py_DecRef(ctypes.py_object(transaction)) return res @@ -316,11 +416,11 @@ def Init(): _OnWriteResponseCallbackFunct, _OnWriteErrorCallbackFunct, _OnWriteDoneCallbackFunct]) handle.pychip_ReadClient_ReadAttributes.restype = c_uint32 setter.Set('pychip_ReadClient_InitCallbacks', None, [ - _OnReadAttributeDataCallbackFunct, _OnReadErrorCallbackFunct, _OnReadDoneCallbackFunct]) + _OnReadAttributeDataCallbackFunct, _OnSubscriptionEstablishedCallbackFunct, _OnReadErrorCallbackFunct, _OnReadDoneCallbackFunct]) handle.pychip_WriteClient_InitCallbacks( _OnWriteResponseCallback, _OnWriteErrorCallback, _OnWriteDoneCallback) handle.pychip_ReadClient_InitCallbacks( - _OnReadAttributeDataCallback, _OnReadErrorCallback, _OnReadDoneCallback) + _OnReadAttributeDataCallback, _OnSubscriptionEstablishedCallback, _OnReadErrorCallback, _OnReadDoneCallback) _BuildAttributeIndex() diff --git a/src/controller/python/chip/clusters/CHIPClusters.cpp b/src/controller/python/chip/clusters/CHIPClusters.cpp deleted file mode 100644 index ab532e0d847ed4..00000000000000 --- a/src/controller/python/chip/clusters/CHIPClusters.cpp +++ /dev/null @@ -1,11639 +0,0 @@ -/* - * - * 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. - */ - -// THIS FILE IS GENERATED BY ZAP - -#include -#include -#include -#include -#include -#include - -#include - -#include -#include - -using namespace chip; -using namespace chip::app; - -namespace { - -// Define pointers for external ZCL response delegates. - -using SuccessResponseDelegate = void (*)(); -using FailureResponseDelegate = void (*)(uint8_t); -SuccessResponseDelegate gSuccessResponseDelegate; -FailureResponseDelegate gFailureResponseDelegate; - -// Define callbacks for ZCL commands and attribute requests. - -#if CHIP_PROGRESS_LOGGING -std::string ByteSpanToString(chip::ByteSpan value) -{ - std::string strValue = ""; - for (size_t i = 0; i < value.size(); i++) - { - strValue += ' '; - strValue += std::to_string(value.data()[i]); - } - return strValue; -} -#endif - -void OnDefaultSuccessResponse(void * /* context */) -{ - if (gSuccessResponseDelegate != nullptr) - gSuccessResponseDelegate(); -} - -void OnDefaultFailureResponse(void * /* context */, uint8_t status) -{ - if (gFailureResponseDelegate != nullptr) - gFailureResponseDelegate(status); -} - -template -void OnAttributeResponse(void * /* context */, AttributeType value) -{ - std::string strValue = std::to_string(value); - ChipLogProgress(Zcl, " attributeValue: %s", strValue.c_str()); - if (gSuccessResponseDelegate != nullptr) - gSuccessResponseDelegate(); -} - -template <> -void OnAttributeResponse(void * /* context */, chip::ByteSpan value) -{ - ChipLogProgress(Zcl, " attributeValue: (span of length %zd) %s", value.size(), ByteSpanToString(value).c_str()); - if (gSuccessResponseDelegate != nullptr) - gSuccessResponseDelegate(); -} - -template <> -void OnAttributeResponse(void * /* context */, chip::CharSpan value) -{ - ChipLogProgress(Zcl, " attributeValue: '%.*s'", static_cast(value.size()), value.data()); - if (gSuccessResponseDelegate != nullptr) - gSuccessResponseDelegate(); -} - -template <> -void OnAttributeResponse(void * /* context */, bool value) -{ - ChipLogProgress(Zcl, " attributeValue: %s", value ? "true" : "false"); - if (gSuccessResponseDelegate != nullptr) - gSuccessResponseDelegate(); -} - -static void -OnApplicationLauncherApplicationLauncherListListAttributeResponse(void * context, - const chip::app::DataModel::DecodableList & list) -{ - if (gSuccessResponseDelegate != nullptr) - gSuccessResponseDelegate(); -} -chip::Callback::Callback - gApplicationLauncherApplicationLauncherListListAttributeCallback{ - OnApplicationLauncherApplicationLauncherListListAttributeResponse, nullptr - }; -static void OnAudioOutputAudioOutputListListAttributeResponse( - void * context, - const chip::app::DataModel::DecodableList & list) -{ - if (gSuccessResponseDelegate != nullptr) - gSuccessResponseDelegate(); -} -chip::Callback::Callback gAudioOutputAudioOutputListListAttributeCallback{ - OnAudioOutputAudioOutputListListAttributeResponse, nullptr -}; -static void OnBridgedActionsActionListListAttributeResponse( - void * context, - const chip::app::DataModel::DecodableList & list) -{ - if (gSuccessResponseDelegate != nullptr) - gSuccessResponseDelegate(); -} -chip::Callback::Callback gBridgedActionsActionListListAttributeCallback{ - OnBridgedActionsActionListListAttributeResponse, nullptr -}; -static void OnBridgedActionsEndpointListListAttributeResponse( - void * context, - const chip::app::DataModel::DecodableList & - list) -{ - if (gSuccessResponseDelegate != nullptr) - gSuccessResponseDelegate(); -} -chip::Callback::Callback gBridgedActionsEndpointListListAttributeCallback{ - OnBridgedActionsEndpointListListAttributeResponse, nullptr -}; -static void -OnContentLauncherAcceptsHeaderListListAttributeResponse(void * context, - const chip::app::DataModel::DecodableList & list) -{ - if (gSuccessResponseDelegate != nullptr) - gSuccessResponseDelegate(); -} -chip::Callback::Callback - gContentLauncherAcceptsHeaderListListAttributeCallback{ OnContentLauncherAcceptsHeaderListListAttributeResponse, nullptr }; -static void OnContentLauncherSupportedStreamingTypesListAttributeResponse( - void * context, - const chip::app::DataModel::DecodableList & list) -{ - if (gSuccessResponseDelegate != nullptr) - gSuccessResponseDelegate(); -} -chip::Callback::Callback - gContentLauncherSupportedStreamingTypesListAttributeCallback{ OnContentLauncherSupportedStreamingTypesListAttributeResponse, - nullptr }; -static void OnDescriptorDeviceListListAttributeResponse( - void * context, - const chip::app::DataModel::DecodableList & list) -{ - if (gSuccessResponseDelegate != nullptr) - gSuccessResponseDelegate(); -} -chip::Callback::Callback gDescriptorDeviceListListAttributeCallback{ - OnDescriptorDeviceListListAttributeResponse, nullptr -}; -static void OnDescriptorServerListListAttributeResponse(void * context, - const chip::app::DataModel::DecodableList & list) -{ - if (gSuccessResponseDelegate != nullptr) - gSuccessResponseDelegate(); -} -chip::Callback::Callback gDescriptorServerListListAttributeCallback{ - OnDescriptorServerListListAttributeResponse, nullptr -}; -static void OnDescriptorClientListListAttributeResponse(void * context, - const chip::app::DataModel::DecodableList & list) -{ - if (gSuccessResponseDelegate != nullptr) - gSuccessResponseDelegate(); -} -chip::Callback::Callback gDescriptorClientListListAttributeCallback{ - OnDescriptorClientListListAttributeResponse, nullptr -}; -static void OnDescriptorPartsListListAttributeResponse(void * context, - const chip::app::DataModel::DecodableList & list) -{ - if (gSuccessResponseDelegate != nullptr) - gSuccessResponseDelegate(); -} -chip::Callback::Callback gDescriptorPartsListListAttributeCallback{ - OnDescriptorPartsListListAttributeResponse, nullptr -}; -static void OnFixedLabelLabelListListAttributeResponse( - void * context, - const chip::app::DataModel::DecodableList & list) -{ - if (gSuccessResponseDelegate != nullptr) - gSuccessResponseDelegate(); -} -chip::Callback::Callback gFixedLabelLabelListListAttributeCallback{ - OnFixedLabelLabelListListAttributeResponse, nullptr -}; -static void OnGeneralCommissioningBasicCommissioningInfoListListAttributeResponse( - void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::GeneralCommissioning::Structs::BasicCommissioningInfoType::DecodableType> & list) -{ - if (gSuccessResponseDelegate != nullptr) - gSuccessResponseDelegate(); -} -chip::Callback::Callback - gGeneralCommissioningBasicCommissioningInfoListListAttributeCallback{ - OnGeneralCommissioningBasicCommissioningInfoListListAttributeResponse, nullptr - }; -static void OnGeneralDiagnosticsNetworkInterfacesListAttributeResponse( - void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::GeneralDiagnostics::Structs::NetworkInterfaceType::DecodableType> & list) -{ - if (gSuccessResponseDelegate != nullptr) - gSuccessResponseDelegate(); -} -chip::Callback::Callback - gGeneralDiagnosticsNetworkInterfacesListAttributeCallback{ OnGeneralDiagnosticsNetworkInterfacesListAttributeResponse, - nullptr }; -static void OnGeneralDiagnosticsActiveHardwareFaultsListAttributeResponse(void * context, - const chip::app::DataModel::DecodableList & list) -{ - if (gSuccessResponseDelegate != nullptr) - gSuccessResponseDelegate(); -} -chip::Callback::Callback - gGeneralDiagnosticsActiveHardwareFaultsListAttributeCallback{ OnGeneralDiagnosticsActiveHardwareFaultsListAttributeResponse, - nullptr }; -static void OnGeneralDiagnosticsActiveRadioFaultsListAttributeResponse(void * context, - const chip::app::DataModel::DecodableList & list) -{ - if (gSuccessResponseDelegate != nullptr) - gSuccessResponseDelegate(); -} -chip::Callback::Callback - gGeneralDiagnosticsActiveRadioFaultsListAttributeCallback{ OnGeneralDiagnosticsActiveRadioFaultsListAttributeResponse, - nullptr }; -static void OnGeneralDiagnosticsActiveNetworkFaultsListAttributeResponse(void * context, - const chip::app::DataModel::DecodableList & list) -{ - if (gSuccessResponseDelegate != nullptr) - gSuccessResponseDelegate(); -} -chip::Callback::Callback - gGeneralDiagnosticsActiveNetworkFaultsListAttributeCallback{ OnGeneralDiagnosticsActiveNetworkFaultsListAttributeResponse, - nullptr }; -static void OnGroupKeyManagementGroupsListAttributeResponse( - void * context, - const chip::app::DataModel::DecodableList & list) -{ - if (gSuccessResponseDelegate != nullptr) - gSuccessResponseDelegate(); -} -chip::Callback::Callback gGroupKeyManagementGroupsListAttributeCallback{ - OnGroupKeyManagementGroupsListAttributeResponse, nullptr -}; -static void OnGroupKeyManagementGroupKeysListAttributeResponse( - void * context, - const chip::app::DataModel::DecodableList & list) -{ - if (gSuccessResponseDelegate != nullptr) - gSuccessResponseDelegate(); -} -chip::Callback::Callback gGroupKeyManagementGroupKeysListAttributeCallback{ - OnGroupKeyManagementGroupKeysListAttributeResponse, nullptr -}; -static void OnMediaInputMediaInputListListAttributeResponse( - void * context, - const chip::app::DataModel::DecodableList & list) -{ - if (gSuccessResponseDelegate != nullptr) - gSuccessResponseDelegate(); -} -chip::Callback::Callback gMediaInputMediaInputListListAttributeCallback{ - OnMediaInputMediaInputListListAttributeResponse, nullptr -}; -static void OnModeSelectSupportedModesListAttributeResponse( - void * context, - const chip::app::DataModel::DecodableList & list) -{ - if (gSuccessResponseDelegate != nullptr) - gSuccessResponseDelegate(); -} -chip::Callback::Callback gModeSelectSupportedModesListAttributeCallback{ - OnModeSelectSupportedModesListAttributeResponse, nullptr -}; -static void OnOperationalCredentialsFabricsListListAttributeResponse( - void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::DecodableType> & list) -{ - if (gSuccessResponseDelegate != nullptr) - gSuccessResponseDelegate(); -} -chip::Callback::Callback - gOperationalCredentialsFabricsListListAttributeCallback{ OnOperationalCredentialsFabricsListListAttributeResponse, nullptr }; -static void OnOperationalCredentialsTrustedRootCertificatesListAttributeResponse( - void * context, const chip::app::DataModel::DecodableList & list) -{ - if (gSuccessResponseDelegate != nullptr) - gSuccessResponseDelegate(); -} -chip::Callback::Callback - gOperationalCredentialsTrustedRootCertificatesListAttributeCallback{ - OnOperationalCredentialsTrustedRootCertificatesListAttributeResponse, nullptr - }; -static void OnPowerSourceActiveBatteryFaultsListAttributeResponse(void * context, - const chip::app::DataModel::DecodableList & list) -{ - if (gSuccessResponseDelegate != nullptr) - gSuccessResponseDelegate(); -} -chip::Callback::Callback gPowerSourceActiveBatteryFaultsListAttributeCallback{ - OnPowerSourceActiveBatteryFaultsListAttributeResponse, nullptr -}; -static void OnSoftwareDiagnosticsThreadMetricsListAttributeResponse( - void * context, - const chip::app::DataModel::DecodableList & - list) -{ - if (gSuccessResponseDelegate != nullptr) - gSuccessResponseDelegate(); -} -chip::Callback::Callback - gSoftwareDiagnosticsThreadMetricsListAttributeCallback{ OnSoftwareDiagnosticsThreadMetricsListAttributeResponse, nullptr }; -static void OnTvChannelTvChannelListListAttributeResponse( - void * context, - const chip::app::DataModel::DecodableList & list) -{ - if (gSuccessResponseDelegate != nullptr) - gSuccessResponseDelegate(); -} -chip::Callback::Callback gTvChannelTvChannelListListAttributeCallback{ - OnTvChannelTvChannelListListAttributeResponse, nullptr -}; -static void OnTargetNavigatorTargetNavigatorListListAttributeResponse( - void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::TargetNavigator::Structs::NavigateTargetTargetInfo::DecodableType> & list) -{ - if (gSuccessResponseDelegate != nullptr) - gSuccessResponseDelegate(); -} -chip::Callback::Callback - gTargetNavigatorTargetNavigatorListListAttributeCallback{ OnTargetNavigatorTargetNavigatorListListAttributeResponse, nullptr }; -static void OnTestClusterListInt8uListAttributeResponse(void * context, const chip::app::DataModel::DecodableList & list) -{ - if (gSuccessResponseDelegate != nullptr) - gSuccessResponseDelegate(); -} -chip::Callback::Callback gTestClusterListInt8uListAttributeCallback{ - OnTestClusterListInt8uListAttributeResponse, nullptr -}; -static void OnTestClusterListOctetStringListAttributeResponse(void * context, - const chip::app::DataModel::DecodableList & list) -{ - if (gSuccessResponseDelegate != nullptr) - gSuccessResponseDelegate(); -} -chip::Callback::Callback gTestClusterListOctetStringListAttributeCallback{ - OnTestClusterListOctetStringListAttributeResponse, nullptr -}; -static void OnTestClusterListStructOctetStringListAttributeResponse( - void * context, - const chip::app::DataModel::DecodableList & list) -{ - if (gSuccessResponseDelegate != nullptr) - gSuccessResponseDelegate(); -} -chip::Callback::Callback - gTestClusterListStructOctetStringListAttributeCallback{ OnTestClusterListStructOctetStringListAttributeResponse, nullptr }; -static void OnTestClusterListNullablesAndOptionalsStructListAttributeResponse( - void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::TestCluster::Structs::NullablesAndOptionalsStruct::DecodableType> & list) -{ - if (gSuccessResponseDelegate != nullptr) - gSuccessResponseDelegate(); -} -chip::Callback::Callback - gTestClusterListNullablesAndOptionalsStructListAttributeCallback{ - OnTestClusterListNullablesAndOptionalsStructListAttributeResponse, nullptr - }; -static void OnThreadNetworkDiagnosticsNeighborTableListListAttributeResponse( - void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::ThreadNetworkDiagnostics::Structs::NeighborTable::DecodableType> & list) -{ - if (gSuccessResponseDelegate != nullptr) - gSuccessResponseDelegate(); -} -chip::Callback::Callback - gThreadNetworkDiagnosticsNeighborTableListListAttributeCallback{ - OnThreadNetworkDiagnosticsNeighborTableListListAttributeResponse, nullptr - }; -static void OnThreadNetworkDiagnosticsRouteTableListListAttributeResponse( - void * context, - const chip::app::DataModel::DecodableList & - list) -{ - if (gSuccessResponseDelegate != nullptr) - gSuccessResponseDelegate(); -} -chip::Callback::Callback - gThreadNetworkDiagnosticsRouteTableListListAttributeCallback{ OnThreadNetworkDiagnosticsRouteTableListListAttributeResponse, - nullptr }; -static void OnThreadNetworkDiagnosticsSecurityPolicyListAttributeResponse( - void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::ThreadNetworkDiagnostics::Structs::SecurityPolicy::DecodableType> & list) -{ - if (gSuccessResponseDelegate != nullptr) - gSuccessResponseDelegate(); -} -chip::Callback::Callback - gThreadNetworkDiagnosticsSecurityPolicyListAttributeCallback{ OnThreadNetworkDiagnosticsSecurityPolicyListAttributeResponse, - nullptr }; -static void OnThreadNetworkDiagnosticsOperationalDatasetComponentsListAttributeResponse( - void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::ThreadNetworkDiagnostics::Structs::OperationalDatasetComponents::DecodableType> & list) -{ - if (gSuccessResponseDelegate != nullptr) - gSuccessResponseDelegate(); -} -chip::Callback::Callback - gThreadNetworkDiagnosticsOperationalDatasetComponentsListAttributeCallback{ - OnThreadNetworkDiagnosticsOperationalDatasetComponentsListAttributeResponse, nullptr - }; -static void OnThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeResponse( - void * context, const chip::app::DataModel::DecodableList & list) -{ - if (gSuccessResponseDelegate != nullptr) - gSuccessResponseDelegate(); -} -chip::Callback::Callback - gThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallback{ - OnThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeResponse, nullptr - }; - -chip::Callback::Callback gDefaultSuccessCallback{ OnDefaultSuccessResponse, nullptr }; -chip::Callback::Callback gDefaultFailureCallback{ OnDefaultFailureResponse, nullptr }; -chip::Callback::Callback gBooleanAttributeCallback{ OnAttributeResponse, nullptr }; -chip::Callback::Callback gInt8uAttributeCallback{ OnAttributeResponse, nullptr }; -chip::Callback::Callback gInt8sAttributeCallback{ OnAttributeResponse, nullptr }; -chip::Callback::Callback gInt16uAttributeCallback{ OnAttributeResponse, nullptr }; -chip::Callback::Callback gInt16sAttributeCallback{ OnAttributeResponse, nullptr }; -chip::Callback::Callback gInt32uAttributeCallback{ OnAttributeResponse, nullptr }; -chip::Callback::Callback gInt32sAttributeCallback{ OnAttributeResponse, nullptr }; -chip::Callback::Callback gInt64uAttributeCallback{ OnAttributeResponse, nullptr }; -chip::Callback::Callback gInt64sAttributeCallback{ OnAttributeResponse, nullptr }; -chip::Callback::Callback gOctetStringAttributeCallback{ OnAttributeResponse, nullptr }; -chip::Callback::Callback gCharStringAttributeCallback{ OnAttributeResponse, nullptr }; - -} // namespace - -extern "C" { - -void chip_ime_SetSuccessResponseDelegate(SuccessResponseDelegate delegate) -{ - gSuccessResponseDelegate = delegate; -} - -void chip_ime_SetFailureResponseDelegate(FailureResponseDelegate delegate) -{ - gFailureResponseDelegate = delegate; -} - -// Cluster AccountLogin - -chip::ChipError::StorageType chip_ime_ReadAttribute_AccountLogin_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::AccountLoginCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_AccountLogin_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::AccountLoginCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -// End of Cluster AccountLogin -// Cluster AdministratorCommissioning - -chip::ChipError::StorageType chip_ime_ReadAttribute_AdministratorCommissioning_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::AdministratorCommissioningCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_AdministratorCommissioning_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::AdministratorCommissioningCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -// End of Cluster AdministratorCommissioning -// Cluster ApplicationBasic - -chip::ChipError::StorageType chip_ime_ReadAttribute_ApplicationBasic_VendorName(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ApplicationBasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeVendorName(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ApplicationBasic_VendorName(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ApplicationBasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeVendorName(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ApplicationBasic_VendorId(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ApplicationBasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeVendorId(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ApplicationBasic_VendorId(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ApplicationBasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeVendorId(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ApplicationBasic_ApplicationName(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ApplicationBasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeApplicationName(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ApplicationBasic_ApplicationName(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ApplicationBasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeApplicationName(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ApplicationBasic_ProductId(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ApplicationBasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeProductId(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ApplicationBasic_ProductId(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ApplicationBasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeProductId(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ApplicationBasic_ApplicationId(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ApplicationBasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeApplicationId(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ApplicationBasic_ApplicationId(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ApplicationBasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeApplicationId(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ApplicationBasic_CatalogVendorId(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ApplicationBasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeCatalogVendorId(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ApplicationBasic_CatalogVendorId(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ApplicationBasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeCatalogVendorId(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ApplicationBasic_ApplicationStatus(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ApplicationBasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeApplicationStatus(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ApplicationBasic_ApplicationStatus(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ApplicationBasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeApplicationStatus(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ApplicationBasic_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ApplicationBasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ApplicationBasic_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ApplicationBasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -// End of Cluster ApplicationBasic -// Cluster ApplicationLauncher - -chip::ChipError::StorageType chip_ime_ReadAttribute_ApplicationLauncher_ApplicationLauncherList(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ApplicationLauncherCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .ReadAttributeApplicationLauncherList(gApplicationLauncherApplicationLauncherListListAttributeCallback.Cancel(), - gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ApplicationLauncher_CatalogVendorId(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ApplicationLauncherCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeCatalogVendorId(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ApplicationLauncher_CatalogVendorId(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ApplicationLauncherCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeCatalogVendorId(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ApplicationLauncher_ApplicationId(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ApplicationLauncherCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeApplicationId(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ApplicationLauncher_ApplicationId(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ApplicationLauncherCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeApplicationId(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ApplicationLauncher_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ApplicationLauncherCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ApplicationLauncher_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ApplicationLauncherCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -// End of Cluster ApplicationLauncher -// Cluster AudioOutput - -chip::ChipError::StorageType chip_ime_ReadAttribute_AudioOutput_AudioOutputList(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::AudioOutputCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .ReadAttributeAudioOutputList(gAudioOutputAudioOutputListListAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_AudioOutput_CurrentAudioOutput(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::AudioOutputCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeCurrentAudioOutput(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_AudioOutput_CurrentAudioOutput(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::AudioOutputCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeCurrentAudioOutput(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_AudioOutput_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::AudioOutputCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_AudioOutput_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::AudioOutputCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -// End of Cluster AudioOutput -// Cluster BarrierControl - -chip::ChipError::StorageType chip_ime_ReadAttribute_BarrierControl_BarrierMovingState(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BarrierControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeBarrierMovingState(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_BarrierControl_BarrierMovingState(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BarrierControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeBarrierMovingState(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_BarrierControl_BarrierSafetyStatus(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BarrierControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeBarrierSafetyStatus(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_BarrierControl_BarrierSafetyStatus(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BarrierControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeBarrierSafetyStatus(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_BarrierControl_BarrierCapabilities(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BarrierControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeBarrierCapabilities(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_BarrierControl_BarrierCapabilities(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BarrierControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeBarrierCapabilities(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_BarrierControl_BarrierPosition(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BarrierControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeBarrierPosition(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_BarrierControl_BarrierPosition(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BarrierControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeBarrierPosition(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_BarrierControl_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BarrierControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_BarrierControl_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BarrierControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -// End of Cluster BarrierControl -// Cluster Basic - -chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_InteractionModelVersion(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeInteractionModelVersion(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_Basic_InteractionModelVersion(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeInteractionModelVersion(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -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; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeVendorName(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_Basic_VendorName(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeVendorName(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -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; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeVendorID(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_Basic_VendorID(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeVendorID(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -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()); - chip::Controller::BasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeProductName(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_Basic_ProductName(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeProductName(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -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; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeProductID(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_Basic_ProductID(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeProductID(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_NodeLabel(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeNodeLabel(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_Basic_NodeLabel(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeNodeLabel(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -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; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeLocation(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_Basic_Location(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeLocation(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_HardwareVersion(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeHardwareVersion(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_Basic_HardwareVersion(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeHardwareVersion(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_HardwareVersionString(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeHardwareVersionString(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_Basic_HardwareVersionString(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeHardwareVersionString(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), - minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_SoftwareVersion(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeSoftwareVersion(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_Basic_SoftwareVersion(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeSoftwareVersion(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_SoftwareVersionString(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeSoftwareVersionString(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_Basic_SoftwareVersionString(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeSoftwareVersionString(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), - minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_ManufacturingDate(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeManufacturingDate(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_Basic_ManufacturingDate(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeManufacturingDate(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -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; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributePartNumber(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_Basic_PartNumber(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributePartNumber(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -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; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeProductURL(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_Basic_ProductURL(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeProductURL(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -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()); - chip::Controller::BasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeProductLabel(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_Basic_ProductLabel(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeProductLabel(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -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()); - chip::Controller::BasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeSerialNumber(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_Basic_SerialNumber(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeSerialNumber(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_LocalConfigDisabled(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeLocalConfigDisabled(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_Basic_LocalConfigDisabled(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeLocalConfigDisabled(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -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; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeReachable(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_Basic_Reachable(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeReachable(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_UniqueID(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeUniqueID(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_Basic_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -// End of Cluster Basic -// Cluster BinaryInputBasic - -chip::ChipError::StorageType chip_ime_ReadAttribute_BinaryInputBasic_OutOfService(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BinaryInputBasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeOutOfService(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_BinaryInputBasic_OutOfService(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BinaryInputBasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeOutOfService(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_BinaryInputBasic_PresentValue(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BinaryInputBasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributePresentValue(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_BinaryInputBasic_PresentValue(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BinaryInputBasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributePresentValue(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_BinaryInputBasic_StatusFlags(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BinaryInputBasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeStatusFlags(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_BinaryInputBasic_StatusFlags(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BinaryInputBasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeStatusFlags(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_BinaryInputBasic_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BinaryInputBasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_BinaryInputBasic_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BinaryInputBasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -// End of Cluster BinaryInputBasic -// Cluster Binding - -chip::ChipError::StorageType chip_ime_ReadAttribute_Binding_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BindingCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_Binding_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BindingCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -// End of Cluster Binding -// Cluster BooleanState - -chip::ChipError::StorageType chip_ime_ReadAttribute_BooleanState_StateValue(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BooleanStateCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeStateValue(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_BooleanState_StateValue(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BooleanStateCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeStateValue(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_BooleanState_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BooleanStateCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_BooleanState_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BooleanStateCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -// End of Cluster BooleanState -// Cluster BridgedActions - -chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedActions_ActionList(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BridgedActionsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .ReadAttributeActionList(gBridgedActionsActionListListAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedActions_EndpointList(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BridgedActionsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .ReadAttributeEndpointList(gBridgedActionsEndpointListListAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedActions_SetupUrl(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BridgedActionsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeSetupUrl(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_BridgedActions_SetupUrl(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BridgedActionsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeSetupUrl(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedActions_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BridgedActionsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_BridgedActions_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BridgedActionsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -// End of Cluster BridgedActions -// Cluster BridgedDeviceBasic - -chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedDeviceBasic_VendorName(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BridgedDeviceBasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeVendorName(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_BridgedDeviceBasic_VendorName(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BridgedDeviceBasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeVendorName(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedDeviceBasic_VendorID(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BridgedDeviceBasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeVendorID(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_BridgedDeviceBasic_VendorID(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BridgedDeviceBasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeVendorID(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedDeviceBasic_ProductName(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BridgedDeviceBasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeProductName(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_BridgedDeviceBasic_ProductName(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BridgedDeviceBasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeProductName(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedDeviceBasic_NodeLabel(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BridgedDeviceBasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeNodeLabel(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_BridgedDeviceBasic_NodeLabel(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BridgedDeviceBasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeNodeLabel(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedDeviceBasic_HardwareVersion(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BridgedDeviceBasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeHardwareVersion(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_BridgedDeviceBasic_HardwareVersion(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BridgedDeviceBasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeHardwareVersion(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedDeviceBasic_HardwareVersionString(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BridgedDeviceBasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeHardwareVersionString(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_BridgedDeviceBasic_HardwareVersionString(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BridgedDeviceBasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeHardwareVersionString(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), - minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedDeviceBasic_SoftwareVersion(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BridgedDeviceBasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeSoftwareVersion(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_BridgedDeviceBasic_SoftwareVersion(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BridgedDeviceBasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeSoftwareVersion(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedDeviceBasic_SoftwareVersionString(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BridgedDeviceBasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeSoftwareVersionString(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_BridgedDeviceBasic_SoftwareVersionString(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BridgedDeviceBasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeSoftwareVersionString(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), - minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedDeviceBasic_ManufacturingDate(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BridgedDeviceBasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeManufacturingDate(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_BridgedDeviceBasic_ManufacturingDate(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BridgedDeviceBasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeManufacturingDate(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedDeviceBasic_PartNumber(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BridgedDeviceBasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributePartNumber(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_BridgedDeviceBasic_PartNumber(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BridgedDeviceBasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributePartNumber(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedDeviceBasic_ProductURL(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BridgedDeviceBasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeProductURL(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_BridgedDeviceBasic_ProductURL(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BridgedDeviceBasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeProductURL(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedDeviceBasic_ProductLabel(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BridgedDeviceBasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeProductLabel(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_BridgedDeviceBasic_ProductLabel(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BridgedDeviceBasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeProductLabel(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedDeviceBasic_SerialNumber(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BridgedDeviceBasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeSerialNumber(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_BridgedDeviceBasic_SerialNumber(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BridgedDeviceBasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeSerialNumber(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedDeviceBasic_Reachable(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BridgedDeviceBasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeReachable(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_BridgedDeviceBasic_Reachable(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BridgedDeviceBasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeReachable(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedDeviceBasic_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BridgedDeviceBasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_BridgedDeviceBasic_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::BridgedDeviceBasicCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -// End of Cluster BridgedDeviceBasic -// Cluster ColorControl - -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_CurrentHue(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeCurrentHue(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_CurrentHue(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeCurrentHue(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_CurrentSaturation(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeCurrentSaturation(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_CurrentSaturation(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeCurrentSaturation(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_RemainingTime(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeRemainingTime(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_RemainingTime(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeRemainingTime(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_CurrentX(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeCurrentX(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_CurrentX(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeCurrentX(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_CurrentY(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeCurrentY(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_CurrentY(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeCurrentY(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_DriftCompensation(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeDriftCompensation(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_DriftCompensation(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeDriftCompensation(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_CompensationText(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeCompensationText(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_CompensationText(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeCompensationText(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorTemperature(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeColorTemperature(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_ColorTemperature(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeColorTemperature(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorMode(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeColorMode(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_ColorMode(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeColorMode(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorControlOptions(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeColorControlOptions(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_ColorControlOptions(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeColorControlOptions(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_NumberOfPrimaries(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeNumberOfPrimaries(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_NumberOfPrimaries(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeNumberOfPrimaries(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary1X(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributePrimary1X(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_Primary1X(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributePrimary1X(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary1Y(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributePrimary1Y(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_Primary1Y(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributePrimary1Y(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary1Intensity(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributePrimary1Intensity(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_Primary1Intensity(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributePrimary1Intensity(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary2X(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributePrimary2X(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_Primary2X(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributePrimary2X(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary2Y(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributePrimary2Y(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_Primary2Y(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributePrimary2Y(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary2Intensity(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributePrimary2Intensity(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_Primary2Intensity(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributePrimary2Intensity(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary3X(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributePrimary3X(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_Primary3X(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributePrimary3X(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary3Y(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributePrimary3Y(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_Primary3Y(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributePrimary3Y(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary3Intensity(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributePrimary3Intensity(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_Primary3Intensity(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributePrimary3Intensity(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary4X(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributePrimary4X(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_Primary4X(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributePrimary4X(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary4Y(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributePrimary4Y(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_Primary4Y(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributePrimary4Y(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary4Intensity(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributePrimary4Intensity(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_Primary4Intensity(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributePrimary4Intensity(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary5X(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributePrimary5X(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_Primary5X(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributePrimary5X(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary5Y(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributePrimary5Y(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_Primary5Y(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributePrimary5Y(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary5Intensity(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributePrimary5Intensity(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_Primary5Intensity(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributePrimary5Intensity(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary6X(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributePrimary6X(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_Primary6X(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributePrimary6X(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary6Y(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributePrimary6Y(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_Primary6Y(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributePrimary6Y(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary6Intensity(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributePrimary6Intensity(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_Primary6Intensity(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributePrimary6Intensity(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_WhitePointX(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeWhitePointX(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_WhitePointX(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeWhitePointX(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_WhitePointY(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeWhitePointY(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_WhitePointY(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeWhitePointY(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorPointRX(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeColorPointRX(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_ColorPointRX(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeColorPointRX(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorPointRY(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeColorPointRY(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_ColorPointRY(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeColorPointRY(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorPointRIntensity(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeColorPointRIntensity(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_ColorPointRIntensity(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeColorPointRIntensity(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorPointGX(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeColorPointGX(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_ColorPointGX(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeColorPointGX(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorPointGY(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeColorPointGY(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_ColorPointGY(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeColorPointGY(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorPointGIntensity(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeColorPointGIntensity(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_ColorPointGIntensity(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeColorPointGIntensity(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorPointBX(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeColorPointBX(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_ColorPointBX(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeColorPointBX(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorPointBY(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeColorPointBY(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_ColorPointBY(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeColorPointBY(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorPointBIntensity(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeColorPointBIntensity(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_ColorPointBIntensity(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeColorPointBIntensity(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_EnhancedCurrentHue(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeEnhancedCurrentHue(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_EnhancedCurrentHue(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeEnhancedCurrentHue(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_EnhancedColorMode(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeEnhancedColorMode(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_EnhancedColorMode(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeEnhancedColorMode(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorLoopActive(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeColorLoopActive(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_ColorLoopActive(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeColorLoopActive(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorLoopDirection(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeColorLoopDirection(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_ColorLoopDirection(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeColorLoopDirection(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorLoopTime(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeColorLoopTime(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_ColorLoopTime(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeColorLoopTime(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorLoopStartEnhancedHue(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeColorLoopStartEnhancedHue(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_ColorLoopStartEnhancedHue(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeColorLoopStartEnhancedHue(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), - minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorLoopStoredEnhancedHue(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeColorLoopStoredEnhancedHue(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_ColorLoopStoredEnhancedHue(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeColorLoopStoredEnhancedHue(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), - minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorCapabilities(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeColorCapabilities(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_ColorCapabilities(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeColorCapabilities(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorTempPhysicalMin(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeColorTempPhysicalMin(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_ColorTempPhysicalMin(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeColorTempPhysicalMin(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorTempPhysicalMax(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeColorTempPhysicalMax(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_ColorTempPhysicalMax(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeColorTempPhysicalMax(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_CoupleColorTempToLevelMinMireds(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeCoupleColorTempToLevelMinMireds(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType -chip_ime_SubscribeAttribute_ColorControl_CoupleColorTempToLevelMinMireds(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeCoupleColorTempToLevelMinMireds(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), - minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_StartUpColorTemperatureMireds(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeStartUpColorTemperatureMireds(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_StartUpColorTemperatureMireds(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeStartUpColorTemperatureMireds(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), - minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ColorControl_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -// End of Cluster ColorControl -// Cluster ContentLauncher - -chip::ChipError::StorageType chip_ime_ReadAttribute_ContentLauncher_AcceptsHeaderList(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ContentLauncherCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .ReadAttributeAcceptsHeaderList(gContentLauncherAcceptsHeaderListListAttributeCallback.Cancel(), - gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ContentLauncher_SupportedStreamingTypes(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ContentLauncherCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .ReadAttributeSupportedStreamingTypes(gContentLauncherSupportedStreamingTypesListAttributeCallback.Cancel(), - gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ContentLauncher_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ContentLauncherCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ContentLauncher_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ContentLauncherCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -// End of Cluster ContentLauncher -// Cluster Descriptor - -chip::ChipError::StorageType chip_ime_ReadAttribute_Descriptor_DeviceList(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::DescriptorCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeDeviceList(gDescriptorDeviceListListAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_Descriptor_ServerList(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::DescriptorCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeServerList(gDescriptorServerListListAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_Descriptor_ClientList(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::DescriptorCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeClientList(gDescriptorClientListListAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -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()); - chip::Controller::DescriptorCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributePartsList(gDescriptorPartsListListAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_Descriptor_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::DescriptorCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_Descriptor_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::DescriptorCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -// End of Cluster Descriptor -// Cluster DiagnosticLogs - -// End of Cluster DiagnosticLogs -// Cluster DoorLock - -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()); - chip::Controller::DoorLockCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeLockState(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_DoorLock_LockState(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::DoorLockCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeLockState(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -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()); - chip::Controller::DoorLockCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeLockType(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_DoorLock_LockType(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::DoorLockCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeLockType(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_DoorLock_ActuatorEnabled(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::DoorLockCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeActuatorEnabled(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_DoorLock_ActuatorEnabled(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::DoorLockCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeActuatorEnabled(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_DoorLock_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::DoorLockCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_DoorLock_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::DoorLockCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -// End of Cluster DoorLock -// Cluster ElectricalMeasurement - -chip::ChipError::StorageType chip_ime_ReadAttribute_ElectricalMeasurement_MeasurementType(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ElectricalMeasurementCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeMeasurementType(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ElectricalMeasurement_MeasurementType(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ElectricalMeasurementCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeMeasurementType(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ElectricalMeasurement_TotalActivePower(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ElectricalMeasurementCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeTotalActivePower(gInt32sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ElectricalMeasurement_TotalActivePower(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ElectricalMeasurementCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeTotalActivePower(gInt32sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ElectricalMeasurement_RmsVoltage(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ElectricalMeasurementCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeRmsVoltage(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ElectricalMeasurement_RmsVoltage(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ElectricalMeasurementCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeRmsVoltage(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ElectricalMeasurement_RmsVoltageMin(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ElectricalMeasurementCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeRmsVoltageMin(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ElectricalMeasurement_RmsVoltageMin(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ElectricalMeasurementCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeRmsVoltageMin(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ElectricalMeasurement_RmsVoltageMax(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ElectricalMeasurementCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeRmsVoltageMax(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ElectricalMeasurement_RmsVoltageMax(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ElectricalMeasurementCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeRmsVoltageMax(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ElectricalMeasurement_RmsCurrent(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ElectricalMeasurementCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeRmsCurrent(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ElectricalMeasurement_RmsCurrent(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ElectricalMeasurementCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeRmsCurrent(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ElectricalMeasurement_RmsCurrentMin(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ElectricalMeasurementCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeRmsCurrentMin(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ElectricalMeasurement_RmsCurrentMin(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ElectricalMeasurementCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeRmsCurrentMin(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ElectricalMeasurement_RmsCurrentMax(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ElectricalMeasurementCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeRmsCurrentMax(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ElectricalMeasurement_RmsCurrentMax(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ElectricalMeasurementCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeRmsCurrentMax(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ElectricalMeasurement_ActivePower(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ElectricalMeasurementCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeActivePower(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ElectricalMeasurement_ActivePower(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ElectricalMeasurementCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeActivePower(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ElectricalMeasurement_ActivePowerMin(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ElectricalMeasurementCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeActivePowerMin(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ElectricalMeasurement_ActivePowerMin(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ElectricalMeasurementCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeActivePowerMin(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ElectricalMeasurement_ActivePowerMax(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ElectricalMeasurementCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeActivePowerMax(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ElectricalMeasurement_ActivePowerMax(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ElectricalMeasurementCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeActivePowerMax(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ElectricalMeasurement_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ElectricalMeasurementCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ElectricalMeasurement_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ElectricalMeasurementCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -// End of Cluster ElectricalMeasurement -// Cluster EthernetNetworkDiagnostics - -chip::ChipError::StorageType chip_ime_ReadAttribute_EthernetNetworkDiagnostics_PHYRate(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::EthernetNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributePHYRate(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_EthernetNetworkDiagnostics_PHYRate(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::EthernetNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributePHYRate(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_EthernetNetworkDiagnostics_FullDuplex(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::EthernetNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeFullDuplex(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_EthernetNetworkDiagnostics_FullDuplex(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::EthernetNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeFullDuplex(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_EthernetNetworkDiagnostics_PacketRxCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::EthernetNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributePacketRxCount(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_EthernetNetworkDiagnostics_PacketRxCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::EthernetNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributePacketRxCount(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_EthernetNetworkDiagnostics_PacketTxCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::EthernetNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributePacketTxCount(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_EthernetNetworkDiagnostics_PacketTxCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::EthernetNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributePacketTxCount(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_EthernetNetworkDiagnostics_TxErrCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::EthernetNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeTxErrCount(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_EthernetNetworkDiagnostics_TxErrCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::EthernetNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeTxErrCount(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_EthernetNetworkDiagnostics_CollisionCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::EthernetNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeCollisionCount(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_EthernetNetworkDiagnostics_CollisionCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::EthernetNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeCollisionCount(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_EthernetNetworkDiagnostics_OverrunCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::EthernetNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeOverrunCount(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_EthernetNetworkDiagnostics_OverrunCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::EthernetNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeOverrunCount(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_EthernetNetworkDiagnostics_CarrierDetect(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::EthernetNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeCarrierDetect(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_EthernetNetworkDiagnostics_CarrierDetect(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::EthernetNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeCarrierDetect(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_EthernetNetworkDiagnostics_TimeSinceReset(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::EthernetNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeTimeSinceReset(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_EthernetNetworkDiagnostics_TimeSinceReset(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::EthernetNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeTimeSinceReset(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_EthernetNetworkDiagnostics_FeatureMap(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::EthernetNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeFeatureMap(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_EthernetNetworkDiagnostics_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::EthernetNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_EthernetNetworkDiagnostics_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::EthernetNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -// End of Cluster EthernetNetworkDiagnostics -// Cluster FixedLabel - -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()); - chip::Controller::FixedLabelCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeLabelList(gFixedLabelLabelListListAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_FixedLabel_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::FixedLabelCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_FixedLabel_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::FixedLabelCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -// End of Cluster FixedLabel -// Cluster FlowMeasurement - -chip::ChipError::StorageType chip_ime_ReadAttribute_FlowMeasurement_MeasuredValue(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::FlowMeasurementCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeMeasuredValue(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_FlowMeasurement_MeasuredValue(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::FlowMeasurementCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeMeasuredValue(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_FlowMeasurement_MinMeasuredValue(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::FlowMeasurementCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeMinMeasuredValue(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_FlowMeasurement_MinMeasuredValue(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::FlowMeasurementCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeMinMeasuredValue(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_FlowMeasurement_MaxMeasuredValue(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::FlowMeasurementCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeMaxMeasuredValue(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_FlowMeasurement_MaxMeasuredValue(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::FlowMeasurementCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeMaxMeasuredValue(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_FlowMeasurement_Tolerance(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::FlowMeasurementCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeTolerance(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_FlowMeasurement_Tolerance(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::FlowMeasurementCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeTolerance(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_FlowMeasurement_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::FlowMeasurementCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_FlowMeasurement_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::FlowMeasurementCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -// End of Cluster FlowMeasurement -// Cluster GeneralCommissioning - -chip::ChipError::StorageType chip_ime_ReadAttribute_GeneralCommissioning_Breadcrumb(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::GeneralCommissioningCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeBreadcrumb(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_GeneralCommissioning_Breadcrumb(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::GeneralCommissioningCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeBreadcrumb(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -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; - cluster.Associate(device, ZCLendpointId); - return cluster - .ReadAttributeBasicCommissioningInfoList(gGeneralCommissioningBasicCommissioningInfoListListAttributeCallback.Cancel(), - gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_GeneralCommissioning_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::GeneralCommissioningCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_GeneralCommissioning_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::GeneralCommissioningCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -// End of Cluster GeneralCommissioning -// Cluster GeneralDiagnostics - -chip::ChipError::StorageType chip_ime_ReadAttribute_GeneralDiagnostics_NetworkInterfaces(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::GeneralDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .ReadAttributeNetworkInterfaces(gGeneralDiagnosticsNetworkInterfacesListAttributeCallback.Cancel(), - gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_GeneralDiagnostics_RebootCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::GeneralDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeRebootCount(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_GeneralDiagnostics_RebootCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::GeneralDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeRebootCount(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_GeneralDiagnostics_UpTime(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::GeneralDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeUpTime(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_GeneralDiagnostics_UpTime(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::GeneralDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeUpTime(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_GeneralDiagnostics_TotalOperationalHours(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::GeneralDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeTotalOperationalHours(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_GeneralDiagnostics_TotalOperationalHours(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::GeneralDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeTotalOperationalHours(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_GeneralDiagnostics_BootReasons(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::GeneralDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeBootReasons(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_GeneralDiagnostics_BootReasons(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::GeneralDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeBootReasons(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_GeneralDiagnostics_ActiveHardwareFaults(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::GeneralDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .ReadAttributeActiveHardwareFaults(gGeneralDiagnosticsActiveHardwareFaultsListAttributeCallback.Cancel(), - gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_GeneralDiagnostics_ActiveRadioFaults(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::GeneralDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .ReadAttributeActiveRadioFaults(gGeneralDiagnosticsActiveRadioFaultsListAttributeCallback.Cancel(), - gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_GeneralDiagnostics_ActiveNetworkFaults(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::GeneralDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .ReadAttributeActiveNetworkFaults(gGeneralDiagnosticsActiveNetworkFaultsListAttributeCallback.Cancel(), - gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_GeneralDiagnostics_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::GeneralDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_GeneralDiagnostics_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::GeneralDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -// End of Cluster GeneralDiagnostics -// Cluster GroupKeyManagement - -chip::ChipError::StorageType chip_ime_ReadAttribute_GroupKeyManagement_Groups(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::GroupKeyManagementCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeGroups(gGroupKeyManagementGroupsListAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_GroupKeyManagement_GroupKeys(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::GroupKeyManagementCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .ReadAttributeGroupKeys(gGroupKeyManagementGroupKeysListAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_GroupKeyManagement_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::GroupKeyManagementCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_GroupKeyManagement_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::GroupKeyManagementCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -// End of Cluster GroupKeyManagement -// Cluster Groups - -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()); - chip::Controller::GroupsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeNameSupport(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_Groups_NameSupport(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::GroupsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeNameSupport(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_Groups_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::GroupsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_Groups_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::GroupsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -// End of Cluster Groups -// Cluster Identify - -chip::ChipError::StorageType chip_ime_ReadAttribute_Identify_IdentifyTime(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::IdentifyCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeIdentifyTime(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_Identify_IdentifyTime(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::IdentifyCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeIdentifyTime(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_Identify_IdentifyType(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::IdentifyCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeIdentifyType(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_Identify_IdentifyType(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::IdentifyCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeIdentifyType(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_Identify_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::IdentifyCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_Identify_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::IdentifyCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -// End of Cluster Identify -// Cluster IlluminanceMeasurement - -chip::ChipError::StorageType chip_ime_ReadAttribute_IlluminanceMeasurement_MeasuredValue(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::IlluminanceMeasurementCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeMeasuredValue(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_IlluminanceMeasurement_MeasuredValue(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::IlluminanceMeasurementCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeMeasuredValue(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_IlluminanceMeasurement_MinMeasuredValue(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::IlluminanceMeasurementCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeMinMeasuredValue(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_IlluminanceMeasurement_MinMeasuredValue(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::IlluminanceMeasurementCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeMinMeasuredValue(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_IlluminanceMeasurement_MaxMeasuredValue(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::IlluminanceMeasurementCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeMaxMeasuredValue(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_IlluminanceMeasurement_MaxMeasuredValue(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::IlluminanceMeasurementCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeMaxMeasuredValue(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_IlluminanceMeasurement_Tolerance(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::IlluminanceMeasurementCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeTolerance(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_IlluminanceMeasurement_Tolerance(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::IlluminanceMeasurementCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeTolerance(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_IlluminanceMeasurement_LightSensorType(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::IlluminanceMeasurementCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeLightSensorType(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_IlluminanceMeasurement_LightSensorType(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::IlluminanceMeasurementCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeLightSensorType(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_IlluminanceMeasurement_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::IlluminanceMeasurementCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_IlluminanceMeasurement_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::IlluminanceMeasurementCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -// End of Cluster IlluminanceMeasurement -// Cluster KeypadInput - -chip::ChipError::StorageType chip_ime_ReadAttribute_KeypadInput_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::KeypadInputCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_KeypadInput_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::KeypadInputCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -// End of Cluster KeypadInput -// Cluster LevelControl - -chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_CurrentLevel(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::LevelControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeCurrentLevel(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_LevelControl_CurrentLevel(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::LevelControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeCurrentLevel(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_RemainingTime(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::LevelControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeRemainingTime(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_LevelControl_RemainingTime(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::LevelControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeRemainingTime(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_MinLevel(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::LevelControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeMinLevel(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_LevelControl_MinLevel(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::LevelControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeMinLevel(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_MaxLevel(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::LevelControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeMaxLevel(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_LevelControl_MaxLevel(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::LevelControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeMaxLevel(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_CurrentFrequency(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::LevelControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeCurrentFrequency(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_LevelControl_CurrentFrequency(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::LevelControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeCurrentFrequency(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_MinFrequency(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::LevelControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeMinFrequency(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_LevelControl_MinFrequency(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::LevelControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeMinFrequency(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_MaxFrequency(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::LevelControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeMaxFrequency(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_LevelControl_MaxFrequency(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::LevelControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeMaxFrequency(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -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()); - chip::Controller::LevelControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeOptions(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_LevelControl_Options(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::LevelControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeOptions(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_OnOffTransitionTime(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::LevelControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeOnOffTransitionTime(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_LevelControl_OnOffTransitionTime(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::LevelControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeOnOffTransitionTime(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -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()); - chip::Controller::LevelControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeOnLevel(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_LevelControl_OnLevel(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::LevelControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeOnLevel(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_OnTransitionTime(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::LevelControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeOnTransitionTime(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_LevelControl_OnTransitionTime(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::LevelControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeOnTransitionTime(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_OffTransitionTime(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::LevelControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeOffTransitionTime(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_LevelControl_OffTransitionTime(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::LevelControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeOffTransitionTime(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_DefaultMoveRate(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::LevelControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeDefaultMoveRate(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_LevelControl_DefaultMoveRate(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::LevelControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeDefaultMoveRate(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_StartUpCurrentLevel(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::LevelControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeStartUpCurrentLevel(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_LevelControl_StartUpCurrentLevel(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::LevelControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeStartUpCurrentLevel(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::LevelControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_LevelControl_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::LevelControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -// End of Cluster LevelControl -// Cluster LowPower - -chip::ChipError::StorageType chip_ime_ReadAttribute_LowPower_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::LowPowerCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_LowPower_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::LowPowerCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -// End of Cluster LowPower -// Cluster MediaInput - -chip::ChipError::StorageType chip_ime_ReadAttribute_MediaInput_MediaInputList(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::MediaInputCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .ReadAttributeMediaInputList(gMediaInputMediaInputListListAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_MediaInput_CurrentMediaInput(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::MediaInputCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeCurrentMediaInput(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_MediaInput_CurrentMediaInput(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::MediaInputCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeCurrentMediaInput(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_MediaInput_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::MediaInputCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_MediaInput_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::MediaInputCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -// End of Cluster MediaInput -// Cluster MediaPlayback - -chip::ChipError::StorageType chip_ime_ReadAttribute_MediaPlayback_PlaybackState(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::MediaPlaybackCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributePlaybackState(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_MediaPlayback_PlaybackState(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::MediaPlaybackCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributePlaybackState(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_MediaPlayback_StartTime(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::MediaPlaybackCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeStartTime(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_MediaPlayback_StartTime(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::MediaPlaybackCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeStartTime(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_MediaPlayback_Duration(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::MediaPlaybackCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeDuration(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_MediaPlayback_Duration(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::MediaPlaybackCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeDuration(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_MediaPlayback_PositionUpdatedAt(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::MediaPlaybackCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributePositionUpdatedAt(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_MediaPlayback_PositionUpdatedAt(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::MediaPlaybackCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributePositionUpdatedAt(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_MediaPlayback_Position(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::MediaPlaybackCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributePosition(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_MediaPlayback_Position(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::MediaPlaybackCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributePosition(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_MediaPlayback_PlaybackSpeed(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::MediaPlaybackCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributePlaybackSpeed(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_MediaPlayback_PlaybackSpeed(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::MediaPlaybackCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributePlaybackSpeed(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_MediaPlayback_SeekRangeEnd(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::MediaPlaybackCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeSeekRangeEnd(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_MediaPlayback_SeekRangeEnd(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::MediaPlaybackCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeSeekRangeEnd(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_MediaPlayback_SeekRangeStart(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::MediaPlaybackCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeSeekRangeStart(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_MediaPlayback_SeekRangeStart(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::MediaPlaybackCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeSeekRangeStart(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_MediaPlayback_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::MediaPlaybackCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_MediaPlayback_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::MediaPlaybackCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -// End of Cluster MediaPlayback -// Cluster ModeSelect - -chip::ChipError::StorageType chip_ime_ReadAttribute_ModeSelect_CurrentMode(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ModeSelectCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeCurrentMode(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ModeSelect_CurrentMode(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ModeSelectCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeCurrentMode(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ModeSelect_SupportedModes(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ModeSelectCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .ReadAttributeSupportedModes(gModeSelectSupportedModesListAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -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()); - chip::Controller::ModeSelectCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeOnMode(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ModeSelect_OnMode(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ModeSelectCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeOnMode(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ModeSelect_StartUpMode(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ModeSelectCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeStartUpMode(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ModeSelect_StartUpMode(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ModeSelectCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeStartUpMode(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ModeSelect_Description(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ModeSelectCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeDescription(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ModeSelect_Description(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ModeSelectCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeDescription(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ModeSelect_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ModeSelectCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ModeSelect_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ModeSelectCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -// End of Cluster ModeSelect -// Cluster NetworkCommissioning - -chip::ChipError::StorageType chip_ime_ReadAttribute_NetworkCommissioning_FeatureMap(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::NetworkCommissioningCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeFeatureMap(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_NetworkCommissioning_FeatureMap(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::NetworkCommissioningCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeFeatureMap(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_NetworkCommissioning_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::NetworkCommissioningCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_NetworkCommissioning_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::NetworkCommissioningCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -// End of Cluster NetworkCommissioning -// Cluster OtaSoftwareUpdateProvider - -chip::ChipError::StorageType chip_ime_ReadAttribute_OtaSoftwareUpdateProvider_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::OtaSoftwareUpdateProviderCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_OtaSoftwareUpdateProvider_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::OtaSoftwareUpdateProviderCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -// End of Cluster OtaSoftwareUpdateProvider -// Cluster OtaSoftwareUpdateRequestor - -chip::ChipError::StorageType chip_ime_ReadAttribute_OtaSoftwareUpdateRequestor_DefaultOtaProvider(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::OtaSoftwareUpdateRequestorCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeDefaultOtaProvider(gOctetStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_OtaSoftwareUpdateRequestor_DefaultOtaProvider( - chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::OtaSoftwareUpdateRequestorCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeDefaultOtaProvider(gOctetStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_OtaSoftwareUpdateRequestor_UpdatePossible(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::OtaSoftwareUpdateRequestorCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeUpdatePossible(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_OtaSoftwareUpdateRequestor_UpdatePossible(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::OtaSoftwareUpdateRequestorCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeUpdatePossible(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_OtaSoftwareUpdateRequestor_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::OtaSoftwareUpdateRequestorCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_OtaSoftwareUpdateRequestor_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::OtaSoftwareUpdateRequestorCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -// End of Cluster OtaSoftwareUpdateRequestor -// Cluster OccupancySensing - -chip::ChipError::StorageType chip_ime_ReadAttribute_OccupancySensing_Occupancy(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::OccupancySensingCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeOccupancy(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_OccupancySensing_Occupancy(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::OccupancySensingCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeOccupancy(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_OccupancySensing_OccupancySensorType(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::OccupancySensingCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeOccupancySensorType(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_OccupancySensing_OccupancySensorType(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::OccupancySensingCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeOccupancySensorType(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_OccupancySensing_OccupancySensorTypeBitmap(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::OccupancySensingCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeOccupancySensorTypeBitmap(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_OccupancySensing_OccupancySensorTypeBitmap(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::OccupancySensingCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeOccupancySensorTypeBitmap(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), - minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_OccupancySensing_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::OccupancySensingCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_OccupancySensing_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::OccupancySensingCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -// End of Cluster OccupancySensing -// Cluster OnOff - -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()); - chip::Controller::OnOffCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeOnOff(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -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; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeOnOff(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_OnOff_GlobalSceneControl(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::OnOffCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeGlobalSceneControl(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_OnOff_GlobalSceneControl(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::OnOffCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeGlobalSceneControl(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -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()); - chip::Controller::OnOffCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeOnTime(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_OnOff_OnTime(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::OnOffCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeOnTime(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -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()); - chip::Controller::OnOffCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeOffWaitTime(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_OnOff_OffWaitTime(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::OnOffCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeOffWaitTime(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -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()); - chip::Controller::OnOffCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeStartUpOnOff(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_OnOff_StartUpOnOff(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::OnOffCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeStartUpOnOff(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -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; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeFeatureMap(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_OnOff_FeatureMap(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::OnOffCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeFeatureMap(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_OnOff_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::OnOffCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_OnOff_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::OnOffCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -// End of Cluster OnOff -// Cluster OnOffSwitchConfiguration - -chip::ChipError::StorageType chip_ime_ReadAttribute_OnOffSwitchConfiguration_SwitchType(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::OnOffSwitchConfigurationCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeSwitchType(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_OnOffSwitchConfiguration_SwitchType(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::OnOffSwitchConfigurationCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeSwitchType(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_OnOffSwitchConfiguration_SwitchActions(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::OnOffSwitchConfigurationCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeSwitchActions(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_OnOffSwitchConfiguration_SwitchActions(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::OnOffSwitchConfigurationCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeSwitchActions(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_OnOffSwitchConfiguration_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::OnOffSwitchConfigurationCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_OnOffSwitchConfiguration_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::OnOffSwitchConfigurationCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -// End of Cluster OnOffSwitchConfiguration -// Cluster OperationalCredentials - -chip::ChipError::StorageType chip_ime_ReadAttribute_OperationalCredentials_FabricsList(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::OperationalCredentialsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .ReadAttributeFabricsList(gOperationalCredentialsFabricsListListAttributeCallback.Cancel(), - gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_OperationalCredentials_SupportedFabrics(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::OperationalCredentialsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeSupportedFabrics(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_OperationalCredentials_SupportedFabrics(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::OperationalCredentialsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeSupportedFabrics(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_OperationalCredentials_CommissionedFabrics(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::OperationalCredentialsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeCommissionedFabrics(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_OperationalCredentials_CommissionedFabrics(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::OperationalCredentialsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeCommissionedFabrics(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -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; - cluster.Associate(device, ZCLendpointId); - return cluster - .ReadAttributeTrustedRootCertificates(gOperationalCredentialsTrustedRootCertificatesListAttributeCallback.Cancel(), - gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_OperationalCredentials_CurrentFabricIndex(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::OperationalCredentialsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeCurrentFabricIndex(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_OperationalCredentials_CurrentFabricIndex(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::OperationalCredentialsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeCurrentFabricIndex(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_OperationalCredentials_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::OperationalCredentialsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_OperationalCredentials_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::OperationalCredentialsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -// End of Cluster OperationalCredentials -// Cluster PowerSource - -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()); - chip::Controller::PowerSourceCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeStatus(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_PowerSource_Status(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::PowerSourceCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeStatus(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -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()); - chip::Controller::PowerSourceCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeOrder(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_PowerSource_Order(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::PowerSourceCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeOrder(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_PowerSource_Description(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::PowerSourceCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeDescription(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_PowerSource_Description(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::PowerSourceCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeDescription(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_PowerSource_BatteryVoltage(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::PowerSourceCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeBatteryVoltage(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_PowerSource_BatteryVoltage(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::PowerSourceCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeBatteryVoltage(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_PowerSource_BatteryPercentRemaining(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::PowerSourceCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeBatteryPercentRemaining(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_PowerSource_BatteryPercentRemaining(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::PowerSourceCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeBatteryPercentRemaining(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_PowerSource_BatteryTimeRemaining(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::PowerSourceCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeBatteryTimeRemaining(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_PowerSource_BatteryTimeRemaining(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::PowerSourceCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeBatteryTimeRemaining(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_PowerSource_BatteryChargeLevel(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::PowerSourceCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeBatteryChargeLevel(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_PowerSource_BatteryChargeLevel(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::PowerSourceCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeBatteryChargeLevel(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_PowerSource_ActiveBatteryFaults(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::PowerSourceCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .ReadAttributeActiveBatteryFaults(gPowerSourceActiveBatteryFaultsListAttributeCallback.Cancel(), - gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_PowerSource_BatteryChargeState(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::PowerSourceCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeBatteryChargeState(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_PowerSource_BatteryChargeState(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::PowerSourceCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeBatteryChargeState(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_PowerSource_FeatureMap(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::PowerSourceCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeFeatureMap(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_PowerSource_FeatureMap(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::PowerSourceCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeFeatureMap(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_PowerSource_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::PowerSourceCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_PowerSource_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::PowerSourceCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -// End of Cluster PowerSource -// Cluster PressureMeasurement - -chip::ChipError::StorageType chip_ime_ReadAttribute_PressureMeasurement_MeasuredValue(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::PressureMeasurementCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeMeasuredValue(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_PressureMeasurement_MeasuredValue(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::PressureMeasurementCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeMeasuredValue(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_PressureMeasurement_MinMeasuredValue(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::PressureMeasurementCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeMinMeasuredValue(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_PressureMeasurement_MinMeasuredValue(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::PressureMeasurementCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeMinMeasuredValue(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_PressureMeasurement_MaxMeasuredValue(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::PressureMeasurementCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeMaxMeasuredValue(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_PressureMeasurement_MaxMeasuredValue(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::PressureMeasurementCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeMaxMeasuredValue(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_PressureMeasurement_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::PressureMeasurementCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_PressureMeasurement_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::PressureMeasurementCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -// End of Cluster PressureMeasurement -// Cluster PumpConfigurationAndControl - -chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_MaxPressure(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::PumpConfigurationAndControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeMaxPressure(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_PumpConfigurationAndControl_MaxPressure(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::PumpConfigurationAndControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeMaxPressure(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_MaxSpeed(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::PumpConfigurationAndControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeMaxSpeed(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_PumpConfigurationAndControl_MaxSpeed(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::PumpConfigurationAndControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeMaxSpeed(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_MaxFlow(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::PumpConfigurationAndControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeMaxFlow(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_PumpConfigurationAndControl_MaxFlow(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::PumpConfigurationAndControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeMaxFlow(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_MinConstPressure(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::PumpConfigurationAndControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeMinConstPressure(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType -chip_ime_SubscribeAttribute_PumpConfigurationAndControl_MinConstPressure(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::PumpConfigurationAndControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeMinConstPressure(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_MaxConstPressure(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::PumpConfigurationAndControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeMaxConstPressure(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType -chip_ime_SubscribeAttribute_PumpConfigurationAndControl_MaxConstPressure(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::PumpConfigurationAndControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeMaxConstPressure(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_MinCompPressure(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::PumpConfigurationAndControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeMinCompPressure(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_PumpConfigurationAndControl_MinCompPressure(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::PumpConfigurationAndControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeMinCompPressure(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_MaxCompPressure(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::PumpConfigurationAndControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeMaxCompPressure(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_PumpConfigurationAndControl_MaxCompPressure(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::PumpConfigurationAndControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeMaxCompPressure(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_MinConstSpeed(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::PumpConfigurationAndControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeMinConstSpeed(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_PumpConfigurationAndControl_MinConstSpeed(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::PumpConfigurationAndControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeMinConstSpeed(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_MaxConstSpeed(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::PumpConfigurationAndControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeMaxConstSpeed(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_PumpConfigurationAndControl_MaxConstSpeed(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::PumpConfigurationAndControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeMaxConstSpeed(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_MinConstFlow(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::PumpConfigurationAndControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeMinConstFlow(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_PumpConfigurationAndControl_MinConstFlow(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::PumpConfigurationAndControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeMinConstFlow(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_MaxConstFlow(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::PumpConfigurationAndControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeMaxConstFlow(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_PumpConfigurationAndControl_MaxConstFlow(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::PumpConfigurationAndControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeMaxConstFlow(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_MinConstTemp(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::PumpConfigurationAndControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeMinConstTemp(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_PumpConfigurationAndControl_MinConstTemp(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::PumpConfigurationAndControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeMinConstTemp(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_MaxConstTemp(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::PumpConfigurationAndControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeMaxConstTemp(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_PumpConfigurationAndControl_MaxConstTemp(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::PumpConfigurationAndControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeMaxConstTemp(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_PumpStatus(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::PumpConfigurationAndControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributePumpStatus(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_PumpConfigurationAndControl_PumpStatus(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::PumpConfigurationAndControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributePumpStatus(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_EffectiveOperationMode( - chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::PumpConfigurationAndControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeEffectiveOperationMode(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_PumpConfigurationAndControl_EffectiveOperationMode( - chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::PumpConfigurationAndControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeEffectiveOperationMode(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -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; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeEffectiveControlMode(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_PumpConfigurationAndControl_EffectiveControlMode( - chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::PumpConfigurationAndControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeEffectiveControlMode(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_Capacity(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::PumpConfigurationAndControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeCapacity(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_PumpConfigurationAndControl_Capacity(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::PumpConfigurationAndControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeCapacity(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_Speed(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::PumpConfigurationAndControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeSpeed(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_PumpConfigurationAndControl_Speed(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::PumpConfigurationAndControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeSpeed(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_LifetimeRunningHours(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::PumpConfigurationAndControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeLifetimeRunningHours(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_PumpConfigurationAndControl_LifetimeRunningHours( - chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::PumpConfigurationAndControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeLifetimeRunningHours(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_Power(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::PumpConfigurationAndControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributePower(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_PumpConfigurationAndControl_Power(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::PumpConfigurationAndControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributePower(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_LifetimeEnergyConsumed( - chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::PumpConfigurationAndControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeLifetimeEnergyConsumed(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_PumpConfigurationAndControl_LifetimeEnergyConsumed( - chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::PumpConfigurationAndControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeLifetimeEnergyConsumed(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_OperationMode(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::PumpConfigurationAndControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeOperationMode(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_PumpConfigurationAndControl_OperationMode(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::PumpConfigurationAndControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeOperationMode(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_ControlMode(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::PumpConfigurationAndControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeControlMode(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_PumpConfigurationAndControl_ControlMode(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::PumpConfigurationAndControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeControlMode(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_AlarmMask(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::PumpConfigurationAndControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeAlarmMask(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_PumpConfigurationAndControl_AlarmMask(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::PumpConfigurationAndControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeAlarmMask(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_FeatureMap(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::PumpConfigurationAndControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeFeatureMap(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_PumpConfigurationAndControl_FeatureMap(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::PumpConfigurationAndControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeFeatureMap(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::PumpConfigurationAndControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_PumpConfigurationAndControl_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::PumpConfigurationAndControlCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -// End of Cluster PumpConfigurationAndControl -// Cluster RelativeHumidityMeasurement - -chip::ChipError::StorageType chip_ime_ReadAttribute_RelativeHumidityMeasurement_MeasuredValue(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::RelativeHumidityMeasurementCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeMeasuredValue(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -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; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeMeasuredValue(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_RelativeHumidityMeasurement_MinMeasuredValue(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::RelativeHumidityMeasurementCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeMinMeasuredValue(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType -chip_ime_SubscribeAttribute_RelativeHumidityMeasurement_MinMeasuredValue(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::RelativeHumidityMeasurementCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeMinMeasuredValue(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_RelativeHumidityMeasurement_MaxMeasuredValue(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::RelativeHumidityMeasurementCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeMaxMeasuredValue(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType -chip_ime_SubscribeAttribute_RelativeHumidityMeasurement_MaxMeasuredValue(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::RelativeHumidityMeasurementCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeMaxMeasuredValue(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_RelativeHumidityMeasurement_Tolerance(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::RelativeHumidityMeasurementCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeTolerance(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_RelativeHumidityMeasurement_Tolerance(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::RelativeHumidityMeasurementCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeTolerance(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_RelativeHumidityMeasurement_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::RelativeHumidityMeasurementCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_RelativeHumidityMeasurement_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::RelativeHumidityMeasurementCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -// End of Cluster RelativeHumidityMeasurement -// Cluster Scenes - -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()); - chip::Controller::ScenesCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeSceneCount(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_Scenes_SceneCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ScenesCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeSceneCount(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -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()); - chip::Controller::ScenesCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeCurrentScene(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_Scenes_CurrentScene(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ScenesCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeCurrentScene(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -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()); - chip::Controller::ScenesCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeCurrentGroup(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_Scenes_CurrentGroup(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ScenesCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeCurrentGroup(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -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()); - chip::Controller::ScenesCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeSceneValid(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_Scenes_SceneValid(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ScenesCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeSceneValid(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -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()); - chip::Controller::ScenesCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeNameSupport(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_Scenes_NameSupport(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ScenesCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeNameSupport(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_Scenes_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ScenesCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_Scenes_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ScenesCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -// End of Cluster Scenes -// Cluster SoftwareDiagnostics - -chip::ChipError::StorageType chip_ime_ReadAttribute_SoftwareDiagnostics_ThreadMetrics(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::SoftwareDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .ReadAttributeThreadMetrics(gSoftwareDiagnosticsThreadMetricsListAttributeCallback.Cancel(), - gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_SoftwareDiagnostics_CurrentHeapFree(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::SoftwareDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeCurrentHeapFree(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_SoftwareDiagnostics_CurrentHeapFree(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::SoftwareDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeCurrentHeapFree(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_SoftwareDiagnostics_CurrentHeapUsed(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::SoftwareDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeCurrentHeapUsed(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_SoftwareDiagnostics_CurrentHeapUsed(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::SoftwareDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeCurrentHeapUsed(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_SoftwareDiagnostics_CurrentHeapHighWatermark(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::SoftwareDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeCurrentHeapHighWatermark(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType -chip_ime_SubscribeAttribute_SoftwareDiagnostics_CurrentHeapHighWatermark(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::SoftwareDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeCurrentHeapHighWatermark(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), - minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_SoftwareDiagnostics_FeatureMap(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::SoftwareDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeFeatureMap(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_SoftwareDiagnostics_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::SoftwareDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_SoftwareDiagnostics_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::SoftwareDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -// End of Cluster SoftwareDiagnostics -// Cluster Switch - -chip::ChipError::StorageType chip_ime_ReadAttribute_Switch_NumberOfPositions(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::SwitchCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeNumberOfPositions(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_Switch_NumberOfPositions(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::SwitchCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeNumberOfPositions(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_Switch_CurrentPosition(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::SwitchCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeCurrentPosition(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_Switch_CurrentPosition(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::SwitchCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeCurrentPosition(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -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()); - chip::Controller::SwitchCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeMultiPressMax(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_Switch_MultiPressMax(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::SwitchCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeMultiPressMax(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -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()); - chip::Controller::SwitchCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeFeatureMap(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_Switch_FeatureMap(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::SwitchCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeFeatureMap(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_Switch_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::SwitchCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_Switch_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::SwitchCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -// End of Cluster Switch -// Cluster TvChannel - -chip::ChipError::StorageType chip_ime_ReadAttribute_TvChannel_TvChannelList(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TvChannelCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .ReadAttributeTvChannelList(gTvChannelTvChannelListListAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_TvChannel_TvChannelLineup(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TvChannelCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeTvChannelLineup(gOctetStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_TvChannel_TvChannelLineup(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TvChannelCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeTvChannelLineup(gOctetStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_TvChannel_CurrentTvChannel(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TvChannelCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeCurrentTvChannel(gOctetStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_TvChannel_CurrentTvChannel(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TvChannelCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeCurrentTvChannel(gOctetStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_TvChannel_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TvChannelCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_TvChannel_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TvChannelCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -// End of Cluster TvChannel -// Cluster TargetNavigator - -chip::ChipError::StorageType chip_ime_ReadAttribute_TargetNavigator_TargetNavigatorList(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TargetNavigatorCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .ReadAttributeTargetNavigatorList(gTargetNavigatorTargetNavigatorListListAttributeCallback.Cancel(), - gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_TargetNavigator_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TargetNavigatorCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_TargetNavigator_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TargetNavigatorCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -// End of Cluster TargetNavigator -// Cluster TemperatureMeasurement - -chip::ChipError::StorageType chip_ime_ReadAttribute_TemperatureMeasurement_MeasuredValue(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TemperatureMeasurementCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeMeasuredValue(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_TemperatureMeasurement_MeasuredValue(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TemperatureMeasurementCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeMeasuredValue(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_TemperatureMeasurement_MinMeasuredValue(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TemperatureMeasurementCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeMinMeasuredValue(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_TemperatureMeasurement_MinMeasuredValue(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TemperatureMeasurementCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeMinMeasuredValue(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_TemperatureMeasurement_MaxMeasuredValue(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TemperatureMeasurementCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeMaxMeasuredValue(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_TemperatureMeasurement_MaxMeasuredValue(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TemperatureMeasurementCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeMaxMeasuredValue(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_TemperatureMeasurement_Tolerance(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TemperatureMeasurementCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeTolerance(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_TemperatureMeasurement_Tolerance(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TemperatureMeasurementCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeTolerance(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_TemperatureMeasurement_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TemperatureMeasurementCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_TemperatureMeasurement_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TemperatureMeasurementCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -// End of Cluster TemperatureMeasurement -// Cluster TestCluster - -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()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeBoolean(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_Boolean(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeBoolean(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -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()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeBitmap8(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_Bitmap8(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeBitmap8(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -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()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeBitmap16(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_Bitmap16(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeBitmap16(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -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()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeBitmap32(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_Bitmap32(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeBitmap32(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -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()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeBitmap64(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_Bitmap64(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeBitmap64(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -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()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeInt8u(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_Int8u(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeInt8u(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -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()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeInt16u(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_Int16u(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeInt16u(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -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()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeInt32u(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_Int32u(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeInt32u(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -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()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeInt64u(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_Int64u(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeInt64u(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -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()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeInt8s(gInt8sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_Int8s(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeInt8s(gInt8sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -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()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeInt16s(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_Int16s(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeInt16s(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -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()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeInt32s(gInt32sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_Int32s(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeInt32s(gInt32sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -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()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeInt64s(gInt64sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_Int64s(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeInt64s(gInt64sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -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()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeEnum8(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_Enum8(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeEnum8(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -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()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeEnum16(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_Enum16(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeEnum16(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_OctetString(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeOctetString(gOctetStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_OctetString(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeOctetString(gOctetStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_ListInt8u(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeListInt8u(gTestClusterListInt8uListAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_ListOctetString(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .ReadAttributeListOctetString(gTestClusterListOctetStringListAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_ListStructOctetString(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .ReadAttributeListStructOctetString(gTestClusterListStructOctetStringListAttributeCallback.Cancel(), - gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_LongOctetString(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeLongOctetString(gOctetStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_LongOctetString(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeLongOctetString(gOctetStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_CharString(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeCharString(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_CharString(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeCharString(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_LongCharString(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeLongCharString(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_LongCharString(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeLongCharString(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -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()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeEpochUs(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_EpochUs(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeEpochUs(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -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()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeEpochS(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_EpochS(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeEpochS(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -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()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeVendorId(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_VendorId(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeVendorId(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_ListNullablesAndOptionalsStruct(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .ReadAttributeListNullablesAndOptionalsStruct(gTestClusterListNullablesAndOptionalsStructListAttributeCallback.Cancel(), - gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Unsupported(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeUnsupported(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_Unsupported(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeUnsupported(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_NullableBoolean(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeNullableBoolean(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_NullableBoolean(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeNullableBoolean(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_NullableBitmap8(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeNullableBitmap8(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_NullableBitmap8(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeNullableBitmap8(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_NullableBitmap16(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeNullableBitmap16(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_NullableBitmap16(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeNullableBitmap16(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_NullableBitmap32(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeNullableBitmap32(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_NullableBitmap32(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeNullableBitmap32(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_NullableBitmap64(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeNullableBitmap64(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_NullableBitmap64(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeNullableBitmap64(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_NullableInt8u(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeNullableInt8u(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_NullableInt8u(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeNullableInt8u(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_NullableInt16u(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeNullableInt16u(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_NullableInt16u(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeNullableInt16u(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_NullableInt32u(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeNullableInt32u(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_NullableInt32u(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeNullableInt32u(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_NullableInt64u(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeNullableInt64u(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_NullableInt64u(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeNullableInt64u(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_NullableInt8s(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeNullableInt8s(gInt8sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_NullableInt8s(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeNullableInt8s(gInt8sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_NullableInt16s(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeNullableInt16s(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_NullableInt16s(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeNullableInt16s(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_NullableInt32s(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeNullableInt32s(gInt32sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_NullableInt32s(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeNullableInt32s(gInt32sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_NullableInt64s(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeNullableInt64s(gInt64sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_NullableInt64s(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeNullableInt64s(gInt64sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_NullableEnum8(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeNullableEnum8(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_NullableEnum8(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeNullableEnum8(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_NullableEnum16(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeNullableEnum16(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_NullableEnum16(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeNullableEnum16(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_NullableOctetString(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeNullableOctetString(gOctetStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_NullableOctetString(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeNullableOctetString(gOctetStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), - minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_NullableCharString(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeNullableCharString(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_NullableCharString(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeNullableCharString(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_TestCluster_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -// End of Cluster TestCluster -// Cluster Thermostat - -chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_LocalTemperature(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThermostatCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeLocalTemperature(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_Thermostat_LocalTemperature(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThermostatCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeLocalTemperature(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_AbsMinHeatSetpointLimit(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThermostatCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeAbsMinHeatSetpointLimit(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_Thermostat_AbsMinHeatSetpointLimit(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThermostatCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeAbsMinHeatSetpointLimit(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_AbsMaxHeatSetpointLimit(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThermostatCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeAbsMaxHeatSetpointLimit(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_Thermostat_AbsMaxHeatSetpointLimit(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThermostatCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeAbsMaxHeatSetpointLimit(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_AbsMinCoolSetpointLimit(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThermostatCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeAbsMinCoolSetpointLimit(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_Thermostat_AbsMinCoolSetpointLimit(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThermostatCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeAbsMinCoolSetpointLimit(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_AbsMaxCoolSetpointLimit(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThermostatCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeAbsMaxCoolSetpointLimit(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_Thermostat_AbsMaxCoolSetpointLimit(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThermostatCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeAbsMaxCoolSetpointLimit(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_OccupiedCoolingSetpoint(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThermostatCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeOccupiedCoolingSetpoint(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_Thermostat_OccupiedCoolingSetpoint(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThermostatCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeOccupiedCoolingSetpoint(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_OccupiedHeatingSetpoint(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThermostatCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeOccupiedHeatingSetpoint(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_Thermostat_OccupiedHeatingSetpoint(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThermostatCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeOccupiedHeatingSetpoint(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_MinHeatSetpointLimit(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThermostatCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeMinHeatSetpointLimit(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_Thermostat_MinHeatSetpointLimit(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThermostatCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeMinHeatSetpointLimit(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_MaxHeatSetpointLimit(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThermostatCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeMaxHeatSetpointLimit(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_Thermostat_MaxHeatSetpointLimit(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThermostatCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeMaxHeatSetpointLimit(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_MinCoolSetpointLimit(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThermostatCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeMinCoolSetpointLimit(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_Thermostat_MinCoolSetpointLimit(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThermostatCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeMinCoolSetpointLimit(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_MaxCoolSetpointLimit(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThermostatCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeMaxCoolSetpointLimit(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_Thermostat_MaxCoolSetpointLimit(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThermostatCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeMaxCoolSetpointLimit(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_MinSetpointDeadBand(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThermostatCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeMinSetpointDeadBand(gInt8sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_Thermostat_MinSetpointDeadBand(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThermostatCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeMinSetpointDeadBand(gInt8sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_ControlSequenceOfOperation(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThermostatCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeControlSequenceOfOperation(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_Thermostat_ControlSequenceOfOperation(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThermostatCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeControlSequenceOfOperation(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), - minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_SystemMode(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThermostatCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeSystemMode(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_Thermostat_SystemMode(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThermostatCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeSystemMode(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_StartOfWeek(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThermostatCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeStartOfWeek(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_Thermostat_StartOfWeek(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThermostatCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeStartOfWeek(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_NumberOfWeeklyTransitions(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThermostatCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeNumberOfWeeklyTransitions(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_Thermostat_NumberOfWeeklyTransitions(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThermostatCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeNumberOfWeeklyTransitions(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), - minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_NumberOfDailyTransitions(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThermostatCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeNumberOfDailyTransitions(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_Thermostat_NumberOfDailyTransitions(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThermostatCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeNumberOfDailyTransitions(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_FeatureMap(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThermostatCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeFeatureMap(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_Thermostat_FeatureMap(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThermostatCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeFeatureMap(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThermostatCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_Thermostat_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThermostatCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -// End of Cluster Thermostat -// Cluster ThermostatUserInterfaceConfiguration - -chip::ChipError::StorageType chip_ime_ReadAttribute_ThermostatUserInterfaceConfiguration_TemperatureDisplayMode( - chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThermostatUserInterfaceConfigurationCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeTemperatureDisplayMode(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThermostatUserInterfaceConfiguration_TemperatureDisplayMode( - chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThermostatUserInterfaceConfigurationCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeTemperatureDisplayMode(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ThermostatUserInterfaceConfiguration_KeypadLockout( - chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThermostatUserInterfaceConfigurationCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeKeypadLockout(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThermostatUserInterfaceConfiguration_KeypadLockout( - chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThermostatUserInterfaceConfigurationCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeKeypadLockout(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ThermostatUserInterfaceConfiguration_ScheduleProgrammingVisibility( - chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThermostatUserInterfaceConfigurationCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeScheduleProgrammingVisibility(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThermostatUserInterfaceConfiguration_ScheduleProgrammingVisibility( - chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThermostatUserInterfaceConfigurationCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeScheduleProgrammingVisibility(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), - minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ThermostatUserInterfaceConfiguration_ClusterRevision( - chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThermostatUserInterfaceConfigurationCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThermostatUserInterfaceConfiguration_ClusterRevision( - chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThermostatUserInterfaceConfigurationCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -// End of Cluster ThermostatUserInterfaceConfiguration -// Cluster ThreadNetworkDiagnostics - -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_Channel(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeChannel(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_Channel(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeChannel(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RoutingRole(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeRoutingRole(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RoutingRole(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeRoutingRole(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_NetworkName(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeNetworkName(gOctetStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_NetworkName(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeNetworkName(gOctetStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_PanId(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributePanId(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_PanId(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributePanId(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_ExtendedPanId(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeExtendedPanId(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_ExtendedPanId(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeExtendedPanId(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_MeshLocalPrefix(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeMeshLocalPrefix(gOctetStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_MeshLocalPrefix(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeMeshLocalPrefix(gOctetStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_OverrunCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeOverrunCount(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_OverrunCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeOverrunCount(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_NeighborTableList(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .ReadAttributeNeighborTableList(gThreadNetworkDiagnosticsNeighborTableListListAttributeCallback.Cancel(), - gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RouteTableList(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .ReadAttributeRouteTableList(gThreadNetworkDiagnosticsRouteTableListListAttributeCallback.Cancel(), - gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_PartitionId(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributePartitionId(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_PartitionId(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributePartitionId(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_Weighting(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeWeighting(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_Weighting(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeWeighting(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_DataVersion(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeDataVersion(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_DataVersion(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeDataVersion(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_StableDataVersion(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeStableDataVersion(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_StableDataVersion(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeStableDataVersion(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_LeaderRouterId(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeLeaderRouterId(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_LeaderRouterId(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeLeaderRouterId(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_DetachedRoleCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeDetachedRoleCount(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_DetachedRoleCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeDetachedRoleCount(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_ChildRoleCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeChildRoleCount(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_ChildRoleCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeChildRoleCount(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RouterRoleCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeRouterRoleCount(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RouterRoleCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeRouterRoleCount(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_LeaderRoleCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeLeaderRoleCount(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_LeaderRoleCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeLeaderRoleCount(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_AttachAttemptCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeAttachAttemptCount(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_AttachAttemptCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeAttachAttemptCount(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -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; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributePartitionIdChangeCount(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_PartitionIdChangeCount( - chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributePartitionIdChangeCount(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_BetterPartitionAttachAttemptCount( - chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .ReadAttributeBetterPartitionAttachAttemptCount(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_BetterPartitionAttachAttemptCount( - chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeBetterPartitionAttachAttemptCount(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), - minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_ParentChangeCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeParentChangeCount(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_ParentChangeCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeParentChangeCount(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxTotalCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeTxTotalCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxTotalCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeTxTotalCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxUnicastCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeTxUnicastCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxUnicastCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeTxUnicastCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxBroadcastCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeTxBroadcastCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxBroadcastCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeTxBroadcastCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxAckRequestedCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeTxAckRequestedCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType -chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxAckRequestedCount(chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeTxAckRequestedCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxAckedCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeTxAckedCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxAckedCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeTxAckedCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -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; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeTxNoAckRequestedCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxNoAckRequestedCount( - chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeTxNoAckRequestedCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxDataCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeTxDataCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxDataCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeTxDataCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxDataPollCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeTxDataPollCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxDataPollCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeTxDataPollCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxBeaconCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeTxBeaconCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxBeaconCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeTxBeaconCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxBeaconRequestCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeTxBeaconRequestCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxBeaconRequestCount( - chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeTxBeaconRequestCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxOtherCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeTxOtherCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxOtherCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeTxOtherCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxRetryCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeTxRetryCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxRetryCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeTxRetryCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxDirectMaxRetryExpiryCount( - chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeTxDirectMaxRetryExpiryCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxDirectMaxRetryExpiryCount( - chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeTxDirectMaxRetryExpiryCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), - minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxIndirectMaxRetryExpiryCount( - chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeTxIndirectMaxRetryExpiryCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxIndirectMaxRetryExpiryCount( - chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeTxIndirectMaxRetryExpiryCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), - minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxErrCcaCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeTxErrCcaCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxErrCcaCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeTxErrCcaCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxErrAbortCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeTxErrAbortCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxErrAbortCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeTxErrAbortCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -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; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeTxErrBusyChannelCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxErrBusyChannelCount( - chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeTxErrBusyChannelCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxTotalCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeRxTotalCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxTotalCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeRxTotalCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxUnicastCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeRxUnicastCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxUnicastCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeRxUnicastCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxBroadcastCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeRxBroadcastCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxBroadcastCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeRxBroadcastCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxDataCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeRxDataCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxDataCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeRxDataCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxDataPollCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeRxDataPollCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxDataPollCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeRxDataPollCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxBeaconCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeRxBeaconCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxBeaconCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeRxBeaconCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxBeaconRequestCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeRxBeaconRequestCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxBeaconRequestCount( - chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeRxBeaconRequestCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxOtherCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeRxOtherCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxOtherCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeRxOtherCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -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; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeRxAddressFilteredCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxAddressFilteredCount( - chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeRxAddressFilteredCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -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; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeRxDestAddrFilteredCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxDestAddrFilteredCount( - chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeRxDestAddrFilteredCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxDuplicatedCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeRxDuplicatedCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxDuplicatedCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeRxDuplicatedCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxErrNoFrameCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeRxErrNoFrameCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxErrNoFrameCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeRxErrNoFrameCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxErrUnknownNeighborCount( - chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeRxErrUnknownNeighborCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxErrUnknownNeighborCount( - chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeRxErrUnknownNeighborCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), - minInterval, maxInterval) - .AsInteger(); -} - -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; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeRxErrInvalidSrcAddrCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxErrInvalidSrcAddrCount( - chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeRxErrInvalidSrcAddrCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), - minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxErrSecCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeRxErrSecCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxErrSecCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeRxErrSecCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxErrFcsCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeRxErrFcsCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxErrFcsCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeRxErrFcsCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxErrOtherCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeRxErrOtherCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxErrOtherCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeRxErrOtherCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_ActiveTimestamp(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeActiveTimestamp(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_ActiveTimestamp(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeActiveTimestamp(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_PendingTimestamp(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributePendingTimestamp(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_PendingTimestamp(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributePendingTimestamp(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_Delay(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeDelay(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_Delay(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeDelay(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_SecurityPolicy(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .ReadAttributeSecurityPolicy(gThreadNetworkDiagnosticsSecurityPolicyListAttributeCallback.Cancel(), - gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_ChannelMask(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeChannelMask(gOctetStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_ChannelMask(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeChannelMask(gOctetStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_OperationalDatasetComponents( - chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .ReadAttributeOperationalDatasetComponents( - gThreadNetworkDiagnosticsOperationalDatasetComponentsListAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -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; - cluster.Associate(device, ZCLendpointId); - return cluster - .ReadAttributeActiveNetworkFaultsList(gThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallback.Cancel(), - gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -// End of Cluster ThreadNetworkDiagnostics -// Cluster WakeOnLan - -chip::ChipError::StorageType chip_ime_ReadAttribute_WakeOnLan_WakeOnLanMacAddress(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::WakeOnLanCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeWakeOnLanMacAddress(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_WakeOnLan_WakeOnLanMacAddress(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::WakeOnLanCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeWakeOnLanMacAddress(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_WakeOnLan_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::WakeOnLanCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_WakeOnLan_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::WakeOnLanCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -// End of Cluster WakeOnLan -// Cluster WiFiNetworkDiagnostics - -chip::ChipError::StorageType chip_ime_ReadAttribute_WiFiNetworkDiagnostics_Bssid(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::WiFiNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeBssid(gOctetStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_WiFiNetworkDiagnostics_Bssid(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::WiFiNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeBssid(gOctetStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_WiFiNetworkDiagnostics_SecurityType(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::WiFiNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeSecurityType(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_WiFiNetworkDiagnostics_SecurityType(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::WiFiNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeSecurityType(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_WiFiNetworkDiagnostics_WiFiVersion(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::WiFiNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeWiFiVersion(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_WiFiNetworkDiagnostics_WiFiVersion(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::WiFiNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeWiFiVersion(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_WiFiNetworkDiagnostics_ChannelNumber(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::WiFiNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeChannelNumber(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_WiFiNetworkDiagnostics_ChannelNumber(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::WiFiNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeChannelNumber(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_WiFiNetworkDiagnostics_Rssi(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::WiFiNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeRssi(gInt8sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_WiFiNetworkDiagnostics_Rssi(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::WiFiNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeRssi(gInt8sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_WiFiNetworkDiagnostics_BeaconLostCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::WiFiNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeBeaconLostCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_WiFiNetworkDiagnostics_BeaconLostCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::WiFiNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeBeaconLostCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_WiFiNetworkDiagnostics_BeaconRxCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::WiFiNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeBeaconRxCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_WiFiNetworkDiagnostics_BeaconRxCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::WiFiNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeBeaconRxCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_WiFiNetworkDiagnostics_PacketMulticastRxCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::WiFiNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributePacketMulticastRxCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_WiFiNetworkDiagnostics_PacketMulticastRxCount( - chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::WiFiNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributePacketMulticastRxCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_WiFiNetworkDiagnostics_PacketMulticastTxCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::WiFiNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributePacketMulticastTxCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_WiFiNetworkDiagnostics_PacketMulticastTxCount( - chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::WiFiNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributePacketMulticastTxCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_WiFiNetworkDiagnostics_PacketUnicastRxCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::WiFiNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributePacketUnicastRxCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_WiFiNetworkDiagnostics_PacketUnicastRxCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::WiFiNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributePacketUnicastRxCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_WiFiNetworkDiagnostics_PacketUnicastTxCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::WiFiNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributePacketUnicastTxCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_WiFiNetworkDiagnostics_PacketUnicastTxCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::WiFiNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributePacketUnicastTxCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_WiFiNetworkDiagnostics_CurrentMaxRate(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::WiFiNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeCurrentMaxRate(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_WiFiNetworkDiagnostics_CurrentMaxRate(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::WiFiNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeCurrentMaxRate(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_WiFiNetworkDiagnostics_OverrunCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::WiFiNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeOverrunCount(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_WiFiNetworkDiagnostics_OverrunCount(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::WiFiNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeOverrunCount(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_WiFiNetworkDiagnostics_FeatureMap(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::WiFiNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeFeatureMap(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_WiFiNetworkDiagnostics_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::WiFiNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_WiFiNetworkDiagnostics_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::WiFiNetworkDiagnosticsCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -// End of Cluster WiFiNetworkDiagnostics -// Cluster WindowCovering - -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()); - chip::Controller::WindowCoveringCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeType(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_WindowCovering_Type(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::WindowCoveringCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeType(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_CurrentPositionLift(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::WindowCoveringCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeCurrentPositionLift(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_WindowCovering_CurrentPositionLift(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::WindowCoveringCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeCurrentPositionLift(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_CurrentPositionTilt(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::WindowCoveringCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeCurrentPositionTilt(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_WindowCovering_CurrentPositionTilt(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::WindowCoveringCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeCurrentPositionTilt(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_ConfigStatus(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::WindowCoveringCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeConfigStatus(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_WindowCovering_ConfigStatus(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::WindowCoveringCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeConfigStatus(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_CurrentPositionLiftPercentage(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::WindowCoveringCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeCurrentPositionLiftPercentage(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -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; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeCurrentPositionLiftPercentage(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), - minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_CurrentPositionTiltPercentage(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::WindowCoveringCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeCurrentPositionTiltPercentage(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -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; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeCurrentPositionTiltPercentage(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), - minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_OperationalStatus(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::WindowCoveringCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeOperationalStatus(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_WindowCovering_OperationalStatus(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::WindowCoveringCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeOperationalStatus(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -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; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeTargetPositionLiftPercent100ths(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_WindowCovering_TargetPositionLiftPercent100ths( - chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::WindowCoveringCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeTargetPositionLiftPercent100ths(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), - minInterval, maxInterval) - .AsInteger(); -} - -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; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeTargetPositionTiltPercent100ths(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_WindowCovering_TargetPositionTiltPercent100ths( - chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::WindowCoveringCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeTargetPositionTiltPercent100ths(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), - minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_EndProductType(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::WindowCoveringCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeEndProductType(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_WindowCovering_EndProductType(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::WindowCoveringCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeEndProductType(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -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; - cluster.Associate(device, ZCLendpointId); - return cluster - .ReadAttributeCurrentPositionLiftPercent100ths(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_WindowCovering_CurrentPositionLiftPercent100ths( - chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::WindowCoveringCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeCurrentPositionLiftPercent100ths(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), - minInterval, maxInterval) - .AsInteger(); -} - -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; - cluster.Associate(device, ZCLendpointId); - return cluster - .ReadAttributeCurrentPositionTiltPercent100ths(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_WindowCovering_CurrentPositionTiltPercent100ths( - chip::DeviceProxy * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::WindowCoveringCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeCurrentPositionTiltPercent100ths(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), - minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_InstalledOpenLimitLift(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::WindowCoveringCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeInstalledOpenLimitLift(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_WindowCovering_InstalledOpenLimitLift(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::WindowCoveringCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeInstalledOpenLimitLift(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_InstalledClosedLimitLift(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::WindowCoveringCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeInstalledClosedLimitLift(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_WindowCovering_InstalledClosedLimitLift(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::WindowCoveringCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeInstalledClosedLimitLift(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), - minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_InstalledOpenLimitTilt(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::WindowCoveringCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeInstalledOpenLimitTilt(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_WindowCovering_InstalledOpenLimitTilt(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::WindowCoveringCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeInstalledOpenLimitTilt(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_InstalledClosedLimitTilt(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::WindowCoveringCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeInstalledClosedLimitTilt(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_WindowCovering_InstalledClosedLimitTilt(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::WindowCoveringCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeInstalledClosedLimitTilt(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), - minInterval, maxInterval) - .AsInteger(); -} - -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()); - chip::Controller::WindowCoveringCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeMode(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_WindowCovering_Mode(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, uint16_t minInterval, - uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::WindowCoveringCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeMode(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_SafetyStatus(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::WindowCoveringCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeSafetyStatus(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_WindowCovering_SafetyStatus(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::WindowCoveringCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeSafetyStatus(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_FeatureMap(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::WindowCoveringCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeFeatureMap(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_WindowCovering_FeatureMap(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::WindowCoveringCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeFeatureMap(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) - .AsInteger(); -} - -chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - chip::GroupId /* ZCLgroupId */) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::WindowCoveringCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -} - -chip::ChipError::StorageType chip_ime_SubscribeAttribute_WindowCovering_ClusterRevision(chip::DeviceProxy * device, - chip::EndpointId ZCLendpointId, - uint16_t minInterval, uint16_t maxInterval) -{ - VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); - chip::Controller::WindowCoveringCluster cluster; - cluster.Associate(device, ZCLendpointId); - return cluster - .SubscribeAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, - maxInterval) - .AsInteger(); -} - -// End of Cluster WindowCovering -} diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index 58d8998e25cb5a..fc1e66f46b50c8 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -5102,6754 +5102,7 @@ def ListClusterAttributes(self): attribute["attributeName"]: attribute for attribute in clusterInfo["attributes"].values() } for clusterName, clusterInfo in ChipClusters._CLUSTER_NAME_DICT.items()} - def SendCommand(self, device: ctypes.c_void_p, cluster: str, command: str, endpoint: int, groupid: int, args, imEnabled): - func = getattr(self, "Cluster{}_Command{}".format( - cluster, command), None) - if not func: - raise UnknownCommand(cluster, command) - funcCaller = self._ChipStack.Call if imEnabled else self._ChipStack.CallAsync - res = funcCaller(lambda: func(device, endpoint, groupid, **args)) - if res != 0: - raise self._ChipStack.ErrorToException(res) - - def ReadAttribute(self, device: ctypes.c_void_p, cluster: str, attribute: str, endpoint: int, groupid: int, imEnabled): - func = getattr(self, "Cluster{}_ReadAttribute{}".format( - cluster, attribute), None) - if not func: - raise UnknownAttribute(cluster, attribute) - funcCaller = self._ChipStack.Call if imEnabled else self._ChipStack.CallAsync - res = funcCaller(lambda: func(device, endpoint, groupid)) - if res != 0: - raise self._ChipStack.ErrorToException(res) - - def SubscribeAttribute(self, device: ctypes.c_void_p, cluster: str, attribute: str, endpoint: int, minInterval: int, maxInterval: int, imEnabled): - func = getattr(self, "Cluster{}_SubscribeAttribute{}".format( - cluster, attribute), None) - if not func: - raise UnknownAttribute(cluster, attribute) - funcCaller = self._ChipStack.Call if imEnabled else self._ChipStack.CallAsync - funcCaller(lambda: func(device, endpoint, minInterval, maxInterval)) - - def WriteAttribute(self, device: ctypes.c_void_p, cluster: str, attribute: str, endpoint: int, groupid: int, value, imEnabled): - func = getattr(self, "Cluster{}_WriteAttribute{}".format( - cluster, attribute), None) - if not func: - raise UnknownAttribute(cluster, attribute) - funcCaller = self._ChipStack.Call if imEnabled else self._ChipStack.CallAsync - res = funcCaller(lambda: func(device, endpoint, groupid, value)) - if res != 0: - raise self._ChipStack.ErrorToException(res) - - # Cluster attributes - - def ClusterAccountLogin_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_AccountLogin_ClusterRevision(device, ZCLendpoint, ZCLgroupid) - - def ClusterAccountLogin_SubscribeAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_AccountLogin_ClusterRevision(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterAdministratorCommissioning_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_AdministratorCommissioning_ClusterRevision(device, ZCLendpoint, ZCLgroupid) - - def ClusterAdministratorCommissioning_SubscribeAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_AdministratorCommissioning_ClusterRevision(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterApplicationBasic_ReadAttributeVendorName(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ApplicationBasic_VendorName(device, ZCLendpoint, ZCLgroupid) - - def ClusterApplicationBasic_SubscribeAttributeVendorName(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ApplicationBasic_VendorName(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterApplicationBasic_ReadAttributeVendorId(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ApplicationBasic_VendorId(device, ZCLendpoint, ZCLgroupid) - - def ClusterApplicationBasic_SubscribeAttributeVendorId(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ApplicationBasic_VendorId(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterApplicationBasic_ReadAttributeApplicationName(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ApplicationBasic_ApplicationName(device, ZCLendpoint, ZCLgroupid) - - def ClusterApplicationBasic_SubscribeAttributeApplicationName(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ApplicationBasic_ApplicationName(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterApplicationBasic_ReadAttributeProductId(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ApplicationBasic_ProductId(device, ZCLendpoint, ZCLgroupid) - - def ClusterApplicationBasic_SubscribeAttributeProductId(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ApplicationBasic_ProductId(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterApplicationBasic_ReadAttributeApplicationId(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ApplicationBasic_ApplicationId(device, ZCLendpoint, ZCLgroupid) - - def ClusterApplicationBasic_SubscribeAttributeApplicationId(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ApplicationBasic_ApplicationId(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterApplicationBasic_ReadAttributeCatalogVendorId(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ApplicationBasic_CatalogVendorId(device, ZCLendpoint, ZCLgroupid) - - def ClusterApplicationBasic_SubscribeAttributeCatalogVendorId(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ApplicationBasic_CatalogVendorId(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterApplicationBasic_ReadAttributeApplicationStatus(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ApplicationBasic_ApplicationStatus(device, ZCLendpoint, ZCLgroupid) - - def ClusterApplicationBasic_SubscribeAttributeApplicationStatus(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ApplicationBasic_ApplicationStatus(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterApplicationBasic_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ApplicationBasic_ClusterRevision(device, ZCLendpoint, ZCLgroupid) - - def ClusterApplicationBasic_SubscribeAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ApplicationBasic_ClusterRevision(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterApplicationLauncher_ReadAttributeApplicationLauncherList(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ApplicationLauncher_ApplicationLauncherList(device, ZCLendpoint, ZCLgroupid) - - def ClusterApplicationLauncher_ReadAttributeCatalogVendorId(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ApplicationLauncher_CatalogVendorId(device, ZCLendpoint, ZCLgroupid) - - def ClusterApplicationLauncher_SubscribeAttributeCatalogVendorId(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ApplicationLauncher_CatalogVendorId(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterApplicationLauncher_ReadAttributeApplicationId(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ApplicationLauncher_ApplicationId(device, ZCLendpoint, ZCLgroupid) - - def ClusterApplicationLauncher_SubscribeAttributeApplicationId(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ApplicationLauncher_ApplicationId(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterApplicationLauncher_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ApplicationLauncher_ClusterRevision(device, ZCLendpoint, ZCLgroupid) - - def ClusterApplicationLauncher_SubscribeAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ApplicationLauncher_ClusterRevision(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterAudioOutput_ReadAttributeAudioOutputList(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_AudioOutput_AudioOutputList(device, ZCLendpoint, ZCLgroupid) - - def ClusterAudioOutput_ReadAttributeCurrentAudioOutput(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_AudioOutput_CurrentAudioOutput(device, ZCLendpoint, ZCLgroupid) - - def ClusterAudioOutput_SubscribeAttributeCurrentAudioOutput(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_AudioOutput_CurrentAudioOutput(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterAudioOutput_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_AudioOutput_ClusterRevision(device, ZCLendpoint, ZCLgroupid) - - def ClusterAudioOutput_SubscribeAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_AudioOutput_ClusterRevision(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterBarrierControl_ReadAttributeBarrierMovingState(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_BarrierControl_BarrierMovingState(device, ZCLendpoint, ZCLgroupid) - - def ClusterBarrierControl_SubscribeAttributeBarrierMovingState(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_BarrierControl_BarrierMovingState(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterBarrierControl_ReadAttributeBarrierSafetyStatus(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_BarrierControl_BarrierSafetyStatus(device, ZCLendpoint, ZCLgroupid) - - def ClusterBarrierControl_SubscribeAttributeBarrierSafetyStatus(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_BarrierControl_BarrierSafetyStatus(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterBarrierControl_ReadAttributeBarrierCapabilities(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_BarrierControl_BarrierCapabilities(device, ZCLendpoint, ZCLgroupid) - - def ClusterBarrierControl_SubscribeAttributeBarrierCapabilities(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_BarrierControl_BarrierCapabilities(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterBarrierControl_ReadAttributeBarrierPosition(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_BarrierControl_BarrierPosition(device, ZCLendpoint, ZCLgroupid) - - def ClusterBarrierControl_SubscribeAttributeBarrierPosition(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_BarrierControl_BarrierPosition(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterBarrierControl_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_BarrierControl_ClusterRevision(device, ZCLendpoint, ZCLgroupid) - - def ClusterBarrierControl_SubscribeAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_BarrierControl_ClusterRevision(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterBasic_ReadAttributeInteractionModelVersion(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_Basic_InteractionModelVersion(device, ZCLendpoint, ZCLgroupid) - - def ClusterBasic_SubscribeAttributeInteractionModelVersion(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_Basic_InteractionModelVersion(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterBasic_ReadAttributeVendorName(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_Basic_VendorName(device, ZCLendpoint, ZCLgroupid) - - def ClusterBasic_SubscribeAttributeVendorName(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_Basic_VendorName(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterBasic_ReadAttributeVendorID(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_Basic_VendorID(device, ZCLendpoint, ZCLgroupid) - - def ClusterBasic_SubscribeAttributeVendorID(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_Basic_VendorID(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterBasic_ReadAttributeProductName(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_Basic_ProductName(device, ZCLendpoint, ZCLgroupid) - - def ClusterBasic_SubscribeAttributeProductName(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_Basic_ProductName(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterBasic_ReadAttributeProductID(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_Basic_ProductID(device, ZCLendpoint, ZCLgroupid) - - def ClusterBasic_SubscribeAttributeProductID(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_Basic_ProductID(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterBasic_ReadAttributeNodeLabel(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_Basic_NodeLabel(device, ZCLendpoint, ZCLgroupid) - - def ClusterBasic_SubscribeAttributeNodeLabel(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_Basic_NodeLabel(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterBasic_ReadAttributeLocation(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_Basic_Location(device, ZCLendpoint, ZCLgroupid) - - def ClusterBasic_SubscribeAttributeLocation(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_Basic_Location(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterBasic_ReadAttributeHardwareVersion(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_Basic_HardwareVersion(device, ZCLendpoint, ZCLgroupid) - - def ClusterBasic_SubscribeAttributeHardwareVersion(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_Basic_HardwareVersion(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterBasic_ReadAttributeHardwareVersionString(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_Basic_HardwareVersionString(device, ZCLendpoint, ZCLgroupid) - - def ClusterBasic_SubscribeAttributeHardwareVersionString(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_Basic_HardwareVersionString(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterBasic_ReadAttributeSoftwareVersion(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_Basic_SoftwareVersion(device, ZCLendpoint, ZCLgroupid) - - def ClusterBasic_SubscribeAttributeSoftwareVersion(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_Basic_SoftwareVersion(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterBasic_ReadAttributeSoftwareVersionString(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_Basic_SoftwareVersionString(device, ZCLendpoint, ZCLgroupid) - - def ClusterBasic_SubscribeAttributeSoftwareVersionString(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_Basic_SoftwareVersionString(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterBasic_ReadAttributeManufacturingDate(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_Basic_ManufacturingDate(device, ZCLendpoint, ZCLgroupid) - - def ClusterBasic_SubscribeAttributeManufacturingDate(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_Basic_ManufacturingDate(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterBasic_ReadAttributePartNumber(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_Basic_PartNumber(device, ZCLendpoint, ZCLgroupid) - - def ClusterBasic_SubscribeAttributePartNumber(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_Basic_PartNumber(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterBasic_ReadAttributeProductURL(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_Basic_ProductURL(device, ZCLendpoint, ZCLgroupid) - - def ClusterBasic_SubscribeAttributeProductURL(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_Basic_ProductURL(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterBasic_ReadAttributeProductLabel(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_Basic_ProductLabel(device, ZCLendpoint, ZCLgroupid) - - def ClusterBasic_SubscribeAttributeProductLabel(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_Basic_ProductLabel(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterBasic_ReadAttributeSerialNumber(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_Basic_SerialNumber(device, ZCLendpoint, ZCLgroupid) - - def ClusterBasic_SubscribeAttributeSerialNumber(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_Basic_SerialNumber(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterBasic_ReadAttributeLocalConfigDisabled(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_Basic_LocalConfigDisabled(device, ZCLendpoint, ZCLgroupid) - - def ClusterBasic_SubscribeAttributeLocalConfigDisabled(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_Basic_LocalConfigDisabled(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterBasic_ReadAttributeReachable(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_Basic_Reachable(device, ZCLendpoint, ZCLgroupid) - - def ClusterBasic_SubscribeAttributeReachable(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_Basic_Reachable(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterBasic_ReadAttributeUniqueID(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_Basic_UniqueID(device, ZCLendpoint, ZCLgroupid) - - def ClusterBasic_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_Basic_ClusterRevision(device, ZCLendpoint, ZCLgroupid) - - def ClusterBasic_SubscribeAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_Basic_ClusterRevision(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterBinaryInputBasic_ReadAttributeOutOfService(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_BinaryInputBasic_OutOfService(device, ZCLendpoint, ZCLgroupid) - - def ClusterBinaryInputBasic_SubscribeAttributeOutOfService(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_BinaryInputBasic_OutOfService(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterBinaryInputBasic_ReadAttributePresentValue(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_BinaryInputBasic_PresentValue(device, ZCLendpoint, ZCLgroupid) - - def ClusterBinaryInputBasic_SubscribeAttributePresentValue(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_BinaryInputBasic_PresentValue(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterBinaryInputBasic_ReadAttributeStatusFlags(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_BinaryInputBasic_StatusFlags(device, ZCLendpoint, ZCLgroupid) - - def ClusterBinaryInputBasic_SubscribeAttributeStatusFlags(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_BinaryInputBasic_StatusFlags(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterBinaryInputBasic_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_BinaryInputBasic_ClusterRevision(device, ZCLendpoint, ZCLgroupid) - - def ClusterBinaryInputBasic_SubscribeAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_BinaryInputBasic_ClusterRevision(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterBinding_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_Binding_ClusterRevision(device, ZCLendpoint, ZCLgroupid) - - def ClusterBinding_SubscribeAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_Binding_ClusterRevision(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterBooleanState_ReadAttributeStateValue(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_BooleanState_StateValue(device, ZCLendpoint, ZCLgroupid) - - def ClusterBooleanState_SubscribeAttributeStateValue(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_BooleanState_StateValue(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterBooleanState_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_BooleanState_ClusterRevision(device, ZCLendpoint, ZCLgroupid) - - def ClusterBooleanState_SubscribeAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_BooleanState_ClusterRevision(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterBridgedActions_ReadAttributeActionList(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_BridgedActions_ActionList(device, ZCLendpoint, ZCLgroupid) - - def ClusterBridgedActions_ReadAttributeEndpointList(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_BridgedActions_EndpointList(device, ZCLendpoint, ZCLgroupid) - - def ClusterBridgedActions_ReadAttributeSetupUrl(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_BridgedActions_SetupUrl(device, ZCLendpoint, ZCLgroupid) - - def ClusterBridgedActions_SubscribeAttributeSetupUrl(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_BridgedActions_SetupUrl(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterBridgedActions_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_BridgedActions_ClusterRevision(device, ZCLendpoint, ZCLgroupid) - - def ClusterBridgedActions_SubscribeAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_BridgedActions_ClusterRevision(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterBridgedDeviceBasic_ReadAttributeVendorName(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_VendorName(device, ZCLendpoint, ZCLgroupid) - - def ClusterBridgedDeviceBasic_SubscribeAttributeVendorName(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_BridgedDeviceBasic_VendorName(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterBridgedDeviceBasic_ReadAttributeVendorID(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_VendorID(device, ZCLendpoint, ZCLgroupid) - - def ClusterBridgedDeviceBasic_SubscribeAttributeVendorID(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_BridgedDeviceBasic_VendorID(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterBridgedDeviceBasic_ReadAttributeProductName(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_ProductName(device, ZCLendpoint, ZCLgroupid) - - def ClusterBridgedDeviceBasic_SubscribeAttributeProductName(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_BridgedDeviceBasic_ProductName(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterBridgedDeviceBasic_ReadAttributeNodeLabel(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_NodeLabel(device, ZCLendpoint, ZCLgroupid) - - def ClusterBridgedDeviceBasic_SubscribeAttributeNodeLabel(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_BridgedDeviceBasic_NodeLabel(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterBridgedDeviceBasic_ReadAttributeHardwareVersion(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_HardwareVersion(device, ZCLendpoint, ZCLgroupid) - - def ClusterBridgedDeviceBasic_SubscribeAttributeHardwareVersion(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_BridgedDeviceBasic_HardwareVersion(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterBridgedDeviceBasic_ReadAttributeHardwareVersionString(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_HardwareVersionString(device, ZCLendpoint, ZCLgroupid) - - def ClusterBridgedDeviceBasic_SubscribeAttributeHardwareVersionString(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_BridgedDeviceBasic_HardwareVersionString(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterBridgedDeviceBasic_ReadAttributeSoftwareVersion(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_SoftwareVersion(device, ZCLendpoint, ZCLgroupid) - - def ClusterBridgedDeviceBasic_SubscribeAttributeSoftwareVersion(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_BridgedDeviceBasic_SoftwareVersion(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterBridgedDeviceBasic_ReadAttributeSoftwareVersionString(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_SoftwareVersionString(device, ZCLendpoint, ZCLgroupid) - - def ClusterBridgedDeviceBasic_SubscribeAttributeSoftwareVersionString(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_BridgedDeviceBasic_SoftwareVersionString(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterBridgedDeviceBasic_ReadAttributeManufacturingDate(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_ManufacturingDate(device, ZCLendpoint, ZCLgroupid) - - def ClusterBridgedDeviceBasic_SubscribeAttributeManufacturingDate(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_BridgedDeviceBasic_ManufacturingDate(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterBridgedDeviceBasic_ReadAttributePartNumber(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_PartNumber(device, ZCLendpoint, ZCLgroupid) - - def ClusterBridgedDeviceBasic_SubscribeAttributePartNumber(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_BridgedDeviceBasic_PartNumber(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterBridgedDeviceBasic_ReadAttributeProductURL(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_ProductURL(device, ZCLendpoint, ZCLgroupid) - - def ClusterBridgedDeviceBasic_SubscribeAttributeProductURL(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_BridgedDeviceBasic_ProductURL(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterBridgedDeviceBasic_ReadAttributeProductLabel(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_ProductLabel(device, ZCLendpoint, ZCLgroupid) - - def ClusterBridgedDeviceBasic_SubscribeAttributeProductLabel(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_BridgedDeviceBasic_ProductLabel(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterBridgedDeviceBasic_ReadAttributeSerialNumber(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_SerialNumber(device, ZCLendpoint, ZCLgroupid) - - def ClusterBridgedDeviceBasic_SubscribeAttributeSerialNumber(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_BridgedDeviceBasic_SerialNumber(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterBridgedDeviceBasic_ReadAttributeReachable(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_Reachable(device, ZCLendpoint, ZCLgroupid) - - def ClusterBridgedDeviceBasic_SubscribeAttributeReachable(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_BridgedDeviceBasic_Reachable(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterBridgedDeviceBasic_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_ClusterRevision(device, ZCLendpoint, ZCLgroupid) - - def ClusterBridgedDeviceBasic_SubscribeAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_BridgedDeviceBasic_ClusterRevision(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterColorControl_ReadAttributeCurrentHue(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ColorControl_CurrentHue(device, ZCLendpoint, ZCLgroupid) - - def ClusterColorControl_SubscribeAttributeCurrentHue(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ColorControl_CurrentHue(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterColorControl_ReadAttributeCurrentSaturation(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ColorControl_CurrentSaturation(device, ZCLendpoint, ZCLgroupid) - - def ClusterColorControl_SubscribeAttributeCurrentSaturation(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ColorControl_CurrentSaturation(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterColorControl_ReadAttributeRemainingTime(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ColorControl_RemainingTime(device, ZCLendpoint, ZCLgroupid) - - def ClusterColorControl_SubscribeAttributeRemainingTime(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ColorControl_RemainingTime(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterColorControl_ReadAttributeCurrentX(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ColorControl_CurrentX(device, ZCLendpoint, ZCLgroupid) - - def ClusterColorControl_SubscribeAttributeCurrentX(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ColorControl_CurrentX(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterColorControl_ReadAttributeCurrentY(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ColorControl_CurrentY(device, ZCLendpoint, ZCLgroupid) - - def ClusterColorControl_SubscribeAttributeCurrentY(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ColorControl_CurrentY(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterColorControl_ReadAttributeDriftCompensation(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ColorControl_DriftCompensation(device, ZCLendpoint, ZCLgroupid) - - def ClusterColorControl_SubscribeAttributeDriftCompensation(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ColorControl_DriftCompensation(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterColorControl_ReadAttributeCompensationText(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ColorControl_CompensationText(device, ZCLendpoint, ZCLgroupid) - - def ClusterColorControl_SubscribeAttributeCompensationText(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ColorControl_CompensationText(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterColorControl_ReadAttributeColorTemperature(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorTemperature(device, ZCLendpoint, ZCLgroupid) - - def ClusterColorControl_SubscribeAttributeColorTemperature(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ColorControl_ColorTemperature(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterColorControl_ReadAttributeColorMode(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorMode(device, ZCLendpoint, ZCLgroupid) - - def ClusterColorControl_SubscribeAttributeColorMode(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ColorControl_ColorMode(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterColorControl_ReadAttributeColorControlOptions(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorControlOptions(device, ZCLendpoint, ZCLgroupid) - - def ClusterColorControl_SubscribeAttributeColorControlOptions(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ColorControl_ColorControlOptions(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterColorControl_ReadAttributeNumberOfPrimaries(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ColorControl_NumberOfPrimaries(device, ZCLendpoint, ZCLgroupid) - - def ClusterColorControl_SubscribeAttributeNumberOfPrimaries(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ColorControl_NumberOfPrimaries(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterColorControl_ReadAttributePrimary1X(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary1X(device, ZCLendpoint, ZCLgroupid) - - def ClusterColorControl_SubscribeAttributePrimary1X(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ColorControl_Primary1X(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterColorControl_ReadAttributePrimary1Y(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary1Y(device, ZCLendpoint, ZCLgroupid) - - def ClusterColorControl_SubscribeAttributePrimary1Y(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ColorControl_Primary1Y(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterColorControl_ReadAttributePrimary1Intensity(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary1Intensity(device, ZCLendpoint, ZCLgroupid) - - def ClusterColorControl_SubscribeAttributePrimary1Intensity(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ColorControl_Primary1Intensity(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterColorControl_ReadAttributePrimary2X(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary2X(device, ZCLendpoint, ZCLgroupid) - - def ClusterColorControl_SubscribeAttributePrimary2X(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ColorControl_Primary2X(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterColorControl_ReadAttributePrimary2Y(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary2Y(device, ZCLendpoint, ZCLgroupid) - - def ClusterColorControl_SubscribeAttributePrimary2Y(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ColorControl_Primary2Y(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterColorControl_ReadAttributePrimary2Intensity(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary2Intensity(device, ZCLendpoint, ZCLgroupid) - - def ClusterColorControl_SubscribeAttributePrimary2Intensity(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ColorControl_Primary2Intensity(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterColorControl_ReadAttributePrimary3X(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary3X(device, ZCLendpoint, ZCLgroupid) - - def ClusterColorControl_SubscribeAttributePrimary3X(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ColorControl_Primary3X(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterColorControl_ReadAttributePrimary3Y(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary3Y(device, ZCLendpoint, ZCLgroupid) - - def ClusterColorControl_SubscribeAttributePrimary3Y(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ColorControl_Primary3Y(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterColorControl_ReadAttributePrimary3Intensity(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary3Intensity(device, ZCLendpoint, ZCLgroupid) - - def ClusterColorControl_SubscribeAttributePrimary3Intensity(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ColorControl_Primary3Intensity(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterColorControl_ReadAttributePrimary4X(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary4X(device, ZCLendpoint, ZCLgroupid) - - def ClusterColorControl_SubscribeAttributePrimary4X(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ColorControl_Primary4X(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterColorControl_ReadAttributePrimary4Y(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary4Y(device, ZCLendpoint, ZCLgroupid) - - def ClusterColorControl_SubscribeAttributePrimary4Y(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ColorControl_Primary4Y(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterColorControl_ReadAttributePrimary4Intensity(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary4Intensity(device, ZCLendpoint, ZCLgroupid) - - def ClusterColorControl_SubscribeAttributePrimary4Intensity(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ColorControl_Primary4Intensity(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterColorControl_ReadAttributePrimary5X(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary5X(device, ZCLendpoint, ZCLgroupid) - - def ClusterColorControl_SubscribeAttributePrimary5X(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ColorControl_Primary5X(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterColorControl_ReadAttributePrimary5Y(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary5Y(device, ZCLendpoint, ZCLgroupid) - - def ClusterColorControl_SubscribeAttributePrimary5Y(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ColorControl_Primary5Y(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterColorControl_ReadAttributePrimary5Intensity(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary5Intensity(device, ZCLendpoint, ZCLgroupid) - - def ClusterColorControl_SubscribeAttributePrimary5Intensity(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ColorControl_Primary5Intensity(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterColorControl_ReadAttributePrimary6X(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary6X(device, ZCLendpoint, ZCLgroupid) - - def ClusterColorControl_SubscribeAttributePrimary6X(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ColorControl_Primary6X(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterColorControl_ReadAttributePrimary6Y(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary6Y(device, ZCLendpoint, ZCLgroupid) - - def ClusterColorControl_SubscribeAttributePrimary6Y(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ColorControl_Primary6Y(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterColorControl_ReadAttributePrimary6Intensity(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary6Intensity(device, ZCLendpoint, ZCLgroupid) - - def ClusterColorControl_SubscribeAttributePrimary6Intensity(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ColorControl_Primary6Intensity(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterColorControl_ReadAttributeWhitePointX(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ColorControl_WhitePointX(device, ZCLendpoint, ZCLgroupid) - - def ClusterColorControl_SubscribeAttributeWhitePointX(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ColorControl_WhitePointX(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterColorControl_ReadAttributeWhitePointY(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ColorControl_WhitePointY(device, ZCLendpoint, ZCLgroupid) - - def ClusterColorControl_SubscribeAttributeWhitePointY(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ColorControl_WhitePointY(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterColorControl_ReadAttributeColorPointRX(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorPointRX(device, ZCLendpoint, ZCLgroupid) - - def ClusterColorControl_SubscribeAttributeColorPointRX(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ColorControl_ColorPointRX(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterColorControl_ReadAttributeColorPointRY(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorPointRY(device, ZCLendpoint, ZCLgroupid) - - def ClusterColorControl_SubscribeAttributeColorPointRY(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ColorControl_ColorPointRY(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterColorControl_ReadAttributeColorPointRIntensity(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorPointRIntensity(device, ZCLendpoint, ZCLgroupid) - - def ClusterColorControl_SubscribeAttributeColorPointRIntensity(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ColorControl_ColorPointRIntensity(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterColorControl_ReadAttributeColorPointGX(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorPointGX(device, ZCLendpoint, ZCLgroupid) - - def ClusterColorControl_SubscribeAttributeColorPointGX(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ColorControl_ColorPointGX(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterColorControl_ReadAttributeColorPointGY(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorPointGY(device, ZCLendpoint, ZCLgroupid) - - def ClusterColorControl_SubscribeAttributeColorPointGY(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ColorControl_ColorPointGY(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterColorControl_ReadAttributeColorPointGIntensity(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorPointGIntensity(device, ZCLendpoint, ZCLgroupid) - - def ClusterColorControl_SubscribeAttributeColorPointGIntensity(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ColorControl_ColorPointGIntensity(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterColorControl_ReadAttributeColorPointBX(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorPointBX(device, ZCLendpoint, ZCLgroupid) - - def ClusterColorControl_SubscribeAttributeColorPointBX(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ColorControl_ColorPointBX(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterColorControl_ReadAttributeColorPointBY(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorPointBY(device, ZCLendpoint, ZCLgroupid) - - def ClusterColorControl_SubscribeAttributeColorPointBY(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ColorControl_ColorPointBY(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterColorControl_ReadAttributeColorPointBIntensity(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorPointBIntensity(device, ZCLendpoint, ZCLgroupid) - - def ClusterColorControl_SubscribeAttributeColorPointBIntensity(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ColorControl_ColorPointBIntensity(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterColorControl_ReadAttributeEnhancedCurrentHue(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ColorControl_EnhancedCurrentHue(device, ZCLendpoint, ZCLgroupid) - - def ClusterColorControl_SubscribeAttributeEnhancedCurrentHue(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ColorControl_EnhancedCurrentHue(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterColorControl_ReadAttributeEnhancedColorMode(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ColorControl_EnhancedColorMode(device, ZCLendpoint, ZCLgroupid) - - def ClusterColorControl_SubscribeAttributeEnhancedColorMode(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ColorControl_EnhancedColorMode(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterColorControl_ReadAttributeColorLoopActive(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorLoopActive(device, ZCLendpoint, ZCLgroupid) - - def ClusterColorControl_SubscribeAttributeColorLoopActive(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ColorControl_ColorLoopActive(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterColorControl_ReadAttributeColorLoopDirection(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorLoopDirection(device, ZCLendpoint, ZCLgroupid) - - def ClusterColorControl_SubscribeAttributeColorLoopDirection(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ColorControl_ColorLoopDirection(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterColorControl_ReadAttributeColorLoopTime(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorLoopTime(device, ZCLendpoint, ZCLgroupid) - - def ClusterColorControl_SubscribeAttributeColorLoopTime(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ColorControl_ColorLoopTime(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterColorControl_ReadAttributeColorLoopStartEnhancedHue(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorLoopStartEnhancedHue(device, ZCLendpoint, ZCLgroupid) - - def ClusterColorControl_SubscribeAttributeColorLoopStartEnhancedHue(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ColorControl_ColorLoopStartEnhancedHue(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterColorControl_ReadAttributeColorLoopStoredEnhancedHue(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorLoopStoredEnhancedHue(device, ZCLendpoint, ZCLgroupid) - - def ClusterColorControl_SubscribeAttributeColorLoopStoredEnhancedHue(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ColorControl_ColorLoopStoredEnhancedHue(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterColorControl_ReadAttributeColorCapabilities(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorCapabilities(device, ZCLendpoint, ZCLgroupid) - - def ClusterColorControl_SubscribeAttributeColorCapabilities(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ColorControl_ColorCapabilities(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterColorControl_ReadAttributeColorTempPhysicalMin(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorTempPhysicalMin(device, ZCLendpoint, ZCLgroupid) - - def ClusterColorControl_SubscribeAttributeColorTempPhysicalMin(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ColorControl_ColorTempPhysicalMin(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterColorControl_ReadAttributeColorTempPhysicalMax(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorTempPhysicalMax(device, ZCLendpoint, ZCLgroupid) - - def ClusterColorControl_SubscribeAttributeColorTempPhysicalMax(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ColorControl_ColorTempPhysicalMax(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterColorControl_ReadAttributeCoupleColorTempToLevelMinMireds(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ColorControl_CoupleColorTempToLevelMinMireds(device, ZCLendpoint, ZCLgroupid) - - def ClusterColorControl_SubscribeAttributeCoupleColorTempToLevelMinMireds(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ColorControl_CoupleColorTempToLevelMinMireds(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterColorControl_ReadAttributeStartUpColorTemperatureMireds(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ColorControl_StartUpColorTemperatureMireds(device, ZCLendpoint, ZCLgroupid) - - def ClusterColorControl_SubscribeAttributeStartUpColorTemperatureMireds(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ColorControl_StartUpColorTemperatureMireds(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterColorControl_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ColorControl_ClusterRevision(device, ZCLendpoint, ZCLgroupid) - - def ClusterColorControl_SubscribeAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ColorControl_ClusterRevision(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterContentLauncher_ReadAttributeAcceptsHeaderList(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ContentLauncher_AcceptsHeaderList(device, ZCLendpoint, ZCLgroupid) - - def ClusterContentLauncher_ReadAttributeSupportedStreamingTypes(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ContentLauncher_SupportedStreamingTypes(device, ZCLendpoint, ZCLgroupid) - - def ClusterContentLauncher_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ContentLauncher_ClusterRevision(device, ZCLendpoint, ZCLgroupid) - - def ClusterContentLauncher_SubscribeAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ContentLauncher_ClusterRevision(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterDescriptor_ReadAttributeDeviceList(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_Descriptor_DeviceList(device, ZCLendpoint, ZCLgroupid) - - def ClusterDescriptor_ReadAttributeServerList(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_Descriptor_ServerList(device, ZCLendpoint, ZCLgroupid) - - def ClusterDescriptor_ReadAttributeClientList(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_Descriptor_ClientList(device, ZCLendpoint, ZCLgroupid) - - def ClusterDescriptor_ReadAttributePartsList(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_Descriptor_PartsList(device, ZCLendpoint, ZCLgroupid) - - def ClusterDescriptor_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_Descriptor_ClusterRevision(device, ZCLendpoint, ZCLgroupid) - - def ClusterDescriptor_SubscribeAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_Descriptor_ClusterRevision(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterDoorLock_ReadAttributeLockState(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_DoorLock_LockState(device, ZCLendpoint, ZCLgroupid) - - def ClusterDoorLock_SubscribeAttributeLockState(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_DoorLock_LockState(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterDoorLock_ReadAttributeLockType(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_DoorLock_LockType(device, ZCLendpoint, ZCLgroupid) - - def ClusterDoorLock_SubscribeAttributeLockType(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_DoorLock_LockType(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterDoorLock_ReadAttributeActuatorEnabled(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_DoorLock_ActuatorEnabled(device, ZCLendpoint, ZCLgroupid) - - def ClusterDoorLock_SubscribeAttributeActuatorEnabled(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_DoorLock_ActuatorEnabled(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterDoorLock_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_DoorLock_ClusterRevision(device, ZCLendpoint, ZCLgroupid) - - def ClusterDoorLock_SubscribeAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_DoorLock_ClusterRevision(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterElectricalMeasurement_ReadAttributeMeasurementType(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ElectricalMeasurement_MeasurementType(device, ZCLendpoint, ZCLgroupid) - - def ClusterElectricalMeasurement_SubscribeAttributeMeasurementType(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ElectricalMeasurement_MeasurementType(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterElectricalMeasurement_ReadAttributeTotalActivePower(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ElectricalMeasurement_TotalActivePower(device, ZCLendpoint, ZCLgroupid) - - def ClusterElectricalMeasurement_SubscribeAttributeTotalActivePower(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ElectricalMeasurement_TotalActivePower(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterElectricalMeasurement_ReadAttributeRmsVoltage(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ElectricalMeasurement_RmsVoltage(device, ZCLendpoint, ZCLgroupid) - - def ClusterElectricalMeasurement_SubscribeAttributeRmsVoltage(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ElectricalMeasurement_RmsVoltage(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterElectricalMeasurement_ReadAttributeRmsVoltageMin(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ElectricalMeasurement_RmsVoltageMin(device, ZCLendpoint, ZCLgroupid) - - def ClusterElectricalMeasurement_SubscribeAttributeRmsVoltageMin(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ElectricalMeasurement_RmsVoltageMin(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterElectricalMeasurement_ReadAttributeRmsVoltageMax(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ElectricalMeasurement_RmsVoltageMax(device, ZCLendpoint, ZCLgroupid) - - def ClusterElectricalMeasurement_SubscribeAttributeRmsVoltageMax(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ElectricalMeasurement_RmsVoltageMax(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterElectricalMeasurement_ReadAttributeRmsCurrent(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ElectricalMeasurement_RmsCurrent(device, ZCLendpoint, ZCLgroupid) - - def ClusterElectricalMeasurement_SubscribeAttributeRmsCurrent(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ElectricalMeasurement_RmsCurrent(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterElectricalMeasurement_ReadAttributeRmsCurrentMin(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ElectricalMeasurement_RmsCurrentMin(device, ZCLendpoint, ZCLgroupid) - - def ClusterElectricalMeasurement_SubscribeAttributeRmsCurrentMin(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ElectricalMeasurement_RmsCurrentMin(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterElectricalMeasurement_ReadAttributeRmsCurrentMax(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ElectricalMeasurement_RmsCurrentMax(device, ZCLendpoint, ZCLgroupid) - - def ClusterElectricalMeasurement_SubscribeAttributeRmsCurrentMax(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ElectricalMeasurement_RmsCurrentMax(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterElectricalMeasurement_ReadAttributeActivePower(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ElectricalMeasurement_ActivePower(device, ZCLendpoint, ZCLgroupid) - - def ClusterElectricalMeasurement_SubscribeAttributeActivePower(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ElectricalMeasurement_ActivePower(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterElectricalMeasurement_ReadAttributeActivePowerMin(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ElectricalMeasurement_ActivePowerMin(device, ZCLendpoint, ZCLgroupid) - - def ClusterElectricalMeasurement_SubscribeAttributeActivePowerMin(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ElectricalMeasurement_ActivePowerMin(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterElectricalMeasurement_ReadAttributeActivePowerMax(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ElectricalMeasurement_ActivePowerMax(device, ZCLendpoint, ZCLgroupid) - - def ClusterElectricalMeasurement_SubscribeAttributeActivePowerMax(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ElectricalMeasurement_ActivePowerMax(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterElectricalMeasurement_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ElectricalMeasurement_ClusterRevision(device, ZCLendpoint, ZCLgroupid) - - def ClusterElectricalMeasurement_SubscribeAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ElectricalMeasurement_ClusterRevision(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterEthernetNetworkDiagnostics_ReadAttributePHYRate(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_EthernetNetworkDiagnostics_PHYRate(device, ZCLendpoint, ZCLgroupid) - - def ClusterEthernetNetworkDiagnostics_SubscribeAttributePHYRate(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_EthernetNetworkDiagnostics_PHYRate(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterEthernetNetworkDiagnostics_ReadAttributeFullDuplex(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_EthernetNetworkDiagnostics_FullDuplex(device, ZCLendpoint, ZCLgroupid) - - def ClusterEthernetNetworkDiagnostics_SubscribeAttributeFullDuplex(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_EthernetNetworkDiagnostics_FullDuplex(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterEthernetNetworkDiagnostics_ReadAttributePacketRxCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_EthernetNetworkDiagnostics_PacketRxCount(device, ZCLendpoint, ZCLgroupid) - - def ClusterEthernetNetworkDiagnostics_SubscribeAttributePacketRxCount(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_EthernetNetworkDiagnostics_PacketRxCount(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterEthernetNetworkDiagnostics_ReadAttributePacketTxCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_EthernetNetworkDiagnostics_PacketTxCount(device, ZCLendpoint, ZCLgroupid) - - def ClusterEthernetNetworkDiagnostics_SubscribeAttributePacketTxCount(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_EthernetNetworkDiagnostics_PacketTxCount(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterEthernetNetworkDiagnostics_ReadAttributeTxErrCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_EthernetNetworkDiagnostics_TxErrCount(device, ZCLendpoint, ZCLgroupid) - - def ClusterEthernetNetworkDiagnostics_SubscribeAttributeTxErrCount(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_EthernetNetworkDiagnostics_TxErrCount(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterEthernetNetworkDiagnostics_ReadAttributeCollisionCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_EthernetNetworkDiagnostics_CollisionCount(device, ZCLendpoint, ZCLgroupid) - - def ClusterEthernetNetworkDiagnostics_SubscribeAttributeCollisionCount(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_EthernetNetworkDiagnostics_CollisionCount(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterEthernetNetworkDiagnostics_ReadAttributeOverrunCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_EthernetNetworkDiagnostics_OverrunCount(device, ZCLendpoint, ZCLgroupid) - - def ClusterEthernetNetworkDiagnostics_SubscribeAttributeOverrunCount(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_EthernetNetworkDiagnostics_OverrunCount(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterEthernetNetworkDiagnostics_ReadAttributeCarrierDetect(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_EthernetNetworkDiagnostics_CarrierDetect(device, ZCLendpoint, ZCLgroupid) - - def ClusterEthernetNetworkDiagnostics_SubscribeAttributeCarrierDetect(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_EthernetNetworkDiagnostics_CarrierDetect(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterEthernetNetworkDiagnostics_ReadAttributeTimeSinceReset(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_EthernetNetworkDiagnostics_TimeSinceReset(device, ZCLendpoint, ZCLgroupid) - - def ClusterEthernetNetworkDiagnostics_SubscribeAttributeTimeSinceReset(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_EthernetNetworkDiagnostics_TimeSinceReset(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterEthernetNetworkDiagnostics_ReadAttributeFeatureMap(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_EthernetNetworkDiagnostics_FeatureMap(device, ZCLendpoint, ZCLgroupid) - - def ClusterEthernetNetworkDiagnostics_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_EthernetNetworkDiagnostics_ClusterRevision(device, ZCLendpoint, ZCLgroupid) - - def ClusterEthernetNetworkDiagnostics_SubscribeAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_EthernetNetworkDiagnostics_ClusterRevision(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterFixedLabel_ReadAttributeLabelList(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_FixedLabel_LabelList(device, ZCLendpoint, ZCLgroupid) - - def ClusterFixedLabel_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_FixedLabel_ClusterRevision(device, ZCLendpoint, ZCLgroupid) - - def ClusterFixedLabel_SubscribeAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_FixedLabel_ClusterRevision(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterFlowMeasurement_ReadAttributeMeasuredValue(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_FlowMeasurement_MeasuredValue(device, ZCLendpoint, ZCLgroupid) - - def ClusterFlowMeasurement_SubscribeAttributeMeasuredValue(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_FlowMeasurement_MeasuredValue(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterFlowMeasurement_ReadAttributeMinMeasuredValue(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_FlowMeasurement_MinMeasuredValue(device, ZCLendpoint, ZCLgroupid) - - def ClusterFlowMeasurement_SubscribeAttributeMinMeasuredValue(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_FlowMeasurement_MinMeasuredValue(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterFlowMeasurement_ReadAttributeMaxMeasuredValue(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_FlowMeasurement_MaxMeasuredValue(device, ZCLendpoint, ZCLgroupid) - - def ClusterFlowMeasurement_SubscribeAttributeMaxMeasuredValue(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_FlowMeasurement_MaxMeasuredValue(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterFlowMeasurement_ReadAttributeTolerance(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_FlowMeasurement_Tolerance(device, ZCLendpoint, ZCLgroupid) - - def ClusterFlowMeasurement_SubscribeAttributeTolerance(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_FlowMeasurement_Tolerance(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterFlowMeasurement_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_FlowMeasurement_ClusterRevision(device, ZCLendpoint, ZCLgroupid) - - def ClusterFlowMeasurement_SubscribeAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_FlowMeasurement_ClusterRevision(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterGeneralCommissioning_ReadAttributeBreadcrumb(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_GeneralCommissioning_Breadcrumb(device, ZCLendpoint, ZCLgroupid) - - def ClusterGeneralCommissioning_SubscribeAttributeBreadcrumb(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_GeneralCommissioning_Breadcrumb(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterGeneralCommissioning_ReadAttributeBasicCommissioningInfoList(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_GeneralCommissioning_BasicCommissioningInfoList(device, ZCLendpoint, ZCLgroupid) - - def ClusterGeneralCommissioning_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_GeneralCommissioning_ClusterRevision(device, ZCLendpoint, ZCLgroupid) - - def ClusterGeneralCommissioning_SubscribeAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_GeneralCommissioning_ClusterRevision(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterGeneralDiagnostics_ReadAttributeNetworkInterfaces(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_GeneralDiagnostics_NetworkInterfaces(device, ZCLendpoint, ZCLgroupid) - - def ClusterGeneralDiagnostics_ReadAttributeRebootCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_GeneralDiagnostics_RebootCount(device, ZCLendpoint, ZCLgroupid) - - def ClusterGeneralDiagnostics_SubscribeAttributeRebootCount(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_GeneralDiagnostics_RebootCount(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterGeneralDiagnostics_ReadAttributeUpTime(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_GeneralDiagnostics_UpTime(device, ZCLendpoint, ZCLgroupid) - - def ClusterGeneralDiagnostics_SubscribeAttributeUpTime(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_GeneralDiagnostics_UpTime(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterGeneralDiagnostics_ReadAttributeTotalOperationalHours(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_GeneralDiagnostics_TotalOperationalHours(device, ZCLendpoint, ZCLgroupid) - - def ClusterGeneralDiagnostics_SubscribeAttributeTotalOperationalHours(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_GeneralDiagnostics_TotalOperationalHours(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterGeneralDiagnostics_ReadAttributeBootReasons(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_GeneralDiagnostics_BootReasons(device, ZCLendpoint, ZCLgroupid) - - def ClusterGeneralDiagnostics_SubscribeAttributeBootReasons(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_GeneralDiagnostics_BootReasons(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterGeneralDiagnostics_ReadAttributeActiveHardwareFaults(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_GeneralDiagnostics_ActiveHardwareFaults(device, ZCLendpoint, ZCLgroupid) - - def ClusterGeneralDiagnostics_ReadAttributeActiveRadioFaults(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_GeneralDiagnostics_ActiveRadioFaults(device, ZCLendpoint, ZCLgroupid) - - def ClusterGeneralDiagnostics_ReadAttributeActiveNetworkFaults(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_GeneralDiagnostics_ActiveNetworkFaults(device, ZCLendpoint, ZCLgroupid) - - def ClusterGeneralDiagnostics_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_GeneralDiagnostics_ClusterRevision(device, ZCLendpoint, ZCLgroupid) - - def ClusterGeneralDiagnostics_SubscribeAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_GeneralDiagnostics_ClusterRevision(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterGroupKeyManagement_ReadAttributeGroups(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_GroupKeyManagement_Groups(device, ZCLendpoint, ZCLgroupid) - - def ClusterGroupKeyManagement_ReadAttributeGroupKeys(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_GroupKeyManagement_GroupKeys(device, ZCLendpoint, ZCLgroupid) - - def ClusterGroupKeyManagement_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_GroupKeyManagement_ClusterRevision(device, ZCLendpoint, ZCLgroupid) - - def ClusterGroupKeyManagement_SubscribeAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_GroupKeyManagement_ClusterRevision(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterGroups_ReadAttributeNameSupport(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_Groups_NameSupport(device, ZCLendpoint, ZCLgroupid) - - def ClusterGroups_SubscribeAttributeNameSupport(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_Groups_NameSupport(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterGroups_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_Groups_ClusterRevision(device, ZCLendpoint, ZCLgroupid) - - def ClusterGroups_SubscribeAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_Groups_ClusterRevision(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterIdentify_ReadAttributeIdentifyTime(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_Identify_IdentifyTime(device, ZCLendpoint, ZCLgroupid) - - def ClusterIdentify_SubscribeAttributeIdentifyTime(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_Identify_IdentifyTime(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterIdentify_ReadAttributeIdentifyType(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_Identify_IdentifyType(device, ZCLendpoint, ZCLgroupid) - - def ClusterIdentify_SubscribeAttributeIdentifyType(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_Identify_IdentifyType(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterIdentify_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_Identify_ClusterRevision(device, ZCLendpoint, ZCLgroupid) - - def ClusterIdentify_SubscribeAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_Identify_ClusterRevision(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterIlluminanceMeasurement_ReadAttributeMeasuredValue(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_IlluminanceMeasurement_MeasuredValue(device, ZCLendpoint, ZCLgroupid) - - def ClusterIlluminanceMeasurement_SubscribeAttributeMeasuredValue(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_IlluminanceMeasurement_MeasuredValue(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterIlluminanceMeasurement_ReadAttributeMinMeasuredValue(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_IlluminanceMeasurement_MinMeasuredValue(device, ZCLendpoint, ZCLgroupid) - - def ClusterIlluminanceMeasurement_SubscribeAttributeMinMeasuredValue(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_IlluminanceMeasurement_MinMeasuredValue(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterIlluminanceMeasurement_ReadAttributeMaxMeasuredValue(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_IlluminanceMeasurement_MaxMeasuredValue(device, ZCLendpoint, ZCLgroupid) - - def ClusterIlluminanceMeasurement_SubscribeAttributeMaxMeasuredValue(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_IlluminanceMeasurement_MaxMeasuredValue(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterIlluminanceMeasurement_ReadAttributeTolerance(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_IlluminanceMeasurement_Tolerance(device, ZCLendpoint, ZCLgroupid) - - def ClusterIlluminanceMeasurement_SubscribeAttributeTolerance(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_IlluminanceMeasurement_Tolerance(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterIlluminanceMeasurement_ReadAttributeLightSensorType(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_IlluminanceMeasurement_LightSensorType(device, ZCLendpoint, ZCLgroupid) - - def ClusterIlluminanceMeasurement_SubscribeAttributeLightSensorType(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_IlluminanceMeasurement_LightSensorType(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterIlluminanceMeasurement_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_IlluminanceMeasurement_ClusterRevision(device, ZCLendpoint, ZCLgroupid) - - def ClusterIlluminanceMeasurement_SubscribeAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_IlluminanceMeasurement_ClusterRevision(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterKeypadInput_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_KeypadInput_ClusterRevision(device, ZCLendpoint, ZCLgroupid) - - def ClusterKeypadInput_SubscribeAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_KeypadInput_ClusterRevision(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterLevelControl_ReadAttributeCurrentLevel(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_LevelControl_CurrentLevel(device, ZCLendpoint, ZCLgroupid) - - def ClusterLevelControl_SubscribeAttributeCurrentLevel(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_LevelControl_CurrentLevel(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterLevelControl_ReadAttributeRemainingTime(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_LevelControl_RemainingTime(device, ZCLendpoint, ZCLgroupid) - - def ClusterLevelControl_SubscribeAttributeRemainingTime(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_LevelControl_RemainingTime(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterLevelControl_ReadAttributeMinLevel(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_LevelControl_MinLevel(device, ZCLendpoint, ZCLgroupid) - - def ClusterLevelControl_SubscribeAttributeMinLevel(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_LevelControl_MinLevel(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterLevelControl_ReadAttributeMaxLevel(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_LevelControl_MaxLevel(device, ZCLendpoint, ZCLgroupid) - - def ClusterLevelControl_SubscribeAttributeMaxLevel(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_LevelControl_MaxLevel(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterLevelControl_ReadAttributeCurrentFrequency(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_LevelControl_CurrentFrequency(device, ZCLendpoint, ZCLgroupid) - - def ClusterLevelControl_SubscribeAttributeCurrentFrequency(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_LevelControl_CurrentFrequency(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterLevelControl_ReadAttributeMinFrequency(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_LevelControl_MinFrequency(device, ZCLendpoint, ZCLgroupid) - - def ClusterLevelControl_SubscribeAttributeMinFrequency(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_LevelControl_MinFrequency(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterLevelControl_ReadAttributeMaxFrequency(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_LevelControl_MaxFrequency(device, ZCLendpoint, ZCLgroupid) - - def ClusterLevelControl_SubscribeAttributeMaxFrequency(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_LevelControl_MaxFrequency(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterLevelControl_ReadAttributeOptions(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_LevelControl_Options(device, ZCLendpoint, ZCLgroupid) - - def ClusterLevelControl_SubscribeAttributeOptions(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_LevelControl_Options(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterLevelControl_ReadAttributeOnOffTransitionTime(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_LevelControl_OnOffTransitionTime(device, ZCLendpoint, ZCLgroupid) - - def ClusterLevelControl_SubscribeAttributeOnOffTransitionTime(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_LevelControl_OnOffTransitionTime(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterLevelControl_ReadAttributeOnLevel(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_LevelControl_OnLevel(device, ZCLendpoint, ZCLgroupid) - - def ClusterLevelControl_SubscribeAttributeOnLevel(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_LevelControl_OnLevel(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterLevelControl_ReadAttributeOnTransitionTime(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_LevelControl_OnTransitionTime(device, ZCLendpoint, ZCLgroupid) - - def ClusterLevelControl_SubscribeAttributeOnTransitionTime(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_LevelControl_OnTransitionTime(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterLevelControl_ReadAttributeOffTransitionTime(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_LevelControl_OffTransitionTime(device, ZCLendpoint, ZCLgroupid) - - def ClusterLevelControl_SubscribeAttributeOffTransitionTime(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_LevelControl_OffTransitionTime(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterLevelControl_ReadAttributeDefaultMoveRate(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_LevelControl_DefaultMoveRate(device, ZCLendpoint, ZCLgroupid) - - def ClusterLevelControl_SubscribeAttributeDefaultMoveRate(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_LevelControl_DefaultMoveRate(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterLevelControl_ReadAttributeStartUpCurrentLevel(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_LevelControl_StartUpCurrentLevel(device, ZCLendpoint, ZCLgroupid) - - def ClusterLevelControl_SubscribeAttributeStartUpCurrentLevel(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_LevelControl_StartUpCurrentLevel(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterLevelControl_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_LevelControl_ClusterRevision(device, ZCLendpoint, ZCLgroupid) - - def ClusterLevelControl_SubscribeAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_LevelControl_ClusterRevision(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterLowPower_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_LowPower_ClusterRevision(device, ZCLendpoint, ZCLgroupid) - - def ClusterLowPower_SubscribeAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_LowPower_ClusterRevision(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterMediaInput_ReadAttributeMediaInputList(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_MediaInput_MediaInputList(device, ZCLendpoint, ZCLgroupid) - - def ClusterMediaInput_ReadAttributeCurrentMediaInput(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_MediaInput_CurrentMediaInput(device, ZCLendpoint, ZCLgroupid) - - def ClusterMediaInput_SubscribeAttributeCurrentMediaInput(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_MediaInput_CurrentMediaInput(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterMediaInput_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_MediaInput_ClusterRevision(device, ZCLendpoint, ZCLgroupid) - - def ClusterMediaInput_SubscribeAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_MediaInput_ClusterRevision(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterMediaPlayback_ReadAttributePlaybackState(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_MediaPlayback_PlaybackState(device, ZCLendpoint, ZCLgroupid) - - def ClusterMediaPlayback_SubscribeAttributePlaybackState(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_MediaPlayback_PlaybackState(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterMediaPlayback_ReadAttributeStartTime(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_MediaPlayback_StartTime(device, ZCLendpoint, ZCLgroupid) - - def ClusterMediaPlayback_SubscribeAttributeStartTime(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_MediaPlayback_StartTime(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterMediaPlayback_ReadAttributeDuration(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_MediaPlayback_Duration(device, ZCLendpoint, ZCLgroupid) - - def ClusterMediaPlayback_SubscribeAttributeDuration(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_MediaPlayback_Duration(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterMediaPlayback_ReadAttributePositionUpdatedAt(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_MediaPlayback_PositionUpdatedAt(device, ZCLendpoint, ZCLgroupid) - - def ClusterMediaPlayback_SubscribeAttributePositionUpdatedAt(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_MediaPlayback_PositionUpdatedAt(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterMediaPlayback_ReadAttributePosition(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_MediaPlayback_Position(device, ZCLendpoint, ZCLgroupid) - - def ClusterMediaPlayback_SubscribeAttributePosition(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_MediaPlayback_Position(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterMediaPlayback_ReadAttributePlaybackSpeed(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_MediaPlayback_PlaybackSpeed(device, ZCLendpoint, ZCLgroupid) - - def ClusterMediaPlayback_SubscribeAttributePlaybackSpeed(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_MediaPlayback_PlaybackSpeed(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterMediaPlayback_ReadAttributeSeekRangeEnd(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_MediaPlayback_SeekRangeEnd(device, ZCLendpoint, ZCLgroupid) - - def ClusterMediaPlayback_SubscribeAttributeSeekRangeEnd(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_MediaPlayback_SeekRangeEnd(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterMediaPlayback_ReadAttributeSeekRangeStart(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_MediaPlayback_SeekRangeStart(device, ZCLendpoint, ZCLgroupid) - - def ClusterMediaPlayback_SubscribeAttributeSeekRangeStart(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_MediaPlayback_SeekRangeStart(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterMediaPlayback_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_MediaPlayback_ClusterRevision(device, ZCLendpoint, ZCLgroupid) - - def ClusterMediaPlayback_SubscribeAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_MediaPlayback_ClusterRevision(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterModeSelect_ReadAttributeCurrentMode(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ModeSelect_CurrentMode(device, ZCLendpoint, ZCLgroupid) - - def ClusterModeSelect_SubscribeAttributeCurrentMode(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ModeSelect_CurrentMode(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterModeSelect_ReadAttributeSupportedModes(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ModeSelect_SupportedModes(device, ZCLendpoint, ZCLgroupid) - - def ClusterModeSelect_ReadAttributeOnMode(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ModeSelect_OnMode(device, ZCLendpoint, ZCLgroupid) - - def ClusterModeSelect_SubscribeAttributeOnMode(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ModeSelect_OnMode(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterModeSelect_ReadAttributeStartUpMode(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ModeSelect_StartUpMode(device, ZCLendpoint, ZCLgroupid) - - def ClusterModeSelect_SubscribeAttributeStartUpMode(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ModeSelect_StartUpMode(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterModeSelect_ReadAttributeDescription(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ModeSelect_Description(device, ZCLendpoint, ZCLgroupid) - - def ClusterModeSelect_SubscribeAttributeDescription(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ModeSelect_Description(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterModeSelect_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ModeSelect_ClusterRevision(device, ZCLendpoint, ZCLgroupid) - - def ClusterModeSelect_SubscribeAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ModeSelect_ClusterRevision(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterNetworkCommissioning_ReadAttributeFeatureMap(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_NetworkCommissioning_FeatureMap(device, ZCLendpoint, ZCLgroupid) - - def ClusterNetworkCommissioning_SubscribeAttributeFeatureMap(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_NetworkCommissioning_FeatureMap(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterNetworkCommissioning_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_NetworkCommissioning_ClusterRevision(device, ZCLendpoint, ZCLgroupid) - - def ClusterNetworkCommissioning_SubscribeAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_NetworkCommissioning_ClusterRevision(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterOtaSoftwareUpdateProvider_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_OtaSoftwareUpdateProvider_ClusterRevision(device, ZCLendpoint, ZCLgroupid) - - def ClusterOtaSoftwareUpdateProvider_SubscribeAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_OtaSoftwareUpdateProvider_ClusterRevision(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterOtaSoftwareUpdateRequestor_ReadAttributeDefaultOtaProvider(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_OtaSoftwareUpdateRequestor_DefaultOtaProvider(device, ZCLendpoint, ZCLgroupid) - - def ClusterOtaSoftwareUpdateRequestor_SubscribeAttributeDefaultOtaProvider(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_OtaSoftwareUpdateRequestor_DefaultOtaProvider(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterOtaSoftwareUpdateRequestor_ReadAttributeUpdatePossible(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_OtaSoftwareUpdateRequestor_UpdatePossible(device, ZCLendpoint, ZCLgroupid) - - def ClusterOtaSoftwareUpdateRequestor_SubscribeAttributeUpdatePossible(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_OtaSoftwareUpdateRequestor_UpdatePossible(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterOtaSoftwareUpdateRequestor_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_OtaSoftwareUpdateRequestor_ClusterRevision(device, ZCLendpoint, ZCLgroupid) - - def ClusterOtaSoftwareUpdateRequestor_SubscribeAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_OtaSoftwareUpdateRequestor_ClusterRevision(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterOccupancySensing_ReadAttributeOccupancy(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_OccupancySensing_Occupancy(device, ZCLendpoint, ZCLgroupid) - - def ClusterOccupancySensing_SubscribeAttributeOccupancy(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_OccupancySensing_Occupancy(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterOccupancySensing_ReadAttributeOccupancySensorType(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_OccupancySensing_OccupancySensorType(device, ZCLendpoint, ZCLgroupid) - - def ClusterOccupancySensing_SubscribeAttributeOccupancySensorType(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_OccupancySensing_OccupancySensorType(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterOccupancySensing_ReadAttributeOccupancySensorTypeBitmap(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_OccupancySensing_OccupancySensorTypeBitmap(device, ZCLendpoint, ZCLgroupid) - - def ClusterOccupancySensing_SubscribeAttributeOccupancySensorTypeBitmap(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_OccupancySensing_OccupancySensorTypeBitmap(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterOccupancySensing_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_OccupancySensing_ClusterRevision(device, ZCLendpoint, ZCLgroupid) - - def ClusterOccupancySensing_SubscribeAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_OccupancySensing_ClusterRevision(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterOnOff_ReadAttributeOnOff(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_OnOff_OnOff(device, ZCLendpoint, ZCLgroupid) - - def ClusterOnOff_SubscribeAttributeOnOff(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_OnOff_OnOff(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterOnOff_ReadAttributeGlobalSceneControl(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_OnOff_GlobalSceneControl(device, ZCLendpoint, ZCLgroupid) - - def ClusterOnOff_SubscribeAttributeGlobalSceneControl(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_OnOff_GlobalSceneControl(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterOnOff_ReadAttributeOnTime(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_OnOff_OnTime(device, ZCLendpoint, ZCLgroupid) - - def ClusterOnOff_SubscribeAttributeOnTime(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_OnOff_OnTime(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterOnOff_ReadAttributeOffWaitTime(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_OnOff_OffWaitTime(device, ZCLendpoint, ZCLgroupid) - - def ClusterOnOff_SubscribeAttributeOffWaitTime(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_OnOff_OffWaitTime(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterOnOff_ReadAttributeStartUpOnOff(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_OnOff_StartUpOnOff(device, ZCLendpoint, ZCLgroupid) - - def ClusterOnOff_SubscribeAttributeStartUpOnOff(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_OnOff_StartUpOnOff(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterOnOff_ReadAttributeFeatureMap(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_OnOff_FeatureMap(device, ZCLendpoint, ZCLgroupid) - - def ClusterOnOff_SubscribeAttributeFeatureMap(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_OnOff_FeatureMap(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterOnOff_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_OnOff_ClusterRevision(device, ZCLendpoint, ZCLgroupid) - - def ClusterOnOff_SubscribeAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_OnOff_ClusterRevision(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterOnOffSwitchConfiguration_ReadAttributeSwitchType(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_OnOffSwitchConfiguration_SwitchType(device, ZCLendpoint, ZCLgroupid) - - def ClusterOnOffSwitchConfiguration_SubscribeAttributeSwitchType(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_OnOffSwitchConfiguration_SwitchType(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterOnOffSwitchConfiguration_ReadAttributeSwitchActions(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_OnOffSwitchConfiguration_SwitchActions(device, ZCLendpoint, ZCLgroupid) - - def ClusterOnOffSwitchConfiguration_SubscribeAttributeSwitchActions(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_OnOffSwitchConfiguration_SwitchActions(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterOnOffSwitchConfiguration_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_OnOffSwitchConfiguration_ClusterRevision(device, ZCLendpoint, ZCLgroupid) - - def ClusterOnOffSwitchConfiguration_SubscribeAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_OnOffSwitchConfiguration_ClusterRevision(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterOperationalCredentials_ReadAttributeFabricsList(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_OperationalCredentials_FabricsList(device, ZCLendpoint, ZCLgroupid) - - def ClusterOperationalCredentials_ReadAttributeSupportedFabrics(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_OperationalCredentials_SupportedFabrics(device, ZCLendpoint, ZCLgroupid) - - def ClusterOperationalCredentials_SubscribeAttributeSupportedFabrics(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_OperationalCredentials_SupportedFabrics(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterOperationalCredentials_ReadAttributeCommissionedFabrics(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_OperationalCredentials_CommissionedFabrics(device, ZCLendpoint, ZCLgroupid) - - def ClusterOperationalCredentials_SubscribeAttributeCommissionedFabrics(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_OperationalCredentials_CommissionedFabrics(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterOperationalCredentials_ReadAttributeTrustedRootCertificates(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_OperationalCredentials_TrustedRootCertificates(device, ZCLendpoint, ZCLgroupid) - - def ClusterOperationalCredentials_ReadAttributeCurrentFabricIndex(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_OperationalCredentials_CurrentFabricIndex(device, ZCLendpoint, ZCLgroupid) - - def ClusterOperationalCredentials_SubscribeAttributeCurrentFabricIndex(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_OperationalCredentials_CurrentFabricIndex(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterOperationalCredentials_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_OperationalCredentials_ClusterRevision(device, ZCLendpoint, ZCLgroupid) - - def ClusterOperationalCredentials_SubscribeAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_OperationalCredentials_ClusterRevision(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterPowerSource_ReadAttributeStatus(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_PowerSource_Status(device, ZCLendpoint, ZCLgroupid) - - def ClusterPowerSource_SubscribeAttributeStatus(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_PowerSource_Status(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterPowerSource_ReadAttributeOrder(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_PowerSource_Order(device, ZCLendpoint, ZCLgroupid) - - def ClusterPowerSource_SubscribeAttributeOrder(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_PowerSource_Order(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterPowerSource_ReadAttributeDescription(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_PowerSource_Description(device, ZCLendpoint, ZCLgroupid) - - def ClusterPowerSource_SubscribeAttributeDescription(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_PowerSource_Description(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterPowerSource_ReadAttributeBatteryVoltage(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_PowerSource_BatteryVoltage(device, ZCLendpoint, ZCLgroupid) - - def ClusterPowerSource_SubscribeAttributeBatteryVoltage(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_PowerSource_BatteryVoltage(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterPowerSource_ReadAttributeBatteryPercentRemaining(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_PowerSource_BatteryPercentRemaining(device, ZCLendpoint, ZCLgroupid) - - def ClusterPowerSource_SubscribeAttributeBatteryPercentRemaining(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_PowerSource_BatteryPercentRemaining(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterPowerSource_ReadAttributeBatteryTimeRemaining(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_PowerSource_BatteryTimeRemaining(device, ZCLendpoint, ZCLgroupid) - - def ClusterPowerSource_SubscribeAttributeBatteryTimeRemaining(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_PowerSource_BatteryTimeRemaining(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterPowerSource_ReadAttributeBatteryChargeLevel(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_PowerSource_BatteryChargeLevel(device, ZCLendpoint, ZCLgroupid) - - def ClusterPowerSource_SubscribeAttributeBatteryChargeLevel(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_PowerSource_BatteryChargeLevel(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterPowerSource_ReadAttributeActiveBatteryFaults(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_PowerSource_ActiveBatteryFaults(device, ZCLendpoint, ZCLgroupid) - - def ClusterPowerSource_ReadAttributeBatteryChargeState(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_PowerSource_BatteryChargeState(device, ZCLendpoint, ZCLgroupid) - - def ClusterPowerSource_SubscribeAttributeBatteryChargeState(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_PowerSource_BatteryChargeState(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterPowerSource_ReadAttributeFeatureMap(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_PowerSource_FeatureMap(device, ZCLendpoint, ZCLgroupid) - - def ClusterPowerSource_SubscribeAttributeFeatureMap(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_PowerSource_FeatureMap(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterPowerSource_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_PowerSource_ClusterRevision(device, ZCLendpoint, ZCLgroupid) - - def ClusterPowerSource_SubscribeAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_PowerSource_ClusterRevision(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterPressureMeasurement_ReadAttributeMeasuredValue(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_PressureMeasurement_MeasuredValue(device, ZCLendpoint, ZCLgroupid) - - def ClusterPressureMeasurement_SubscribeAttributeMeasuredValue(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_PressureMeasurement_MeasuredValue(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterPressureMeasurement_ReadAttributeMinMeasuredValue(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_PressureMeasurement_MinMeasuredValue(device, ZCLendpoint, ZCLgroupid) - - def ClusterPressureMeasurement_SubscribeAttributeMinMeasuredValue(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_PressureMeasurement_MinMeasuredValue(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterPressureMeasurement_ReadAttributeMaxMeasuredValue(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_PressureMeasurement_MaxMeasuredValue(device, ZCLendpoint, ZCLgroupid) - - def ClusterPressureMeasurement_SubscribeAttributeMaxMeasuredValue(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_PressureMeasurement_MaxMeasuredValue(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterPressureMeasurement_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_PressureMeasurement_ClusterRevision(device, ZCLendpoint, ZCLgroupid) - - def ClusterPressureMeasurement_SubscribeAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_PressureMeasurement_ClusterRevision(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterPumpConfigurationAndControl_ReadAttributeMaxPressure(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_MaxPressure(device, ZCLendpoint, ZCLgroupid) - - def ClusterPumpConfigurationAndControl_SubscribeAttributeMaxPressure(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_PumpConfigurationAndControl_MaxPressure(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterPumpConfigurationAndControl_ReadAttributeMaxSpeed(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_MaxSpeed(device, ZCLendpoint, ZCLgroupid) - - def ClusterPumpConfigurationAndControl_SubscribeAttributeMaxSpeed(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_PumpConfigurationAndControl_MaxSpeed(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterPumpConfigurationAndControl_ReadAttributeMaxFlow(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_MaxFlow(device, ZCLendpoint, ZCLgroupid) - - def ClusterPumpConfigurationAndControl_SubscribeAttributeMaxFlow(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_PumpConfigurationAndControl_MaxFlow(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterPumpConfigurationAndControl_ReadAttributeMinConstPressure(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_MinConstPressure(device, ZCLendpoint, ZCLgroupid) - - def ClusterPumpConfigurationAndControl_SubscribeAttributeMinConstPressure(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_PumpConfigurationAndControl_MinConstPressure(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterPumpConfigurationAndControl_ReadAttributeMaxConstPressure(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_MaxConstPressure(device, ZCLendpoint, ZCLgroupid) - - def ClusterPumpConfigurationAndControl_SubscribeAttributeMaxConstPressure(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_PumpConfigurationAndControl_MaxConstPressure(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterPumpConfigurationAndControl_ReadAttributeMinCompPressure(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_MinCompPressure(device, ZCLendpoint, ZCLgroupid) - - def ClusterPumpConfigurationAndControl_SubscribeAttributeMinCompPressure(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_PumpConfigurationAndControl_MinCompPressure(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterPumpConfigurationAndControl_ReadAttributeMaxCompPressure(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_MaxCompPressure(device, ZCLendpoint, ZCLgroupid) - - def ClusterPumpConfigurationAndControl_SubscribeAttributeMaxCompPressure(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_PumpConfigurationAndControl_MaxCompPressure(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterPumpConfigurationAndControl_ReadAttributeMinConstSpeed(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_MinConstSpeed(device, ZCLendpoint, ZCLgroupid) - - def ClusterPumpConfigurationAndControl_SubscribeAttributeMinConstSpeed(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_PumpConfigurationAndControl_MinConstSpeed(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterPumpConfigurationAndControl_ReadAttributeMaxConstSpeed(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_MaxConstSpeed(device, ZCLendpoint, ZCLgroupid) - - def ClusterPumpConfigurationAndControl_SubscribeAttributeMaxConstSpeed(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_PumpConfigurationAndControl_MaxConstSpeed(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterPumpConfigurationAndControl_ReadAttributeMinConstFlow(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_MinConstFlow(device, ZCLendpoint, ZCLgroupid) - - def ClusterPumpConfigurationAndControl_SubscribeAttributeMinConstFlow(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_PumpConfigurationAndControl_MinConstFlow(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterPumpConfigurationAndControl_ReadAttributeMaxConstFlow(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_MaxConstFlow(device, ZCLendpoint, ZCLgroupid) - - def ClusterPumpConfigurationAndControl_SubscribeAttributeMaxConstFlow(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_PumpConfigurationAndControl_MaxConstFlow(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterPumpConfigurationAndControl_ReadAttributeMinConstTemp(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_MinConstTemp(device, ZCLendpoint, ZCLgroupid) - - def ClusterPumpConfigurationAndControl_SubscribeAttributeMinConstTemp(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_PumpConfigurationAndControl_MinConstTemp(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterPumpConfigurationAndControl_ReadAttributeMaxConstTemp(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_MaxConstTemp(device, ZCLendpoint, ZCLgroupid) - - def ClusterPumpConfigurationAndControl_SubscribeAttributeMaxConstTemp(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_PumpConfigurationAndControl_MaxConstTemp(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterPumpConfigurationAndControl_ReadAttributePumpStatus(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_PumpStatus(device, ZCLendpoint, ZCLgroupid) - - def ClusterPumpConfigurationAndControl_SubscribeAttributePumpStatus(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_PumpConfigurationAndControl_PumpStatus(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterPumpConfigurationAndControl_ReadAttributeEffectiveOperationMode(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_EffectiveOperationMode(device, ZCLendpoint, ZCLgroupid) - - def ClusterPumpConfigurationAndControl_SubscribeAttributeEffectiveOperationMode(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_PumpConfigurationAndControl_EffectiveOperationMode(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterPumpConfigurationAndControl_ReadAttributeEffectiveControlMode(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_EffectiveControlMode(device, ZCLendpoint, ZCLgroupid) - - def ClusterPumpConfigurationAndControl_SubscribeAttributeEffectiveControlMode(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_PumpConfigurationAndControl_EffectiveControlMode(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterPumpConfigurationAndControl_ReadAttributeCapacity(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_Capacity(device, ZCLendpoint, ZCLgroupid) - - def ClusterPumpConfigurationAndControl_SubscribeAttributeCapacity(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_PumpConfigurationAndControl_Capacity(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterPumpConfigurationAndControl_ReadAttributeSpeed(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_Speed(device, ZCLendpoint, ZCLgroupid) - - def ClusterPumpConfigurationAndControl_SubscribeAttributeSpeed(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_PumpConfigurationAndControl_Speed(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterPumpConfigurationAndControl_ReadAttributeLifetimeRunningHours(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_LifetimeRunningHours(device, ZCLendpoint, ZCLgroupid) - - def ClusterPumpConfigurationAndControl_SubscribeAttributeLifetimeRunningHours(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_PumpConfigurationAndControl_LifetimeRunningHours(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterPumpConfigurationAndControl_ReadAttributePower(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_Power(device, ZCLendpoint, ZCLgroupid) - - def ClusterPumpConfigurationAndControl_SubscribeAttributePower(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_PumpConfigurationAndControl_Power(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterPumpConfigurationAndControl_ReadAttributeLifetimeEnergyConsumed(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_LifetimeEnergyConsumed(device, ZCLendpoint, ZCLgroupid) - - def ClusterPumpConfigurationAndControl_SubscribeAttributeLifetimeEnergyConsumed(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_PumpConfigurationAndControl_LifetimeEnergyConsumed(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterPumpConfigurationAndControl_ReadAttributeOperationMode(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_OperationMode(device, ZCLendpoint, ZCLgroupid) - - def ClusterPumpConfigurationAndControl_SubscribeAttributeOperationMode(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_PumpConfigurationAndControl_OperationMode(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterPumpConfigurationAndControl_ReadAttributeControlMode(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_ControlMode(device, ZCLendpoint, ZCLgroupid) - - def ClusterPumpConfigurationAndControl_SubscribeAttributeControlMode(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_PumpConfigurationAndControl_ControlMode(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterPumpConfigurationAndControl_ReadAttributeAlarmMask(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_AlarmMask(device, ZCLendpoint, ZCLgroupid) - - def ClusterPumpConfigurationAndControl_SubscribeAttributeAlarmMask(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_PumpConfigurationAndControl_AlarmMask(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterPumpConfigurationAndControl_ReadAttributeFeatureMap(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_FeatureMap(device, ZCLendpoint, ZCLgroupid) - - def ClusterPumpConfigurationAndControl_SubscribeAttributeFeatureMap(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_PumpConfigurationAndControl_FeatureMap(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterPumpConfigurationAndControl_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_ClusterRevision(device, ZCLendpoint, ZCLgroupid) - - def ClusterPumpConfigurationAndControl_SubscribeAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_PumpConfigurationAndControl_ClusterRevision(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterRelativeHumidityMeasurement_ReadAttributeMeasuredValue(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_RelativeHumidityMeasurement_MeasuredValue(device, ZCLendpoint, ZCLgroupid) - - def ClusterRelativeHumidityMeasurement_SubscribeAttributeMeasuredValue(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_RelativeHumidityMeasurement_MeasuredValue(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterRelativeHumidityMeasurement_ReadAttributeMinMeasuredValue(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_RelativeHumidityMeasurement_MinMeasuredValue(device, ZCLendpoint, ZCLgroupid) - - def ClusterRelativeHumidityMeasurement_SubscribeAttributeMinMeasuredValue(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_RelativeHumidityMeasurement_MinMeasuredValue(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterRelativeHumidityMeasurement_ReadAttributeMaxMeasuredValue(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_RelativeHumidityMeasurement_MaxMeasuredValue(device, ZCLendpoint, ZCLgroupid) - - def ClusterRelativeHumidityMeasurement_SubscribeAttributeMaxMeasuredValue(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_RelativeHumidityMeasurement_MaxMeasuredValue(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterRelativeHumidityMeasurement_ReadAttributeTolerance(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_RelativeHumidityMeasurement_Tolerance(device, ZCLendpoint, ZCLgroupid) - - def ClusterRelativeHumidityMeasurement_SubscribeAttributeTolerance(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_RelativeHumidityMeasurement_Tolerance(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterRelativeHumidityMeasurement_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_RelativeHumidityMeasurement_ClusterRevision(device, ZCLendpoint, ZCLgroupid) - - def ClusterRelativeHumidityMeasurement_SubscribeAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_RelativeHumidityMeasurement_ClusterRevision(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterScenes_ReadAttributeSceneCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_Scenes_SceneCount(device, ZCLendpoint, ZCLgroupid) - - def ClusterScenes_SubscribeAttributeSceneCount(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_Scenes_SceneCount(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterScenes_ReadAttributeCurrentScene(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_Scenes_CurrentScene(device, ZCLendpoint, ZCLgroupid) - - def ClusterScenes_SubscribeAttributeCurrentScene(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_Scenes_CurrentScene(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterScenes_ReadAttributeCurrentGroup(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_Scenes_CurrentGroup(device, ZCLendpoint, ZCLgroupid) - - def ClusterScenes_SubscribeAttributeCurrentGroup(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_Scenes_CurrentGroup(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterScenes_ReadAttributeSceneValid(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_Scenes_SceneValid(device, ZCLendpoint, ZCLgroupid) - - def ClusterScenes_SubscribeAttributeSceneValid(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_Scenes_SceneValid(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterScenes_ReadAttributeNameSupport(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_Scenes_NameSupport(device, ZCLendpoint, ZCLgroupid) - - def ClusterScenes_SubscribeAttributeNameSupport(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_Scenes_NameSupport(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterScenes_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_Scenes_ClusterRevision(device, ZCLendpoint, ZCLgroupid) - - def ClusterScenes_SubscribeAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_Scenes_ClusterRevision(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterSoftwareDiagnostics_ReadAttributeThreadMetrics(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_SoftwareDiagnostics_ThreadMetrics(device, ZCLendpoint, ZCLgroupid) - - def ClusterSoftwareDiagnostics_ReadAttributeCurrentHeapFree(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_SoftwareDiagnostics_CurrentHeapFree(device, ZCLendpoint, ZCLgroupid) - - def ClusterSoftwareDiagnostics_SubscribeAttributeCurrentHeapFree(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_SoftwareDiagnostics_CurrentHeapFree(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterSoftwareDiagnostics_ReadAttributeCurrentHeapUsed(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_SoftwareDiagnostics_CurrentHeapUsed(device, ZCLendpoint, ZCLgroupid) - - def ClusterSoftwareDiagnostics_SubscribeAttributeCurrentHeapUsed(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_SoftwareDiagnostics_CurrentHeapUsed(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterSoftwareDiagnostics_ReadAttributeCurrentHeapHighWatermark(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_SoftwareDiagnostics_CurrentHeapHighWatermark(device, ZCLendpoint, ZCLgroupid) - - def ClusterSoftwareDiagnostics_SubscribeAttributeCurrentHeapHighWatermark(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_SoftwareDiagnostics_CurrentHeapHighWatermark(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterSoftwareDiagnostics_ReadAttributeFeatureMap(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_SoftwareDiagnostics_FeatureMap(device, ZCLendpoint, ZCLgroupid) - - def ClusterSoftwareDiagnostics_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_SoftwareDiagnostics_ClusterRevision(device, ZCLendpoint, ZCLgroupid) - - def ClusterSoftwareDiagnostics_SubscribeAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_SoftwareDiagnostics_ClusterRevision(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterSwitch_ReadAttributeNumberOfPositions(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_Switch_NumberOfPositions(device, ZCLendpoint, ZCLgroupid) - - def ClusterSwitch_SubscribeAttributeNumberOfPositions(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_Switch_NumberOfPositions(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterSwitch_ReadAttributeCurrentPosition(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_Switch_CurrentPosition(device, ZCLendpoint, ZCLgroupid) - - def ClusterSwitch_SubscribeAttributeCurrentPosition(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_Switch_CurrentPosition(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterSwitch_ReadAttributeMultiPressMax(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_Switch_MultiPressMax(device, ZCLendpoint, ZCLgroupid) - - def ClusterSwitch_SubscribeAttributeMultiPressMax(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_Switch_MultiPressMax(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterSwitch_ReadAttributeFeatureMap(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_Switch_FeatureMap(device, ZCLendpoint, ZCLgroupid) - - def ClusterSwitch_SubscribeAttributeFeatureMap(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_Switch_FeatureMap(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterSwitch_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_Switch_ClusterRevision(device, ZCLendpoint, ZCLgroupid) - - def ClusterSwitch_SubscribeAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_Switch_ClusterRevision(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterTvChannel_ReadAttributeTvChannelList(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_TvChannel_TvChannelList(device, ZCLendpoint, ZCLgroupid) - - def ClusterTvChannel_ReadAttributeTvChannelLineup(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_TvChannel_TvChannelLineup(device, ZCLendpoint, ZCLgroupid) - - def ClusterTvChannel_SubscribeAttributeTvChannelLineup(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_TvChannel_TvChannelLineup(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterTvChannel_ReadAttributeCurrentTvChannel(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_TvChannel_CurrentTvChannel(device, ZCLendpoint, ZCLgroupid) - - def ClusterTvChannel_SubscribeAttributeCurrentTvChannel(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_TvChannel_CurrentTvChannel(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterTvChannel_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_TvChannel_ClusterRevision(device, ZCLendpoint, ZCLgroupid) - - def ClusterTvChannel_SubscribeAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_TvChannel_ClusterRevision(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterTargetNavigator_ReadAttributeTargetNavigatorList(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_TargetNavigator_TargetNavigatorList(device, ZCLendpoint, ZCLgroupid) - - def ClusterTargetNavigator_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_TargetNavigator_ClusterRevision(device, ZCLendpoint, ZCLgroupid) - - def ClusterTargetNavigator_SubscribeAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_TargetNavigator_ClusterRevision(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterTemperatureMeasurement_ReadAttributeMeasuredValue(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_TemperatureMeasurement_MeasuredValue(device, ZCLendpoint, ZCLgroupid) - - def ClusterTemperatureMeasurement_SubscribeAttributeMeasuredValue(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_TemperatureMeasurement_MeasuredValue(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterTemperatureMeasurement_ReadAttributeMinMeasuredValue(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_TemperatureMeasurement_MinMeasuredValue(device, ZCLendpoint, ZCLgroupid) - - def ClusterTemperatureMeasurement_SubscribeAttributeMinMeasuredValue(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_TemperatureMeasurement_MinMeasuredValue(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterTemperatureMeasurement_ReadAttributeMaxMeasuredValue(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_TemperatureMeasurement_MaxMeasuredValue(device, ZCLendpoint, ZCLgroupid) - - def ClusterTemperatureMeasurement_SubscribeAttributeMaxMeasuredValue(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_TemperatureMeasurement_MaxMeasuredValue(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterTemperatureMeasurement_ReadAttributeTolerance(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_TemperatureMeasurement_Tolerance(device, ZCLendpoint, ZCLgroupid) - - def ClusterTemperatureMeasurement_SubscribeAttributeTolerance(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_TemperatureMeasurement_Tolerance(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterTemperatureMeasurement_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_TemperatureMeasurement_ClusterRevision(device, ZCLendpoint, ZCLgroupid) - - def ClusterTemperatureMeasurement_SubscribeAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_TemperatureMeasurement_ClusterRevision(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterTestCluster_ReadAttributeBoolean(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_TestCluster_Boolean(device, ZCLendpoint, ZCLgroupid) - - def ClusterTestCluster_SubscribeAttributeBoolean(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_TestCluster_Boolean(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterTestCluster_ReadAttributeBitmap8(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_TestCluster_Bitmap8(device, ZCLendpoint, ZCLgroupid) - - def ClusterTestCluster_SubscribeAttributeBitmap8(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_TestCluster_Bitmap8(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterTestCluster_ReadAttributeBitmap16(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_TestCluster_Bitmap16(device, ZCLendpoint, ZCLgroupid) - - def ClusterTestCluster_SubscribeAttributeBitmap16(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_TestCluster_Bitmap16(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterTestCluster_ReadAttributeBitmap32(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_TestCluster_Bitmap32(device, ZCLendpoint, ZCLgroupid) - - def ClusterTestCluster_SubscribeAttributeBitmap32(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_TestCluster_Bitmap32(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterTestCluster_ReadAttributeBitmap64(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_TestCluster_Bitmap64(device, ZCLendpoint, ZCLgroupid) - - def ClusterTestCluster_SubscribeAttributeBitmap64(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_TestCluster_Bitmap64(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterTestCluster_ReadAttributeInt8u(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_TestCluster_Int8u(device, ZCLendpoint, ZCLgroupid) - - def ClusterTestCluster_SubscribeAttributeInt8u(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_TestCluster_Int8u(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterTestCluster_ReadAttributeInt16u(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_TestCluster_Int16u(device, ZCLendpoint, ZCLgroupid) - - def ClusterTestCluster_SubscribeAttributeInt16u(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_TestCluster_Int16u(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterTestCluster_ReadAttributeInt32u(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_TestCluster_Int32u(device, ZCLendpoint, ZCLgroupid) - - def ClusterTestCluster_SubscribeAttributeInt32u(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_TestCluster_Int32u(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterTestCluster_ReadAttributeInt64u(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_TestCluster_Int64u(device, ZCLendpoint, ZCLgroupid) - - def ClusterTestCluster_SubscribeAttributeInt64u(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_TestCluster_Int64u(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterTestCluster_ReadAttributeInt8s(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_TestCluster_Int8s(device, ZCLendpoint, ZCLgroupid) - - def ClusterTestCluster_SubscribeAttributeInt8s(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_TestCluster_Int8s(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterTestCluster_ReadAttributeInt16s(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_TestCluster_Int16s(device, ZCLendpoint, ZCLgroupid) - - def ClusterTestCluster_SubscribeAttributeInt16s(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_TestCluster_Int16s(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterTestCluster_ReadAttributeInt32s(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_TestCluster_Int32s(device, ZCLendpoint, ZCLgroupid) - - def ClusterTestCluster_SubscribeAttributeInt32s(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_TestCluster_Int32s(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterTestCluster_ReadAttributeInt64s(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_TestCluster_Int64s(device, ZCLendpoint, ZCLgroupid) - - def ClusterTestCluster_SubscribeAttributeInt64s(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_TestCluster_Int64s(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterTestCluster_ReadAttributeEnum8(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_TestCluster_Enum8(device, ZCLendpoint, ZCLgroupid) - - def ClusterTestCluster_SubscribeAttributeEnum8(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_TestCluster_Enum8(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterTestCluster_ReadAttributeEnum16(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_TestCluster_Enum16(device, ZCLendpoint, ZCLgroupid) - - def ClusterTestCluster_SubscribeAttributeEnum16(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_TestCluster_Enum16(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterTestCluster_ReadAttributeOctetString(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_TestCluster_OctetString(device, ZCLendpoint, ZCLgroupid) - - def ClusterTestCluster_SubscribeAttributeOctetString(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_TestCluster_OctetString(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterTestCluster_ReadAttributeListInt8u(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_TestCluster_ListInt8u(device, ZCLendpoint, ZCLgroupid) - - def ClusterTestCluster_ReadAttributeListOctetString(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_TestCluster_ListOctetString(device, ZCLendpoint, ZCLgroupid) - - def ClusterTestCluster_ReadAttributeListStructOctetString(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_TestCluster_ListStructOctetString(device, ZCLendpoint, ZCLgroupid) - - def ClusterTestCluster_ReadAttributeLongOctetString(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_TestCluster_LongOctetString(device, ZCLendpoint, ZCLgroupid) - - def ClusterTestCluster_SubscribeAttributeLongOctetString(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_TestCluster_LongOctetString(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterTestCluster_ReadAttributeCharString(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_TestCluster_CharString(device, ZCLendpoint, ZCLgroupid) - - def ClusterTestCluster_SubscribeAttributeCharString(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_TestCluster_CharString(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterTestCluster_ReadAttributeLongCharString(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_TestCluster_LongCharString(device, ZCLendpoint, ZCLgroupid) - - def ClusterTestCluster_SubscribeAttributeLongCharString(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_TestCluster_LongCharString(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterTestCluster_ReadAttributeEpochUs(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_TestCluster_EpochUs(device, ZCLendpoint, ZCLgroupid) - - def ClusterTestCluster_SubscribeAttributeEpochUs(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_TestCluster_EpochUs(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterTestCluster_ReadAttributeEpochS(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_TestCluster_EpochS(device, ZCLendpoint, ZCLgroupid) - - def ClusterTestCluster_SubscribeAttributeEpochS(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_TestCluster_EpochS(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterTestCluster_ReadAttributeVendorId(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_TestCluster_VendorId(device, ZCLendpoint, ZCLgroupid) - - def ClusterTestCluster_SubscribeAttributeVendorId(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_TestCluster_VendorId(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterTestCluster_ReadAttributeListNullablesAndOptionalsStruct(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_TestCluster_ListNullablesAndOptionalsStruct(device, ZCLendpoint, ZCLgroupid) - - def ClusterTestCluster_ReadAttributeUnsupported(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_TestCluster_Unsupported(device, ZCLendpoint, ZCLgroupid) - - def ClusterTestCluster_SubscribeAttributeUnsupported(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_TestCluster_Unsupported(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterTestCluster_ReadAttributeNullableBoolean(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableBoolean(device, ZCLendpoint, ZCLgroupid) - - def ClusterTestCluster_SubscribeAttributeNullableBoolean(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_TestCluster_NullableBoolean(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterTestCluster_ReadAttributeNullableBitmap8(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableBitmap8(device, ZCLendpoint, ZCLgroupid) - - def ClusterTestCluster_SubscribeAttributeNullableBitmap8(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_TestCluster_NullableBitmap8(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterTestCluster_ReadAttributeNullableBitmap16(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableBitmap16(device, ZCLendpoint, ZCLgroupid) - - def ClusterTestCluster_SubscribeAttributeNullableBitmap16(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_TestCluster_NullableBitmap16(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterTestCluster_ReadAttributeNullableBitmap32(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableBitmap32(device, ZCLendpoint, ZCLgroupid) - - def ClusterTestCluster_SubscribeAttributeNullableBitmap32(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_TestCluster_NullableBitmap32(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterTestCluster_ReadAttributeNullableBitmap64(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableBitmap64(device, ZCLendpoint, ZCLgroupid) - - def ClusterTestCluster_SubscribeAttributeNullableBitmap64(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_TestCluster_NullableBitmap64(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterTestCluster_ReadAttributeNullableInt8u(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableInt8u(device, ZCLendpoint, ZCLgroupid) - - def ClusterTestCluster_SubscribeAttributeNullableInt8u(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_TestCluster_NullableInt8u(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterTestCluster_ReadAttributeNullableInt16u(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableInt16u(device, ZCLendpoint, ZCLgroupid) - - def ClusterTestCluster_SubscribeAttributeNullableInt16u(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_TestCluster_NullableInt16u(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterTestCluster_ReadAttributeNullableInt32u(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableInt32u(device, ZCLendpoint, ZCLgroupid) - - def ClusterTestCluster_SubscribeAttributeNullableInt32u(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_TestCluster_NullableInt32u(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterTestCluster_ReadAttributeNullableInt64u(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableInt64u(device, ZCLendpoint, ZCLgroupid) - - def ClusterTestCluster_SubscribeAttributeNullableInt64u(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_TestCluster_NullableInt64u(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterTestCluster_ReadAttributeNullableInt8s(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableInt8s(device, ZCLendpoint, ZCLgroupid) - - def ClusterTestCluster_SubscribeAttributeNullableInt8s(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_TestCluster_NullableInt8s(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterTestCluster_ReadAttributeNullableInt16s(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableInt16s(device, ZCLendpoint, ZCLgroupid) - - def ClusterTestCluster_SubscribeAttributeNullableInt16s(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_TestCluster_NullableInt16s(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterTestCluster_ReadAttributeNullableInt32s(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableInt32s(device, ZCLendpoint, ZCLgroupid) - - def ClusterTestCluster_SubscribeAttributeNullableInt32s(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_TestCluster_NullableInt32s(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterTestCluster_ReadAttributeNullableInt64s(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableInt64s(device, ZCLendpoint, ZCLgroupid) - - def ClusterTestCluster_SubscribeAttributeNullableInt64s(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_TestCluster_NullableInt64s(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterTestCluster_ReadAttributeNullableEnum8(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableEnum8(device, ZCLendpoint, ZCLgroupid) - - def ClusterTestCluster_SubscribeAttributeNullableEnum8(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_TestCluster_NullableEnum8(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterTestCluster_ReadAttributeNullableEnum16(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableEnum16(device, ZCLendpoint, ZCLgroupid) - - def ClusterTestCluster_SubscribeAttributeNullableEnum16(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_TestCluster_NullableEnum16(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterTestCluster_ReadAttributeNullableOctetString(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableOctetString(device, ZCLendpoint, ZCLgroupid) - - def ClusterTestCluster_SubscribeAttributeNullableOctetString(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_TestCluster_NullableOctetString(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterTestCluster_ReadAttributeNullableCharString(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableCharString(device, ZCLendpoint, ZCLgroupid) - - def ClusterTestCluster_SubscribeAttributeNullableCharString(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_TestCluster_NullableCharString(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterTestCluster_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_TestCluster_ClusterRevision(device, ZCLendpoint, ZCLgroupid) - - def ClusterTestCluster_SubscribeAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_TestCluster_ClusterRevision(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThermostat_ReadAttributeLocalTemperature(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_Thermostat_LocalTemperature(device, ZCLendpoint, ZCLgroupid) - - def ClusterThermostat_SubscribeAttributeLocalTemperature(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_Thermostat_LocalTemperature(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThermostat_ReadAttributeAbsMinHeatSetpointLimit(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_Thermostat_AbsMinHeatSetpointLimit(device, ZCLendpoint, ZCLgroupid) - - def ClusterThermostat_SubscribeAttributeAbsMinHeatSetpointLimit(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_Thermostat_AbsMinHeatSetpointLimit(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThermostat_ReadAttributeAbsMaxHeatSetpointLimit(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_Thermostat_AbsMaxHeatSetpointLimit(device, ZCLendpoint, ZCLgroupid) - - def ClusterThermostat_SubscribeAttributeAbsMaxHeatSetpointLimit(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_Thermostat_AbsMaxHeatSetpointLimit(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThermostat_ReadAttributeAbsMinCoolSetpointLimit(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_Thermostat_AbsMinCoolSetpointLimit(device, ZCLendpoint, ZCLgroupid) - - def ClusterThermostat_SubscribeAttributeAbsMinCoolSetpointLimit(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_Thermostat_AbsMinCoolSetpointLimit(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThermostat_ReadAttributeAbsMaxCoolSetpointLimit(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_Thermostat_AbsMaxCoolSetpointLimit(device, ZCLendpoint, ZCLgroupid) - - def ClusterThermostat_SubscribeAttributeAbsMaxCoolSetpointLimit(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_Thermostat_AbsMaxCoolSetpointLimit(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThermostat_ReadAttributeOccupiedCoolingSetpoint(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_Thermostat_OccupiedCoolingSetpoint(device, ZCLendpoint, ZCLgroupid) - - def ClusterThermostat_SubscribeAttributeOccupiedCoolingSetpoint(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_Thermostat_OccupiedCoolingSetpoint(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThermostat_ReadAttributeOccupiedHeatingSetpoint(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_Thermostat_OccupiedHeatingSetpoint(device, ZCLendpoint, ZCLgroupid) - - def ClusterThermostat_SubscribeAttributeOccupiedHeatingSetpoint(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_Thermostat_OccupiedHeatingSetpoint(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThermostat_ReadAttributeMinHeatSetpointLimit(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_Thermostat_MinHeatSetpointLimit(device, ZCLendpoint, ZCLgroupid) - - def ClusterThermostat_SubscribeAttributeMinHeatSetpointLimit(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_Thermostat_MinHeatSetpointLimit(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThermostat_ReadAttributeMaxHeatSetpointLimit(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_Thermostat_MaxHeatSetpointLimit(device, ZCLendpoint, ZCLgroupid) - - def ClusterThermostat_SubscribeAttributeMaxHeatSetpointLimit(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_Thermostat_MaxHeatSetpointLimit(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThermostat_ReadAttributeMinCoolSetpointLimit(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_Thermostat_MinCoolSetpointLimit(device, ZCLendpoint, ZCLgroupid) - - def ClusterThermostat_SubscribeAttributeMinCoolSetpointLimit(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_Thermostat_MinCoolSetpointLimit(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThermostat_ReadAttributeMaxCoolSetpointLimit(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_Thermostat_MaxCoolSetpointLimit(device, ZCLendpoint, ZCLgroupid) - - def ClusterThermostat_SubscribeAttributeMaxCoolSetpointLimit(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_Thermostat_MaxCoolSetpointLimit(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThermostat_ReadAttributeMinSetpointDeadBand(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_Thermostat_MinSetpointDeadBand(device, ZCLendpoint, ZCLgroupid) - - def ClusterThermostat_SubscribeAttributeMinSetpointDeadBand(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_Thermostat_MinSetpointDeadBand(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThermostat_ReadAttributeControlSequenceOfOperation(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_Thermostat_ControlSequenceOfOperation(device, ZCLendpoint, ZCLgroupid) - - def ClusterThermostat_SubscribeAttributeControlSequenceOfOperation(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_Thermostat_ControlSequenceOfOperation(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThermostat_ReadAttributeSystemMode(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_Thermostat_SystemMode(device, ZCLendpoint, ZCLgroupid) - - def ClusterThermostat_SubscribeAttributeSystemMode(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_Thermostat_SystemMode(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThermostat_ReadAttributeStartOfWeek(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_Thermostat_StartOfWeek(device, ZCLendpoint, ZCLgroupid) - - def ClusterThermostat_SubscribeAttributeStartOfWeek(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_Thermostat_StartOfWeek(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThermostat_ReadAttributeNumberOfWeeklyTransitions(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_Thermostat_NumberOfWeeklyTransitions(device, ZCLendpoint, ZCLgroupid) - - def ClusterThermostat_SubscribeAttributeNumberOfWeeklyTransitions(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_Thermostat_NumberOfWeeklyTransitions(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThermostat_ReadAttributeNumberOfDailyTransitions(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_Thermostat_NumberOfDailyTransitions(device, ZCLendpoint, ZCLgroupid) - - def ClusterThermostat_SubscribeAttributeNumberOfDailyTransitions(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_Thermostat_NumberOfDailyTransitions(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThermostat_ReadAttributeFeatureMap(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_Thermostat_FeatureMap(device, ZCLendpoint, ZCLgroupid) - - def ClusterThermostat_SubscribeAttributeFeatureMap(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_Thermostat_FeatureMap(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThermostat_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_Thermostat_ClusterRevision(device, ZCLendpoint, ZCLgroupid) - - def ClusterThermostat_SubscribeAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_Thermostat_ClusterRevision(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThermostatUserInterfaceConfiguration_ReadAttributeTemperatureDisplayMode(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ThermostatUserInterfaceConfiguration_TemperatureDisplayMode(device, ZCLendpoint, ZCLgroupid) - - def ClusterThermostatUserInterfaceConfiguration_SubscribeAttributeTemperatureDisplayMode(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ThermostatUserInterfaceConfiguration_TemperatureDisplayMode(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThermostatUserInterfaceConfiguration_ReadAttributeKeypadLockout(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ThermostatUserInterfaceConfiguration_KeypadLockout(device, ZCLendpoint, ZCLgroupid) - - def ClusterThermostatUserInterfaceConfiguration_SubscribeAttributeKeypadLockout(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ThermostatUserInterfaceConfiguration_KeypadLockout(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThermostatUserInterfaceConfiguration_ReadAttributeScheduleProgrammingVisibility(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ThermostatUserInterfaceConfiguration_ScheduleProgrammingVisibility(device, ZCLendpoint, ZCLgroupid) - - def ClusterThermostatUserInterfaceConfiguration_SubscribeAttributeScheduleProgrammingVisibility(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ThermostatUserInterfaceConfiguration_ScheduleProgrammingVisibility(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThermostatUserInterfaceConfiguration_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ThermostatUserInterfaceConfiguration_ClusterRevision(device, ZCLendpoint, ZCLgroupid) - - def ClusterThermostatUserInterfaceConfiguration_SubscribeAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ThermostatUserInterfaceConfiguration_ClusterRevision(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThreadNetworkDiagnostics_ReadAttributeChannel(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_Channel(device, ZCLendpoint, ZCLgroupid) - - def ClusterThreadNetworkDiagnostics_SubscribeAttributeChannel(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_Channel(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThreadNetworkDiagnostics_ReadAttributeRoutingRole(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RoutingRole(device, ZCLendpoint, ZCLgroupid) - - def ClusterThreadNetworkDiagnostics_SubscribeAttributeRoutingRole(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RoutingRole(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThreadNetworkDiagnostics_ReadAttributeNetworkName(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_NetworkName(device, ZCLendpoint, ZCLgroupid) - - def ClusterThreadNetworkDiagnostics_SubscribeAttributeNetworkName(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_NetworkName(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThreadNetworkDiagnostics_ReadAttributePanId(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_PanId(device, ZCLendpoint, ZCLgroupid) - - def ClusterThreadNetworkDiagnostics_SubscribeAttributePanId(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_PanId(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThreadNetworkDiagnostics_ReadAttributeExtendedPanId(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_ExtendedPanId(device, ZCLendpoint, ZCLgroupid) - - def ClusterThreadNetworkDiagnostics_SubscribeAttributeExtendedPanId(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_ExtendedPanId(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThreadNetworkDiagnostics_ReadAttributeMeshLocalPrefix(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_MeshLocalPrefix(device, ZCLendpoint, ZCLgroupid) - - def ClusterThreadNetworkDiagnostics_SubscribeAttributeMeshLocalPrefix(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_MeshLocalPrefix(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThreadNetworkDiagnostics_ReadAttributeOverrunCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_OverrunCount(device, ZCLendpoint, ZCLgroupid) - - def ClusterThreadNetworkDiagnostics_SubscribeAttributeOverrunCount(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_OverrunCount(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThreadNetworkDiagnostics_ReadAttributeNeighborTableList(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_NeighborTableList(device, ZCLendpoint, ZCLgroupid) - - def ClusterThreadNetworkDiagnostics_ReadAttributeRouteTableList(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RouteTableList(device, ZCLendpoint, ZCLgroupid) - - def ClusterThreadNetworkDiagnostics_ReadAttributePartitionId(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_PartitionId(device, ZCLendpoint, ZCLgroupid) - - def ClusterThreadNetworkDiagnostics_SubscribeAttributePartitionId(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_PartitionId(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThreadNetworkDiagnostics_ReadAttributeWeighting(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_Weighting(device, ZCLendpoint, ZCLgroupid) - - def ClusterThreadNetworkDiagnostics_SubscribeAttributeWeighting(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_Weighting(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThreadNetworkDiagnostics_ReadAttributeDataVersion(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_DataVersion(device, ZCLendpoint, ZCLgroupid) - - def ClusterThreadNetworkDiagnostics_SubscribeAttributeDataVersion(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_DataVersion(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThreadNetworkDiagnostics_ReadAttributeStableDataVersion(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_StableDataVersion(device, ZCLendpoint, ZCLgroupid) - - def ClusterThreadNetworkDiagnostics_SubscribeAttributeStableDataVersion(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_StableDataVersion(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThreadNetworkDiagnostics_ReadAttributeLeaderRouterId(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_LeaderRouterId(device, ZCLendpoint, ZCLgroupid) - - def ClusterThreadNetworkDiagnostics_SubscribeAttributeLeaderRouterId(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_LeaderRouterId(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThreadNetworkDiagnostics_ReadAttributeDetachedRoleCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_DetachedRoleCount(device, ZCLendpoint, ZCLgroupid) - - def ClusterThreadNetworkDiagnostics_SubscribeAttributeDetachedRoleCount(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_DetachedRoleCount(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThreadNetworkDiagnostics_ReadAttributeChildRoleCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_ChildRoleCount(device, ZCLendpoint, ZCLgroupid) - - def ClusterThreadNetworkDiagnostics_SubscribeAttributeChildRoleCount(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_ChildRoleCount(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThreadNetworkDiagnostics_ReadAttributeRouterRoleCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RouterRoleCount(device, ZCLendpoint, ZCLgroupid) - - def ClusterThreadNetworkDiagnostics_SubscribeAttributeRouterRoleCount(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RouterRoleCount(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThreadNetworkDiagnostics_ReadAttributeLeaderRoleCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_LeaderRoleCount(device, ZCLendpoint, ZCLgroupid) - - def ClusterThreadNetworkDiagnostics_SubscribeAttributeLeaderRoleCount(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_LeaderRoleCount(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThreadNetworkDiagnostics_ReadAttributeAttachAttemptCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_AttachAttemptCount(device, ZCLendpoint, ZCLgroupid) - - def ClusterThreadNetworkDiagnostics_SubscribeAttributeAttachAttemptCount(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_AttachAttemptCount(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThreadNetworkDiagnostics_ReadAttributePartitionIdChangeCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_PartitionIdChangeCount(device, ZCLendpoint, ZCLgroupid) - - def ClusterThreadNetworkDiagnostics_SubscribeAttributePartitionIdChangeCount(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_PartitionIdChangeCount(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThreadNetworkDiagnostics_ReadAttributeBetterPartitionAttachAttemptCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_BetterPartitionAttachAttemptCount(device, ZCLendpoint, ZCLgroupid) - - def ClusterThreadNetworkDiagnostics_SubscribeAttributeBetterPartitionAttachAttemptCount(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_BetterPartitionAttachAttemptCount(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThreadNetworkDiagnostics_ReadAttributeParentChangeCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_ParentChangeCount(device, ZCLendpoint, ZCLgroupid) - - def ClusterThreadNetworkDiagnostics_SubscribeAttributeParentChangeCount(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_ParentChangeCount(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThreadNetworkDiagnostics_ReadAttributeTxTotalCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxTotalCount(device, ZCLendpoint, ZCLgroupid) - - def ClusterThreadNetworkDiagnostics_SubscribeAttributeTxTotalCount(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxTotalCount(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThreadNetworkDiagnostics_ReadAttributeTxUnicastCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxUnicastCount(device, ZCLendpoint, ZCLgroupid) - - def ClusterThreadNetworkDiagnostics_SubscribeAttributeTxUnicastCount(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxUnicastCount(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThreadNetworkDiagnostics_ReadAttributeTxBroadcastCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxBroadcastCount(device, ZCLendpoint, ZCLgroupid) - - def ClusterThreadNetworkDiagnostics_SubscribeAttributeTxBroadcastCount(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxBroadcastCount(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThreadNetworkDiagnostics_ReadAttributeTxAckRequestedCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxAckRequestedCount(device, ZCLendpoint, ZCLgroupid) - - def ClusterThreadNetworkDiagnostics_SubscribeAttributeTxAckRequestedCount(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxAckRequestedCount(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThreadNetworkDiagnostics_ReadAttributeTxAckedCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxAckedCount(device, ZCLendpoint, ZCLgroupid) - - def ClusterThreadNetworkDiagnostics_SubscribeAttributeTxAckedCount(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxAckedCount(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThreadNetworkDiagnostics_ReadAttributeTxNoAckRequestedCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxNoAckRequestedCount(device, ZCLendpoint, ZCLgroupid) - - def ClusterThreadNetworkDiagnostics_SubscribeAttributeTxNoAckRequestedCount(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxNoAckRequestedCount(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThreadNetworkDiagnostics_ReadAttributeTxDataCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxDataCount(device, ZCLendpoint, ZCLgroupid) - - def ClusterThreadNetworkDiagnostics_SubscribeAttributeTxDataCount(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxDataCount(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThreadNetworkDiagnostics_ReadAttributeTxDataPollCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxDataPollCount(device, ZCLendpoint, ZCLgroupid) - - def ClusterThreadNetworkDiagnostics_SubscribeAttributeTxDataPollCount(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxDataPollCount(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThreadNetworkDiagnostics_ReadAttributeTxBeaconCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxBeaconCount(device, ZCLendpoint, ZCLgroupid) - - def ClusterThreadNetworkDiagnostics_SubscribeAttributeTxBeaconCount(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxBeaconCount(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThreadNetworkDiagnostics_ReadAttributeTxBeaconRequestCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxBeaconRequestCount(device, ZCLendpoint, ZCLgroupid) - - def ClusterThreadNetworkDiagnostics_SubscribeAttributeTxBeaconRequestCount(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxBeaconRequestCount(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThreadNetworkDiagnostics_ReadAttributeTxOtherCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxOtherCount(device, ZCLendpoint, ZCLgroupid) - - def ClusterThreadNetworkDiagnostics_SubscribeAttributeTxOtherCount(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxOtherCount(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThreadNetworkDiagnostics_ReadAttributeTxRetryCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxRetryCount(device, ZCLendpoint, ZCLgroupid) - - def ClusterThreadNetworkDiagnostics_SubscribeAttributeTxRetryCount(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxRetryCount(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThreadNetworkDiagnostics_ReadAttributeTxDirectMaxRetryExpiryCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxDirectMaxRetryExpiryCount(device, ZCLendpoint, ZCLgroupid) - - def ClusterThreadNetworkDiagnostics_SubscribeAttributeTxDirectMaxRetryExpiryCount(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxDirectMaxRetryExpiryCount(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThreadNetworkDiagnostics_ReadAttributeTxIndirectMaxRetryExpiryCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxIndirectMaxRetryExpiryCount(device, ZCLendpoint, ZCLgroupid) - - def ClusterThreadNetworkDiagnostics_SubscribeAttributeTxIndirectMaxRetryExpiryCount(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxIndirectMaxRetryExpiryCount(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThreadNetworkDiagnostics_ReadAttributeTxErrCcaCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxErrCcaCount(device, ZCLendpoint, ZCLgroupid) - - def ClusterThreadNetworkDiagnostics_SubscribeAttributeTxErrCcaCount(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxErrCcaCount(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThreadNetworkDiagnostics_ReadAttributeTxErrAbortCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxErrAbortCount(device, ZCLendpoint, ZCLgroupid) - - def ClusterThreadNetworkDiagnostics_SubscribeAttributeTxErrAbortCount(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxErrAbortCount(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThreadNetworkDiagnostics_ReadAttributeTxErrBusyChannelCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxErrBusyChannelCount(device, ZCLendpoint, ZCLgroupid) - - def ClusterThreadNetworkDiagnostics_SubscribeAttributeTxErrBusyChannelCount(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxErrBusyChannelCount(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThreadNetworkDiagnostics_ReadAttributeRxTotalCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxTotalCount(device, ZCLendpoint, ZCLgroupid) - - def ClusterThreadNetworkDiagnostics_SubscribeAttributeRxTotalCount(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxTotalCount(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThreadNetworkDiagnostics_ReadAttributeRxUnicastCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxUnicastCount(device, ZCLendpoint, ZCLgroupid) - - def ClusterThreadNetworkDiagnostics_SubscribeAttributeRxUnicastCount(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxUnicastCount(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThreadNetworkDiagnostics_ReadAttributeRxBroadcastCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxBroadcastCount(device, ZCLendpoint, ZCLgroupid) - - def ClusterThreadNetworkDiagnostics_SubscribeAttributeRxBroadcastCount(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxBroadcastCount(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThreadNetworkDiagnostics_ReadAttributeRxDataCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxDataCount(device, ZCLendpoint, ZCLgroupid) - - def ClusterThreadNetworkDiagnostics_SubscribeAttributeRxDataCount(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxDataCount(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThreadNetworkDiagnostics_ReadAttributeRxDataPollCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxDataPollCount(device, ZCLendpoint, ZCLgroupid) - - def ClusterThreadNetworkDiagnostics_SubscribeAttributeRxDataPollCount(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxDataPollCount(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThreadNetworkDiagnostics_ReadAttributeRxBeaconCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxBeaconCount(device, ZCLendpoint, ZCLgroupid) - - def ClusterThreadNetworkDiagnostics_SubscribeAttributeRxBeaconCount(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxBeaconCount(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThreadNetworkDiagnostics_ReadAttributeRxBeaconRequestCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxBeaconRequestCount(device, ZCLendpoint, ZCLgroupid) - - def ClusterThreadNetworkDiagnostics_SubscribeAttributeRxBeaconRequestCount(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxBeaconRequestCount(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThreadNetworkDiagnostics_ReadAttributeRxOtherCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxOtherCount(device, ZCLendpoint, ZCLgroupid) - - def ClusterThreadNetworkDiagnostics_SubscribeAttributeRxOtherCount(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxOtherCount(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThreadNetworkDiagnostics_ReadAttributeRxAddressFilteredCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxAddressFilteredCount(device, ZCLendpoint, ZCLgroupid) - - def ClusterThreadNetworkDiagnostics_SubscribeAttributeRxAddressFilteredCount(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxAddressFilteredCount(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThreadNetworkDiagnostics_ReadAttributeRxDestAddrFilteredCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxDestAddrFilteredCount(device, ZCLendpoint, ZCLgroupid) - - def ClusterThreadNetworkDiagnostics_SubscribeAttributeRxDestAddrFilteredCount(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxDestAddrFilteredCount(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThreadNetworkDiagnostics_ReadAttributeRxDuplicatedCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxDuplicatedCount(device, ZCLendpoint, ZCLgroupid) - - def ClusterThreadNetworkDiagnostics_SubscribeAttributeRxDuplicatedCount(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxDuplicatedCount(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThreadNetworkDiagnostics_ReadAttributeRxErrNoFrameCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxErrNoFrameCount(device, ZCLendpoint, ZCLgroupid) - - def ClusterThreadNetworkDiagnostics_SubscribeAttributeRxErrNoFrameCount(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxErrNoFrameCount(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThreadNetworkDiagnostics_ReadAttributeRxErrUnknownNeighborCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxErrUnknownNeighborCount(device, ZCLendpoint, ZCLgroupid) - - def ClusterThreadNetworkDiagnostics_SubscribeAttributeRxErrUnknownNeighborCount(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxErrUnknownNeighborCount(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThreadNetworkDiagnostics_ReadAttributeRxErrInvalidSrcAddrCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxErrInvalidSrcAddrCount(device, ZCLendpoint, ZCLgroupid) - - def ClusterThreadNetworkDiagnostics_SubscribeAttributeRxErrInvalidSrcAddrCount(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxErrInvalidSrcAddrCount(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThreadNetworkDiagnostics_ReadAttributeRxErrSecCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxErrSecCount(device, ZCLendpoint, ZCLgroupid) - - def ClusterThreadNetworkDiagnostics_SubscribeAttributeRxErrSecCount(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxErrSecCount(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThreadNetworkDiagnostics_ReadAttributeRxErrFcsCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxErrFcsCount(device, ZCLendpoint, ZCLgroupid) - - def ClusterThreadNetworkDiagnostics_SubscribeAttributeRxErrFcsCount(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxErrFcsCount(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThreadNetworkDiagnostics_ReadAttributeRxErrOtherCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxErrOtherCount(device, ZCLendpoint, ZCLgroupid) - - def ClusterThreadNetworkDiagnostics_SubscribeAttributeRxErrOtherCount(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxErrOtherCount(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThreadNetworkDiagnostics_ReadAttributeActiveTimestamp(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_ActiveTimestamp(device, ZCLendpoint, ZCLgroupid) - - def ClusterThreadNetworkDiagnostics_SubscribeAttributeActiveTimestamp(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_ActiveTimestamp(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThreadNetworkDiagnostics_ReadAttributePendingTimestamp(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_PendingTimestamp(device, ZCLendpoint, ZCLgroupid) - - def ClusterThreadNetworkDiagnostics_SubscribeAttributePendingTimestamp(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_PendingTimestamp(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThreadNetworkDiagnostics_ReadAttributeDelay(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_Delay(device, ZCLendpoint, ZCLgroupid) - - def ClusterThreadNetworkDiagnostics_SubscribeAttributeDelay(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_Delay(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThreadNetworkDiagnostics_ReadAttributeSecurityPolicy(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_SecurityPolicy(device, ZCLendpoint, ZCLgroupid) - - def ClusterThreadNetworkDiagnostics_ReadAttributeChannelMask(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_ChannelMask(device, ZCLendpoint, ZCLgroupid) - - def ClusterThreadNetworkDiagnostics_SubscribeAttributeChannelMask(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_ChannelMask(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterThreadNetworkDiagnostics_ReadAttributeOperationalDatasetComponents(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_OperationalDatasetComponents(device, ZCLendpoint, ZCLgroupid) - - def ClusterThreadNetworkDiagnostics_ReadAttributeActiveNetworkFaultsList(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_ActiveNetworkFaultsList(device, ZCLendpoint, ZCLgroupid) - - def ClusterThreadNetworkDiagnostics_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_ClusterRevision(device, ZCLendpoint, ZCLgroupid) - - def ClusterThreadNetworkDiagnostics_SubscribeAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_ClusterRevision(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterWakeOnLan_ReadAttributeWakeOnLanMacAddress(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_WakeOnLan_WakeOnLanMacAddress(device, ZCLendpoint, ZCLgroupid) - - def ClusterWakeOnLan_SubscribeAttributeWakeOnLanMacAddress(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_WakeOnLan_WakeOnLanMacAddress(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterWakeOnLan_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_WakeOnLan_ClusterRevision(device, ZCLendpoint, ZCLgroupid) - - def ClusterWakeOnLan_SubscribeAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_WakeOnLan_ClusterRevision(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterWiFiNetworkDiagnostics_ReadAttributeBssid(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_WiFiNetworkDiagnostics_Bssid(device, ZCLendpoint, ZCLgroupid) - - def ClusterWiFiNetworkDiagnostics_SubscribeAttributeBssid(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_WiFiNetworkDiagnostics_Bssid(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterWiFiNetworkDiagnostics_ReadAttributeSecurityType(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_WiFiNetworkDiagnostics_SecurityType(device, ZCLendpoint, ZCLgroupid) - - def ClusterWiFiNetworkDiagnostics_SubscribeAttributeSecurityType(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_WiFiNetworkDiagnostics_SecurityType(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterWiFiNetworkDiagnostics_ReadAttributeWiFiVersion(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_WiFiNetworkDiagnostics_WiFiVersion(device, ZCLendpoint, ZCLgroupid) - - def ClusterWiFiNetworkDiagnostics_SubscribeAttributeWiFiVersion(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_WiFiNetworkDiagnostics_WiFiVersion(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterWiFiNetworkDiagnostics_ReadAttributeChannelNumber(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_WiFiNetworkDiagnostics_ChannelNumber(device, ZCLendpoint, ZCLgroupid) - - def ClusterWiFiNetworkDiagnostics_SubscribeAttributeChannelNumber(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_WiFiNetworkDiagnostics_ChannelNumber(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterWiFiNetworkDiagnostics_ReadAttributeRssi(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_WiFiNetworkDiagnostics_Rssi(device, ZCLendpoint, ZCLgroupid) - - def ClusterWiFiNetworkDiagnostics_SubscribeAttributeRssi(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_WiFiNetworkDiagnostics_Rssi(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterWiFiNetworkDiagnostics_ReadAttributeBeaconLostCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_WiFiNetworkDiagnostics_BeaconLostCount(device, ZCLendpoint, ZCLgroupid) - - def ClusterWiFiNetworkDiagnostics_SubscribeAttributeBeaconLostCount(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_WiFiNetworkDiagnostics_BeaconLostCount(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterWiFiNetworkDiagnostics_ReadAttributeBeaconRxCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_WiFiNetworkDiagnostics_BeaconRxCount(device, ZCLendpoint, ZCLgroupid) - - def ClusterWiFiNetworkDiagnostics_SubscribeAttributeBeaconRxCount(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_WiFiNetworkDiagnostics_BeaconRxCount(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterWiFiNetworkDiagnostics_ReadAttributePacketMulticastRxCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_WiFiNetworkDiagnostics_PacketMulticastRxCount(device, ZCLendpoint, ZCLgroupid) - - def ClusterWiFiNetworkDiagnostics_SubscribeAttributePacketMulticastRxCount(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_WiFiNetworkDiagnostics_PacketMulticastRxCount(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterWiFiNetworkDiagnostics_ReadAttributePacketMulticastTxCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_WiFiNetworkDiagnostics_PacketMulticastTxCount(device, ZCLendpoint, ZCLgroupid) - - def ClusterWiFiNetworkDiagnostics_SubscribeAttributePacketMulticastTxCount(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_WiFiNetworkDiagnostics_PacketMulticastTxCount(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterWiFiNetworkDiagnostics_ReadAttributePacketUnicastRxCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_WiFiNetworkDiagnostics_PacketUnicastRxCount(device, ZCLendpoint, ZCLgroupid) - - def ClusterWiFiNetworkDiagnostics_SubscribeAttributePacketUnicastRxCount(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_WiFiNetworkDiagnostics_PacketUnicastRxCount(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterWiFiNetworkDiagnostics_ReadAttributePacketUnicastTxCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_WiFiNetworkDiagnostics_PacketUnicastTxCount(device, ZCLendpoint, ZCLgroupid) - - def ClusterWiFiNetworkDiagnostics_SubscribeAttributePacketUnicastTxCount(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_WiFiNetworkDiagnostics_PacketUnicastTxCount(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterWiFiNetworkDiagnostics_ReadAttributeCurrentMaxRate(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_WiFiNetworkDiagnostics_CurrentMaxRate(device, ZCLendpoint, ZCLgroupid) - - def ClusterWiFiNetworkDiagnostics_SubscribeAttributeCurrentMaxRate(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_WiFiNetworkDiagnostics_CurrentMaxRate(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterWiFiNetworkDiagnostics_ReadAttributeOverrunCount(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_WiFiNetworkDiagnostics_OverrunCount(device, ZCLendpoint, ZCLgroupid) - - def ClusterWiFiNetworkDiagnostics_SubscribeAttributeOverrunCount(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_WiFiNetworkDiagnostics_OverrunCount(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterWiFiNetworkDiagnostics_ReadAttributeFeatureMap(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_WiFiNetworkDiagnostics_FeatureMap(device, ZCLendpoint, ZCLgroupid) - - def ClusterWiFiNetworkDiagnostics_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_WiFiNetworkDiagnostics_ClusterRevision(device, ZCLendpoint, ZCLgroupid) - - def ClusterWiFiNetworkDiagnostics_SubscribeAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_WiFiNetworkDiagnostics_ClusterRevision(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterWindowCovering_ReadAttributeType(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_WindowCovering_Type(device, ZCLendpoint, ZCLgroupid) - - def ClusterWindowCovering_SubscribeAttributeType(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_WindowCovering_Type(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterWindowCovering_ReadAttributeCurrentPositionLift(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_WindowCovering_CurrentPositionLift(device, ZCLendpoint, ZCLgroupid) - - def ClusterWindowCovering_SubscribeAttributeCurrentPositionLift(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_WindowCovering_CurrentPositionLift(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterWindowCovering_ReadAttributeCurrentPositionTilt(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_WindowCovering_CurrentPositionTilt(device, ZCLendpoint, ZCLgroupid) - - def ClusterWindowCovering_SubscribeAttributeCurrentPositionTilt(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_WindowCovering_CurrentPositionTilt(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterWindowCovering_ReadAttributeConfigStatus(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_WindowCovering_ConfigStatus(device, ZCLendpoint, ZCLgroupid) - - def ClusterWindowCovering_SubscribeAttributeConfigStatus(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_WindowCovering_ConfigStatus(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterWindowCovering_ReadAttributeCurrentPositionLiftPercentage(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_WindowCovering_CurrentPositionLiftPercentage(device, ZCLendpoint, ZCLgroupid) - - def ClusterWindowCovering_SubscribeAttributeCurrentPositionLiftPercentage(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_WindowCovering_CurrentPositionLiftPercentage(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterWindowCovering_ReadAttributeCurrentPositionTiltPercentage(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_WindowCovering_CurrentPositionTiltPercentage(device, ZCLendpoint, ZCLgroupid) - - def ClusterWindowCovering_SubscribeAttributeCurrentPositionTiltPercentage(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_WindowCovering_CurrentPositionTiltPercentage(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterWindowCovering_ReadAttributeOperationalStatus(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_WindowCovering_OperationalStatus(device, ZCLendpoint, ZCLgroupid) - - def ClusterWindowCovering_SubscribeAttributeOperationalStatus(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_WindowCovering_OperationalStatus(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterWindowCovering_ReadAttributeTargetPositionLiftPercent100ths(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_WindowCovering_TargetPositionLiftPercent100ths(device, ZCLendpoint, ZCLgroupid) - - def ClusterWindowCovering_SubscribeAttributeTargetPositionLiftPercent100ths(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_WindowCovering_TargetPositionLiftPercent100ths(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterWindowCovering_ReadAttributeTargetPositionTiltPercent100ths(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_WindowCovering_TargetPositionTiltPercent100ths(device, ZCLendpoint, ZCLgroupid) - - def ClusterWindowCovering_SubscribeAttributeTargetPositionTiltPercent100ths(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_WindowCovering_TargetPositionTiltPercent100ths(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterWindowCovering_ReadAttributeEndProductType(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_WindowCovering_EndProductType(device, ZCLendpoint, ZCLgroupid) - - def ClusterWindowCovering_SubscribeAttributeEndProductType(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_WindowCovering_EndProductType(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterWindowCovering_ReadAttributeCurrentPositionLiftPercent100ths(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_WindowCovering_CurrentPositionLiftPercent100ths(device, ZCLendpoint, ZCLgroupid) - - def ClusterWindowCovering_SubscribeAttributeCurrentPositionLiftPercent100ths(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_WindowCovering_CurrentPositionLiftPercent100ths(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterWindowCovering_ReadAttributeCurrentPositionTiltPercent100ths(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_WindowCovering_CurrentPositionTiltPercent100ths(device, ZCLendpoint, ZCLgroupid) - - def ClusterWindowCovering_SubscribeAttributeCurrentPositionTiltPercent100ths(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_WindowCovering_CurrentPositionTiltPercent100ths(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterWindowCovering_ReadAttributeInstalledOpenLimitLift(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_WindowCovering_InstalledOpenLimitLift(device, ZCLendpoint, ZCLgroupid) - - def ClusterWindowCovering_SubscribeAttributeInstalledOpenLimitLift(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_WindowCovering_InstalledOpenLimitLift(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterWindowCovering_ReadAttributeInstalledClosedLimitLift(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_WindowCovering_InstalledClosedLimitLift(device, ZCLendpoint, ZCLgroupid) - - def ClusterWindowCovering_SubscribeAttributeInstalledClosedLimitLift(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_WindowCovering_InstalledClosedLimitLift(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterWindowCovering_ReadAttributeInstalledOpenLimitTilt(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_WindowCovering_InstalledOpenLimitTilt(device, ZCLendpoint, ZCLgroupid) - - def ClusterWindowCovering_SubscribeAttributeInstalledOpenLimitTilt(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_WindowCovering_InstalledOpenLimitTilt(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterWindowCovering_ReadAttributeInstalledClosedLimitTilt(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_WindowCovering_InstalledClosedLimitTilt(device, ZCLendpoint, ZCLgroupid) - - def ClusterWindowCovering_SubscribeAttributeInstalledClosedLimitTilt(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_WindowCovering_InstalledClosedLimitTilt(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterWindowCovering_ReadAttributeMode(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_WindowCovering_Mode(device, ZCLendpoint, ZCLgroupid) - - def ClusterWindowCovering_SubscribeAttributeMode(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_WindowCovering_Mode(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterWindowCovering_ReadAttributeSafetyStatus(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_WindowCovering_SafetyStatus(device, ZCLendpoint, ZCLgroupid) - - def ClusterWindowCovering_SubscribeAttributeSafetyStatus(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_WindowCovering_SafetyStatus(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterWindowCovering_ReadAttributeFeatureMap(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_WindowCovering_FeatureMap(device, ZCLendpoint, ZCLgroupid) - - def ClusterWindowCovering_SubscribeAttributeFeatureMap(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_WindowCovering_FeatureMap(device, ZCLendpoint, minInterval, maxInterval) - - def ClusterWindowCovering_ReadAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_WindowCovering_ClusterRevision(device, ZCLendpoint, ZCLgroupid) - - def ClusterWindowCovering_SubscribeAttributeClusterRevision(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_WindowCovering_ClusterRevision(device, ZCLendpoint, minInterval, maxInterval) - # Init native functions def InitLib(self, chipLib): self._chipLib = chipLib - # Response delegate setters - self._chipLib.chip_ime_SetSuccessResponseDelegate.argtypes = [ - ChipClusters.SUCCESS_DELEGATE] - self._chipLib.chip_ime_SetSuccessResponseDelegate.restype = None - self._chipLib.chip_ime_SetFailureResponseDelegate.argtypes = [ - ChipClusters.FAILURE_DELEGATE] - self._chipLib.chip_ime_SetFailureResponseDelegate.res = None - # Cluster AccountLogin - # Cluster AccountLogin ReadAttribute ClusterRevision - self._chipLib.chip_ime_ReadAttribute_AccountLogin_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_AccountLogin_ClusterRevision.restype = ctypes.c_uint32 - # Cluster AccountLogin SubscribeAttribute ClusterRevision - self._chipLib.chip_ime_SubscribeAttribute_AccountLogin_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_AccountLogin_ClusterRevision.restype = ctypes.c_uint32 - # Cluster AdministratorCommissioning - # Cluster AdministratorCommissioning ReadAttribute ClusterRevision - self._chipLib.chip_ime_ReadAttribute_AdministratorCommissioning_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_AdministratorCommissioning_ClusterRevision.restype = ctypes.c_uint32 - # Cluster AdministratorCommissioning SubscribeAttribute ClusterRevision - self._chipLib.chip_ime_SubscribeAttribute_AdministratorCommissioning_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_AdministratorCommissioning_ClusterRevision.restype = ctypes.c_uint32 - # Cluster ApplicationBasic - # Cluster ApplicationBasic ReadAttribute VendorName - self._chipLib.chip_ime_ReadAttribute_ApplicationBasic_VendorName.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ApplicationBasic_VendorName.restype = ctypes.c_uint32 - # Cluster ApplicationBasic SubscribeAttribute VendorName - self._chipLib.chip_ime_SubscribeAttribute_ApplicationBasic_VendorName.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ApplicationBasic_VendorName.restype = ctypes.c_uint32 - # Cluster ApplicationBasic ReadAttribute VendorId - self._chipLib.chip_ime_ReadAttribute_ApplicationBasic_VendorId.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ApplicationBasic_VendorId.restype = ctypes.c_uint32 - # Cluster ApplicationBasic SubscribeAttribute VendorId - self._chipLib.chip_ime_SubscribeAttribute_ApplicationBasic_VendorId.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ApplicationBasic_VendorId.restype = ctypes.c_uint32 - # Cluster ApplicationBasic ReadAttribute ApplicationName - self._chipLib.chip_ime_ReadAttribute_ApplicationBasic_ApplicationName.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ApplicationBasic_ApplicationName.restype = ctypes.c_uint32 - # Cluster ApplicationBasic SubscribeAttribute ApplicationName - self._chipLib.chip_ime_SubscribeAttribute_ApplicationBasic_ApplicationName.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ApplicationBasic_ApplicationName.restype = ctypes.c_uint32 - # Cluster ApplicationBasic ReadAttribute ProductId - self._chipLib.chip_ime_ReadAttribute_ApplicationBasic_ProductId.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ApplicationBasic_ProductId.restype = ctypes.c_uint32 - # Cluster ApplicationBasic SubscribeAttribute ProductId - self._chipLib.chip_ime_SubscribeAttribute_ApplicationBasic_ProductId.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ApplicationBasic_ProductId.restype = ctypes.c_uint32 - # Cluster ApplicationBasic ReadAttribute ApplicationId - self._chipLib.chip_ime_ReadAttribute_ApplicationBasic_ApplicationId.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ApplicationBasic_ApplicationId.restype = ctypes.c_uint32 - # Cluster ApplicationBasic SubscribeAttribute ApplicationId - self._chipLib.chip_ime_SubscribeAttribute_ApplicationBasic_ApplicationId.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ApplicationBasic_ApplicationId.restype = ctypes.c_uint32 - # Cluster ApplicationBasic ReadAttribute CatalogVendorId - self._chipLib.chip_ime_ReadAttribute_ApplicationBasic_CatalogVendorId.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ApplicationBasic_CatalogVendorId.restype = ctypes.c_uint32 - # Cluster ApplicationBasic SubscribeAttribute CatalogVendorId - self._chipLib.chip_ime_SubscribeAttribute_ApplicationBasic_CatalogVendorId.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ApplicationBasic_CatalogVendorId.restype = ctypes.c_uint32 - # Cluster ApplicationBasic ReadAttribute ApplicationStatus - self._chipLib.chip_ime_ReadAttribute_ApplicationBasic_ApplicationStatus.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ApplicationBasic_ApplicationStatus.restype = ctypes.c_uint32 - # Cluster ApplicationBasic SubscribeAttribute ApplicationStatus - self._chipLib.chip_ime_SubscribeAttribute_ApplicationBasic_ApplicationStatus.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ApplicationBasic_ApplicationStatus.restype = ctypes.c_uint32 - # Cluster ApplicationBasic ReadAttribute ClusterRevision - self._chipLib.chip_ime_ReadAttribute_ApplicationBasic_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ApplicationBasic_ClusterRevision.restype = ctypes.c_uint32 - # Cluster ApplicationBasic SubscribeAttribute ClusterRevision - self._chipLib.chip_ime_SubscribeAttribute_ApplicationBasic_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ApplicationBasic_ClusterRevision.restype = ctypes.c_uint32 - # Cluster ApplicationLauncher - # Cluster ApplicationLauncher ReadAttribute ApplicationLauncherList - self._chipLib.chip_ime_ReadAttribute_ApplicationLauncher_ApplicationLauncherList.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ApplicationLauncher_ApplicationLauncherList.restype = ctypes.c_uint32 - # Cluster ApplicationLauncher ReadAttribute CatalogVendorId - self._chipLib.chip_ime_ReadAttribute_ApplicationLauncher_CatalogVendorId.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ApplicationLauncher_CatalogVendorId.restype = ctypes.c_uint32 - # Cluster ApplicationLauncher SubscribeAttribute CatalogVendorId - self._chipLib.chip_ime_SubscribeAttribute_ApplicationLauncher_CatalogVendorId.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ApplicationLauncher_CatalogVendorId.restype = ctypes.c_uint32 - # Cluster ApplicationLauncher ReadAttribute ApplicationId - self._chipLib.chip_ime_ReadAttribute_ApplicationLauncher_ApplicationId.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ApplicationLauncher_ApplicationId.restype = ctypes.c_uint32 - # Cluster ApplicationLauncher SubscribeAttribute ApplicationId - self._chipLib.chip_ime_SubscribeAttribute_ApplicationLauncher_ApplicationId.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ApplicationLauncher_ApplicationId.restype = ctypes.c_uint32 - # Cluster ApplicationLauncher ReadAttribute ClusterRevision - self._chipLib.chip_ime_ReadAttribute_ApplicationLauncher_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ApplicationLauncher_ClusterRevision.restype = ctypes.c_uint32 - # Cluster ApplicationLauncher SubscribeAttribute ClusterRevision - self._chipLib.chip_ime_SubscribeAttribute_ApplicationLauncher_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ApplicationLauncher_ClusterRevision.restype = ctypes.c_uint32 - # Cluster AudioOutput - # Cluster AudioOutput ReadAttribute AudioOutputList - self._chipLib.chip_ime_ReadAttribute_AudioOutput_AudioOutputList.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_AudioOutput_AudioOutputList.restype = ctypes.c_uint32 - # Cluster AudioOutput ReadAttribute CurrentAudioOutput - self._chipLib.chip_ime_ReadAttribute_AudioOutput_CurrentAudioOutput.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_AudioOutput_CurrentAudioOutput.restype = ctypes.c_uint32 - # Cluster AudioOutput SubscribeAttribute CurrentAudioOutput - self._chipLib.chip_ime_SubscribeAttribute_AudioOutput_CurrentAudioOutput.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_AudioOutput_CurrentAudioOutput.restype = ctypes.c_uint32 - # Cluster AudioOutput ReadAttribute ClusterRevision - self._chipLib.chip_ime_ReadAttribute_AudioOutput_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_AudioOutput_ClusterRevision.restype = ctypes.c_uint32 - # Cluster AudioOutput SubscribeAttribute ClusterRevision - self._chipLib.chip_ime_SubscribeAttribute_AudioOutput_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_AudioOutput_ClusterRevision.restype = ctypes.c_uint32 - # Cluster BarrierControl - # Cluster BarrierControl ReadAttribute BarrierMovingState - self._chipLib.chip_ime_ReadAttribute_BarrierControl_BarrierMovingState.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_BarrierControl_BarrierMovingState.restype = ctypes.c_uint32 - # Cluster BarrierControl SubscribeAttribute BarrierMovingState - self._chipLib.chip_ime_SubscribeAttribute_BarrierControl_BarrierMovingState.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_BarrierControl_BarrierMovingState.restype = ctypes.c_uint32 - # Cluster BarrierControl ReadAttribute BarrierSafetyStatus - self._chipLib.chip_ime_ReadAttribute_BarrierControl_BarrierSafetyStatus.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_BarrierControl_BarrierSafetyStatus.restype = ctypes.c_uint32 - # Cluster BarrierControl SubscribeAttribute BarrierSafetyStatus - self._chipLib.chip_ime_SubscribeAttribute_BarrierControl_BarrierSafetyStatus.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_BarrierControl_BarrierSafetyStatus.restype = ctypes.c_uint32 - # Cluster BarrierControl ReadAttribute BarrierCapabilities - self._chipLib.chip_ime_ReadAttribute_BarrierControl_BarrierCapabilities.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_BarrierControl_BarrierCapabilities.restype = ctypes.c_uint32 - # Cluster BarrierControl SubscribeAttribute BarrierCapabilities - self._chipLib.chip_ime_SubscribeAttribute_BarrierControl_BarrierCapabilities.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_BarrierControl_BarrierCapabilities.restype = ctypes.c_uint32 - # Cluster BarrierControl ReadAttribute BarrierPosition - self._chipLib.chip_ime_ReadAttribute_BarrierControl_BarrierPosition.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_BarrierControl_BarrierPosition.restype = ctypes.c_uint32 - # Cluster BarrierControl SubscribeAttribute BarrierPosition - self._chipLib.chip_ime_SubscribeAttribute_BarrierControl_BarrierPosition.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_BarrierControl_BarrierPosition.restype = ctypes.c_uint32 - # Cluster BarrierControl ReadAttribute ClusterRevision - self._chipLib.chip_ime_ReadAttribute_BarrierControl_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_BarrierControl_ClusterRevision.restype = ctypes.c_uint32 - # Cluster BarrierControl SubscribeAttribute ClusterRevision - self._chipLib.chip_ime_SubscribeAttribute_BarrierControl_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_BarrierControl_ClusterRevision.restype = ctypes.c_uint32 - # Cluster Basic - # Cluster Basic ReadAttribute InteractionModelVersion - self._chipLib.chip_ime_ReadAttribute_Basic_InteractionModelVersion.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_Basic_InteractionModelVersion.restype = ctypes.c_uint32 - # Cluster Basic SubscribeAttribute InteractionModelVersion - self._chipLib.chip_ime_SubscribeAttribute_Basic_InteractionModelVersion.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_Basic_InteractionModelVersion.restype = ctypes.c_uint32 - # Cluster Basic ReadAttribute VendorName - self._chipLib.chip_ime_ReadAttribute_Basic_VendorName.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_Basic_VendorName.restype = ctypes.c_uint32 - # Cluster Basic SubscribeAttribute VendorName - self._chipLib.chip_ime_SubscribeAttribute_Basic_VendorName.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_Basic_VendorName.restype = ctypes.c_uint32 - # Cluster Basic ReadAttribute VendorID - self._chipLib.chip_ime_ReadAttribute_Basic_VendorID.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_Basic_VendorID.restype = ctypes.c_uint32 - # Cluster Basic SubscribeAttribute VendorID - self._chipLib.chip_ime_SubscribeAttribute_Basic_VendorID.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_Basic_VendorID.restype = ctypes.c_uint32 - # Cluster Basic ReadAttribute ProductName - self._chipLib.chip_ime_ReadAttribute_Basic_ProductName.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_Basic_ProductName.restype = ctypes.c_uint32 - # Cluster Basic SubscribeAttribute ProductName - self._chipLib.chip_ime_SubscribeAttribute_Basic_ProductName.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_Basic_ProductName.restype = ctypes.c_uint32 - # Cluster Basic ReadAttribute ProductID - self._chipLib.chip_ime_ReadAttribute_Basic_ProductID.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_Basic_ProductID.restype = ctypes.c_uint32 - # Cluster Basic SubscribeAttribute ProductID - self._chipLib.chip_ime_SubscribeAttribute_Basic_ProductID.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_Basic_ProductID.restype = ctypes.c_uint32 - # Cluster Basic ReadAttribute NodeLabel - self._chipLib.chip_ime_ReadAttribute_Basic_NodeLabel.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_Basic_NodeLabel.restype = ctypes.c_uint32 - # Cluster Basic SubscribeAttribute NodeLabel - self._chipLib.chip_ime_SubscribeAttribute_Basic_NodeLabel.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_Basic_NodeLabel.restype = ctypes.c_uint32 - # Cluster Basic ReadAttribute Location - self._chipLib.chip_ime_ReadAttribute_Basic_Location.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_Basic_Location.restype = ctypes.c_uint32 - # Cluster Basic SubscribeAttribute Location - self._chipLib.chip_ime_SubscribeAttribute_Basic_Location.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_Basic_Location.restype = ctypes.c_uint32 - # Cluster Basic ReadAttribute HardwareVersion - self._chipLib.chip_ime_ReadAttribute_Basic_HardwareVersion.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_Basic_HardwareVersion.restype = ctypes.c_uint32 - # Cluster Basic SubscribeAttribute HardwareVersion - self._chipLib.chip_ime_SubscribeAttribute_Basic_HardwareVersion.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_Basic_HardwareVersion.restype = ctypes.c_uint32 - # Cluster Basic ReadAttribute HardwareVersionString - self._chipLib.chip_ime_ReadAttribute_Basic_HardwareVersionString.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_Basic_HardwareVersionString.restype = ctypes.c_uint32 - # Cluster Basic SubscribeAttribute HardwareVersionString - self._chipLib.chip_ime_SubscribeAttribute_Basic_HardwareVersionString.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_Basic_HardwareVersionString.restype = ctypes.c_uint32 - # Cluster Basic ReadAttribute SoftwareVersion - self._chipLib.chip_ime_ReadAttribute_Basic_SoftwareVersion.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_Basic_SoftwareVersion.restype = ctypes.c_uint32 - # Cluster Basic SubscribeAttribute SoftwareVersion - self._chipLib.chip_ime_SubscribeAttribute_Basic_SoftwareVersion.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_Basic_SoftwareVersion.restype = ctypes.c_uint32 - # Cluster Basic ReadAttribute SoftwareVersionString - self._chipLib.chip_ime_ReadAttribute_Basic_SoftwareVersionString.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_Basic_SoftwareVersionString.restype = ctypes.c_uint32 - # Cluster Basic SubscribeAttribute SoftwareVersionString - self._chipLib.chip_ime_SubscribeAttribute_Basic_SoftwareVersionString.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_Basic_SoftwareVersionString.restype = ctypes.c_uint32 - # Cluster Basic ReadAttribute ManufacturingDate - self._chipLib.chip_ime_ReadAttribute_Basic_ManufacturingDate.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_Basic_ManufacturingDate.restype = ctypes.c_uint32 - # Cluster Basic SubscribeAttribute ManufacturingDate - self._chipLib.chip_ime_SubscribeAttribute_Basic_ManufacturingDate.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_Basic_ManufacturingDate.restype = ctypes.c_uint32 - # Cluster Basic ReadAttribute PartNumber - self._chipLib.chip_ime_ReadAttribute_Basic_PartNumber.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_Basic_PartNumber.restype = ctypes.c_uint32 - # Cluster Basic SubscribeAttribute PartNumber - self._chipLib.chip_ime_SubscribeAttribute_Basic_PartNumber.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_Basic_PartNumber.restype = ctypes.c_uint32 - # Cluster Basic ReadAttribute ProductURL - self._chipLib.chip_ime_ReadAttribute_Basic_ProductURL.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_Basic_ProductURL.restype = ctypes.c_uint32 - # Cluster Basic SubscribeAttribute ProductURL - self._chipLib.chip_ime_SubscribeAttribute_Basic_ProductURL.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_Basic_ProductURL.restype = ctypes.c_uint32 - # Cluster Basic ReadAttribute ProductLabel - self._chipLib.chip_ime_ReadAttribute_Basic_ProductLabel.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_Basic_ProductLabel.restype = ctypes.c_uint32 - # Cluster Basic SubscribeAttribute ProductLabel - self._chipLib.chip_ime_SubscribeAttribute_Basic_ProductLabel.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_Basic_ProductLabel.restype = ctypes.c_uint32 - # Cluster Basic ReadAttribute SerialNumber - self._chipLib.chip_ime_ReadAttribute_Basic_SerialNumber.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_Basic_SerialNumber.restype = ctypes.c_uint32 - # Cluster Basic SubscribeAttribute SerialNumber - self._chipLib.chip_ime_SubscribeAttribute_Basic_SerialNumber.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_Basic_SerialNumber.restype = ctypes.c_uint32 - # Cluster Basic ReadAttribute LocalConfigDisabled - self._chipLib.chip_ime_ReadAttribute_Basic_LocalConfigDisabled.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_Basic_LocalConfigDisabled.restype = ctypes.c_uint32 - # Cluster Basic SubscribeAttribute LocalConfigDisabled - self._chipLib.chip_ime_SubscribeAttribute_Basic_LocalConfigDisabled.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_Basic_LocalConfigDisabled.restype = ctypes.c_uint32 - # Cluster Basic ReadAttribute Reachable - self._chipLib.chip_ime_ReadAttribute_Basic_Reachable.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_Basic_Reachable.restype = ctypes.c_uint32 - # Cluster Basic SubscribeAttribute Reachable - self._chipLib.chip_ime_SubscribeAttribute_Basic_Reachable.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_Basic_Reachable.restype = ctypes.c_uint32 - # Cluster Basic ReadAttribute UniqueID - self._chipLib.chip_ime_ReadAttribute_Basic_UniqueID.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_Basic_UniqueID.restype = ctypes.c_uint32 - # Cluster Basic ReadAttribute ClusterRevision - self._chipLib.chip_ime_ReadAttribute_Basic_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_Basic_ClusterRevision.restype = ctypes.c_uint32 - # Cluster Basic SubscribeAttribute ClusterRevision - self._chipLib.chip_ime_SubscribeAttribute_Basic_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_Basic_ClusterRevision.restype = ctypes.c_uint32 - # Cluster BinaryInputBasic - # Cluster BinaryInputBasic ReadAttribute OutOfService - self._chipLib.chip_ime_ReadAttribute_BinaryInputBasic_OutOfService.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_BinaryInputBasic_OutOfService.restype = ctypes.c_uint32 - # Cluster BinaryInputBasic SubscribeAttribute OutOfService - self._chipLib.chip_ime_SubscribeAttribute_BinaryInputBasic_OutOfService.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_BinaryInputBasic_OutOfService.restype = ctypes.c_uint32 - # Cluster BinaryInputBasic ReadAttribute PresentValue - self._chipLib.chip_ime_ReadAttribute_BinaryInputBasic_PresentValue.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_BinaryInputBasic_PresentValue.restype = ctypes.c_uint32 - # Cluster BinaryInputBasic SubscribeAttribute PresentValue - self._chipLib.chip_ime_SubscribeAttribute_BinaryInputBasic_PresentValue.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_BinaryInputBasic_PresentValue.restype = ctypes.c_uint32 - # Cluster BinaryInputBasic ReadAttribute StatusFlags - self._chipLib.chip_ime_ReadAttribute_BinaryInputBasic_StatusFlags.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_BinaryInputBasic_StatusFlags.restype = ctypes.c_uint32 - # Cluster BinaryInputBasic SubscribeAttribute StatusFlags - self._chipLib.chip_ime_SubscribeAttribute_BinaryInputBasic_StatusFlags.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_BinaryInputBasic_StatusFlags.restype = ctypes.c_uint32 - # Cluster BinaryInputBasic ReadAttribute ClusterRevision - self._chipLib.chip_ime_ReadAttribute_BinaryInputBasic_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_BinaryInputBasic_ClusterRevision.restype = ctypes.c_uint32 - # Cluster BinaryInputBasic SubscribeAttribute ClusterRevision - self._chipLib.chip_ime_SubscribeAttribute_BinaryInputBasic_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_BinaryInputBasic_ClusterRevision.restype = ctypes.c_uint32 - # Cluster Binding - # Cluster Binding ReadAttribute ClusterRevision - self._chipLib.chip_ime_ReadAttribute_Binding_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_Binding_ClusterRevision.restype = ctypes.c_uint32 - # Cluster Binding SubscribeAttribute ClusterRevision - self._chipLib.chip_ime_SubscribeAttribute_Binding_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_Binding_ClusterRevision.restype = ctypes.c_uint32 - # Cluster BooleanState - # Cluster BooleanState ReadAttribute StateValue - self._chipLib.chip_ime_ReadAttribute_BooleanState_StateValue.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_BooleanState_StateValue.restype = ctypes.c_uint32 - # Cluster BooleanState SubscribeAttribute StateValue - self._chipLib.chip_ime_SubscribeAttribute_BooleanState_StateValue.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_BooleanState_StateValue.restype = ctypes.c_uint32 - # Cluster BooleanState ReadAttribute ClusterRevision - self._chipLib.chip_ime_ReadAttribute_BooleanState_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_BooleanState_ClusterRevision.restype = ctypes.c_uint32 - # Cluster BooleanState SubscribeAttribute ClusterRevision - self._chipLib.chip_ime_SubscribeAttribute_BooleanState_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_BooleanState_ClusterRevision.restype = ctypes.c_uint32 - # Cluster BridgedActions - # Cluster BridgedActions ReadAttribute ActionList - self._chipLib.chip_ime_ReadAttribute_BridgedActions_ActionList.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_BridgedActions_ActionList.restype = ctypes.c_uint32 - # Cluster BridgedActions ReadAttribute EndpointList - self._chipLib.chip_ime_ReadAttribute_BridgedActions_EndpointList.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_BridgedActions_EndpointList.restype = ctypes.c_uint32 - # Cluster BridgedActions ReadAttribute SetupUrl - self._chipLib.chip_ime_ReadAttribute_BridgedActions_SetupUrl.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_BridgedActions_SetupUrl.restype = ctypes.c_uint32 - # Cluster BridgedActions SubscribeAttribute SetupUrl - self._chipLib.chip_ime_SubscribeAttribute_BridgedActions_SetupUrl.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_BridgedActions_SetupUrl.restype = ctypes.c_uint32 - # Cluster BridgedActions ReadAttribute ClusterRevision - self._chipLib.chip_ime_ReadAttribute_BridgedActions_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_BridgedActions_ClusterRevision.restype = ctypes.c_uint32 - # Cluster BridgedActions SubscribeAttribute ClusterRevision - self._chipLib.chip_ime_SubscribeAttribute_BridgedActions_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_BridgedActions_ClusterRevision.restype = ctypes.c_uint32 - # Cluster BridgedDeviceBasic - # Cluster BridgedDeviceBasic ReadAttribute VendorName - self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_VendorName.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_VendorName.restype = ctypes.c_uint32 - # Cluster BridgedDeviceBasic SubscribeAttribute VendorName - self._chipLib.chip_ime_SubscribeAttribute_BridgedDeviceBasic_VendorName.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_BridgedDeviceBasic_VendorName.restype = ctypes.c_uint32 - # Cluster BridgedDeviceBasic ReadAttribute VendorID - self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_VendorID.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_VendorID.restype = ctypes.c_uint32 - # Cluster BridgedDeviceBasic SubscribeAttribute VendorID - self._chipLib.chip_ime_SubscribeAttribute_BridgedDeviceBasic_VendorID.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_BridgedDeviceBasic_VendorID.restype = ctypes.c_uint32 - # Cluster BridgedDeviceBasic ReadAttribute ProductName - self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_ProductName.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_ProductName.restype = ctypes.c_uint32 - # Cluster BridgedDeviceBasic SubscribeAttribute ProductName - self._chipLib.chip_ime_SubscribeAttribute_BridgedDeviceBasic_ProductName.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_BridgedDeviceBasic_ProductName.restype = ctypes.c_uint32 - # Cluster BridgedDeviceBasic ReadAttribute NodeLabel - self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_NodeLabel.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_NodeLabel.restype = ctypes.c_uint32 - # Cluster BridgedDeviceBasic SubscribeAttribute NodeLabel - self._chipLib.chip_ime_SubscribeAttribute_BridgedDeviceBasic_NodeLabel.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_BridgedDeviceBasic_NodeLabel.restype = ctypes.c_uint32 - # Cluster BridgedDeviceBasic ReadAttribute HardwareVersion - self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_HardwareVersion.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_HardwareVersion.restype = ctypes.c_uint32 - # Cluster BridgedDeviceBasic SubscribeAttribute HardwareVersion - self._chipLib.chip_ime_SubscribeAttribute_BridgedDeviceBasic_HardwareVersion.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_BridgedDeviceBasic_HardwareVersion.restype = ctypes.c_uint32 - # Cluster BridgedDeviceBasic ReadAttribute HardwareVersionString - self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_HardwareVersionString.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_HardwareVersionString.restype = ctypes.c_uint32 - # Cluster BridgedDeviceBasic SubscribeAttribute HardwareVersionString - self._chipLib.chip_ime_SubscribeAttribute_BridgedDeviceBasic_HardwareVersionString.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_BridgedDeviceBasic_HardwareVersionString.restype = ctypes.c_uint32 - # Cluster BridgedDeviceBasic ReadAttribute SoftwareVersion - self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_SoftwareVersion.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_SoftwareVersion.restype = ctypes.c_uint32 - # Cluster BridgedDeviceBasic SubscribeAttribute SoftwareVersion - self._chipLib.chip_ime_SubscribeAttribute_BridgedDeviceBasic_SoftwareVersion.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_BridgedDeviceBasic_SoftwareVersion.restype = ctypes.c_uint32 - # Cluster BridgedDeviceBasic ReadAttribute SoftwareVersionString - self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_SoftwareVersionString.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_SoftwareVersionString.restype = ctypes.c_uint32 - # Cluster BridgedDeviceBasic SubscribeAttribute SoftwareVersionString - self._chipLib.chip_ime_SubscribeAttribute_BridgedDeviceBasic_SoftwareVersionString.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_BridgedDeviceBasic_SoftwareVersionString.restype = ctypes.c_uint32 - # Cluster BridgedDeviceBasic ReadAttribute ManufacturingDate - self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_ManufacturingDate.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_ManufacturingDate.restype = ctypes.c_uint32 - # Cluster BridgedDeviceBasic SubscribeAttribute ManufacturingDate - self._chipLib.chip_ime_SubscribeAttribute_BridgedDeviceBasic_ManufacturingDate.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_BridgedDeviceBasic_ManufacturingDate.restype = ctypes.c_uint32 - # Cluster BridgedDeviceBasic ReadAttribute PartNumber - self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_PartNumber.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_PartNumber.restype = ctypes.c_uint32 - # Cluster BridgedDeviceBasic SubscribeAttribute PartNumber - self._chipLib.chip_ime_SubscribeAttribute_BridgedDeviceBasic_PartNumber.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_BridgedDeviceBasic_PartNumber.restype = ctypes.c_uint32 - # Cluster BridgedDeviceBasic ReadAttribute ProductURL - self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_ProductURL.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_ProductURL.restype = ctypes.c_uint32 - # Cluster BridgedDeviceBasic SubscribeAttribute ProductURL - self._chipLib.chip_ime_SubscribeAttribute_BridgedDeviceBasic_ProductURL.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_BridgedDeviceBasic_ProductURL.restype = ctypes.c_uint32 - # Cluster BridgedDeviceBasic ReadAttribute ProductLabel - self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_ProductLabel.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_ProductLabel.restype = ctypes.c_uint32 - # Cluster BridgedDeviceBasic SubscribeAttribute ProductLabel - self._chipLib.chip_ime_SubscribeAttribute_BridgedDeviceBasic_ProductLabel.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_BridgedDeviceBasic_ProductLabel.restype = ctypes.c_uint32 - # Cluster BridgedDeviceBasic ReadAttribute SerialNumber - self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_SerialNumber.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_SerialNumber.restype = ctypes.c_uint32 - # Cluster BridgedDeviceBasic SubscribeAttribute SerialNumber - self._chipLib.chip_ime_SubscribeAttribute_BridgedDeviceBasic_SerialNumber.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_BridgedDeviceBasic_SerialNumber.restype = ctypes.c_uint32 - # Cluster BridgedDeviceBasic ReadAttribute Reachable - self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_Reachable.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_Reachable.restype = ctypes.c_uint32 - # Cluster BridgedDeviceBasic SubscribeAttribute Reachable - self._chipLib.chip_ime_SubscribeAttribute_BridgedDeviceBasic_Reachable.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_BridgedDeviceBasic_Reachable.restype = ctypes.c_uint32 - # Cluster BridgedDeviceBasic ReadAttribute ClusterRevision - self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_BridgedDeviceBasic_ClusterRevision.restype = ctypes.c_uint32 - # Cluster BridgedDeviceBasic SubscribeAttribute ClusterRevision - self._chipLib.chip_ime_SubscribeAttribute_BridgedDeviceBasic_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_BridgedDeviceBasic_ClusterRevision.restype = ctypes.c_uint32 - # Cluster ColorControl - # Cluster ColorControl ReadAttribute CurrentHue - self._chipLib.chip_ime_ReadAttribute_ColorControl_CurrentHue.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ColorControl_CurrentHue.restype = ctypes.c_uint32 - # Cluster ColorControl SubscribeAttribute CurrentHue - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_CurrentHue.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_CurrentHue.restype = ctypes.c_uint32 - # Cluster ColorControl ReadAttribute CurrentSaturation - self._chipLib.chip_ime_ReadAttribute_ColorControl_CurrentSaturation.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ColorControl_CurrentSaturation.restype = ctypes.c_uint32 - # Cluster ColorControl SubscribeAttribute CurrentSaturation - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_CurrentSaturation.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_CurrentSaturation.restype = ctypes.c_uint32 - # Cluster ColorControl ReadAttribute RemainingTime - self._chipLib.chip_ime_ReadAttribute_ColorControl_RemainingTime.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ColorControl_RemainingTime.restype = ctypes.c_uint32 - # Cluster ColorControl SubscribeAttribute RemainingTime - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_RemainingTime.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_RemainingTime.restype = ctypes.c_uint32 - # Cluster ColorControl ReadAttribute CurrentX - self._chipLib.chip_ime_ReadAttribute_ColorControl_CurrentX.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ColorControl_CurrentX.restype = ctypes.c_uint32 - # Cluster ColorControl SubscribeAttribute CurrentX - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_CurrentX.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_CurrentX.restype = ctypes.c_uint32 - # Cluster ColorControl ReadAttribute CurrentY - self._chipLib.chip_ime_ReadAttribute_ColorControl_CurrentY.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ColorControl_CurrentY.restype = ctypes.c_uint32 - # Cluster ColorControl SubscribeAttribute CurrentY - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_CurrentY.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_CurrentY.restype = ctypes.c_uint32 - # Cluster ColorControl ReadAttribute DriftCompensation - self._chipLib.chip_ime_ReadAttribute_ColorControl_DriftCompensation.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ColorControl_DriftCompensation.restype = ctypes.c_uint32 - # Cluster ColorControl SubscribeAttribute DriftCompensation - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_DriftCompensation.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_DriftCompensation.restype = ctypes.c_uint32 - # Cluster ColorControl ReadAttribute CompensationText - self._chipLib.chip_ime_ReadAttribute_ColorControl_CompensationText.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ColorControl_CompensationText.restype = ctypes.c_uint32 - # Cluster ColorControl SubscribeAttribute CompensationText - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_CompensationText.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_CompensationText.restype = ctypes.c_uint32 - # Cluster ColorControl ReadAttribute ColorTemperature - self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorTemperature.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorTemperature.restype = ctypes.c_uint32 - # Cluster ColorControl SubscribeAttribute ColorTemperature - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_ColorTemperature.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_ColorTemperature.restype = ctypes.c_uint32 - # Cluster ColorControl ReadAttribute ColorMode - self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorMode.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorMode.restype = ctypes.c_uint32 - # Cluster ColorControl SubscribeAttribute ColorMode - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_ColorMode.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_ColorMode.restype = ctypes.c_uint32 - # Cluster ColorControl ReadAttribute ColorControlOptions - self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorControlOptions.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorControlOptions.restype = ctypes.c_uint32 - # Cluster ColorControl SubscribeAttribute ColorControlOptions - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_ColorControlOptions.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_ColorControlOptions.restype = ctypes.c_uint32 - # Cluster ColorControl ReadAttribute NumberOfPrimaries - self._chipLib.chip_ime_ReadAttribute_ColorControl_NumberOfPrimaries.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ColorControl_NumberOfPrimaries.restype = ctypes.c_uint32 - # Cluster ColorControl SubscribeAttribute NumberOfPrimaries - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_NumberOfPrimaries.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_NumberOfPrimaries.restype = ctypes.c_uint32 - # Cluster ColorControl ReadAttribute Primary1X - self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary1X.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary1X.restype = ctypes.c_uint32 - # Cluster ColorControl SubscribeAttribute Primary1X - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_Primary1X.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_Primary1X.restype = ctypes.c_uint32 - # Cluster ColorControl ReadAttribute Primary1Y - self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary1Y.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary1Y.restype = ctypes.c_uint32 - # Cluster ColorControl SubscribeAttribute Primary1Y - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_Primary1Y.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_Primary1Y.restype = ctypes.c_uint32 - # Cluster ColorControl ReadAttribute Primary1Intensity - self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary1Intensity.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary1Intensity.restype = ctypes.c_uint32 - # Cluster ColorControl SubscribeAttribute Primary1Intensity - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_Primary1Intensity.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_Primary1Intensity.restype = ctypes.c_uint32 - # Cluster ColorControl ReadAttribute Primary2X - self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary2X.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary2X.restype = ctypes.c_uint32 - # Cluster ColorControl SubscribeAttribute Primary2X - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_Primary2X.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_Primary2X.restype = ctypes.c_uint32 - # Cluster ColorControl ReadAttribute Primary2Y - self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary2Y.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary2Y.restype = ctypes.c_uint32 - # Cluster ColorControl SubscribeAttribute Primary2Y - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_Primary2Y.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_Primary2Y.restype = ctypes.c_uint32 - # Cluster ColorControl ReadAttribute Primary2Intensity - self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary2Intensity.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary2Intensity.restype = ctypes.c_uint32 - # Cluster ColorControl SubscribeAttribute Primary2Intensity - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_Primary2Intensity.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_Primary2Intensity.restype = ctypes.c_uint32 - # Cluster ColorControl ReadAttribute Primary3X - self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary3X.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary3X.restype = ctypes.c_uint32 - # Cluster ColorControl SubscribeAttribute Primary3X - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_Primary3X.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_Primary3X.restype = ctypes.c_uint32 - # Cluster ColorControl ReadAttribute Primary3Y - self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary3Y.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary3Y.restype = ctypes.c_uint32 - # Cluster ColorControl SubscribeAttribute Primary3Y - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_Primary3Y.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_Primary3Y.restype = ctypes.c_uint32 - # Cluster ColorControl ReadAttribute Primary3Intensity - self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary3Intensity.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary3Intensity.restype = ctypes.c_uint32 - # Cluster ColorControl SubscribeAttribute Primary3Intensity - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_Primary3Intensity.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_Primary3Intensity.restype = ctypes.c_uint32 - # Cluster ColorControl ReadAttribute Primary4X - self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary4X.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary4X.restype = ctypes.c_uint32 - # Cluster ColorControl SubscribeAttribute Primary4X - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_Primary4X.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_Primary4X.restype = ctypes.c_uint32 - # Cluster ColorControl ReadAttribute Primary4Y - self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary4Y.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary4Y.restype = ctypes.c_uint32 - # Cluster ColorControl SubscribeAttribute Primary4Y - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_Primary4Y.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_Primary4Y.restype = ctypes.c_uint32 - # Cluster ColorControl ReadAttribute Primary4Intensity - self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary4Intensity.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary4Intensity.restype = ctypes.c_uint32 - # Cluster ColorControl SubscribeAttribute Primary4Intensity - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_Primary4Intensity.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_Primary4Intensity.restype = ctypes.c_uint32 - # Cluster ColorControl ReadAttribute Primary5X - self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary5X.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary5X.restype = ctypes.c_uint32 - # Cluster ColorControl SubscribeAttribute Primary5X - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_Primary5X.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_Primary5X.restype = ctypes.c_uint32 - # Cluster ColorControl ReadAttribute Primary5Y - self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary5Y.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary5Y.restype = ctypes.c_uint32 - # Cluster ColorControl SubscribeAttribute Primary5Y - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_Primary5Y.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_Primary5Y.restype = ctypes.c_uint32 - # Cluster ColorControl ReadAttribute Primary5Intensity - self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary5Intensity.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary5Intensity.restype = ctypes.c_uint32 - # Cluster ColorControl SubscribeAttribute Primary5Intensity - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_Primary5Intensity.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_Primary5Intensity.restype = ctypes.c_uint32 - # Cluster ColorControl ReadAttribute Primary6X - self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary6X.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary6X.restype = ctypes.c_uint32 - # Cluster ColorControl SubscribeAttribute Primary6X - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_Primary6X.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_Primary6X.restype = ctypes.c_uint32 - # Cluster ColorControl ReadAttribute Primary6Y - self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary6Y.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary6Y.restype = ctypes.c_uint32 - # Cluster ColorControl SubscribeAttribute Primary6Y - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_Primary6Y.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_Primary6Y.restype = ctypes.c_uint32 - # Cluster ColorControl ReadAttribute Primary6Intensity - self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary6Intensity.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ColorControl_Primary6Intensity.restype = ctypes.c_uint32 - # Cluster ColorControl SubscribeAttribute Primary6Intensity - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_Primary6Intensity.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_Primary6Intensity.restype = ctypes.c_uint32 - # Cluster ColorControl ReadAttribute WhitePointX - self._chipLib.chip_ime_ReadAttribute_ColorControl_WhitePointX.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ColorControl_WhitePointX.restype = ctypes.c_uint32 - # Cluster ColorControl SubscribeAttribute WhitePointX - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_WhitePointX.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_WhitePointX.restype = ctypes.c_uint32 - # Cluster ColorControl ReadAttribute WhitePointY - self._chipLib.chip_ime_ReadAttribute_ColorControl_WhitePointY.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ColorControl_WhitePointY.restype = ctypes.c_uint32 - # Cluster ColorControl SubscribeAttribute WhitePointY - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_WhitePointY.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_WhitePointY.restype = ctypes.c_uint32 - # Cluster ColorControl ReadAttribute ColorPointRX - self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorPointRX.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorPointRX.restype = ctypes.c_uint32 - # Cluster ColorControl SubscribeAttribute ColorPointRX - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_ColorPointRX.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_ColorPointRX.restype = ctypes.c_uint32 - # Cluster ColorControl ReadAttribute ColorPointRY - self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorPointRY.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorPointRY.restype = ctypes.c_uint32 - # Cluster ColorControl SubscribeAttribute ColorPointRY - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_ColorPointRY.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_ColorPointRY.restype = ctypes.c_uint32 - # Cluster ColorControl ReadAttribute ColorPointRIntensity - self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorPointRIntensity.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorPointRIntensity.restype = ctypes.c_uint32 - # Cluster ColorControl SubscribeAttribute ColorPointRIntensity - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_ColorPointRIntensity.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_ColorPointRIntensity.restype = ctypes.c_uint32 - # Cluster ColorControl ReadAttribute ColorPointGX - self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorPointGX.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorPointGX.restype = ctypes.c_uint32 - # Cluster ColorControl SubscribeAttribute ColorPointGX - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_ColorPointGX.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_ColorPointGX.restype = ctypes.c_uint32 - # Cluster ColorControl ReadAttribute ColorPointGY - self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorPointGY.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorPointGY.restype = ctypes.c_uint32 - # Cluster ColorControl SubscribeAttribute ColorPointGY - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_ColorPointGY.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_ColorPointGY.restype = ctypes.c_uint32 - # Cluster ColorControl ReadAttribute ColorPointGIntensity - self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorPointGIntensity.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorPointGIntensity.restype = ctypes.c_uint32 - # Cluster ColorControl SubscribeAttribute ColorPointGIntensity - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_ColorPointGIntensity.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_ColorPointGIntensity.restype = ctypes.c_uint32 - # Cluster ColorControl ReadAttribute ColorPointBX - self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorPointBX.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorPointBX.restype = ctypes.c_uint32 - # Cluster ColorControl SubscribeAttribute ColorPointBX - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_ColorPointBX.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_ColorPointBX.restype = ctypes.c_uint32 - # Cluster ColorControl ReadAttribute ColorPointBY - self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorPointBY.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorPointBY.restype = ctypes.c_uint32 - # Cluster ColorControl SubscribeAttribute ColorPointBY - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_ColorPointBY.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_ColorPointBY.restype = ctypes.c_uint32 - # Cluster ColorControl ReadAttribute ColorPointBIntensity - self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorPointBIntensity.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorPointBIntensity.restype = ctypes.c_uint32 - # Cluster ColorControl SubscribeAttribute ColorPointBIntensity - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_ColorPointBIntensity.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_ColorPointBIntensity.restype = ctypes.c_uint32 - # Cluster ColorControl ReadAttribute EnhancedCurrentHue - self._chipLib.chip_ime_ReadAttribute_ColorControl_EnhancedCurrentHue.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ColorControl_EnhancedCurrentHue.restype = ctypes.c_uint32 - # Cluster ColorControl SubscribeAttribute EnhancedCurrentHue - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_EnhancedCurrentHue.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_EnhancedCurrentHue.restype = ctypes.c_uint32 - # Cluster ColorControl ReadAttribute EnhancedColorMode - self._chipLib.chip_ime_ReadAttribute_ColorControl_EnhancedColorMode.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ColorControl_EnhancedColorMode.restype = ctypes.c_uint32 - # Cluster ColorControl SubscribeAttribute EnhancedColorMode - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_EnhancedColorMode.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_EnhancedColorMode.restype = ctypes.c_uint32 - # Cluster ColorControl ReadAttribute ColorLoopActive - self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorLoopActive.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorLoopActive.restype = ctypes.c_uint32 - # Cluster ColorControl SubscribeAttribute ColorLoopActive - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_ColorLoopActive.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_ColorLoopActive.restype = ctypes.c_uint32 - # Cluster ColorControl ReadAttribute ColorLoopDirection - self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorLoopDirection.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorLoopDirection.restype = ctypes.c_uint32 - # Cluster ColorControl SubscribeAttribute ColorLoopDirection - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_ColorLoopDirection.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_ColorLoopDirection.restype = ctypes.c_uint32 - # Cluster ColorControl ReadAttribute ColorLoopTime - self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorLoopTime.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorLoopTime.restype = ctypes.c_uint32 - # Cluster ColorControl SubscribeAttribute ColorLoopTime - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_ColorLoopTime.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_ColorLoopTime.restype = ctypes.c_uint32 - # Cluster ColorControl ReadAttribute ColorLoopStartEnhancedHue - self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorLoopStartEnhancedHue.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorLoopStartEnhancedHue.restype = ctypes.c_uint32 - # Cluster ColorControl SubscribeAttribute ColorLoopStartEnhancedHue - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_ColorLoopStartEnhancedHue.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_ColorLoopStartEnhancedHue.restype = ctypes.c_uint32 - # Cluster ColorControl ReadAttribute ColorLoopStoredEnhancedHue - self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorLoopStoredEnhancedHue.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorLoopStoredEnhancedHue.restype = ctypes.c_uint32 - # Cluster ColorControl SubscribeAttribute ColorLoopStoredEnhancedHue - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_ColorLoopStoredEnhancedHue.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_ColorLoopStoredEnhancedHue.restype = ctypes.c_uint32 - # Cluster ColorControl ReadAttribute ColorCapabilities - self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorCapabilities.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorCapabilities.restype = ctypes.c_uint32 - # Cluster ColorControl SubscribeAttribute ColorCapabilities - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_ColorCapabilities.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_ColorCapabilities.restype = ctypes.c_uint32 - # Cluster ColorControl ReadAttribute ColorTempPhysicalMin - self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorTempPhysicalMin.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorTempPhysicalMin.restype = ctypes.c_uint32 - # Cluster ColorControl SubscribeAttribute ColorTempPhysicalMin - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_ColorTempPhysicalMin.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_ColorTempPhysicalMin.restype = ctypes.c_uint32 - # Cluster ColorControl ReadAttribute ColorTempPhysicalMax - self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorTempPhysicalMax.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ColorControl_ColorTempPhysicalMax.restype = ctypes.c_uint32 - # Cluster ColorControl SubscribeAttribute ColorTempPhysicalMax - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_ColorTempPhysicalMax.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_ColorTempPhysicalMax.restype = ctypes.c_uint32 - # Cluster ColorControl ReadAttribute CoupleColorTempToLevelMinMireds - self._chipLib.chip_ime_ReadAttribute_ColorControl_CoupleColorTempToLevelMinMireds.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ColorControl_CoupleColorTempToLevelMinMireds.restype = ctypes.c_uint32 - # Cluster ColorControl SubscribeAttribute CoupleColorTempToLevelMinMireds - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_CoupleColorTempToLevelMinMireds.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_CoupleColorTempToLevelMinMireds.restype = ctypes.c_uint32 - # Cluster ColorControl ReadAttribute StartUpColorTemperatureMireds - self._chipLib.chip_ime_ReadAttribute_ColorControl_StartUpColorTemperatureMireds.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ColorControl_StartUpColorTemperatureMireds.restype = ctypes.c_uint32 - # Cluster ColorControl SubscribeAttribute StartUpColorTemperatureMireds - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_StartUpColorTemperatureMireds.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_StartUpColorTemperatureMireds.restype = ctypes.c_uint32 - # Cluster ColorControl ReadAttribute ClusterRevision - self._chipLib.chip_ime_ReadAttribute_ColorControl_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ColorControl_ClusterRevision.restype = ctypes.c_uint32 - # Cluster ColorControl SubscribeAttribute ClusterRevision - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ColorControl_ClusterRevision.restype = ctypes.c_uint32 - # Cluster ContentLauncher - # Cluster ContentLauncher ReadAttribute AcceptsHeaderList - self._chipLib.chip_ime_ReadAttribute_ContentLauncher_AcceptsHeaderList.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ContentLauncher_AcceptsHeaderList.restype = ctypes.c_uint32 - # Cluster ContentLauncher ReadAttribute SupportedStreamingTypes - self._chipLib.chip_ime_ReadAttribute_ContentLauncher_SupportedStreamingTypes.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ContentLauncher_SupportedStreamingTypes.restype = ctypes.c_uint32 - # Cluster ContentLauncher ReadAttribute ClusterRevision - self._chipLib.chip_ime_ReadAttribute_ContentLauncher_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ContentLauncher_ClusterRevision.restype = ctypes.c_uint32 - # Cluster ContentLauncher SubscribeAttribute ClusterRevision - self._chipLib.chip_ime_SubscribeAttribute_ContentLauncher_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ContentLauncher_ClusterRevision.restype = ctypes.c_uint32 - # Cluster Descriptor - # Cluster Descriptor ReadAttribute DeviceList - self._chipLib.chip_ime_ReadAttribute_Descriptor_DeviceList.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_Descriptor_DeviceList.restype = ctypes.c_uint32 - # Cluster Descriptor ReadAttribute ServerList - self._chipLib.chip_ime_ReadAttribute_Descriptor_ServerList.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_Descriptor_ServerList.restype = ctypes.c_uint32 - # Cluster Descriptor ReadAttribute ClientList - self._chipLib.chip_ime_ReadAttribute_Descriptor_ClientList.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_Descriptor_ClientList.restype = ctypes.c_uint32 - # Cluster Descriptor ReadAttribute PartsList - self._chipLib.chip_ime_ReadAttribute_Descriptor_PartsList.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_Descriptor_PartsList.restype = ctypes.c_uint32 - # Cluster Descriptor ReadAttribute ClusterRevision - self._chipLib.chip_ime_ReadAttribute_Descriptor_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_Descriptor_ClusterRevision.restype = ctypes.c_uint32 - # Cluster Descriptor SubscribeAttribute ClusterRevision - self._chipLib.chip_ime_SubscribeAttribute_Descriptor_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_Descriptor_ClusterRevision.restype = ctypes.c_uint32 - # Cluster DiagnosticLogs - # Cluster DoorLock - # Cluster DoorLock ReadAttribute LockState - self._chipLib.chip_ime_ReadAttribute_DoorLock_LockState.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_DoorLock_LockState.restype = ctypes.c_uint32 - # Cluster DoorLock SubscribeAttribute LockState - self._chipLib.chip_ime_SubscribeAttribute_DoorLock_LockState.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_DoorLock_LockState.restype = ctypes.c_uint32 - # Cluster DoorLock ReadAttribute LockType - self._chipLib.chip_ime_ReadAttribute_DoorLock_LockType.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_DoorLock_LockType.restype = ctypes.c_uint32 - # Cluster DoorLock SubscribeAttribute LockType - self._chipLib.chip_ime_SubscribeAttribute_DoorLock_LockType.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_DoorLock_LockType.restype = ctypes.c_uint32 - # Cluster DoorLock ReadAttribute ActuatorEnabled - self._chipLib.chip_ime_ReadAttribute_DoorLock_ActuatorEnabled.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_DoorLock_ActuatorEnabled.restype = ctypes.c_uint32 - # Cluster DoorLock SubscribeAttribute ActuatorEnabled - self._chipLib.chip_ime_SubscribeAttribute_DoorLock_ActuatorEnabled.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_DoorLock_ActuatorEnabled.restype = ctypes.c_uint32 - # Cluster DoorLock ReadAttribute ClusterRevision - self._chipLib.chip_ime_ReadAttribute_DoorLock_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_DoorLock_ClusterRevision.restype = ctypes.c_uint32 - # Cluster DoorLock SubscribeAttribute ClusterRevision - self._chipLib.chip_ime_SubscribeAttribute_DoorLock_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_DoorLock_ClusterRevision.restype = ctypes.c_uint32 - # Cluster ElectricalMeasurement - # Cluster ElectricalMeasurement ReadAttribute MeasurementType - self._chipLib.chip_ime_ReadAttribute_ElectricalMeasurement_MeasurementType.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ElectricalMeasurement_MeasurementType.restype = ctypes.c_uint32 - # Cluster ElectricalMeasurement SubscribeAttribute MeasurementType - self._chipLib.chip_ime_SubscribeAttribute_ElectricalMeasurement_MeasurementType.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ElectricalMeasurement_MeasurementType.restype = ctypes.c_uint32 - # Cluster ElectricalMeasurement ReadAttribute TotalActivePower - self._chipLib.chip_ime_ReadAttribute_ElectricalMeasurement_TotalActivePower.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ElectricalMeasurement_TotalActivePower.restype = ctypes.c_uint32 - # Cluster ElectricalMeasurement SubscribeAttribute TotalActivePower - self._chipLib.chip_ime_SubscribeAttribute_ElectricalMeasurement_TotalActivePower.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ElectricalMeasurement_TotalActivePower.restype = ctypes.c_uint32 - # Cluster ElectricalMeasurement ReadAttribute RmsVoltage - self._chipLib.chip_ime_ReadAttribute_ElectricalMeasurement_RmsVoltage.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ElectricalMeasurement_RmsVoltage.restype = ctypes.c_uint32 - # Cluster ElectricalMeasurement SubscribeAttribute RmsVoltage - self._chipLib.chip_ime_SubscribeAttribute_ElectricalMeasurement_RmsVoltage.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ElectricalMeasurement_RmsVoltage.restype = ctypes.c_uint32 - # Cluster ElectricalMeasurement ReadAttribute RmsVoltageMin - self._chipLib.chip_ime_ReadAttribute_ElectricalMeasurement_RmsVoltageMin.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ElectricalMeasurement_RmsVoltageMin.restype = ctypes.c_uint32 - # Cluster ElectricalMeasurement SubscribeAttribute RmsVoltageMin - self._chipLib.chip_ime_SubscribeAttribute_ElectricalMeasurement_RmsVoltageMin.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ElectricalMeasurement_RmsVoltageMin.restype = ctypes.c_uint32 - # Cluster ElectricalMeasurement ReadAttribute RmsVoltageMax - self._chipLib.chip_ime_ReadAttribute_ElectricalMeasurement_RmsVoltageMax.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ElectricalMeasurement_RmsVoltageMax.restype = ctypes.c_uint32 - # Cluster ElectricalMeasurement SubscribeAttribute RmsVoltageMax - self._chipLib.chip_ime_SubscribeAttribute_ElectricalMeasurement_RmsVoltageMax.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ElectricalMeasurement_RmsVoltageMax.restype = ctypes.c_uint32 - # Cluster ElectricalMeasurement ReadAttribute RmsCurrent - self._chipLib.chip_ime_ReadAttribute_ElectricalMeasurement_RmsCurrent.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ElectricalMeasurement_RmsCurrent.restype = ctypes.c_uint32 - # Cluster ElectricalMeasurement SubscribeAttribute RmsCurrent - self._chipLib.chip_ime_SubscribeAttribute_ElectricalMeasurement_RmsCurrent.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ElectricalMeasurement_RmsCurrent.restype = ctypes.c_uint32 - # Cluster ElectricalMeasurement ReadAttribute RmsCurrentMin - self._chipLib.chip_ime_ReadAttribute_ElectricalMeasurement_RmsCurrentMin.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ElectricalMeasurement_RmsCurrentMin.restype = ctypes.c_uint32 - # Cluster ElectricalMeasurement SubscribeAttribute RmsCurrentMin - self._chipLib.chip_ime_SubscribeAttribute_ElectricalMeasurement_RmsCurrentMin.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ElectricalMeasurement_RmsCurrentMin.restype = ctypes.c_uint32 - # Cluster ElectricalMeasurement ReadAttribute RmsCurrentMax - self._chipLib.chip_ime_ReadAttribute_ElectricalMeasurement_RmsCurrentMax.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ElectricalMeasurement_RmsCurrentMax.restype = ctypes.c_uint32 - # Cluster ElectricalMeasurement SubscribeAttribute RmsCurrentMax - self._chipLib.chip_ime_SubscribeAttribute_ElectricalMeasurement_RmsCurrentMax.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ElectricalMeasurement_RmsCurrentMax.restype = ctypes.c_uint32 - # Cluster ElectricalMeasurement ReadAttribute ActivePower - self._chipLib.chip_ime_ReadAttribute_ElectricalMeasurement_ActivePower.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ElectricalMeasurement_ActivePower.restype = ctypes.c_uint32 - # Cluster ElectricalMeasurement SubscribeAttribute ActivePower - self._chipLib.chip_ime_SubscribeAttribute_ElectricalMeasurement_ActivePower.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ElectricalMeasurement_ActivePower.restype = ctypes.c_uint32 - # Cluster ElectricalMeasurement ReadAttribute ActivePowerMin - self._chipLib.chip_ime_ReadAttribute_ElectricalMeasurement_ActivePowerMin.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ElectricalMeasurement_ActivePowerMin.restype = ctypes.c_uint32 - # Cluster ElectricalMeasurement SubscribeAttribute ActivePowerMin - self._chipLib.chip_ime_SubscribeAttribute_ElectricalMeasurement_ActivePowerMin.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ElectricalMeasurement_ActivePowerMin.restype = ctypes.c_uint32 - # Cluster ElectricalMeasurement ReadAttribute ActivePowerMax - self._chipLib.chip_ime_ReadAttribute_ElectricalMeasurement_ActivePowerMax.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ElectricalMeasurement_ActivePowerMax.restype = ctypes.c_uint32 - # Cluster ElectricalMeasurement SubscribeAttribute ActivePowerMax - self._chipLib.chip_ime_SubscribeAttribute_ElectricalMeasurement_ActivePowerMax.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ElectricalMeasurement_ActivePowerMax.restype = ctypes.c_uint32 - # Cluster ElectricalMeasurement ReadAttribute ClusterRevision - self._chipLib.chip_ime_ReadAttribute_ElectricalMeasurement_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ElectricalMeasurement_ClusterRevision.restype = ctypes.c_uint32 - # Cluster ElectricalMeasurement SubscribeAttribute ClusterRevision - self._chipLib.chip_ime_SubscribeAttribute_ElectricalMeasurement_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ElectricalMeasurement_ClusterRevision.restype = ctypes.c_uint32 - # Cluster EthernetNetworkDiagnostics - # Cluster EthernetNetworkDiagnostics ReadAttribute PHYRate - self._chipLib.chip_ime_ReadAttribute_EthernetNetworkDiagnostics_PHYRate.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_EthernetNetworkDiagnostics_PHYRate.restype = ctypes.c_uint32 - # Cluster EthernetNetworkDiagnostics SubscribeAttribute PHYRate - self._chipLib.chip_ime_SubscribeAttribute_EthernetNetworkDiagnostics_PHYRate.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_EthernetNetworkDiagnostics_PHYRate.restype = ctypes.c_uint32 - # Cluster EthernetNetworkDiagnostics ReadAttribute FullDuplex - self._chipLib.chip_ime_ReadAttribute_EthernetNetworkDiagnostics_FullDuplex.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_EthernetNetworkDiagnostics_FullDuplex.restype = ctypes.c_uint32 - # Cluster EthernetNetworkDiagnostics SubscribeAttribute FullDuplex - self._chipLib.chip_ime_SubscribeAttribute_EthernetNetworkDiagnostics_FullDuplex.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_EthernetNetworkDiagnostics_FullDuplex.restype = ctypes.c_uint32 - # Cluster EthernetNetworkDiagnostics ReadAttribute PacketRxCount - self._chipLib.chip_ime_ReadAttribute_EthernetNetworkDiagnostics_PacketRxCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_EthernetNetworkDiagnostics_PacketRxCount.restype = ctypes.c_uint32 - # Cluster EthernetNetworkDiagnostics SubscribeAttribute PacketRxCount - self._chipLib.chip_ime_SubscribeAttribute_EthernetNetworkDiagnostics_PacketRxCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_EthernetNetworkDiagnostics_PacketRxCount.restype = ctypes.c_uint32 - # Cluster EthernetNetworkDiagnostics ReadAttribute PacketTxCount - self._chipLib.chip_ime_ReadAttribute_EthernetNetworkDiagnostics_PacketTxCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_EthernetNetworkDiagnostics_PacketTxCount.restype = ctypes.c_uint32 - # Cluster EthernetNetworkDiagnostics SubscribeAttribute PacketTxCount - self._chipLib.chip_ime_SubscribeAttribute_EthernetNetworkDiagnostics_PacketTxCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_EthernetNetworkDiagnostics_PacketTxCount.restype = ctypes.c_uint32 - # Cluster EthernetNetworkDiagnostics ReadAttribute TxErrCount - self._chipLib.chip_ime_ReadAttribute_EthernetNetworkDiagnostics_TxErrCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_EthernetNetworkDiagnostics_TxErrCount.restype = ctypes.c_uint32 - # Cluster EthernetNetworkDiagnostics SubscribeAttribute TxErrCount - self._chipLib.chip_ime_SubscribeAttribute_EthernetNetworkDiagnostics_TxErrCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_EthernetNetworkDiagnostics_TxErrCount.restype = ctypes.c_uint32 - # Cluster EthernetNetworkDiagnostics ReadAttribute CollisionCount - self._chipLib.chip_ime_ReadAttribute_EthernetNetworkDiagnostics_CollisionCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_EthernetNetworkDiagnostics_CollisionCount.restype = ctypes.c_uint32 - # Cluster EthernetNetworkDiagnostics SubscribeAttribute CollisionCount - self._chipLib.chip_ime_SubscribeAttribute_EthernetNetworkDiagnostics_CollisionCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_EthernetNetworkDiagnostics_CollisionCount.restype = ctypes.c_uint32 - # Cluster EthernetNetworkDiagnostics ReadAttribute OverrunCount - self._chipLib.chip_ime_ReadAttribute_EthernetNetworkDiagnostics_OverrunCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_EthernetNetworkDiagnostics_OverrunCount.restype = ctypes.c_uint32 - # Cluster EthernetNetworkDiagnostics SubscribeAttribute OverrunCount - self._chipLib.chip_ime_SubscribeAttribute_EthernetNetworkDiagnostics_OverrunCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_EthernetNetworkDiagnostics_OverrunCount.restype = ctypes.c_uint32 - # Cluster EthernetNetworkDiagnostics ReadAttribute CarrierDetect - self._chipLib.chip_ime_ReadAttribute_EthernetNetworkDiagnostics_CarrierDetect.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_EthernetNetworkDiagnostics_CarrierDetect.restype = ctypes.c_uint32 - # Cluster EthernetNetworkDiagnostics SubscribeAttribute CarrierDetect - self._chipLib.chip_ime_SubscribeAttribute_EthernetNetworkDiagnostics_CarrierDetect.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_EthernetNetworkDiagnostics_CarrierDetect.restype = ctypes.c_uint32 - # Cluster EthernetNetworkDiagnostics ReadAttribute TimeSinceReset - self._chipLib.chip_ime_ReadAttribute_EthernetNetworkDiagnostics_TimeSinceReset.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_EthernetNetworkDiagnostics_TimeSinceReset.restype = ctypes.c_uint32 - # Cluster EthernetNetworkDiagnostics SubscribeAttribute TimeSinceReset - self._chipLib.chip_ime_SubscribeAttribute_EthernetNetworkDiagnostics_TimeSinceReset.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_EthernetNetworkDiagnostics_TimeSinceReset.restype = ctypes.c_uint32 - # Cluster EthernetNetworkDiagnostics ReadAttribute FeatureMap - self._chipLib.chip_ime_ReadAttribute_EthernetNetworkDiagnostics_FeatureMap.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_EthernetNetworkDiagnostics_FeatureMap.restype = ctypes.c_uint32 - # Cluster EthernetNetworkDiagnostics ReadAttribute ClusterRevision - self._chipLib.chip_ime_ReadAttribute_EthernetNetworkDiagnostics_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_EthernetNetworkDiagnostics_ClusterRevision.restype = ctypes.c_uint32 - # Cluster EthernetNetworkDiagnostics SubscribeAttribute ClusterRevision - self._chipLib.chip_ime_SubscribeAttribute_EthernetNetworkDiagnostics_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_EthernetNetworkDiagnostics_ClusterRevision.restype = ctypes.c_uint32 - # Cluster FixedLabel - # Cluster FixedLabel ReadAttribute LabelList - self._chipLib.chip_ime_ReadAttribute_FixedLabel_LabelList.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_FixedLabel_LabelList.restype = ctypes.c_uint32 - # Cluster FixedLabel ReadAttribute ClusterRevision - self._chipLib.chip_ime_ReadAttribute_FixedLabel_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_FixedLabel_ClusterRevision.restype = ctypes.c_uint32 - # Cluster FixedLabel SubscribeAttribute ClusterRevision - self._chipLib.chip_ime_SubscribeAttribute_FixedLabel_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_FixedLabel_ClusterRevision.restype = ctypes.c_uint32 - # Cluster FlowMeasurement - # Cluster FlowMeasurement ReadAttribute MeasuredValue - self._chipLib.chip_ime_ReadAttribute_FlowMeasurement_MeasuredValue.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_FlowMeasurement_MeasuredValue.restype = ctypes.c_uint32 - # Cluster FlowMeasurement SubscribeAttribute MeasuredValue - self._chipLib.chip_ime_SubscribeAttribute_FlowMeasurement_MeasuredValue.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_FlowMeasurement_MeasuredValue.restype = ctypes.c_uint32 - # Cluster FlowMeasurement ReadAttribute MinMeasuredValue - self._chipLib.chip_ime_ReadAttribute_FlowMeasurement_MinMeasuredValue.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_FlowMeasurement_MinMeasuredValue.restype = ctypes.c_uint32 - # Cluster FlowMeasurement SubscribeAttribute MinMeasuredValue - self._chipLib.chip_ime_SubscribeAttribute_FlowMeasurement_MinMeasuredValue.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_FlowMeasurement_MinMeasuredValue.restype = ctypes.c_uint32 - # Cluster FlowMeasurement ReadAttribute MaxMeasuredValue - self._chipLib.chip_ime_ReadAttribute_FlowMeasurement_MaxMeasuredValue.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_FlowMeasurement_MaxMeasuredValue.restype = ctypes.c_uint32 - # Cluster FlowMeasurement SubscribeAttribute MaxMeasuredValue - self._chipLib.chip_ime_SubscribeAttribute_FlowMeasurement_MaxMeasuredValue.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_FlowMeasurement_MaxMeasuredValue.restype = ctypes.c_uint32 - # Cluster FlowMeasurement ReadAttribute Tolerance - self._chipLib.chip_ime_ReadAttribute_FlowMeasurement_Tolerance.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_FlowMeasurement_Tolerance.restype = ctypes.c_uint32 - # Cluster FlowMeasurement SubscribeAttribute Tolerance - self._chipLib.chip_ime_SubscribeAttribute_FlowMeasurement_Tolerance.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_FlowMeasurement_Tolerance.restype = ctypes.c_uint32 - # Cluster FlowMeasurement ReadAttribute ClusterRevision - self._chipLib.chip_ime_ReadAttribute_FlowMeasurement_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_FlowMeasurement_ClusterRevision.restype = ctypes.c_uint32 - # Cluster FlowMeasurement SubscribeAttribute ClusterRevision - self._chipLib.chip_ime_SubscribeAttribute_FlowMeasurement_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_FlowMeasurement_ClusterRevision.restype = ctypes.c_uint32 - # Cluster GeneralCommissioning - # Cluster GeneralCommissioning ReadAttribute Breadcrumb - self._chipLib.chip_ime_ReadAttribute_GeneralCommissioning_Breadcrumb.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_GeneralCommissioning_Breadcrumb.restype = ctypes.c_uint32 - # Cluster GeneralCommissioning SubscribeAttribute Breadcrumb - self._chipLib.chip_ime_SubscribeAttribute_GeneralCommissioning_Breadcrumb.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_GeneralCommissioning_Breadcrumb.restype = ctypes.c_uint32 - # Cluster GeneralCommissioning ReadAttribute BasicCommissioningInfoList - self._chipLib.chip_ime_ReadAttribute_GeneralCommissioning_BasicCommissioningInfoList.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_GeneralCommissioning_BasicCommissioningInfoList.restype = ctypes.c_uint32 - # Cluster GeneralCommissioning ReadAttribute ClusterRevision - self._chipLib.chip_ime_ReadAttribute_GeneralCommissioning_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_GeneralCommissioning_ClusterRevision.restype = ctypes.c_uint32 - # Cluster GeneralCommissioning SubscribeAttribute ClusterRevision - self._chipLib.chip_ime_SubscribeAttribute_GeneralCommissioning_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_GeneralCommissioning_ClusterRevision.restype = ctypes.c_uint32 - # Cluster GeneralDiagnostics - # Cluster GeneralDiagnostics ReadAttribute NetworkInterfaces - self._chipLib.chip_ime_ReadAttribute_GeneralDiagnostics_NetworkInterfaces.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_GeneralDiagnostics_NetworkInterfaces.restype = ctypes.c_uint32 - # Cluster GeneralDiagnostics ReadAttribute RebootCount - self._chipLib.chip_ime_ReadAttribute_GeneralDiagnostics_RebootCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_GeneralDiagnostics_RebootCount.restype = ctypes.c_uint32 - # Cluster GeneralDiagnostics SubscribeAttribute RebootCount - self._chipLib.chip_ime_SubscribeAttribute_GeneralDiagnostics_RebootCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_GeneralDiagnostics_RebootCount.restype = ctypes.c_uint32 - # Cluster GeneralDiagnostics ReadAttribute UpTime - self._chipLib.chip_ime_ReadAttribute_GeneralDiagnostics_UpTime.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_GeneralDiagnostics_UpTime.restype = ctypes.c_uint32 - # Cluster GeneralDiagnostics SubscribeAttribute UpTime - self._chipLib.chip_ime_SubscribeAttribute_GeneralDiagnostics_UpTime.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_GeneralDiagnostics_UpTime.restype = ctypes.c_uint32 - # Cluster GeneralDiagnostics ReadAttribute TotalOperationalHours - self._chipLib.chip_ime_ReadAttribute_GeneralDiagnostics_TotalOperationalHours.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_GeneralDiagnostics_TotalOperationalHours.restype = ctypes.c_uint32 - # Cluster GeneralDiagnostics SubscribeAttribute TotalOperationalHours - self._chipLib.chip_ime_SubscribeAttribute_GeneralDiagnostics_TotalOperationalHours.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_GeneralDiagnostics_TotalOperationalHours.restype = ctypes.c_uint32 - # Cluster GeneralDiagnostics ReadAttribute BootReasons - self._chipLib.chip_ime_ReadAttribute_GeneralDiagnostics_BootReasons.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_GeneralDiagnostics_BootReasons.restype = ctypes.c_uint32 - # Cluster GeneralDiagnostics SubscribeAttribute BootReasons - self._chipLib.chip_ime_SubscribeAttribute_GeneralDiagnostics_BootReasons.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_GeneralDiagnostics_BootReasons.restype = ctypes.c_uint32 - # Cluster GeneralDiagnostics ReadAttribute ActiveHardwareFaults - self._chipLib.chip_ime_ReadAttribute_GeneralDiagnostics_ActiveHardwareFaults.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_GeneralDiagnostics_ActiveHardwareFaults.restype = ctypes.c_uint32 - # Cluster GeneralDiagnostics ReadAttribute ActiveRadioFaults - self._chipLib.chip_ime_ReadAttribute_GeneralDiagnostics_ActiveRadioFaults.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_GeneralDiagnostics_ActiveRadioFaults.restype = ctypes.c_uint32 - # Cluster GeneralDiagnostics ReadAttribute ActiveNetworkFaults - self._chipLib.chip_ime_ReadAttribute_GeneralDiagnostics_ActiveNetworkFaults.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_GeneralDiagnostics_ActiveNetworkFaults.restype = ctypes.c_uint32 - # Cluster GeneralDiagnostics ReadAttribute ClusterRevision - self._chipLib.chip_ime_ReadAttribute_GeneralDiagnostics_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_GeneralDiagnostics_ClusterRevision.restype = ctypes.c_uint32 - # Cluster GeneralDiagnostics SubscribeAttribute ClusterRevision - self._chipLib.chip_ime_SubscribeAttribute_GeneralDiagnostics_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_GeneralDiagnostics_ClusterRevision.restype = ctypes.c_uint32 - # Cluster GroupKeyManagement - # Cluster GroupKeyManagement ReadAttribute Groups - self._chipLib.chip_ime_ReadAttribute_GroupKeyManagement_Groups.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_GroupKeyManagement_Groups.restype = ctypes.c_uint32 - # Cluster GroupKeyManagement ReadAttribute GroupKeys - self._chipLib.chip_ime_ReadAttribute_GroupKeyManagement_GroupKeys.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_GroupKeyManagement_GroupKeys.restype = ctypes.c_uint32 - # Cluster GroupKeyManagement ReadAttribute ClusterRevision - self._chipLib.chip_ime_ReadAttribute_GroupKeyManagement_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_GroupKeyManagement_ClusterRevision.restype = ctypes.c_uint32 - # Cluster GroupKeyManagement SubscribeAttribute ClusterRevision - self._chipLib.chip_ime_SubscribeAttribute_GroupKeyManagement_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_GroupKeyManagement_ClusterRevision.restype = ctypes.c_uint32 - # Cluster Groups - # Cluster Groups ReadAttribute NameSupport - self._chipLib.chip_ime_ReadAttribute_Groups_NameSupport.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_Groups_NameSupport.restype = ctypes.c_uint32 - # Cluster Groups SubscribeAttribute NameSupport - self._chipLib.chip_ime_SubscribeAttribute_Groups_NameSupport.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_Groups_NameSupport.restype = ctypes.c_uint32 - # Cluster Groups ReadAttribute ClusterRevision - self._chipLib.chip_ime_ReadAttribute_Groups_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_Groups_ClusterRevision.restype = ctypes.c_uint32 - # Cluster Groups SubscribeAttribute ClusterRevision - self._chipLib.chip_ime_SubscribeAttribute_Groups_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_Groups_ClusterRevision.restype = ctypes.c_uint32 - # Cluster Identify - # Cluster Identify ReadAttribute IdentifyTime - self._chipLib.chip_ime_ReadAttribute_Identify_IdentifyTime.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_Identify_IdentifyTime.restype = ctypes.c_uint32 - # Cluster Identify SubscribeAttribute IdentifyTime - self._chipLib.chip_ime_SubscribeAttribute_Identify_IdentifyTime.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_Identify_IdentifyTime.restype = ctypes.c_uint32 - # Cluster Identify ReadAttribute IdentifyType - self._chipLib.chip_ime_ReadAttribute_Identify_IdentifyType.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_Identify_IdentifyType.restype = ctypes.c_uint32 - # Cluster Identify SubscribeAttribute IdentifyType - self._chipLib.chip_ime_SubscribeAttribute_Identify_IdentifyType.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_Identify_IdentifyType.restype = ctypes.c_uint32 - # Cluster Identify ReadAttribute ClusterRevision - self._chipLib.chip_ime_ReadAttribute_Identify_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_Identify_ClusterRevision.restype = ctypes.c_uint32 - # Cluster Identify SubscribeAttribute ClusterRevision - self._chipLib.chip_ime_SubscribeAttribute_Identify_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_Identify_ClusterRevision.restype = ctypes.c_uint32 - # Cluster IlluminanceMeasurement - # Cluster IlluminanceMeasurement ReadAttribute MeasuredValue - self._chipLib.chip_ime_ReadAttribute_IlluminanceMeasurement_MeasuredValue.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_IlluminanceMeasurement_MeasuredValue.restype = ctypes.c_uint32 - # Cluster IlluminanceMeasurement SubscribeAttribute MeasuredValue - self._chipLib.chip_ime_SubscribeAttribute_IlluminanceMeasurement_MeasuredValue.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_IlluminanceMeasurement_MeasuredValue.restype = ctypes.c_uint32 - # Cluster IlluminanceMeasurement ReadAttribute MinMeasuredValue - self._chipLib.chip_ime_ReadAttribute_IlluminanceMeasurement_MinMeasuredValue.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_IlluminanceMeasurement_MinMeasuredValue.restype = ctypes.c_uint32 - # Cluster IlluminanceMeasurement SubscribeAttribute MinMeasuredValue - self._chipLib.chip_ime_SubscribeAttribute_IlluminanceMeasurement_MinMeasuredValue.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_IlluminanceMeasurement_MinMeasuredValue.restype = ctypes.c_uint32 - # Cluster IlluminanceMeasurement ReadAttribute MaxMeasuredValue - self._chipLib.chip_ime_ReadAttribute_IlluminanceMeasurement_MaxMeasuredValue.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_IlluminanceMeasurement_MaxMeasuredValue.restype = ctypes.c_uint32 - # Cluster IlluminanceMeasurement SubscribeAttribute MaxMeasuredValue - self._chipLib.chip_ime_SubscribeAttribute_IlluminanceMeasurement_MaxMeasuredValue.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_IlluminanceMeasurement_MaxMeasuredValue.restype = ctypes.c_uint32 - # Cluster IlluminanceMeasurement ReadAttribute Tolerance - self._chipLib.chip_ime_ReadAttribute_IlluminanceMeasurement_Tolerance.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_IlluminanceMeasurement_Tolerance.restype = ctypes.c_uint32 - # Cluster IlluminanceMeasurement SubscribeAttribute Tolerance - self._chipLib.chip_ime_SubscribeAttribute_IlluminanceMeasurement_Tolerance.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_IlluminanceMeasurement_Tolerance.restype = ctypes.c_uint32 - # Cluster IlluminanceMeasurement ReadAttribute LightSensorType - self._chipLib.chip_ime_ReadAttribute_IlluminanceMeasurement_LightSensorType.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_IlluminanceMeasurement_LightSensorType.restype = ctypes.c_uint32 - # Cluster IlluminanceMeasurement SubscribeAttribute LightSensorType - self._chipLib.chip_ime_SubscribeAttribute_IlluminanceMeasurement_LightSensorType.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_IlluminanceMeasurement_LightSensorType.restype = ctypes.c_uint32 - # Cluster IlluminanceMeasurement ReadAttribute ClusterRevision - self._chipLib.chip_ime_ReadAttribute_IlluminanceMeasurement_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_IlluminanceMeasurement_ClusterRevision.restype = ctypes.c_uint32 - # Cluster IlluminanceMeasurement SubscribeAttribute ClusterRevision - self._chipLib.chip_ime_SubscribeAttribute_IlluminanceMeasurement_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_IlluminanceMeasurement_ClusterRevision.restype = ctypes.c_uint32 - # Cluster KeypadInput - # Cluster KeypadInput ReadAttribute ClusterRevision - self._chipLib.chip_ime_ReadAttribute_KeypadInput_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_KeypadInput_ClusterRevision.restype = ctypes.c_uint32 - # Cluster KeypadInput SubscribeAttribute ClusterRevision - self._chipLib.chip_ime_SubscribeAttribute_KeypadInput_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_KeypadInput_ClusterRevision.restype = ctypes.c_uint32 - # Cluster LevelControl - # Cluster LevelControl ReadAttribute CurrentLevel - self._chipLib.chip_ime_ReadAttribute_LevelControl_CurrentLevel.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_LevelControl_CurrentLevel.restype = ctypes.c_uint32 - # Cluster LevelControl SubscribeAttribute CurrentLevel - self._chipLib.chip_ime_SubscribeAttribute_LevelControl_CurrentLevel.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_LevelControl_CurrentLevel.restype = ctypes.c_uint32 - # Cluster LevelControl ReadAttribute RemainingTime - self._chipLib.chip_ime_ReadAttribute_LevelControl_RemainingTime.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_LevelControl_RemainingTime.restype = ctypes.c_uint32 - # Cluster LevelControl SubscribeAttribute RemainingTime - self._chipLib.chip_ime_SubscribeAttribute_LevelControl_RemainingTime.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_LevelControl_RemainingTime.restype = ctypes.c_uint32 - # Cluster LevelControl ReadAttribute MinLevel - self._chipLib.chip_ime_ReadAttribute_LevelControl_MinLevel.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_LevelControl_MinLevel.restype = ctypes.c_uint32 - # Cluster LevelControl SubscribeAttribute MinLevel - self._chipLib.chip_ime_SubscribeAttribute_LevelControl_MinLevel.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_LevelControl_MinLevel.restype = ctypes.c_uint32 - # Cluster LevelControl ReadAttribute MaxLevel - self._chipLib.chip_ime_ReadAttribute_LevelControl_MaxLevel.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_LevelControl_MaxLevel.restype = ctypes.c_uint32 - # Cluster LevelControl SubscribeAttribute MaxLevel - self._chipLib.chip_ime_SubscribeAttribute_LevelControl_MaxLevel.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_LevelControl_MaxLevel.restype = ctypes.c_uint32 - # Cluster LevelControl ReadAttribute CurrentFrequency - self._chipLib.chip_ime_ReadAttribute_LevelControl_CurrentFrequency.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_LevelControl_CurrentFrequency.restype = ctypes.c_uint32 - # Cluster LevelControl SubscribeAttribute CurrentFrequency - self._chipLib.chip_ime_SubscribeAttribute_LevelControl_CurrentFrequency.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_LevelControl_CurrentFrequency.restype = ctypes.c_uint32 - # Cluster LevelControl ReadAttribute MinFrequency - self._chipLib.chip_ime_ReadAttribute_LevelControl_MinFrequency.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_LevelControl_MinFrequency.restype = ctypes.c_uint32 - # Cluster LevelControl SubscribeAttribute MinFrequency - self._chipLib.chip_ime_SubscribeAttribute_LevelControl_MinFrequency.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_LevelControl_MinFrequency.restype = ctypes.c_uint32 - # Cluster LevelControl ReadAttribute MaxFrequency - self._chipLib.chip_ime_ReadAttribute_LevelControl_MaxFrequency.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_LevelControl_MaxFrequency.restype = ctypes.c_uint32 - # Cluster LevelControl SubscribeAttribute MaxFrequency - self._chipLib.chip_ime_SubscribeAttribute_LevelControl_MaxFrequency.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_LevelControl_MaxFrequency.restype = ctypes.c_uint32 - # Cluster LevelControl ReadAttribute Options - self._chipLib.chip_ime_ReadAttribute_LevelControl_Options.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_LevelControl_Options.restype = ctypes.c_uint32 - # Cluster LevelControl SubscribeAttribute Options - self._chipLib.chip_ime_SubscribeAttribute_LevelControl_Options.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_LevelControl_Options.restype = ctypes.c_uint32 - # Cluster LevelControl ReadAttribute OnOffTransitionTime - self._chipLib.chip_ime_ReadAttribute_LevelControl_OnOffTransitionTime.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_LevelControl_OnOffTransitionTime.restype = ctypes.c_uint32 - # Cluster LevelControl SubscribeAttribute OnOffTransitionTime - self._chipLib.chip_ime_SubscribeAttribute_LevelControl_OnOffTransitionTime.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_LevelControl_OnOffTransitionTime.restype = ctypes.c_uint32 - # Cluster LevelControl ReadAttribute OnLevel - self._chipLib.chip_ime_ReadAttribute_LevelControl_OnLevel.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_LevelControl_OnLevel.restype = ctypes.c_uint32 - # Cluster LevelControl SubscribeAttribute OnLevel - self._chipLib.chip_ime_SubscribeAttribute_LevelControl_OnLevel.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_LevelControl_OnLevel.restype = ctypes.c_uint32 - # Cluster LevelControl ReadAttribute OnTransitionTime - self._chipLib.chip_ime_ReadAttribute_LevelControl_OnTransitionTime.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_LevelControl_OnTransitionTime.restype = ctypes.c_uint32 - # Cluster LevelControl SubscribeAttribute OnTransitionTime - self._chipLib.chip_ime_SubscribeAttribute_LevelControl_OnTransitionTime.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_LevelControl_OnTransitionTime.restype = ctypes.c_uint32 - # Cluster LevelControl ReadAttribute OffTransitionTime - self._chipLib.chip_ime_ReadAttribute_LevelControl_OffTransitionTime.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_LevelControl_OffTransitionTime.restype = ctypes.c_uint32 - # Cluster LevelControl SubscribeAttribute OffTransitionTime - self._chipLib.chip_ime_SubscribeAttribute_LevelControl_OffTransitionTime.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_LevelControl_OffTransitionTime.restype = ctypes.c_uint32 - # Cluster LevelControl ReadAttribute DefaultMoveRate - self._chipLib.chip_ime_ReadAttribute_LevelControl_DefaultMoveRate.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_LevelControl_DefaultMoveRate.restype = ctypes.c_uint32 - # Cluster LevelControl SubscribeAttribute DefaultMoveRate - self._chipLib.chip_ime_SubscribeAttribute_LevelControl_DefaultMoveRate.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_LevelControl_DefaultMoveRate.restype = ctypes.c_uint32 - # Cluster LevelControl ReadAttribute StartUpCurrentLevel - self._chipLib.chip_ime_ReadAttribute_LevelControl_StartUpCurrentLevel.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_LevelControl_StartUpCurrentLevel.restype = ctypes.c_uint32 - # Cluster LevelControl SubscribeAttribute StartUpCurrentLevel - self._chipLib.chip_ime_SubscribeAttribute_LevelControl_StartUpCurrentLevel.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_LevelControl_StartUpCurrentLevel.restype = ctypes.c_uint32 - # Cluster LevelControl ReadAttribute ClusterRevision - self._chipLib.chip_ime_ReadAttribute_LevelControl_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_LevelControl_ClusterRevision.restype = ctypes.c_uint32 - # Cluster LevelControl SubscribeAttribute ClusterRevision - self._chipLib.chip_ime_SubscribeAttribute_LevelControl_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_LevelControl_ClusterRevision.restype = ctypes.c_uint32 - # Cluster LowPower - # Cluster LowPower ReadAttribute ClusterRevision - self._chipLib.chip_ime_ReadAttribute_LowPower_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_LowPower_ClusterRevision.restype = ctypes.c_uint32 - # Cluster LowPower SubscribeAttribute ClusterRevision - self._chipLib.chip_ime_SubscribeAttribute_LowPower_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_LowPower_ClusterRevision.restype = ctypes.c_uint32 - # Cluster MediaInput - # Cluster MediaInput ReadAttribute MediaInputList - self._chipLib.chip_ime_ReadAttribute_MediaInput_MediaInputList.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_MediaInput_MediaInputList.restype = ctypes.c_uint32 - # Cluster MediaInput ReadAttribute CurrentMediaInput - self._chipLib.chip_ime_ReadAttribute_MediaInput_CurrentMediaInput.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_MediaInput_CurrentMediaInput.restype = ctypes.c_uint32 - # Cluster MediaInput SubscribeAttribute CurrentMediaInput - self._chipLib.chip_ime_SubscribeAttribute_MediaInput_CurrentMediaInput.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_MediaInput_CurrentMediaInput.restype = ctypes.c_uint32 - # Cluster MediaInput ReadAttribute ClusterRevision - self._chipLib.chip_ime_ReadAttribute_MediaInput_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_MediaInput_ClusterRevision.restype = ctypes.c_uint32 - # Cluster MediaInput SubscribeAttribute ClusterRevision - self._chipLib.chip_ime_SubscribeAttribute_MediaInput_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_MediaInput_ClusterRevision.restype = ctypes.c_uint32 - # Cluster MediaPlayback - # Cluster MediaPlayback ReadAttribute PlaybackState - self._chipLib.chip_ime_ReadAttribute_MediaPlayback_PlaybackState.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_MediaPlayback_PlaybackState.restype = ctypes.c_uint32 - # Cluster MediaPlayback SubscribeAttribute PlaybackState - self._chipLib.chip_ime_SubscribeAttribute_MediaPlayback_PlaybackState.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_MediaPlayback_PlaybackState.restype = ctypes.c_uint32 - # Cluster MediaPlayback ReadAttribute StartTime - self._chipLib.chip_ime_ReadAttribute_MediaPlayback_StartTime.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_MediaPlayback_StartTime.restype = ctypes.c_uint32 - # Cluster MediaPlayback SubscribeAttribute StartTime - self._chipLib.chip_ime_SubscribeAttribute_MediaPlayback_StartTime.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_MediaPlayback_StartTime.restype = ctypes.c_uint32 - # Cluster MediaPlayback ReadAttribute Duration - self._chipLib.chip_ime_ReadAttribute_MediaPlayback_Duration.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_MediaPlayback_Duration.restype = ctypes.c_uint32 - # Cluster MediaPlayback SubscribeAttribute Duration - self._chipLib.chip_ime_SubscribeAttribute_MediaPlayback_Duration.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_MediaPlayback_Duration.restype = ctypes.c_uint32 - # Cluster MediaPlayback ReadAttribute PositionUpdatedAt - self._chipLib.chip_ime_ReadAttribute_MediaPlayback_PositionUpdatedAt.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_MediaPlayback_PositionUpdatedAt.restype = ctypes.c_uint32 - # Cluster MediaPlayback SubscribeAttribute PositionUpdatedAt - self._chipLib.chip_ime_SubscribeAttribute_MediaPlayback_PositionUpdatedAt.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_MediaPlayback_PositionUpdatedAt.restype = ctypes.c_uint32 - # Cluster MediaPlayback ReadAttribute Position - self._chipLib.chip_ime_ReadAttribute_MediaPlayback_Position.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_MediaPlayback_Position.restype = ctypes.c_uint32 - # Cluster MediaPlayback SubscribeAttribute Position - self._chipLib.chip_ime_SubscribeAttribute_MediaPlayback_Position.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_MediaPlayback_Position.restype = ctypes.c_uint32 - # Cluster MediaPlayback ReadAttribute PlaybackSpeed - self._chipLib.chip_ime_ReadAttribute_MediaPlayback_PlaybackSpeed.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_MediaPlayback_PlaybackSpeed.restype = ctypes.c_uint32 - # Cluster MediaPlayback SubscribeAttribute PlaybackSpeed - self._chipLib.chip_ime_SubscribeAttribute_MediaPlayback_PlaybackSpeed.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_MediaPlayback_PlaybackSpeed.restype = ctypes.c_uint32 - # Cluster MediaPlayback ReadAttribute SeekRangeEnd - self._chipLib.chip_ime_ReadAttribute_MediaPlayback_SeekRangeEnd.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_MediaPlayback_SeekRangeEnd.restype = ctypes.c_uint32 - # Cluster MediaPlayback SubscribeAttribute SeekRangeEnd - self._chipLib.chip_ime_SubscribeAttribute_MediaPlayback_SeekRangeEnd.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_MediaPlayback_SeekRangeEnd.restype = ctypes.c_uint32 - # Cluster MediaPlayback ReadAttribute SeekRangeStart - self._chipLib.chip_ime_ReadAttribute_MediaPlayback_SeekRangeStart.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_MediaPlayback_SeekRangeStart.restype = ctypes.c_uint32 - # Cluster MediaPlayback SubscribeAttribute SeekRangeStart - self._chipLib.chip_ime_SubscribeAttribute_MediaPlayback_SeekRangeStart.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_MediaPlayback_SeekRangeStart.restype = ctypes.c_uint32 - # Cluster MediaPlayback ReadAttribute ClusterRevision - self._chipLib.chip_ime_ReadAttribute_MediaPlayback_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_MediaPlayback_ClusterRevision.restype = ctypes.c_uint32 - # Cluster MediaPlayback SubscribeAttribute ClusterRevision - self._chipLib.chip_ime_SubscribeAttribute_MediaPlayback_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_MediaPlayback_ClusterRevision.restype = ctypes.c_uint32 - # Cluster ModeSelect - # Cluster ModeSelect ReadAttribute CurrentMode - self._chipLib.chip_ime_ReadAttribute_ModeSelect_CurrentMode.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ModeSelect_CurrentMode.restype = ctypes.c_uint32 - # Cluster ModeSelect SubscribeAttribute CurrentMode - self._chipLib.chip_ime_SubscribeAttribute_ModeSelect_CurrentMode.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ModeSelect_CurrentMode.restype = ctypes.c_uint32 - # Cluster ModeSelect ReadAttribute SupportedModes - self._chipLib.chip_ime_ReadAttribute_ModeSelect_SupportedModes.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ModeSelect_SupportedModes.restype = ctypes.c_uint32 - # Cluster ModeSelect ReadAttribute OnMode - self._chipLib.chip_ime_ReadAttribute_ModeSelect_OnMode.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ModeSelect_OnMode.restype = ctypes.c_uint32 - # Cluster ModeSelect SubscribeAttribute OnMode - self._chipLib.chip_ime_SubscribeAttribute_ModeSelect_OnMode.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ModeSelect_OnMode.restype = ctypes.c_uint32 - # Cluster ModeSelect ReadAttribute StartUpMode - self._chipLib.chip_ime_ReadAttribute_ModeSelect_StartUpMode.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ModeSelect_StartUpMode.restype = ctypes.c_uint32 - # Cluster ModeSelect SubscribeAttribute StartUpMode - self._chipLib.chip_ime_SubscribeAttribute_ModeSelect_StartUpMode.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ModeSelect_StartUpMode.restype = ctypes.c_uint32 - # Cluster ModeSelect ReadAttribute Description - self._chipLib.chip_ime_ReadAttribute_ModeSelect_Description.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ModeSelect_Description.restype = ctypes.c_uint32 - # Cluster ModeSelect SubscribeAttribute Description - self._chipLib.chip_ime_SubscribeAttribute_ModeSelect_Description.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ModeSelect_Description.restype = ctypes.c_uint32 - # Cluster ModeSelect ReadAttribute ClusterRevision - self._chipLib.chip_ime_ReadAttribute_ModeSelect_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ModeSelect_ClusterRevision.restype = ctypes.c_uint32 - # Cluster ModeSelect SubscribeAttribute ClusterRevision - self._chipLib.chip_ime_SubscribeAttribute_ModeSelect_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ModeSelect_ClusterRevision.restype = ctypes.c_uint32 - # Cluster NetworkCommissioning - # Cluster NetworkCommissioning ReadAttribute FeatureMap - self._chipLib.chip_ime_ReadAttribute_NetworkCommissioning_FeatureMap.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_NetworkCommissioning_FeatureMap.restype = ctypes.c_uint32 - # Cluster NetworkCommissioning SubscribeAttribute FeatureMap - self._chipLib.chip_ime_SubscribeAttribute_NetworkCommissioning_FeatureMap.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_NetworkCommissioning_FeatureMap.restype = ctypes.c_uint32 - # Cluster NetworkCommissioning ReadAttribute ClusterRevision - self._chipLib.chip_ime_ReadAttribute_NetworkCommissioning_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_NetworkCommissioning_ClusterRevision.restype = ctypes.c_uint32 - # Cluster NetworkCommissioning SubscribeAttribute ClusterRevision - self._chipLib.chip_ime_SubscribeAttribute_NetworkCommissioning_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_NetworkCommissioning_ClusterRevision.restype = ctypes.c_uint32 - # Cluster OtaSoftwareUpdateProvider - # Cluster OtaSoftwareUpdateProvider ReadAttribute ClusterRevision - self._chipLib.chip_ime_ReadAttribute_OtaSoftwareUpdateProvider_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_OtaSoftwareUpdateProvider_ClusterRevision.restype = ctypes.c_uint32 - # Cluster OtaSoftwareUpdateProvider SubscribeAttribute ClusterRevision - self._chipLib.chip_ime_SubscribeAttribute_OtaSoftwareUpdateProvider_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_OtaSoftwareUpdateProvider_ClusterRevision.restype = ctypes.c_uint32 - # Cluster OtaSoftwareUpdateRequestor - # Cluster OtaSoftwareUpdateRequestor ReadAttribute DefaultOtaProvider - self._chipLib.chip_ime_ReadAttribute_OtaSoftwareUpdateRequestor_DefaultOtaProvider.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_OtaSoftwareUpdateRequestor_DefaultOtaProvider.restype = ctypes.c_uint32 - # Cluster OtaSoftwareUpdateRequestor SubscribeAttribute DefaultOtaProvider - self._chipLib.chip_ime_SubscribeAttribute_OtaSoftwareUpdateRequestor_DefaultOtaProvider.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_OtaSoftwareUpdateRequestor_DefaultOtaProvider.restype = ctypes.c_uint32 - # Cluster OtaSoftwareUpdateRequestor ReadAttribute UpdatePossible - self._chipLib.chip_ime_ReadAttribute_OtaSoftwareUpdateRequestor_UpdatePossible.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_OtaSoftwareUpdateRequestor_UpdatePossible.restype = ctypes.c_uint32 - # Cluster OtaSoftwareUpdateRequestor SubscribeAttribute UpdatePossible - self._chipLib.chip_ime_SubscribeAttribute_OtaSoftwareUpdateRequestor_UpdatePossible.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_OtaSoftwareUpdateRequestor_UpdatePossible.restype = ctypes.c_uint32 - # Cluster OtaSoftwareUpdateRequestor ReadAttribute ClusterRevision - self._chipLib.chip_ime_ReadAttribute_OtaSoftwareUpdateRequestor_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_OtaSoftwareUpdateRequestor_ClusterRevision.restype = ctypes.c_uint32 - # Cluster OtaSoftwareUpdateRequestor SubscribeAttribute ClusterRevision - self._chipLib.chip_ime_SubscribeAttribute_OtaSoftwareUpdateRequestor_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_OtaSoftwareUpdateRequestor_ClusterRevision.restype = ctypes.c_uint32 - # Cluster OccupancySensing - # Cluster OccupancySensing ReadAttribute Occupancy - self._chipLib.chip_ime_ReadAttribute_OccupancySensing_Occupancy.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_OccupancySensing_Occupancy.restype = ctypes.c_uint32 - # Cluster OccupancySensing SubscribeAttribute Occupancy - self._chipLib.chip_ime_SubscribeAttribute_OccupancySensing_Occupancy.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_OccupancySensing_Occupancy.restype = ctypes.c_uint32 - # Cluster OccupancySensing ReadAttribute OccupancySensorType - self._chipLib.chip_ime_ReadAttribute_OccupancySensing_OccupancySensorType.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_OccupancySensing_OccupancySensorType.restype = ctypes.c_uint32 - # Cluster OccupancySensing SubscribeAttribute OccupancySensorType - self._chipLib.chip_ime_SubscribeAttribute_OccupancySensing_OccupancySensorType.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_OccupancySensing_OccupancySensorType.restype = ctypes.c_uint32 - # Cluster OccupancySensing ReadAttribute OccupancySensorTypeBitmap - self._chipLib.chip_ime_ReadAttribute_OccupancySensing_OccupancySensorTypeBitmap.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_OccupancySensing_OccupancySensorTypeBitmap.restype = ctypes.c_uint32 - # Cluster OccupancySensing SubscribeAttribute OccupancySensorTypeBitmap - self._chipLib.chip_ime_SubscribeAttribute_OccupancySensing_OccupancySensorTypeBitmap.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_OccupancySensing_OccupancySensorTypeBitmap.restype = ctypes.c_uint32 - # Cluster OccupancySensing ReadAttribute ClusterRevision - self._chipLib.chip_ime_ReadAttribute_OccupancySensing_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_OccupancySensing_ClusterRevision.restype = ctypes.c_uint32 - # Cluster OccupancySensing SubscribeAttribute ClusterRevision - self._chipLib.chip_ime_SubscribeAttribute_OccupancySensing_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_OccupancySensing_ClusterRevision.restype = ctypes.c_uint32 - # Cluster OnOff - # Cluster OnOff ReadAttribute OnOff - self._chipLib.chip_ime_ReadAttribute_OnOff_OnOff.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_OnOff_OnOff.restype = ctypes.c_uint32 - # Cluster OnOff SubscribeAttribute OnOff - self._chipLib.chip_ime_SubscribeAttribute_OnOff_OnOff.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_OnOff_OnOff.restype = ctypes.c_uint32 - # Cluster OnOff ReadAttribute GlobalSceneControl - self._chipLib.chip_ime_ReadAttribute_OnOff_GlobalSceneControl.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_OnOff_GlobalSceneControl.restype = ctypes.c_uint32 - # Cluster OnOff SubscribeAttribute GlobalSceneControl - self._chipLib.chip_ime_SubscribeAttribute_OnOff_GlobalSceneControl.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_OnOff_GlobalSceneControl.restype = ctypes.c_uint32 - # Cluster OnOff ReadAttribute OnTime - self._chipLib.chip_ime_ReadAttribute_OnOff_OnTime.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_OnOff_OnTime.restype = ctypes.c_uint32 - # Cluster OnOff SubscribeAttribute OnTime - self._chipLib.chip_ime_SubscribeAttribute_OnOff_OnTime.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_OnOff_OnTime.restype = ctypes.c_uint32 - # Cluster OnOff ReadAttribute OffWaitTime - self._chipLib.chip_ime_ReadAttribute_OnOff_OffWaitTime.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_OnOff_OffWaitTime.restype = ctypes.c_uint32 - # Cluster OnOff SubscribeAttribute OffWaitTime - self._chipLib.chip_ime_SubscribeAttribute_OnOff_OffWaitTime.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_OnOff_OffWaitTime.restype = ctypes.c_uint32 - # Cluster OnOff ReadAttribute StartUpOnOff - self._chipLib.chip_ime_ReadAttribute_OnOff_StartUpOnOff.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_OnOff_StartUpOnOff.restype = ctypes.c_uint32 - # Cluster OnOff SubscribeAttribute StartUpOnOff - self._chipLib.chip_ime_SubscribeAttribute_OnOff_StartUpOnOff.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_OnOff_StartUpOnOff.restype = ctypes.c_uint32 - # Cluster OnOff ReadAttribute FeatureMap - self._chipLib.chip_ime_ReadAttribute_OnOff_FeatureMap.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_OnOff_FeatureMap.restype = ctypes.c_uint32 - # Cluster OnOff SubscribeAttribute FeatureMap - self._chipLib.chip_ime_SubscribeAttribute_OnOff_FeatureMap.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_OnOff_FeatureMap.restype = ctypes.c_uint32 - # Cluster OnOff ReadAttribute ClusterRevision - self._chipLib.chip_ime_ReadAttribute_OnOff_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_OnOff_ClusterRevision.restype = ctypes.c_uint32 - # Cluster OnOff SubscribeAttribute ClusterRevision - self._chipLib.chip_ime_SubscribeAttribute_OnOff_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_OnOff_ClusterRevision.restype = ctypes.c_uint32 - # Cluster OnOffSwitchConfiguration - # Cluster OnOffSwitchConfiguration ReadAttribute SwitchType - self._chipLib.chip_ime_ReadAttribute_OnOffSwitchConfiguration_SwitchType.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_OnOffSwitchConfiguration_SwitchType.restype = ctypes.c_uint32 - # Cluster OnOffSwitchConfiguration SubscribeAttribute SwitchType - self._chipLib.chip_ime_SubscribeAttribute_OnOffSwitchConfiguration_SwitchType.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_OnOffSwitchConfiguration_SwitchType.restype = ctypes.c_uint32 - # Cluster OnOffSwitchConfiguration ReadAttribute SwitchActions - self._chipLib.chip_ime_ReadAttribute_OnOffSwitchConfiguration_SwitchActions.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_OnOffSwitchConfiguration_SwitchActions.restype = ctypes.c_uint32 - # Cluster OnOffSwitchConfiguration SubscribeAttribute SwitchActions - self._chipLib.chip_ime_SubscribeAttribute_OnOffSwitchConfiguration_SwitchActions.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_OnOffSwitchConfiguration_SwitchActions.restype = ctypes.c_uint32 - # Cluster OnOffSwitchConfiguration ReadAttribute ClusterRevision - self._chipLib.chip_ime_ReadAttribute_OnOffSwitchConfiguration_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_OnOffSwitchConfiguration_ClusterRevision.restype = ctypes.c_uint32 - # Cluster OnOffSwitchConfiguration SubscribeAttribute ClusterRevision - self._chipLib.chip_ime_SubscribeAttribute_OnOffSwitchConfiguration_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_OnOffSwitchConfiguration_ClusterRevision.restype = ctypes.c_uint32 - # Cluster OperationalCredentials - # Cluster OperationalCredentials ReadAttribute FabricsList - self._chipLib.chip_ime_ReadAttribute_OperationalCredentials_FabricsList.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_OperationalCredentials_FabricsList.restype = ctypes.c_uint32 - # Cluster OperationalCredentials ReadAttribute SupportedFabrics - self._chipLib.chip_ime_ReadAttribute_OperationalCredentials_SupportedFabrics.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_OperationalCredentials_SupportedFabrics.restype = ctypes.c_uint32 - # Cluster OperationalCredentials SubscribeAttribute SupportedFabrics - self._chipLib.chip_ime_SubscribeAttribute_OperationalCredentials_SupportedFabrics.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_OperationalCredentials_SupportedFabrics.restype = ctypes.c_uint32 - # Cluster OperationalCredentials ReadAttribute CommissionedFabrics - self._chipLib.chip_ime_ReadAttribute_OperationalCredentials_CommissionedFabrics.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_OperationalCredentials_CommissionedFabrics.restype = ctypes.c_uint32 - # Cluster OperationalCredentials SubscribeAttribute CommissionedFabrics - self._chipLib.chip_ime_SubscribeAttribute_OperationalCredentials_CommissionedFabrics.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_OperationalCredentials_CommissionedFabrics.restype = ctypes.c_uint32 - # Cluster OperationalCredentials ReadAttribute TrustedRootCertificates - self._chipLib.chip_ime_ReadAttribute_OperationalCredentials_TrustedRootCertificates.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_OperationalCredentials_TrustedRootCertificates.restype = ctypes.c_uint32 - # Cluster OperationalCredentials ReadAttribute CurrentFabricIndex - self._chipLib.chip_ime_ReadAttribute_OperationalCredentials_CurrentFabricIndex.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_OperationalCredentials_CurrentFabricIndex.restype = ctypes.c_uint32 - # Cluster OperationalCredentials SubscribeAttribute CurrentFabricIndex - self._chipLib.chip_ime_SubscribeAttribute_OperationalCredentials_CurrentFabricIndex.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_OperationalCredentials_CurrentFabricIndex.restype = ctypes.c_uint32 - # Cluster OperationalCredentials ReadAttribute ClusterRevision - self._chipLib.chip_ime_ReadAttribute_OperationalCredentials_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_OperationalCredentials_ClusterRevision.restype = ctypes.c_uint32 - # Cluster OperationalCredentials SubscribeAttribute ClusterRevision - self._chipLib.chip_ime_SubscribeAttribute_OperationalCredentials_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_OperationalCredentials_ClusterRevision.restype = ctypes.c_uint32 - # Cluster PowerSource - # Cluster PowerSource ReadAttribute Status - self._chipLib.chip_ime_ReadAttribute_PowerSource_Status.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_PowerSource_Status.restype = ctypes.c_uint32 - # Cluster PowerSource SubscribeAttribute Status - self._chipLib.chip_ime_SubscribeAttribute_PowerSource_Status.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_PowerSource_Status.restype = ctypes.c_uint32 - # Cluster PowerSource ReadAttribute Order - self._chipLib.chip_ime_ReadAttribute_PowerSource_Order.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_PowerSource_Order.restype = ctypes.c_uint32 - # Cluster PowerSource SubscribeAttribute Order - self._chipLib.chip_ime_SubscribeAttribute_PowerSource_Order.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_PowerSource_Order.restype = ctypes.c_uint32 - # Cluster PowerSource ReadAttribute Description - self._chipLib.chip_ime_ReadAttribute_PowerSource_Description.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_PowerSource_Description.restype = ctypes.c_uint32 - # Cluster PowerSource SubscribeAttribute Description - self._chipLib.chip_ime_SubscribeAttribute_PowerSource_Description.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_PowerSource_Description.restype = ctypes.c_uint32 - # Cluster PowerSource ReadAttribute BatteryVoltage - self._chipLib.chip_ime_ReadAttribute_PowerSource_BatteryVoltage.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_PowerSource_BatteryVoltage.restype = ctypes.c_uint32 - # Cluster PowerSource SubscribeAttribute BatteryVoltage - self._chipLib.chip_ime_SubscribeAttribute_PowerSource_BatteryVoltage.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_PowerSource_BatteryVoltage.restype = ctypes.c_uint32 - # Cluster PowerSource ReadAttribute BatteryPercentRemaining - self._chipLib.chip_ime_ReadAttribute_PowerSource_BatteryPercentRemaining.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_PowerSource_BatteryPercentRemaining.restype = ctypes.c_uint32 - # Cluster PowerSource SubscribeAttribute BatteryPercentRemaining - self._chipLib.chip_ime_SubscribeAttribute_PowerSource_BatteryPercentRemaining.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_PowerSource_BatteryPercentRemaining.restype = ctypes.c_uint32 - # Cluster PowerSource ReadAttribute BatteryTimeRemaining - self._chipLib.chip_ime_ReadAttribute_PowerSource_BatteryTimeRemaining.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_PowerSource_BatteryTimeRemaining.restype = ctypes.c_uint32 - # Cluster PowerSource SubscribeAttribute BatteryTimeRemaining - self._chipLib.chip_ime_SubscribeAttribute_PowerSource_BatteryTimeRemaining.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_PowerSource_BatteryTimeRemaining.restype = ctypes.c_uint32 - # Cluster PowerSource ReadAttribute BatteryChargeLevel - self._chipLib.chip_ime_ReadAttribute_PowerSource_BatteryChargeLevel.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_PowerSource_BatteryChargeLevel.restype = ctypes.c_uint32 - # Cluster PowerSource SubscribeAttribute BatteryChargeLevel - self._chipLib.chip_ime_SubscribeAttribute_PowerSource_BatteryChargeLevel.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_PowerSource_BatteryChargeLevel.restype = ctypes.c_uint32 - # Cluster PowerSource ReadAttribute ActiveBatteryFaults - self._chipLib.chip_ime_ReadAttribute_PowerSource_ActiveBatteryFaults.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_PowerSource_ActiveBatteryFaults.restype = ctypes.c_uint32 - # Cluster PowerSource ReadAttribute BatteryChargeState - self._chipLib.chip_ime_ReadAttribute_PowerSource_BatteryChargeState.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_PowerSource_BatteryChargeState.restype = ctypes.c_uint32 - # Cluster PowerSource SubscribeAttribute BatteryChargeState - self._chipLib.chip_ime_SubscribeAttribute_PowerSource_BatteryChargeState.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_PowerSource_BatteryChargeState.restype = ctypes.c_uint32 - # Cluster PowerSource ReadAttribute FeatureMap - self._chipLib.chip_ime_ReadAttribute_PowerSource_FeatureMap.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_PowerSource_FeatureMap.restype = ctypes.c_uint32 - # Cluster PowerSource SubscribeAttribute FeatureMap - self._chipLib.chip_ime_SubscribeAttribute_PowerSource_FeatureMap.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_PowerSource_FeatureMap.restype = ctypes.c_uint32 - # Cluster PowerSource ReadAttribute ClusterRevision - self._chipLib.chip_ime_ReadAttribute_PowerSource_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_PowerSource_ClusterRevision.restype = ctypes.c_uint32 - # Cluster PowerSource SubscribeAttribute ClusterRevision - self._chipLib.chip_ime_SubscribeAttribute_PowerSource_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_PowerSource_ClusterRevision.restype = ctypes.c_uint32 - # Cluster PressureMeasurement - # Cluster PressureMeasurement ReadAttribute MeasuredValue - self._chipLib.chip_ime_ReadAttribute_PressureMeasurement_MeasuredValue.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_PressureMeasurement_MeasuredValue.restype = ctypes.c_uint32 - # Cluster PressureMeasurement SubscribeAttribute MeasuredValue - self._chipLib.chip_ime_SubscribeAttribute_PressureMeasurement_MeasuredValue.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_PressureMeasurement_MeasuredValue.restype = ctypes.c_uint32 - # Cluster PressureMeasurement ReadAttribute MinMeasuredValue - self._chipLib.chip_ime_ReadAttribute_PressureMeasurement_MinMeasuredValue.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_PressureMeasurement_MinMeasuredValue.restype = ctypes.c_uint32 - # Cluster PressureMeasurement SubscribeAttribute MinMeasuredValue - self._chipLib.chip_ime_SubscribeAttribute_PressureMeasurement_MinMeasuredValue.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_PressureMeasurement_MinMeasuredValue.restype = ctypes.c_uint32 - # Cluster PressureMeasurement ReadAttribute MaxMeasuredValue - self._chipLib.chip_ime_ReadAttribute_PressureMeasurement_MaxMeasuredValue.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_PressureMeasurement_MaxMeasuredValue.restype = ctypes.c_uint32 - # Cluster PressureMeasurement SubscribeAttribute MaxMeasuredValue - self._chipLib.chip_ime_SubscribeAttribute_PressureMeasurement_MaxMeasuredValue.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_PressureMeasurement_MaxMeasuredValue.restype = ctypes.c_uint32 - # Cluster PressureMeasurement ReadAttribute ClusterRevision - self._chipLib.chip_ime_ReadAttribute_PressureMeasurement_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_PressureMeasurement_ClusterRevision.restype = ctypes.c_uint32 - # Cluster PressureMeasurement SubscribeAttribute ClusterRevision - self._chipLib.chip_ime_SubscribeAttribute_PressureMeasurement_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_PressureMeasurement_ClusterRevision.restype = ctypes.c_uint32 - # Cluster PumpConfigurationAndControl - # Cluster PumpConfigurationAndControl ReadAttribute MaxPressure - self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_MaxPressure.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_MaxPressure.restype = ctypes.c_uint32 - # Cluster PumpConfigurationAndControl SubscribeAttribute MaxPressure - self._chipLib.chip_ime_SubscribeAttribute_PumpConfigurationAndControl_MaxPressure.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_PumpConfigurationAndControl_MaxPressure.restype = ctypes.c_uint32 - # Cluster PumpConfigurationAndControl ReadAttribute MaxSpeed - self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_MaxSpeed.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_MaxSpeed.restype = ctypes.c_uint32 - # Cluster PumpConfigurationAndControl SubscribeAttribute MaxSpeed - self._chipLib.chip_ime_SubscribeAttribute_PumpConfigurationAndControl_MaxSpeed.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_PumpConfigurationAndControl_MaxSpeed.restype = ctypes.c_uint32 - # Cluster PumpConfigurationAndControl ReadAttribute MaxFlow - self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_MaxFlow.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_MaxFlow.restype = ctypes.c_uint32 - # Cluster PumpConfigurationAndControl SubscribeAttribute MaxFlow - self._chipLib.chip_ime_SubscribeAttribute_PumpConfigurationAndControl_MaxFlow.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_PumpConfigurationAndControl_MaxFlow.restype = ctypes.c_uint32 - # Cluster PumpConfigurationAndControl ReadAttribute MinConstPressure - self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_MinConstPressure.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_MinConstPressure.restype = ctypes.c_uint32 - # Cluster PumpConfigurationAndControl SubscribeAttribute MinConstPressure - self._chipLib.chip_ime_SubscribeAttribute_PumpConfigurationAndControl_MinConstPressure.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_PumpConfigurationAndControl_MinConstPressure.restype = ctypes.c_uint32 - # Cluster PumpConfigurationAndControl ReadAttribute MaxConstPressure - self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_MaxConstPressure.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_MaxConstPressure.restype = ctypes.c_uint32 - # Cluster PumpConfigurationAndControl SubscribeAttribute MaxConstPressure - self._chipLib.chip_ime_SubscribeAttribute_PumpConfigurationAndControl_MaxConstPressure.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_PumpConfigurationAndControl_MaxConstPressure.restype = ctypes.c_uint32 - # Cluster PumpConfigurationAndControl ReadAttribute MinCompPressure - self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_MinCompPressure.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_MinCompPressure.restype = ctypes.c_uint32 - # Cluster PumpConfigurationAndControl SubscribeAttribute MinCompPressure - self._chipLib.chip_ime_SubscribeAttribute_PumpConfigurationAndControl_MinCompPressure.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_PumpConfigurationAndControl_MinCompPressure.restype = ctypes.c_uint32 - # Cluster PumpConfigurationAndControl ReadAttribute MaxCompPressure - self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_MaxCompPressure.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_MaxCompPressure.restype = ctypes.c_uint32 - # Cluster PumpConfigurationAndControl SubscribeAttribute MaxCompPressure - self._chipLib.chip_ime_SubscribeAttribute_PumpConfigurationAndControl_MaxCompPressure.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_PumpConfigurationAndControl_MaxCompPressure.restype = ctypes.c_uint32 - # Cluster PumpConfigurationAndControl ReadAttribute MinConstSpeed - self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_MinConstSpeed.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_MinConstSpeed.restype = ctypes.c_uint32 - # Cluster PumpConfigurationAndControl SubscribeAttribute MinConstSpeed - self._chipLib.chip_ime_SubscribeAttribute_PumpConfigurationAndControl_MinConstSpeed.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_PumpConfigurationAndControl_MinConstSpeed.restype = ctypes.c_uint32 - # Cluster PumpConfigurationAndControl ReadAttribute MaxConstSpeed - self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_MaxConstSpeed.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_MaxConstSpeed.restype = ctypes.c_uint32 - # Cluster PumpConfigurationAndControl SubscribeAttribute MaxConstSpeed - self._chipLib.chip_ime_SubscribeAttribute_PumpConfigurationAndControl_MaxConstSpeed.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_PumpConfigurationAndControl_MaxConstSpeed.restype = ctypes.c_uint32 - # Cluster PumpConfigurationAndControl ReadAttribute MinConstFlow - self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_MinConstFlow.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_MinConstFlow.restype = ctypes.c_uint32 - # Cluster PumpConfigurationAndControl SubscribeAttribute MinConstFlow - self._chipLib.chip_ime_SubscribeAttribute_PumpConfigurationAndControl_MinConstFlow.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_PumpConfigurationAndControl_MinConstFlow.restype = ctypes.c_uint32 - # Cluster PumpConfigurationAndControl ReadAttribute MaxConstFlow - self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_MaxConstFlow.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_MaxConstFlow.restype = ctypes.c_uint32 - # Cluster PumpConfigurationAndControl SubscribeAttribute MaxConstFlow - self._chipLib.chip_ime_SubscribeAttribute_PumpConfigurationAndControl_MaxConstFlow.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_PumpConfigurationAndControl_MaxConstFlow.restype = ctypes.c_uint32 - # Cluster PumpConfigurationAndControl ReadAttribute MinConstTemp - self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_MinConstTemp.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_MinConstTemp.restype = ctypes.c_uint32 - # Cluster PumpConfigurationAndControl SubscribeAttribute MinConstTemp - self._chipLib.chip_ime_SubscribeAttribute_PumpConfigurationAndControl_MinConstTemp.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_PumpConfigurationAndControl_MinConstTemp.restype = ctypes.c_uint32 - # Cluster PumpConfigurationAndControl ReadAttribute MaxConstTemp - self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_MaxConstTemp.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_MaxConstTemp.restype = ctypes.c_uint32 - # Cluster PumpConfigurationAndControl SubscribeAttribute MaxConstTemp - self._chipLib.chip_ime_SubscribeAttribute_PumpConfigurationAndControl_MaxConstTemp.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_PumpConfigurationAndControl_MaxConstTemp.restype = ctypes.c_uint32 - # Cluster PumpConfigurationAndControl ReadAttribute PumpStatus - self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_PumpStatus.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_PumpStatus.restype = ctypes.c_uint32 - # Cluster PumpConfigurationAndControl SubscribeAttribute PumpStatus - self._chipLib.chip_ime_SubscribeAttribute_PumpConfigurationAndControl_PumpStatus.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_PumpConfigurationAndControl_PumpStatus.restype = ctypes.c_uint32 - # Cluster PumpConfigurationAndControl ReadAttribute EffectiveOperationMode - self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_EffectiveOperationMode.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_EffectiveOperationMode.restype = ctypes.c_uint32 - # Cluster PumpConfigurationAndControl SubscribeAttribute EffectiveOperationMode - self._chipLib.chip_ime_SubscribeAttribute_PumpConfigurationAndControl_EffectiveOperationMode.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_PumpConfigurationAndControl_EffectiveOperationMode.restype = ctypes.c_uint32 - # Cluster PumpConfigurationAndControl ReadAttribute EffectiveControlMode - self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_EffectiveControlMode.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_EffectiveControlMode.restype = ctypes.c_uint32 - # Cluster PumpConfigurationAndControl SubscribeAttribute EffectiveControlMode - self._chipLib.chip_ime_SubscribeAttribute_PumpConfigurationAndControl_EffectiveControlMode.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_PumpConfigurationAndControl_EffectiveControlMode.restype = ctypes.c_uint32 - # Cluster PumpConfigurationAndControl ReadAttribute Capacity - self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_Capacity.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_Capacity.restype = ctypes.c_uint32 - # Cluster PumpConfigurationAndControl SubscribeAttribute Capacity - self._chipLib.chip_ime_SubscribeAttribute_PumpConfigurationAndControl_Capacity.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_PumpConfigurationAndControl_Capacity.restype = ctypes.c_uint32 - # Cluster PumpConfigurationAndControl ReadAttribute Speed - self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_Speed.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_Speed.restype = ctypes.c_uint32 - # Cluster PumpConfigurationAndControl SubscribeAttribute Speed - self._chipLib.chip_ime_SubscribeAttribute_PumpConfigurationAndControl_Speed.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_PumpConfigurationAndControl_Speed.restype = ctypes.c_uint32 - # Cluster PumpConfigurationAndControl ReadAttribute LifetimeRunningHours - self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_LifetimeRunningHours.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_LifetimeRunningHours.restype = ctypes.c_uint32 - # Cluster PumpConfigurationAndControl SubscribeAttribute LifetimeRunningHours - self._chipLib.chip_ime_SubscribeAttribute_PumpConfigurationAndControl_LifetimeRunningHours.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_PumpConfigurationAndControl_LifetimeRunningHours.restype = ctypes.c_uint32 - # Cluster PumpConfigurationAndControl ReadAttribute Power - self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_Power.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_Power.restype = ctypes.c_uint32 - # Cluster PumpConfigurationAndControl SubscribeAttribute Power - self._chipLib.chip_ime_SubscribeAttribute_PumpConfigurationAndControl_Power.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_PumpConfigurationAndControl_Power.restype = ctypes.c_uint32 - # Cluster PumpConfigurationAndControl ReadAttribute LifetimeEnergyConsumed - self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_LifetimeEnergyConsumed.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_LifetimeEnergyConsumed.restype = ctypes.c_uint32 - # Cluster PumpConfigurationAndControl SubscribeAttribute LifetimeEnergyConsumed - self._chipLib.chip_ime_SubscribeAttribute_PumpConfigurationAndControl_LifetimeEnergyConsumed.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_PumpConfigurationAndControl_LifetimeEnergyConsumed.restype = ctypes.c_uint32 - # Cluster PumpConfigurationAndControl ReadAttribute OperationMode - self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_OperationMode.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_OperationMode.restype = ctypes.c_uint32 - # Cluster PumpConfigurationAndControl SubscribeAttribute OperationMode - self._chipLib.chip_ime_SubscribeAttribute_PumpConfigurationAndControl_OperationMode.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_PumpConfigurationAndControl_OperationMode.restype = ctypes.c_uint32 - # Cluster PumpConfigurationAndControl ReadAttribute ControlMode - self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_ControlMode.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_ControlMode.restype = ctypes.c_uint32 - # Cluster PumpConfigurationAndControl SubscribeAttribute ControlMode - self._chipLib.chip_ime_SubscribeAttribute_PumpConfigurationAndControl_ControlMode.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_PumpConfigurationAndControl_ControlMode.restype = ctypes.c_uint32 - # Cluster PumpConfigurationAndControl ReadAttribute AlarmMask - self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_AlarmMask.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_AlarmMask.restype = ctypes.c_uint32 - # Cluster PumpConfigurationAndControl SubscribeAttribute AlarmMask - self._chipLib.chip_ime_SubscribeAttribute_PumpConfigurationAndControl_AlarmMask.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_PumpConfigurationAndControl_AlarmMask.restype = ctypes.c_uint32 - # Cluster PumpConfigurationAndControl ReadAttribute FeatureMap - self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_FeatureMap.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_FeatureMap.restype = ctypes.c_uint32 - # Cluster PumpConfigurationAndControl SubscribeAttribute FeatureMap - self._chipLib.chip_ime_SubscribeAttribute_PumpConfigurationAndControl_FeatureMap.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_PumpConfigurationAndControl_FeatureMap.restype = ctypes.c_uint32 - # Cluster PumpConfigurationAndControl ReadAttribute ClusterRevision - self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_PumpConfigurationAndControl_ClusterRevision.restype = ctypes.c_uint32 - # Cluster PumpConfigurationAndControl SubscribeAttribute ClusterRevision - self._chipLib.chip_ime_SubscribeAttribute_PumpConfigurationAndControl_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_PumpConfigurationAndControl_ClusterRevision.restype = ctypes.c_uint32 - # Cluster RelativeHumidityMeasurement - # Cluster RelativeHumidityMeasurement ReadAttribute MeasuredValue - self._chipLib.chip_ime_ReadAttribute_RelativeHumidityMeasurement_MeasuredValue.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_RelativeHumidityMeasurement_MeasuredValue.restype = ctypes.c_uint32 - # Cluster RelativeHumidityMeasurement SubscribeAttribute MeasuredValue - self._chipLib.chip_ime_SubscribeAttribute_RelativeHumidityMeasurement_MeasuredValue.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_RelativeHumidityMeasurement_MeasuredValue.restype = ctypes.c_uint32 - # Cluster RelativeHumidityMeasurement ReadAttribute MinMeasuredValue - self._chipLib.chip_ime_ReadAttribute_RelativeHumidityMeasurement_MinMeasuredValue.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_RelativeHumidityMeasurement_MinMeasuredValue.restype = ctypes.c_uint32 - # Cluster RelativeHumidityMeasurement SubscribeAttribute MinMeasuredValue - self._chipLib.chip_ime_SubscribeAttribute_RelativeHumidityMeasurement_MinMeasuredValue.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_RelativeHumidityMeasurement_MinMeasuredValue.restype = ctypes.c_uint32 - # Cluster RelativeHumidityMeasurement ReadAttribute MaxMeasuredValue - self._chipLib.chip_ime_ReadAttribute_RelativeHumidityMeasurement_MaxMeasuredValue.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_RelativeHumidityMeasurement_MaxMeasuredValue.restype = ctypes.c_uint32 - # Cluster RelativeHumidityMeasurement SubscribeAttribute MaxMeasuredValue - self._chipLib.chip_ime_SubscribeAttribute_RelativeHumidityMeasurement_MaxMeasuredValue.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_RelativeHumidityMeasurement_MaxMeasuredValue.restype = ctypes.c_uint32 - # Cluster RelativeHumidityMeasurement ReadAttribute Tolerance - self._chipLib.chip_ime_ReadAttribute_RelativeHumidityMeasurement_Tolerance.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_RelativeHumidityMeasurement_Tolerance.restype = ctypes.c_uint32 - # Cluster RelativeHumidityMeasurement SubscribeAttribute Tolerance - self._chipLib.chip_ime_SubscribeAttribute_RelativeHumidityMeasurement_Tolerance.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_RelativeHumidityMeasurement_Tolerance.restype = ctypes.c_uint32 - # Cluster RelativeHumidityMeasurement ReadAttribute ClusterRevision - self._chipLib.chip_ime_ReadAttribute_RelativeHumidityMeasurement_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_RelativeHumidityMeasurement_ClusterRevision.restype = ctypes.c_uint32 - # Cluster RelativeHumidityMeasurement SubscribeAttribute ClusterRevision - self._chipLib.chip_ime_SubscribeAttribute_RelativeHumidityMeasurement_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_RelativeHumidityMeasurement_ClusterRevision.restype = ctypes.c_uint32 - # Cluster Scenes - # Cluster Scenes ReadAttribute SceneCount - self._chipLib.chip_ime_ReadAttribute_Scenes_SceneCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_Scenes_SceneCount.restype = ctypes.c_uint32 - # Cluster Scenes SubscribeAttribute SceneCount - self._chipLib.chip_ime_SubscribeAttribute_Scenes_SceneCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_Scenes_SceneCount.restype = ctypes.c_uint32 - # Cluster Scenes ReadAttribute CurrentScene - self._chipLib.chip_ime_ReadAttribute_Scenes_CurrentScene.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_Scenes_CurrentScene.restype = ctypes.c_uint32 - # Cluster Scenes SubscribeAttribute CurrentScene - self._chipLib.chip_ime_SubscribeAttribute_Scenes_CurrentScene.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_Scenes_CurrentScene.restype = ctypes.c_uint32 - # Cluster Scenes ReadAttribute CurrentGroup - self._chipLib.chip_ime_ReadAttribute_Scenes_CurrentGroup.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_Scenes_CurrentGroup.restype = ctypes.c_uint32 - # Cluster Scenes SubscribeAttribute CurrentGroup - self._chipLib.chip_ime_SubscribeAttribute_Scenes_CurrentGroup.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_Scenes_CurrentGroup.restype = ctypes.c_uint32 - # Cluster Scenes ReadAttribute SceneValid - self._chipLib.chip_ime_ReadAttribute_Scenes_SceneValid.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_Scenes_SceneValid.restype = ctypes.c_uint32 - # Cluster Scenes SubscribeAttribute SceneValid - self._chipLib.chip_ime_SubscribeAttribute_Scenes_SceneValid.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_Scenes_SceneValid.restype = ctypes.c_uint32 - # Cluster Scenes ReadAttribute NameSupport - self._chipLib.chip_ime_ReadAttribute_Scenes_NameSupport.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_Scenes_NameSupport.restype = ctypes.c_uint32 - # Cluster Scenes SubscribeAttribute NameSupport - self._chipLib.chip_ime_SubscribeAttribute_Scenes_NameSupport.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_Scenes_NameSupport.restype = ctypes.c_uint32 - # Cluster Scenes ReadAttribute ClusterRevision - self._chipLib.chip_ime_ReadAttribute_Scenes_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_Scenes_ClusterRevision.restype = ctypes.c_uint32 - # Cluster Scenes SubscribeAttribute ClusterRevision - self._chipLib.chip_ime_SubscribeAttribute_Scenes_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_Scenes_ClusterRevision.restype = ctypes.c_uint32 - # Cluster SoftwareDiagnostics - # Cluster SoftwareDiagnostics ReadAttribute ThreadMetrics - self._chipLib.chip_ime_ReadAttribute_SoftwareDiagnostics_ThreadMetrics.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_SoftwareDiagnostics_ThreadMetrics.restype = ctypes.c_uint32 - # Cluster SoftwareDiagnostics ReadAttribute CurrentHeapFree - self._chipLib.chip_ime_ReadAttribute_SoftwareDiagnostics_CurrentHeapFree.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_SoftwareDiagnostics_CurrentHeapFree.restype = ctypes.c_uint32 - # Cluster SoftwareDiagnostics SubscribeAttribute CurrentHeapFree - self._chipLib.chip_ime_SubscribeAttribute_SoftwareDiagnostics_CurrentHeapFree.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_SoftwareDiagnostics_CurrentHeapFree.restype = ctypes.c_uint32 - # Cluster SoftwareDiagnostics ReadAttribute CurrentHeapUsed - self._chipLib.chip_ime_ReadAttribute_SoftwareDiagnostics_CurrentHeapUsed.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_SoftwareDiagnostics_CurrentHeapUsed.restype = ctypes.c_uint32 - # Cluster SoftwareDiagnostics SubscribeAttribute CurrentHeapUsed - self._chipLib.chip_ime_SubscribeAttribute_SoftwareDiagnostics_CurrentHeapUsed.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_SoftwareDiagnostics_CurrentHeapUsed.restype = ctypes.c_uint32 - # Cluster SoftwareDiagnostics ReadAttribute CurrentHeapHighWatermark - self._chipLib.chip_ime_ReadAttribute_SoftwareDiagnostics_CurrentHeapHighWatermark.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_SoftwareDiagnostics_CurrentHeapHighWatermark.restype = ctypes.c_uint32 - # Cluster SoftwareDiagnostics SubscribeAttribute CurrentHeapHighWatermark - self._chipLib.chip_ime_SubscribeAttribute_SoftwareDiagnostics_CurrentHeapHighWatermark.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_SoftwareDiagnostics_CurrentHeapHighWatermark.restype = ctypes.c_uint32 - # Cluster SoftwareDiagnostics ReadAttribute FeatureMap - self._chipLib.chip_ime_ReadAttribute_SoftwareDiagnostics_FeatureMap.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_SoftwareDiagnostics_FeatureMap.restype = ctypes.c_uint32 - # Cluster SoftwareDiagnostics ReadAttribute ClusterRevision - self._chipLib.chip_ime_ReadAttribute_SoftwareDiagnostics_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_SoftwareDiagnostics_ClusterRevision.restype = ctypes.c_uint32 - # Cluster SoftwareDiagnostics SubscribeAttribute ClusterRevision - self._chipLib.chip_ime_SubscribeAttribute_SoftwareDiagnostics_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_SoftwareDiagnostics_ClusterRevision.restype = ctypes.c_uint32 - # Cluster Switch - # Cluster Switch ReadAttribute NumberOfPositions - self._chipLib.chip_ime_ReadAttribute_Switch_NumberOfPositions.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_Switch_NumberOfPositions.restype = ctypes.c_uint32 - # Cluster Switch SubscribeAttribute NumberOfPositions - self._chipLib.chip_ime_SubscribeAttribute_Switch_NumberOfPositions.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_Switch_NumberOfPositions.restype = ctypes.c_uint32 - # Cluster Switch ReadAttribute CurrentPosition - self._chipLib.chip_ime_ReadAttribute_Switch_CurrentPosition.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_Switch_CurrentPosition.restype = ctypes.c_uint32 - # Cluster Switch SubscribeAttribute CurrentPosition - self._chipLib.chip_ime_SubscribeAttribute_Switch_CurrentPosition.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_Switch_CurrentPosition.restype = ctypes.c_uint32 - # Cluster Switch ReadAttribute MultiPressMax - self._chipLib.chip_ime_ReadAttribute_Switch_MultiPressMax.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_Switch_MultiPressMax.restype = ctypes.c_uint32 - # Cluster Switch SubscribeAttribute MultiPressMax - self._chipLib.chip_ime_SubscribeAttribute_Switch_MultiPressMax.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_Switch_MultiPressMax.restype = ctypes.c_uint32 - # Cluster Switch ReadAttribute FeatureMap - self._chipLib.chip_ime_ReadAttribute_Switch_FeatureMap.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_Switch_FeatureMap.restype = ctypes.c_uint32 - # Cluster Switch SubscribeAttribute FeatureMap - self._chipLib.chip_ime_SubscribeAttribute_Switch_FeatureMap.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_Switch_FeatureMap.restype = ctypes.c_uint32 - # Cluster Switch ReadAttribute ClusterRevision - self._chipLib.chip_ime_ReadAttribute_Switch_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_Switch_ClusterRevision.restype = ctypes.c_uint32 - # Cluster Switch SubscribeAttribute ClusterRevision - self._chipLib.chip_ime_SubscribeAttribute_Switch_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_Switch_ClusterRevision.restype = ctypes.c_uint32 - # Cluster TvChannel - # Cluster TvChannel ReadAttribute TvChannelList - self._chipLib.chip_ime_ReadAttribute_TvChannel_TvChannelList.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_TvChannel_TvChannelList.restype = ctypes.c_uint32 - # Cluster TvChannel ReadAttribute TvChannelLineup - self._chipLib.chip_ime_ReadAttribute_TvChannel_TvChannelLineup.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_TvChannel_TvChannelLineup.restype = ctypes.c_uint32 - # Cluster TvChannel SubscribeAttribute TvChannelLineup - self._chipLib.chip_ime_SubscribeAttribute_TvChannel_TvChannelLineup.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_TvChannel_TvChannelLineup.restype = ctypes.c_uint32 - # Cluster TvChannel ReadAttribute CurrentTvChannel - self._chipLib.chip_ime_ReadAttribute_TvChannel_CurrentTvChannel.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_TvChannel_CurrentTvChannel.restype = ctypes.c_uint32 - # Cluster TvChannel SubscribeAttribute CurrentTvChannel - self._chipLib.chip_ime_SubscribeAttribute_TvChannel_CurrentTvChannel.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_TvChannel_CurrentTvChannel.restype = ctypes.c_uint32 - # Cluster TvChannel ReadAttribute ClusterRevision - self._chipLib.chip_ime_ReadAttribute_TvChannel_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_TvChannel_ClusterRevision.restype = ctypes.c_uint32 - # Cluster TvChannel SubscribeAttribute ClusterRevision - self._chipLib.chip_ime_SubscribeAttribute_TvChannel_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_TvChannel_ClusterRevision.restype = ctypes.c_uint32 - # Cluster TargetNavigator - # Cluster TargetNavigator ReadAttribute TargetNavigatorList - self._chipLib.chip_ime_ReadAttribute_TargetNavigator_TargetNavigatorList.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_TargetNavigator_TargetNavigatorList.restype = ctypes.c_uint32 - # Cluster TargetNavigator ReadAttribute ClusterRevision - self._chipLib.chip_ime_ReadAttribute_TargetNavigator_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_TargetNavigator_ClusterRevision.restype = ctypes.c_uint32 - # Cluster TargetNavigator SubscribeAttribute ClusterRevision - self._chipLib.chip_ime_SubscribeAttribute_TargetNavigator_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_TargetNavigator_ClusterRevision.restype = ctypes.c_uint32 - # Cluster TemperatureMeasurement - # Cluster TemperatureMeasurement ReadAttribute MeasuredValue - self._chipLib.chip_ime_ReadAttribute_TemperatureMeasurement_MeasuredValue.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_TemperatureMeasurement_MeasuredValue.restype = ctypes.c_uint32 - # Cluster TemperatureMeasurement SubscribeAttribute MeasuredValue - self._chipLib.chip_ime_SubscribeAttribute_TemperatureMeasurement_MeasuredValue.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_TemperatureMeasurement_MeasuredValue.restype = ctypes.c_uint32 - # Cluster TemperatureMeasurement ReadAttribute MinMeasuredValue - self._chipLib.chip_ime_ReadAttribute_TemperatureMeasurement_MinMeasuredValue.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_TemperatureMeasurement_MinMeasuredValue.restype = ctypes.c_uint32 - # Cluster TemperatureMeasurement SubscribeAttribute MinMeasuredValue - self._chipLib.chip_ime_SubscribeAttribute_TemperatureMeasurement_MinMeasuredValue.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_TemperatureMeasurement_MinMeasuredValue.restype = ctypes.c_uint32 - # Cluster TemperatureMeasurement ReadAttribute MaxMeasuredValue - self._chipLib.chip_ime_ReadAttribute_TemperatureMeasurement_MaxMeasuredValue.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_TemperatureMeasurement_MaxMeasuredValue.restype = ctypes.c_uint32 - # Cluster TemperatureMeasurement SubscribeAttribute MaxMeasuredValue - self._chipLib.chip_ime_SubscribeAttribute_TemperatureMeasurement_MaxMeasuredValue.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_TemperatureMeasurement_MaxMeasuredValue.restype = ctypes.c_uint32 - # Cluster TemperatureMeasurement ReadAttribute Tolerance - self._chipLib.chip_ime_ReadAttribute_TemperatureMeasurement_Tolerance.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_TemperatureMeasurement_Tolerance.restype = ctypes.c_uint32 - # Cluster TemperatureMeasurement SubscribeAttribute Tolerance - self._chipLib.chip_ime_SubscribeAttribute_TemperatureMeasurement_Tolerance.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_TemperatureMeasurement_Tolerance.restype = ctypes.c_uint32 - # Cluster TemperatureMeasurement ReadAttribute ClusterRevision - self._chipLib.chip_ime_ReadAttribute_TemperatureMeasurement_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_TemperatureMeasurement_ClusterRevision.restype = ctypes.c_uint32 - # Cluster TemperatureMeasurement SubscribeAttribute ClusterRevision - self._chipLib.chip_ime_SubscribeAttribute_TemperatureMeasurement_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_TemperatureMeasurement_ClusterRevision.restype = ctypes.c_uint32 - # Cluster TestCluster - # Cluster TestCluster ReadAttribute Boolean - self._chipLib.chip_ime_ReadAttribute_TestCluster_Boolean.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_TestCluster_Boolean.restype = ctypes.c_uint32 - # Cluster TestCluster SubscribeAttribute Boolean - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_Boolean.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_Boolean.restype = ctypes.c_uint32 - # Cluster TestCluster ReadAttribute Bitmap8 - self._chipLib.chip_ime_ReadAttribute_TestCluster_Bitmap8.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_TestCluster_Bitmap8.restype = ctypes.c_uint32 - # Cluster TestCluster SubscribeAttribute Bitmap8 - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_Bitmap8.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_Bitmap8.restype = ctypes.c_uint32 - # Cluster TestCluster ReadAttribute Bitmap16 - self._chipLib.chip_ime_ReadAttribute_TestCluster_Bitmap16.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_TestCluster_Bitmap16.restype = ctypes.c_uint32 - # Cluster TestCluster SubscribeAttribute Bitmap16 - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_Bitmap16.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_Bitmap16.restype = ctypes.c_uint32 - # Cluster TestCluster ReadAttribute Bitmap32 - self._chipLib.chip_ime_ReadAttribute_TestCluster_Bitmap32.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_TestCluster_Bitmap32.restype = ctypes.c_uint32 - # Cluster TestCluster SubscribeAttribute Bitmap32 - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_Bitmap32.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_Bitmap32.restype = ctypes.c_uint32 - # Cluster TestCluster ReadAttribute Bitmap64 - self._chipLib.chip_ime_ReadAttribute_TestCluster_Bitmap64.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_TestCluster_Bitmap64.restype = ctypes.c_uint32 - # Cluster TestCluster SubscribeAttribute Bitmap64 - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_Bitmap64.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_Bitmap64.restype = ctypes.c_uint32 - # Cluster TestCluster ReadAttribute Int8u - self._chipLib.chip_ime_ReadAttribute_TestCluster_Int8u.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_TestCluster_Int8u.restype = ctypes.c_uint32 - # Cluster TestCluster SubscribeAttribute Int8u - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_Int8u.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_Int8u.restype = ctypes.c_uint32 - # Cluster TestCluster ReadAttribute Int16u - self._chipLib.chip_ime_ReadAttribute_TestCluster_Int16u.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_TestCluster_Int16u.restype = ctypes.c_uint32 - # Cluster TestCluster SubscribeAttribute Int16u - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_Int16u.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_Int16u.restype = ctypes.c_uint32 - # Cluster TestCluster ReadAttribute Int32u - self._chipLib.chip_ime_ReadAttribute_TestCluster_Int32u.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_TestCluster_Int32u.restype = ctypes.c_uint32 - # Cluster TestCluster SubscribeAttribute Int32u - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_Int32u.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_Int32u.restype = ctypes.c_uint32 - # Cluster TestCluster ReadAttribute Int64u - self._chipLib.chip_ime_ReadAttribute_TestCluster_Int64u.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_TestCluster_Int64u.restype = ctypes.c_uint32 - # Cluster TestCluster SubscribeAttribute Int64u - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_Int64u.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_Int64u.restype = ctypes.c_uint32 - # Cluster TestCluster ReadAttribute Int8s - self._chipLib.chip_ime_ReadAttribute_TestCluster_Int8s.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_TestCluster_Int8s.restype = ctypes.c_uint32 - # Cluster TestCluster SubscribeAttribute Int8s - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_Int8s.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_Int8s.restype = ctypes.c_uint32 - # Cluster TestCluster ReadAttribute Int16s - self._chipLib.chip_ime_ReadAttribute_TestCluster_Int16s.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_TestCluster_Int16s.restype = ctypes.c_uint32 - # Cluster TestCluster SubscribeAttribute Int16s - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_Int16s.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_Int16s.restype = ctypes.c_uint32 - # Cluster TestCluster ReadAttribute Int32s - self._chipLib.chip_ime_ReadAttribute_TestCluster_Int32s.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_TestCluster_Int32s.restype = ctypes.c_uint32 - # Cluster TestCluster SubscribeAttribute Int32s - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_Int32s.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_Int32s.restype = ctypes.c_uint32 - # Cluster TestCluster ReadAttribute Int64s - self._chipLib.chip_ime_ReadAttribute_TestCluster_Int64s.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_TestCluster_Int64s.restype = ctypes.c_uint32 - # Cluster TestCluster SubscribeAttribute Int64s - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_Int64s.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_Int64s.restype = ctypes.c_uint32 - # Cluster TestCluster ReadAttribute Enum8 - self._chipLib.chip_ime_ReadAttribute_TestCluster_Enum8.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_TestCluster_Enum8.restype = ctypes.c_uint32 - # Cluster TestCluster SubscribeAttribute Enum8 - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_Enum8.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_Enum8.restype = ctypes.c_uint32 - # Cluster TestCluster ReadAttribute Enum16 - self._chipLib.chip_ime_ReadAttribute_TestCluster_Enum16.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_TestCluster_Enum16.restype = ctypes.c_uint32 - # Cluster TestCluster SubscribeAttribute Enum16 - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_Enum16.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_Enum16.restype = ctypes.c_uint32 - # Cluster TestCluster ReadAttribute OctetString - self._chipLib.chip_ime_ReadAttribute_TestCluster_OctetString.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_TestCluster_OctetString.restype = ctypes.c_uint32 - # Cluster TestCluster SubscribeAttribute OctetString - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_OctetString.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_OctetString.restype = ctypes.c_uint32 - # Cluster TestCluster ReadAttribute ListInt8u - self._chipLib.chip_ime_ReadAttribute_TestCluster_ListInt8u.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_TestCluster_ListInt8u.restype = ctypes.c_uint32 - # Cluster TestCluster ReadAttribute ListOctetString - self._chipLib.chip_ime_ReadAttribute_TestCluster_ListOctetString.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_TestCluster_ListOctetString.restype = ctypes.c_uint32 - # Cluster TestCluster ReadAttribute ListStructOctetString - self._chipLib.chip_ime_ReadAttribute_TestCluster_ListStructOctetString.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_TestCluster_ListStructOctetString.restype = ctypes.c_uint32 - # Cluster TestCluster ReadAttribute LongOctetString - self._chipLib.chip_ime_ReadAttribute_TestCluster_LongOctetString.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_TestCluster_LongOctetString.restype = ctypes.c_uint32 - # Cluster TestCluster SubscribeAttribute LongOctetString - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_LongOctetString.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_LongOctetString.restype = ctypes.c_uint32 - # Cluster TestCluster ReadAttribute CharString - self._chipLib.chip_ime_ReadAttribute_TestCluster_CharString.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_TestCluster_CharString.restype = ctypes.c_uint32 - # Cluster TestCluster SubscribeAttribute CharString - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_CharString.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_CharString.restype = ctypes.c_uint32 - # Cluster TestCluster ReadAttribute LongCharString - self._chipLib.chip_ime_ReadAttribute_TestCluster_LongCharString.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_TestCluster_LongCharString.restype = ctypes.c_uint32 - # Cluster TestCluster SubscribeAttribute LongCharString - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_LongCharString.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_LongCharString.restype = ctypes.c_uint32 - # Cluster TestCluster ReadAttribute EpochUs - self._chipLib.chip_ime_ReadAttribute_TestCluster_EpochUs.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_TestCluster_EpochUs.restype = ctypes.c_uint32 - # Cluster TestCluster SubscribeAttribute EpochUs - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_EpochUs.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_EpochUs.restype = ctypes.c_uint32 - # Cluster TestCluster ReadAttribute EpochS - self._chipLib.chip_ime_ReadAttribute_TestCluster_EpochS.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_TestCluster_EpochS.restype = ctypes.c_uint32 - # Cluster TestCluster SubscribeAttribute EpochS - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_EpochS.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_EpochS.restype = ctypes.c_uint32 - # Cluster TestCluster ReadAttribute VendorId - self._chipLib.chip_ime_ReadAttribute_TestCluster_VendorId.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_TestCluster_VendorId.restype = ctypes.c_uint32 - # Cluster TestCluster SubscribeAttribute VendorId - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_VendorId.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_VendorId.restype = ctypes.c_uint32 - # Cluster TestCluster ReadAttribute ListNullablesAndOptionalsStruct - self._chipLib.chip_ime_ReadAttribute_TestCluster_ListNullablesAndOptionalsStruct.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_TestCluster_ListNullablesAndOptionalsStruct.restype = ctypes.c_uint32 - # Cluster TestCluster ReadAttribute Unsupported - self._chipLib.chip_ime_ReadAttribute_TestCluster_Unsupported.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_TestCluster_Unsupported.restype = ctypes.c_uint32 - # Cluster TestCluster SubscribeAttribute Unsupported - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_Unsupported.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_Unsupported.restype = ctypes.c_uint32 - # Cluster TestCluster ReadAttribute NullableBoolean - self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableBoolean.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableBoolean.restype = ctypes.c_uint32 - # Cluster TestCluster SubscribeAttribute NullableBoolean - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_NullableBoolean.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_NullableBoolean.restype = ctypes.c_uint32 - # Cluster TestCluster ReadAttribute NullableBitmap8 - self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableBitmap8.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableBitmap8.restype = ctypes.c_uint32 - # Cluster TestCluster SubscribeAttribute NullableBitmap8 - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_NullableBitmap8.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_NullableBitmap8.restype = ctypes.c_uint32 - # Cluster TestCluster ReadAttribute NullableBitmap16 - self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableBitmap16.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableBitmap16.restype = ctypes.c_uint32 - # Cluster TestCluster SubscribeAttribute NullableBitmap16 - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_NullableBitmap16.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_NullableBitmap16.restype = ctypes.c_uint32 - # Cluster TestCluster ReadAttribute NullableBitmap32 - self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableBitmap32.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableBitmap32.restype = ctypes.c_uint32 - # Cluster TestCluster SubscribeAttribute NullableBitmap32 - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_NullableBitmap32.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_NullableBitmap32.restype = ctypes.c_uint32 - # Cluster TestCluster ReadAttribute NullableBitmap64 - self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableBitmap64.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableBitmap64.restype = ctypes.c_uint32 - # Cluster TestCluster SubscribeAttribute NullableBitmap64 - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_NullableBitmap64.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_NullableBitmap64.restype = ctypes.c_uint32 - # Cluster TestCluster ReadAttribute NullableInt8u - self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableInt8u.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableInt8u.restype = ctypes.c_uint32 - # Cluster TestCluster SubscribeAttribute NullableInt8u - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_NullableInt8u.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_NullableInt8u.restype = ctypes.c_uint32 - # Cluster TestCluster ReadAttribute NullableInt16u - self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableInt16u.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableInt16u.restype = ctypes.c_uint32 - # Cluster TestCluster SubscribeAttribute NullableInt16u - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_NullableInt16u.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_NullableInt16u.restype = ctypes.c_uint32 - # Cluster TestCluster ReadAttribute NullableInt32u - self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableInt32u.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableInt32u.restype = ctypes.c_uint32 - # Cluster TestCluster SubscribeAttribute NullableInt32u - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_NullableInt32u.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_NullableInt32u.restype = ctypes.c_uint32 - # Cluster TestCluster ReadAttribute NullableInt64u - self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableInt64u.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableInt64u.restype = ctypes.c_uint32 - # Cluster TestCluster SubscribeAttribute NullableInt64u - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_NullableInt64u.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_NullableInt64u.restype = ctypes.c_uint32 - # Cluster TestCluster ReadAttribute NullableInt8s - self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableInt8s.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableInt8s.restype = ctypes.c_uint32 - # Cluster TestCluster SubscribeAttribute NullableInt8s - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_NullableInt8s.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_NullableInt8s.restype = ctypes.c_uint32 - # Cluster TestCluster ReadAttribute NullableInt16s - self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableInt16s.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableInt16s.restype = ctypes.c_uint32 - # Cluster TestCluster SubscribeAttribute NullableInt16s - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_NullableInt16s.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_NullableInt16s.restype = ctypes.c_uint32 - # Cluster TestCluster ReadAttribute NullableInt32s - self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableInt32s.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableInt32s.restype = ctypes.c_uint32 - # Cluster TestCluster SubscribeAttribute NullableInt32s - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_NullableInt32s.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_NullableInt32s.restype = ctypes.c_uint32 - # Cluster TestCluster ReadAttribute NullableInt64s - self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableInt64s.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableInt64s.restype = ctypes.c_uint32 - # Cluster TestCluster SubscribeAttribute NullableInt64s - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_NullableInt64s.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_NullableInt64s.restype = ctypes.c_uint32 - # Cluster TestCluster ReadAttribute NullableEnum8 - self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableEnum8.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableEnum8.restype = ctypes.c_uint32 - # Cluster TestCluster SubscribeAttribute NullableEnum8 - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_NullableEnum8.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_NullableEnum8.restype = ctypes.c_uint32 - # Cluster TestCluster ReadAttribute NullableEnum16 - self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableEnum16.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableEnum16.restype = ctypes.c_uint32 - # Cluster TestCluster SubscribeAttribute NullableEnum16 - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_NullableEnum16.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_NullableEnum16.restype = ctypes.c_uint32 - # Cluster TestCluster ReadAttribute NullableOctetString - self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableOctetString.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableOctetString.restype = ctypes.c_uint32 - # Cluster TestCluster SubscribeAttribute NullableOctetString - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_NullableOctetString.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_NullableOctetString.restype = ctypes.c_uint32 - # Cluster TestCluster ReadAttribute NullableCharString - self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableCharString.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_TestCluster_NullableCharString.restype = ctypes.c_uint32 - # Cluster TestCluster SubscribeAttribute NullableCharString - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_NullableCharString.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_NullableCharString.restype = ctypes.c_uint32 - # Cluster TestCluster ReadAttribute ClusterRevision - self._chipLib.chip_ime_ReadAttribute_TestCluster_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_TestCluster_ClusterRevision.restype = ctypes.c_uint32 - # Cluster TestCluster SubscribeAttribute ClusterRevision - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_TestCluster_ClusterRevision.restype = ctypes.c_uint32 - # Cluster Thermostat - # Cluster Thermostat ReadAttribute LocalTemperature - self._chipLib.chip_ime_ReadAttribute_Thermostat_LocalTemperature.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_Thermostat_LocalTemperature.restype = ctypes.c_uint32 - # Cluster Thermostat SubscribeAttribute LocalTemperature - self._chipLib.chip_ime_SubscribeAttribute_Thermostat_LocalTemperature.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_Thermostat_LocalTemperature.restype = ctypes.c_uint32 - # Cluster Thermostat ReadAttribute AbsMinHeatSetpointLimit - self._chipLib.chip_ime_ReadAttribute_Thermostat_AbsMinHeatSetpointLimit.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_Thermostat_AbsMinHeatSetpointLimit.restype = ctypes.c_uint32 - # Cluster Thermostat SubscribeAttribute AbsMinHeatSetpointLimit - self._chipLib.chip_ime_SubscribeAttribute_Thermostat_AbsMinHeatSetpointLimit.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_Thermostat_AbsMinHeatSetpointLimit.restype = ctypes.c_uint32 - # Cluster Thermostat ReadAttribute AbsMaxHeatSetpointLimit - self._chipLib.chip_ime_ReadAttribute_Thermostat_AbsMaxHeatSetpointLimit.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_Thermostat_AbsMaxHeatSetpointLimit.restype = ctypes.c_uint32 - # Cluster Thermostat SubscribeAttribute AbsMaxHeatSetpointLimit - self._chipLib.chip_ime_SubscribeAttribute_Thermostat_AbsMaxHeatSetpointLimit.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_Thermostat_AbsMaxHeatSetpointLimit.restype = ctypes.c_uint32 - # Cluster Thermostat ReadAttribute AbsMinCoolSetpointLimit - self._chipLib.chip_ime_ReadAttribute_Thermostat_AbsMinCoolSetpointLimit.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_Thermostat_AbsMinCoolSetpointLimit.restype = ctypes.c_uint32 - # Cluster Thermostat SubscribeAttribute AbsMinCoolSetpointLimit - self._chipLib.chip_ime_SubscribeAttribute_Thermostat_AbsMinCoolSetpointLimit.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_Thermostat_AbsMinCoolSetpointLimit.restype = ctypes.c_uint32 - # Cluster Thermostat ReadAttribute AbsMaxCoolSetpointLimit - self._chipLib.chip_ime_ReadAttribute_Thermostat_AbsMaxCoolSetpointLimit.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_Thermostat_AbsMaxCoolSetpointLimit.restype = ctypes.c_uint32 - # Cluster Thermostat SubscribeAttribute AbsMaxCoolSetpointLimit - self._chipLib.chip_ime_SubscribeAttribute_Thermostat_AbsMaxCoolSetpointLimit.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_Thermostat_AbsMaxCoolSetpointLimit.restype = ctypes.c_uint32 - # Cluster Thermostat ReadAttribute OccupiedCoolingSetpoint - self._chipLib.chip_ime_ReadAttribute_Thermostat_OccupiedCoolingSetpoint.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_Thermostat_OccupiedCoolingSetpoint.restype = ctypes.c_uint32 - # Cluster Thermostat SubscribeAttribute OccupiedCoolingSetpoint - self._chipLib.chip_ime_SubscribeAttribute_Thermostat_OccupiedCoolingSetpoint.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_Thermostat_OccupiedCoolingSetpoint.restype = ctypes.c_uint32 - # Cluster Thermostat ReadAttribute OccupiedHeatingSetpoint - self._chipLib.chip_ime_ReadAttribute_Thermostat_OccupiedHeatingSetpoint.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_Thermostat_OccupiedHeatingSetpoint.restype = ctypes.c_uint32 - # Cluster Thermostat SubscribeAttribute OccupiedHeatingSetpoint - self._chipLib.chip_ime_SubscribeAttribute_Thermostat_OccupiedHeatingSetpoint.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_Thermostat_OccupiedHeatingSetpoint.restype = ctypes.c_uint32 - # Cluster Thermostat ReadAttribute MinHeatSetpointLimit - self._chipLib.chip_ime_ReadAttribute_Thermostat_MinHeatSetpointLimit.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_Thermostat_MinHeatSetpointLimit.restype = ctypes.c_uint32 - # Cluster Thermostat SubscribeAttribute MinHeatSetpointLimit - self._chipLib.chip_ime_SubscribeAttribute_Thermostat_MinHeatSetpointLimit.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_Thermostat_MinHeatSetpointLimit.restype = ctypes.c_uint32 - # Cluster Thermostat ReadAttribute MaxHeatSetpointLimit - self._chipLib.chip_ime_ReadAttribute_Thermostat_MaxHeatSetpointLimit.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_Thermostat_MaxHeatSetpointLimit.restype = ctypes.c_uint32 - # Cluster Thermostat SubscribeAttribute MaxHeatSetpointLimit - self._chipLib.chip_ime_SubscribeAttribute_Thermostat_MaxHeatSetpointLimit.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_Thermostat_MaxHeatSetpointLimit.restype = ctypes.c_uint32 - # Cluster Thermostat ReadAttribute MinCoolSetpointLimit - self._chipLib.chip_ime_ReadAttribute_Thermostat_MinCoolSetpointLimit.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_Thermostat_MinCoolSetpointLimit.restype = ctypes.c_uint32 - # Cluster Thermostat SubscribeAttribute MinCoolSetpointLimit - self._chipLib.chip_ime_SubscribeAttribute_Thermostat_MinCoolSetpointLimit.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_Thermostat_MinCoolSetpointLimit.restype = ctypes.c_uint32 - # Cluster Thermostat ReadAttribute MaxCoolSetpointLimit - self._chipLib.chip_ime_ReadAttribute_Thermostat_MaxCoolSetpointLimit.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_Thermostat_MaxCoolSetpointLimit.restype = ctypes.c_uint32 - # Cluster Thermostat SubscribeAttribute MaxCoolSetpointLimit - self._chipLib.chip_ime_SubscribeAttribute_Thermostat_MaxCoolSetpointLimit.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_Thermostat_MaxCoolSetpointLimit.restype = ctypes.c_uint32 - # Cluster Thermostat ReadAttribute MinSetpointDeadBand - self._chipLib.chip_ime_ReadAttribute_Thermostat_MinSetpointDeadBand.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_Thermostat_MinSetpointDeadBand.restype = ctypes.c_uint32 - # Cluster Thermostat SubscribeAttribute MinSetpointDeadBand - self._chipLib.chip_ime_SubscribeAttribute_Thermostat_MinSetpointDeadBand.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_Thermostat_MinSetpointDeadBand.restype = ctypes.c_uint32 - # Cluster Thermostat ReadAttribute ControlSequenceOfOperation - self._chipLib.chip_ime_ReadAttribute_Thermostat_ControlSequenceOfOperation.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_Thermostat_ControlSequenceOfOperation.restype = ctypes.c_uint32 - # Cluster Thermostat SubscribeAttribute ControlSequenceOfOperation - self._chipLib.chip_ime_SubscribeAttribute_Thermostat_ControlSequenceOfOperation.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_Thermostat_ControlSequenceOfOperation.restype = ctypes.c_uint32 - # Cluster Thermostat ReadAttribute SystemMode - self._chipLib.chip_ime_ReadAttribute_Thermostat_SystemMode.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_Thermostat_SystemMode.restype = ctypes.c_uint32 - # Cluster Thermostat SubscribeAttribute SystemMode - self._chipLib.chip_ime_SubscribeAttribute_Thermostat_SystemMode.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_Thermostat_SystemMode.restype = ctypes.c_uint32 - # Cluster Thermostat ReadAttribute StartOfWeek - self._chipLib.chip_ime_ReadAttribute_Thermostat_StartOfWeek.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_Thermostat_StartOfWeek.restype = ctypes.c_uint32 - # Cluster Thermostat SubscribeAttribute StartOfWeek - self._chipLib.chip_ime_SubscribeAttribute_Thermostat_StartOfWeek.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_Thermostat_StartOfWeek.restype = ctypes.c_uint32 - # Cluster Thermostat ReadAttribute NumberOfWeeklyTransitions - self._chipLib.chip_ime_ReadAttribute_Thermostat_NumberOfWeeklyTransitions.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_Thermostat_NumberOfWeeklyTransitions.restype = ctypes.c_uint32 - # Cluster Thermostat SubscribeAttribute NumberOfWeeklyTransitions - self._chipLib.chip_ime_SubscribeAttribute_Thermostat_NumberOfWeeklyTransitions.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_Thermostat_NumberOfWeeklyTransitions.restype = ctypes.c_uint32 - # Cluster Thermostat ReadAttribute NumberOfDailyTransitions - self._chipLib.chip_ime_ReadAttribute_Thermostat_NumberOfDailyTransitions.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_Thermostat_NumberOfDailyTransitions.restype = ctypes.c_uint32 - # Cluster Thermostat SubscribeAttribute NumberOfDailyTransitions - self._chipLib.chip_ime_SubscribeAttribute_Thermostat_NumberOfDailyTransitions.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_Thermostat_NumberOfDailyTransitions.restype = ctypes.c_uint32 - # Cluster Thermostat ReadAttribute FeatureMap - self._chipLib.chip_ime_ReadAttribute_Thermostat_FeatureMap.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_Thermostat_FeatureMap.restype = ctypes.c_uint32 - # Cluster Thermostat SubscribeAttribute FeatureMap - self._chipLib.chip_ime_SubscribeAttribute_Thermostat_FeatureMap.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_Thermostat_FeatureMap.restype = ctypes.c_uint32 - # Cluster Thermostat ReadAttribute ClusterRevision - self._chipLib.chip_ime_ReadAttribute_Thermostat_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_Thermostat_ClusterRevision.restype = ctypes.c_uint32 - # Cluster Thermostat SubscribeAttribute ClusterRevision - self._chipLib.chip_ime_SubscribeAttribute_Thermostat_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_Thermostat_ClusterRevision.restype = ctypes.c_uint32 - # Cluster ThermostatUserInterfaceConfiguration - # Cluster ThermostatUserInterfaceConfiguration ReadAttribute TemperatureDisplayMode - self._chipLib.chip_ime_ReadAttribute_ThermostatUserInterfaceConfiguration_TemperatureDisplayMode.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ThermostatUserInterfaceConfiguration_TemperatureDisplayMode.restype = ctypes.c_uint32 - # Cluster ThermostatUserInterfaceConfiguration SubscribeAttribute TemperatureDisplayMode - self._chipLib.chip_ime_SubscribeAttribute_ThermostatUserInterfaceConfiguration_TemperatureDisplayMode.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ThermostatUserInterfaceConfiguration_TemperatureDisplayMode.restype = ctypes.c_uint32 - # Cluster ThermostatUserInterfaceConfiguration ReadAttribute KeypadLockout - self._chipLib.chip_ime_ReadAttribute_ThermostatUserInterfaceConfiguration_KeypadLockout.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ThermostatUserInterfaceConfiguration_KeypadLockout.restype = ctypes.c_uint32 - # Cluster ThermostatUserInterfaceConfiguration SubscribeAttribute KeypadLockout - self._chipLib.chip_ime_SubscribeAttribute_ThermostatUserInterfaceConfiguration_KeypadLockout.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ThermostatUserInterfaceConfiguration_KeypadLockout.restype = ctypes.c_uint32 - # Cluster ThermostatUserInterfaceConfiguration ReadAttribute ScheduleProgrammingVisibility - self._chipLib.chip_ime_ReadAttribute_ThermostatUserInterfaceConfiguration_ScheduleProgrammingVisibility.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ThermostatUserInterfaceConfiguration_ScheduleProgrammingVisibility.restype = ctypes.c_uint32 - # Cluster ThermostatUserInterfaceConfiguration SubscribeAttribute ScheduleProgrammingVisibility - self._chipLib.chip_ime_SubscribeAttribute_ThermostatUserInterfaceConfiguration_ScheduleProgrammingVisibility.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ThermostatUserInterfaceConfiguration_ScheduleProgrammingVisibility.restype = ctypes.c_uint32 - # Cluster ThermostatUserInterfaceConfiguration ReadAttribute ClusterRevision - self._chipLib.chip_ime_ReadAttribute_ThermostatUserInterfaceConfiguration_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ThermostatUserInterfaceConfiguration_ClusterRevision.restype = ctypes.c_uint32 - # Cluster ThermostatUserInterfaceConfiguration SubscribeAttribute ClusterRevision - self._chipLib.chip_ime_SubscribeAttribute_ThermostatUserInterfaceConfiguration_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ThermostatUserInterfaceConfiguration_ClusterRevision.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics - # Cluster ThreadNetworkDiagnostics ReadAttribute Channel - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_Channel.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_Channel.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics SubscribeAttribute Channel - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_Channel.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_Channel.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics ReadAttribute RoutingRole - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RoutingRole.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RoutingRole.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics SubscribeAttribute RoutingRole - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RoutingRole.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RoutingRole.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics ReadAttribute NetworkName - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_NetworkName.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_NetworkName.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics SubscribeAttribute NetworkName - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_NetworkName.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_NetworkName.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics ReadAttribute PanId - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_PanId.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_PanId.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics SubscribeAttribute PanId - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_PanId.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_PanId.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics ReadAttribute ExtendedPanId - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_ExtendedPanId.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_ExtendedPanId.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics SubscribeAttribute ExtendedPanId - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_ExtendedPanId.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_ExtendedPanId.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics ReadAttribute MeshLocalPrefix - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_MeshLocalPrefix.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_MeshLocalPrefix.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics SubscribeAttribute MeshLocalPrefix - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_MeshLocalPrefix.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_MeshLocalPrefix.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics ReadAttribute OverrunCount - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_OverrunCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_OverrunCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics SubscribeAttribute OverrunCount - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_OverrunCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_OverrunCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics ReadAttribute NeighborTableList - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_NeighborTableList.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_NeighborTableList.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics ReadAttribute RouteTableList - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RouteTableList.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RouteTableList.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics ReadAttribute PartitionId - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_PartitionId.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_PartitionId.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics SubscribeAttribute PartitionId - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_PartitionId.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_PartitionId.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics ReadAttribute Weighting - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_Weighting.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_Weighting.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics SubscribeAttribute Weighting - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_Weighting.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_Weighting.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics ReadAttribute DataVersion - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_DataVersion.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_DataVersion.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics SubscribeAttribute DataVersion - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_DataVersion.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_DataVersion.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics ReadAttribute StableDataVersion - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_StableDataVersion.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_StableDataVersion.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics SubscribeAttribute StableDataVersion - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_StableDataVersion.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_StableDataVersion.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics ReadAttribute LeaderRouterId - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_LeaderRouterId.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_LeaderRouterId.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics SubscribeAttribute LeaderRouterId - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_LeaderRouterId.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_LeaderRouterId.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics ReadAttribute DetachedRoleCount - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_DetachedRoleCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_DetachedRoleCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics SubscribeAttribute DetachedRoleCount - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_DetachedRoleCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_DetachedRoleCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics ReadAttribute ChildRoleCount - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_ChildRoleCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_ChildRoleCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics SubscribeAttribute ChildRoleCount - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_ChildRoleCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_ChildRoleCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics ReadAttribute RouterRoleCount - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RouterRoleCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RouterRoleCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics SubscribeAttribute RouterRoleCount - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RouterRoleCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RouterRoleCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics ReadAttribute LeaderRoleCount - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_LeaderRoleCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_LeaderRoleCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics SubscribeAttribute LeaderRoleCount - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_LeaderRoleCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_LeaderRoleCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics ReadAttribute AttachAttemptCount - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_AttachAttemptCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_AttachAttemptCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics SubscribeAttribute AttachAttemptCount - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_AttachAttemptCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_AttachAttemptCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics ReadAttribute PartitionIdChangeCount - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_PartitionIdChangeCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_PartitionIdChangeCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics SubscribeAttribute PartitionIdChangeCount - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_PartitionIdChangeCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_PartitionIdChangeCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics ReadAttribute BetterPartitionAttachAttemptCount - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_BetterPartitionAttachAttemptCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_BetterPartitionAttachAttemptCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics SubscribeAttribute BetterPartitionAttachAttemptCount - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_BetterPartitionAttachAttemptCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_BetterPartitionAttachAttemptCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics ReadAttribute ParentChangeCount - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_ParentChangeCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_ParentChangeCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics SubscribeAttribute ParentChangeCount - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_ParentChangeCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_ParentChangeCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics ReadAttribute TxTotalCount - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxTotalCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxTotalCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics SubscribeAttribute TxTotalCount - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxTotalCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxTotalCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics ReadAttribute TxUnicastCount - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxUnicastCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxUnicastCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics SubscribeAttribute TxUnicastCount - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxUnicastCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxUnicastCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics ReadAttribute TxBroadcastCount - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxBroadcastCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxBroadcastCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics SubscribeAttribute TxBroadcastCount - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxBroadcastCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxBroadcastCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics ReadAttribute TxAckRequestedCount - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxAckRequestedCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxAckRequestedCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics SubscribeAttribute TxAckRequestedCount - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxAckRequestedCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxAckRequestedCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics ReadAttribute TxAckedCount - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxAckedCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxAckedCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics SubscribeAttribute TxAckedCount - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxAckedCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxAckedCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics ReadAttribute TxNoAckRequestedCount - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxNoAckRequestedCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxNoAckRequestedCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics SubscribeAttribute TxNoAckRequestedCount - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxNoAckRequestedCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxNoAckRequestedCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics ReadAttribute TxDataCount - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxDataCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxDataCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics SubscribeAttribute TxDataCount - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxDataCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxDataCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics ReadAttribute TxDataPollCount - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxDataPollCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxDataPollCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics SubscribeAttribute TxDataPollCount - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxDataPollCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxDataPollCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics ReadAttribute TxBeaconCount - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxBeaconCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxBeaconCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics SubscribeAttribute TxBeaconCount - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxBeaconCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxBeaconCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics ReadAttribute TxBeaconRequestCount - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxBeaconRequestCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxBeaconRequestCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics SubscribeAttribute TxBeaconRequestCount - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxBeaconRequestCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxBeaconRequestCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics ReadAttribute TxOtherCount - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxOtherCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxOtherCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics SubscribeAttribute TxOtherCount - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxOtherCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxOtherCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics ReadAttribute TxRetryCount - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxRetryCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxRetryCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics SubscribeAttribute TxRetryCount - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxRetryCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxRetryCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics ReadAttribute TxDirectMaxRetryExpiryCount - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxDirectMaxRetryExpiryCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxDirectMaxRetryExpiryCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics SubscribeAttribute TxDirectMaxRetryExpiryCount - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxDirectMaxRetryExpiryCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxDirectMaxRetryExpiryCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics ReadAttribute TxIndirectMaxRetryExpiryCount - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxIndirectMaxRetryExpiryCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxIndirectMaxRetryExpiryCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics SubscribeAttribute TxIndirectMaxRetryExpiryCount - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxIndirectMaxRetryExpiryCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxIndirectMaxRetryExpiryCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics ReadAttribute TxErrCcaCount - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxErrCcaCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxErrCcaCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics SubscribeAttribute TxErrCcaCount - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxErrCcaCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxErrCcaCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics ReadAttribute TxErrAbortCount - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxErrAbortCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxErrAbortCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics SubscribeAttribute TxErrAbortCount - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxErrAbortCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxErrAbortCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics ReadAttribute TxErrBusyChannelCount - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxErrBusyChannelCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxErrBusyChannelCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics SubscribeAttribute TxErrBusyChannelCount - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxErrBusyChannelCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_TxErrBusyChannelCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics ReadAttribute RxTotalCount - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxTotalCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxTotalCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics SubscribeAttribute RxTotalCount - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxTotalCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxTotalCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics ReadAttribute RxUnicastCount - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxUnicastCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxUnicastCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics SubscribeAttribute RxUnicastCount - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxUnicastCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxUnicastCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics ReadAttribute RxBroadcastCount - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxBroadcastCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxBroadcastCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics SubscribeAttribute RxBroadcastCount - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxBroadcastCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxBroadcastCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics ReadAttribute RxDataCount - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxDataCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxDataCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics SubscribeAttribute RxDataCount - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxDataCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxDataCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics ReadAttribute RxDataPollCount - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxDataPollCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxDataPollCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics SubscribeAttribute RxDataPollCount - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxDataPollCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxDataPollCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics ReadAttribute RxBeaconCount - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxBeaconCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxBeaconCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics SubscribeAttribute RxBeaconCount - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxBeaconCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxBeaconCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics ReadAttribute RxBeaconRequestCount - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxBeaconRequestCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxBeaconRequestCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics SubscribeAttribute RxBeaconRequestCount - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxBeaconRequestCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxBeaconRequestCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics ReadAttribute RxOtherCount - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxOtherCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxOtherCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics SubscribeAttribute RxOtherCount - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxOtherCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxOtherCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics ReadAttribute RxAddressFilteredCount - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxAddressFilteredCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxAddressFilteredCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics SubscribeAttribute RxAddressFilteredCount - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxAddressFilteredCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxAddressFilteredCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics ReadAttribute RxDestAddrFilteredCount - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxDestAddrFilteredCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxDestAddrFilteredCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics SubscribeAttribute RxDestAddrFilteredCount - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxDestAddrFilteredCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxDestAddrFilteredCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics ReadAttribute RxDuplicatedCount - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxDuplicatedCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxDuplicatedCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics SubscribeAttribute RxDuplicatedCount - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxDuplicatedCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxDuplicatedCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics ReadAttribute RxErrNoFrameCount - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxErrNoFrameCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxErrNoFrameCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics SubscribeAttribute RxErrNoFrameCount - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxErrNoFrameCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxErrNoFrameCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics ReadAttribute RxErrUnknownNeighborCount - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxErrUnknownNeighborCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxErrUnknownNeighborCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics SubscribeAttribute RxErrUnknownNeighborCount - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxErrUnknownNeighborCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxErrUnknownNeighborCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics ReadAttribute RxErrInvalidSrcAddrCount - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxErrInvalidSrcAddrCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxErrInvalidSrcAddrCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics SubscribeAttribute RxErrInvalidSrcAddrCount - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxErrInvalidSrcAddrCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxErrInvalidSrcAddrCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics ReadAttribute RxErrSecCount - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxErrSecCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxErrSecCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics SubscribeAttribute RxErrSecCount - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxErrSecCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxErrSecCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics ReadAttribute RxErrFcsCount - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxErrFcsCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxErrFcsCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics SubscribeAttribute RxErrFcsCount - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxErrFcsCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxErrFcsCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics ReadAttribute RxErrOtherCount - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxErrOtherCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxErrOtherCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics SubscribeAttribute RxErrOtherCount - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxErrOtherCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_RxErrOtherCount.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics ReadAttribute ActiveTimestamp - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_ActiveTimestamp.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_ActiveTimestamp.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics SubscribeAttribute ActiveTimestamp - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_ActiveTimestamp.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_ActiveTimestamp.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics ReadAttribute PendingTimestamp - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_PendingTimestamp.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_PendingTimestamp.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics SubscribeAttribute PendingTimestamp - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_PendingTimestamp.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_PendingTimestamp.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics ReadAttribute Delay - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_Delay.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_Delay.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics SubscribeAttribute Delay - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_Delay.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_Delay.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics ReadAttribute SecurityPolicy - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_SecurityPolicy.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_SecurityPolicy.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics ReadAttribute ChannelMask - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_ChannelMask.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_ChannelMask.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics SubscribeAttribute ChannelMask - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_ChannelMask.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_ChannelMask.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics ReadAttribute OperationalDatasetComponents - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_OperationalDatasetComponents.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_OperationalDatasetComponents.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics ReadAttribute ActiveNetworkFaultsList - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_ActiveNetworkFaultsList.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_ActiveNetworkFaultsList.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics ReadAttribute ClusterRevision - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_ThreadNetworkDiagnostics_ClusterRevision.restype = ctypes.c_uint32 - # Cluster ThreadNetworkDiagnostics SubscribeAttribute ClusterRevision - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_ThreadNetworkDiagnostics_ClusterRevision.restype = ctypes.c_uint32 - # Cluster WakeOnLan - # Cluster WakeOnLan ReadAttribute WakeOnLanMacAddress - self._chipLib.chip_ime_ReadAttribute_WakeOnLan_WakeOnLanMacAddress.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_WakeOnLan_WakeOnLanMacAddress.restype = ctypes.c_uint32 - # Cluster WakeOnLan SubscribeAttribute WakeOnLanMacAddress - self._chipLib.chip_ime_SubscribeAttribute_WakeOnLan_WakeOnLanMacAddress.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_WakeOnLan_WakeOnLanMacAddress.restype = ctypes.c_uint32 - # Cluster WakeOnLan ReadAttribute ClusterRevision - self._chipLib.chip_ime_ReadAttribute_WakeOnLan_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_WakeOnLan_ClusterRevision.restype = ctypes.c_uint32 - # Cluster WakeOnLan SubscribeAttribute ClusterRevision - self._chipLib.chip_ime_SubscribeAttribute_WakeOnLan_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_WakeOnLan_ClusterRevision.restype = ctypes.c_uint32 - # Cluster WiFiNetworkDiagnostics - # Cluster WiFiNetworkDiagnostics ReadAttribute Bssid - self._chipLib.chip_ime_ReadAttribute_WiFiNetworkDiagnostics_Bssid.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_WiFiNetworkDiagnostics_Bssid.restype = ctypes.c_uint32 - # Cluster WiFiNetworkDiagnostics SubscribeAttribute Bssid - self._chipLib.chip_ime_SubscribeAttribute_WiFiNetworkDiagnostics_Bssid.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_WiFiNetworkDiagnostics_Bssid.restype = ctypes.c_uint32 - # Cluster WiFiNetworkDiagnostics ReadAttribute SecurityType - self._chipLib.chip_ime_ReadAttribute_WiFiNetworkDiagnostics_SecurityType.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_WiFiNetworkDiagnostics_SecurityType.restype = ctypes.c_uint32 - # Cluster WiFiNetworkDiagnostics SubscribeAttribute SecurityType - self._chipLib.chip_ime_SubscribeAttribute_WiFiNetworkDiagnostics_SecurityType.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_WiFiNetworkDiagnostics_SecurityType.restype = ctypes.c_uint32 - # Cluster WiFiNetworkDiagnostics ReadAttribute WiFiVersion - self._chipLib.chip_ime_ReadAttribute_WiFiNetworkDiagnostics_WiFiVersion.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_WiFiNetworkDiagnostics_WiFiVersion.restype = ctypes.c_uint32 - # Cluster WiFiNetworkDiagnostics SubscribeAttribute WiFiVersion - self._chipLib.chip_ime_SubscribeAttribute_WiFiNetworkDiagnostics_WiFiVersion.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_WiFiNetworkDiagnostics_WiFiVersion.restype = ctypes.c_uint32 - # Cluster WiFiNetworkDiagnostics ReadAttribute ChannelNumber - self._chipLib.chip_ime_ReadAttribute_WiFiNetworkDiagnostics_ChannelNumber.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_WiFiNetworkDiagnostics_ChannelNumber.restype = ctypes.c_uint32 - # Cluster WiFiNetworkDiagnostics SubscribeAttribute ChannelNumber - self._chipLib.chip_ime_SubscribeAttribute_WiFiNetworkDiagnostics_ChannelNumber.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_WiFiNetworkDiagnostics_ChannelNumber.restype = ctypes.c_uint32 - # Cluster WiFiNetworkDiagnostics ReadAttribute Rssi - self._chipLib.chip_ime_ReadAttribute_WiFiNetworkDiagnostics_Rssi.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_WiFiNetworkDiagnostics_Rssi.restype = ctypes.c_uint32 - # Cluster WiFiNetworkDiagnostics SubscribeAttribute Rssi - self._chipLib.chip_ime_SubscribeAttribute_WiFiNetworkDiagnostics_Rssi.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_WiFiNetworkDiagnostics_Rssi.restype = ctypes.c_uint32 - # Cluster WiFiNetworkDiagnostics ReadAttribute BeaconLostCount - self._chipLib.chip_ime_ReadAttribute_WiFiNetworkDiagnostics_BeaconLostCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_WiFiNetworkDiagnostics_BeaconLostCount.restype = ctypes.c_uint32 - # Cluster WiFiNetworkDiagnostics SubscribeAttribute BeaconLostCount - self._chipLib.chip_ime_SubscribeAttribute_WiFiNetworkDiagnostics_BeaconLostCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_WiFiNetworkDiagnostics_BeaconLostCount.restype = ctypes.c_uint32 - # Cluster WiFiNetworkDiagnostics ReadAttribute BeaconRxCount - self._chipLib.chip_ime_ReadAttribute_WiFiNetworkDiagnostics_BeaconRxCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_WiFiNetworkDiagnostics_BeaconRxCount.restype = ctypes.c_uint32 - # Cluster WiFiNetworkDiagnostics SubscribeAttribute BeaconRxCount - self._chipLib.chip_ime_SubscribeAttribute_WiFiNetworkDiagnostics_BeaconRxCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_WiFiNetworkDiagnostics_BeaconRxCount.restype = ctypes.c_uint32 - # Cluster WiFiNetworkDiagnostics ReadAttribute PacketMulticastRxCount - self._chipLib.chip_ime_ReadAttribute_WiFiNetworkDiagnostics_PacketMulticastRxCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_WiFiNetworkDiagnostics_PacketMulticastRxCount.restype = ctypes.c_uint32 - # Cluster WiFiNetworkDiagnostics SubscribeAttribute PacketMulticastRxCount - self._chipLib.chip_ime_SubscribeAttribute_WiFiNetworkDiagnostics_PacketMulticastRxCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_WiFiNetworkDiagnostics_PacketMulticastRxCount.restype = ctypes.c_uint32 - # Cluster WiFiNetworkDiagnostics ReadAttribute PacketMulticastTxCount - self._chipLib.chip_ime_ReadAttribute_WiFiNetworkDiagnostics_PacketMulticastTxCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_WiFiNetworkDiagnostics_PacketMulticastTxCount.restype = ctypes.c_uint32 - # Cluster WiFiNetworkDiagnostics SubscribeAttribute PacketMulticastTxCount - self._chipLib.chip_ime_SubscribeAttribute_WiFiNetworkDiagnostics_PacketMulticastTxCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_WiFiNetworkDiagnostics_PacketMulticastTxCount.restype = ctypes.c_uint32 - # Cluster WiFiNetworkDiagnostics ReadAttribute PacketUnicastRxCount - self._chipLib.chip_ime_ReadAttribute_WiFiNetworkDiagnostics_PacketUnicastRxCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_WiFiNetworkDiagnostics_PacketUnicastRxCount.restype = ctypes.c_uint32 - # Cluster WiFiNetworkDiagnostics SubscribeAttribute PacketUnicastRxCount - self._chipLib.chip_ime_SubscribeAttribute_WiFiNetworkDiagnostics_PacketUnicastRxCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_WiFiNetworkDiagnostics_PacketUnicastRxCount.restype = ctypes.c_uint32 - # Cluster WiFiNetworkDiagnostics ReadAttribute PacketUnicastTxCount - self._chipLib.chip_ime_ReadAttribute_WiFiNetworkDiagnostics_PacketUnicastTxCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_WiFiNetworkDiagnostics_PacketUnicastTxCount.restype = ctypes.c_uint32 - # Cluster WiFiNetworkDiagnostics SubscribeAttribute PacketUnicastTxCount - self._chipLib.chip_ime_SubscribeAttribute_WiFiNetworkDiagnostics_PacketUnicastTxCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_WiFiNetworkDiagnostics_PacketUnicastTxCount.restype = ctypes.c_uint32 - # Cluster WiFiNetworkDiagnostics ReadAttribute CurrentMaxRate - self._chipLib.chip_ime_ReadAttribute_WiFiNetworkDiagnostics_CurrentMaxRate.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_WiFiNetworkDiagnostics_CurrentMaxRate.restype = ctypes.c_uint32 - # Cluster WiFiNetworkDiagnostics SubscribeAttribute CurrentMaxRate - self._chipLib.chip_ime_SubscribeAttribute_WiFiNetworkDiagnostics_CurrentMaxRate.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_WiFiNetworkDiagnostics_CurrentMaxRate.restype = ctypes.c_uint32 - # Cluster WiFiNetworkDiagnostics ReadAttribute OverrunCount - self._chipLib.chip_ime_ReadAttribute_WiFiNetworkDiagnostics_OverrunCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_WiFiNetworkDiagnostics_OverrunCount.restype = ctypes.c_uint32 - # Cluster WiFiNetworkDiagnostics SubscribeAttribute OverrunCount - self._chipLib.chip_ime_SubscribeAttribute_WiFiNetworkDiagnostics_OverrunCount.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_WiFiNetworkDiagnostics_OverrunCount.restype = ctypes.c_uint32 - # Cluster WiFiNetworkDiagnostics ReadAttribute FeatureMap - self._chipLib.chip_ime_ReadAttribute_WiFiNetworkDiagnostics_FeatureMap.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_WiFiNetworkDiagnostics_FeatureMap.restype = ctypes.c_uint32 - # Cluster WiFiNetworkDiagnostics ReadAttribute ClusterRevision - self._chipLib.chip_ime_ReadAttribute_WiFiNetworkDiagnostics_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_WiFiNetworkDiagnostics_ClusterRevision.restype = ctypes.c_uint32 - # Cluster WiFiNetworkDiagnostics SubscribeAttribute ClusterRevision - self._chipLib.chip_ime_SubscribeAttribute_WiFiNetworkDiagnostics_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_WiFiNetworkDiagnostics_ClusterRevision.restype = ctypes.c_uint32 - # Cluster WindowCovering - # Cluster WindowCovering ReadAttribute Type - self._chipLib.chip_ime_ReadAttribute_WindowCovering_Type.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_WindowCovering_Type.restype = ctypes.c_uint32 - # Cluster WindowCovering SubscribeAttribute Type - self._chipLib.chip_ime_SubscribeAttribute_WindowCovering_Type.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_WindowCovering_Type.restype = ctypes.c_uint32 - # Cluster WindowCovering ReadAttribute CurrentPositionLift - self._chipLib.chip_ime_ReadAttribute_WindowCovering_CurrentPositionLift.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_WindowCovering_CurrentPositionLift.restype = ctypes.c_uint32 - # Cluster WindowCovering SubscribeAttribute CurrentPositionLift - self._chipLib.chip_ime_SubscribeAttribute_WindowCovering_CurrentPositionLift.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_WindowCovering_CurrentPositionLift.restype = ctypes.c_uint32 - # Cluster WindowCovering ReadAttribute CurrentPositionTilt - self._chipLib.chip_ime_ReadAttribute_WindowCovering_CurrentPositionTilt.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_WindowCovering_CurrentPositionTilt.restype = ctypes.c_uint32 - # Cluster WindowCovering SubscribeAttribute CurrentPositionTilt - self._chipLib.chip_ime_SubscribeAttribute_WindowCovering_CurrentPositionTilt.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_WindowCovering_CurrentPositionTilt.restype = ctypes.c_uint32 - # Cluster WindowCovering ReadAttribute ConfigStatus - self._chipLib.chip_ime_ReadAttribute_WindowCovering_ConfigStatus.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_WindowCovering_ConfigStatus.restype = ctypes.c_uint32 - # Cluster WindowCovering SubscribeAttribute ConfigStatus - self._chipLib.chip_ime_SubscribeAttribute_WindowCovering_ConfigStatus.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_WindowCovering_ConfigStatus.restype = ctypes.c_uint32 - # Cluster WindowCovering ReadAttribute CurrentPositionLiftPercentage - self._chipLib.chip_ime_ReadAttribute_WindowCovering_CurrentPositionLiftPercentage.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_WindowCovering_CurrentPositionLiftPercentage.restype = ctypes.c_uint32 - # Cluster WindowCovering SubscribeAttribute CurrentPositionLiftPercentage - self._chipLib.chip_ime_SubscribeAttribute_WindowCovering_CurrentPositionLiftPercentage.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_WindowCovering_CurrentPositionLiftPercentage.restype = ctypes.c_uint32 - # Cluster WindowCovering ReadAttribute CurrentPositionTiltPercentage - self._chipLib.chip_ime_ReadAttribute_WindowCovering_CurrentPositionTiltPercentage.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_WindowCovering_CurrentPositionTiltPercentage.restype = ctypes.c_uint32 - # Cluster WindowCovering SubscribeAttribute CurrentPositionTiltPercentage - self._chipLib.chip_ime_SubscribeAttribute_WindowCovering_CurrentPositionTiltPercentage.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_WindowCovering_CurrentPositionTiltPercentage.restype = ctypes.c_uint32 - # Cluster WindowCovering ReadAttribute OperationalStatus - self._chipLib.chip_ime_ReadAttribute_WindowCovering_OperationalStatus.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_WindowCovering_OperationalStatus.restype = ctypes.c_uint32 - # Cluster WindowCovering SubscribeAttribute OperationalStatus - self._chipLib.chip_ime_SubscribeAttribute_WindowCovering_OperationalStatus.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_WindowCovering_OperationalStatus.restype = ctypes.c_uint32 - # Cluster WindowCovering ReadAttribute TargetPositionLiftPercent100ths - self._chipLib.chip_ime_ReadAttribute_WindowCovering_TargetPositionLiftPercent100ths.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_WindowCovering_TargetPositionLiftPercent100ths.restype = ctypes.c_uint32 - # Cluster WindowCovering SubscribeAttribute TargetPositionLiftPercent100ths - self._chipLib.chip_ime_SubscribeAttribute_WindowCovering_TargetPositionLiftPercent100ths.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_WindowCovering_TargetPositionLiftPercent100ths.restype = ctypes.c_uint32 - # Cluster WindowCovering ReadAttribute TargetPositionTiltPercent100ths - self._chipLib.chip_ime_ReadAttribute_WindowCovering_TargetPositionTiltPercent100ths.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_WindowCovering_TargetPositionTiltPercent100ths.restype = ctypes.c_uint32 - # Cluster WindowCovering SubscribeAttribute TargetPositionTiltPercent100ths - self._chipLib.chip_ime_SubscribeAttribute_WindowCovering_TargetPositionTiltPercent100ths.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_WindowCovering_TargetPositionTiltPercent100ths.restype = ctypes.c_uint32 - # Cluster WindowCovering ReadAttribute EndProductType - self._chipLib.chip_ime_ReadAttribute_WindowCovering_EndProductType.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_WindowCovering_EndProductType.restype = ctypes.c_uint32 - # Cluster WindowCovering SubscribeAttribute EndProductType - self._chipLib.chip_ime_SubscribeAttribute_WindowCovering_EndProductType.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_WindowCovering_EndProductType.restype = ctypes.c_uint32 - # Cluster WindowCovering ReadAttribute CurrentPositionLiftPercent100ths - self._chipLib.chip_ime_ReadAttribute_WindowCovering_CurrentPositionLiftPercent100ths.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_WindowCovering_CurrentPositionLiftPercent100ths.restype = ctypes.c_uint32 - # Cluster WindowCovering SubscribeAttribute CurrentPositionLiftPercent100ths - self._chipLib.chip_ime_SubscribeAttribute_WindowCovering_CurrentPositionLiftPercent100ths.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_WindowCovering_CurrentPositionLiftPercent100ths.restype = ctypes.c_uint32 - # Cluster WindowCovering ReadAttribute CurrentPositionTiltPercent100ths - self._chipLib.chip_ime_ReadAttribute_WindowCovering_CurrentPositionTiltPercent100ths.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_WindowCovering_CurrentPositionTiltPercent100ths.restype = ctypes.c_uint32 - # Cluster WindowCovering SubscribeAttribute CurrentPositionTiltPercent100ths - self._chipLib.chip_ime_SubscribeAttribute_WindowCovering_CurrentPositionTiltPercent100ths.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_WindowCovering_CurrentPositionTiltPercent100ths.restype = ctypes.c_uint32 - # Cluster WindowCovering ReadAttribute InstalledOpenLimitLift - self._chipLib.chip_ime_ReadAttribute_WindowCovering_InstalledOpenLimitLift.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_WindowCovering_InstalledOpenLimitLift.restype = ctypes.c_uint32 - # Cluster WindowCovering SubscribeAttribute InstalledOpenLimitLift - self._chipLib.chip_ime_SubscribeAttribute_WindowCovering_InstalledOpenLimitLift.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_WindowCovering_InstalledOpenLimitLift.restype = ctypes.c_uint32 - # Cluster WindowCovering ReadAttribute InstalledClosedLimitLift - self._chipLib.chip_ime_ReadAttribute_WindowCovering_InstalledClosedLimitLift.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_WindowCovering_InstalledClosedLimitLift.restype = ctypes.c_uint32 - # Cluster WindowCovering SubscribeAttribute InstalledClosedLimitLift - self._chipLib.chip_ime_SubscribeAttribute_WindowCovering_InstalledClosedLimitLift.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_WindowCovering_InstalledClosedLimitLift.restype = ctypes.c_uint32 - # Cluster WindowCovering ReadAttribute InstalledOpenLimitTilt - self._chipLib.chip_ime_ReadAttribute_WindowCovering_InstalledOpenLimitTilt.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_WindowCovering_InstalledOpenLimitTilt.restype = ctypes.c_uint32 - # Cluster WindowCovering SubscribeAttribute InstalledOpenLimitTilt - self._chipLib.chip_ime_SubscribeAttribute_WindowCovering_InstalledOpenLimitTilt.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_WindowCovering_InstalledOpenLimitTilt.restype = ctypes.c_uint32 - # Cluster WindowCovering ReadAttribute InstalledClosedLimitTilt - self._chipLib.chip_ime_ReadAttribute_WindowCovering_InstalledClosedLimitTilt.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_WindowCovering_InstalledClosedLimitTilt.restype = ctypes.c_uint32 - # Cluster WindowCovering SubscribeAttribute InstalledClosedLimitTilt - self._chipLib.chip_ime_SubscribeAttribute_WindowCovering_InstalledClosedLimitTilt.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_WindowCovering_InstalledClosedLimitTilt.restype = ctypes.c_uint32 - # Cluster WindowCovering ReadAttribute Mode - self._chipLib.chip_ime_ReadAttribute_WindowCovering_Mode.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_WindowCovering_Mode.restype = ctypes.c_uint32 - # Cluster WindowCovering SubscribeAttribute Mode - self._chipLib.chip_ime_SubscribeAttribute_WindowCovering_Mode.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_WindowCovering_Mode.restype = ctypes.c_uint32 - # Cluster WindowCovering ReadAttribute SafetyStatus - self._chipLib.chip_ime_ReadAttribute_WindowCovering_SafetyStatus.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_WindowCovering_SafetyStatus.restype = ctypes.c_uint32 - # Cluster WindowCovering SubscribeAttribute SafetyStatus - self._chipLib.chip_ime_SubscribeAttribute_WindowCovering_SafetyStatus.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_WindowCovering_SafetyStatus.restype = ctypes.c_uint32 - # Cluster WindowCovering ReadAttribute FeatureMap - self._chipLib.chip_ime_ReadAttribute_WindowCovering_FeatureMap.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_WindowCovering_FeatureMap.restype = ctypes.c_uint32 - # Cluster WindowCovering SubscribeAttribute FeatureMap - self._chipLib.chip_ime_SubscribeAttribute_WindowCovering_FeatureMap.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_WindowCovering_FeatureMap.restype = ctypes.c_uint32 - # Cluster WindowCovering ReadAttribute ClusterRevision - self._chipLib.chip_ime_ReadAttribute_WindowCovering_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_WindowCovering_ClusterRevision.restype = ctypes.c_uint32 - # Cluster WindowCovering SubscribeAttribute ClusterRevision - self._chipLib.chip_ime_SubscribeAttribute_WindowCovering_ClusterRevision.argtypes = [ - ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_WindowCovering_ClusterRevision.restype = ctypes.c_uint32 - # Init response delegates - - def HandleSuccess(): - self._ChipStack.callbackRes = 0 - self._ChipStack.completeEvent.set() - - def HandleFailure(status): - self._ChipStack.callbackRes = status - self._ChipStack.completeEvent.set() - - self._HandleSuccess = ChipClusters.SUCCESS_DELEGATE(HandleSuccess) - self._HandleFailure = ChipClusters.FAILURE_DELEGATE(HandleFailure) - self._chipLib.chip_ime_SetSuccessResponseDelegate(self._HandleSuccess) - self._chipLib.chip_ime_SetFailureResponseDelegate(self._HandleFailure) diff --git a/src/controller/python/chip/clusters/attribute.cpp b/src/controller/python/chip/clusters/attribute.cpp index 00267d25038578..ff46592fafec99 100644 --- a/src/controller/python/chip/clusters/attribute.cpp +++ b/src/controller/python/chip/clusters/attribute.cpp @@ -35,7 +35,8 @@ 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, DeviceProxy * device, size_t n, ...); -chip::ChipError::StorageType pychip_ReadClient_ReadAttributes(void * appContext, DeviceProxy * device, size_t n, ...); +chip::ChipError::StorageType pychip_ReadClient_ReadAttributes(void * appContext, DeviceProxy * device, bool isSubscription, + uint32_t minInterval, uint32_t maxInterval, size_t n, ...); } namespace chip { @@ -48,16 +49,18 @@ struct __attribute__((packed)) AttributePath chip::AttributeId attributeId; }; -using OnReadAttributeDataCallback = void (*)(PyObject * appContext, chip::EndpointId endpointId, chip::ClusterId clusterId, +using OnReadAttributeDataCallback = void (*)(PyObject * appContext, chip::EndpointId endpointId, chip::ClusterId clusterId, chip::AttributeId attributeId, std::underlying_type_t imstatus, uint8_t * data, uint32_t dataLen); -using OnReadErrorCallback = void (*)(PyObject * appContext, uint32_t chiperror); -using OnReadDoneCallback = void (*)(PyObject * appContext); +using OnSubscriptionEstablishedCallback = void (*)(PyObject * appContext, uint64_t subscriptionId); +using OnReadErrorCallback = void (*)(PyObject * appContext, uint32_t chiperror); +using OnReadDoneCallback = void (*)(PyObject * appContext); -OnReadAttributeDataCallback gOnReadAttributeDataCallback = nullptr; -OnReadErrorCallback gOnReadErrorCallback = nullptr; -OnReadDoneCallback gOnReadDoneCallback = nullptr; +OnReadAttributeDataCallback gOnReadAttributeDataCallback = nullptr; +OnSubscriptionEstablishedCallback gOnSubscriptionEstablishedCallback = nullptr; +OnReadErrorCallback gOnReadErrorCallback = nullptr; +OnReadDoneCallback gOnReadDoneCallback = nullptr; class ReadClientCallback : public ReadClient::Callback { @@ -99,6 +102,11 @@ class ReadClientCallback : public ReadClient::Callback to_underlying(aStatus.mStatus), buffer, size); } + void OnSubscriptionEstablished(const ReadClient * apReadClient) override + { + gOnSubscriptionEstablishedCallback(mAppContext, apReadClient->GetSubscriptionId().ValueOr(0)); + } + void OnError(const ReadClient * apReadClient, CHIP_ERROR aError) override { gOnReadErrorCallback(mAppContext, aError.AsInteger()); @@ -167,11 +175,13 @@ void pychip_WriteClient_InitCallbacks(OnWriteResponseCallback onWriteResponseCal } void pychip_ReadClient_InitCallbacks(OnReadAttributeDataCallback onReadAttributeDataCallback, + OnSubscriptionEstablishedCallback onSubscriptionEstablishedCallback, OnReadErrorCallback onReadErrorCallback, OnReadDoneCallback onReadDoneCallback) { - gOnReadAttributeDataCallback = onReadAttributeDataCallback; - gOnReadErrorCallback = onReadErrorCallback; - gOnReadDoneCallback = onReadDoneCallback; + gOnReadAttributeDataCallback = onReadAttributeDataCallback; + gOnSubscriptionEstablishedCallback = onSubscriptionEstablishedCallback; + gOnReadErrorCallback = onReadErrorCallback; + gOnReadDoneCallback = onReadDoneCallback; } chip::ChipError::StorageType pychip_WriteClient_WriteAttributes(void * appContext, DeviceProxy * device, size_t n, ...) @@ -222,7 +232,8 @@ chip::ChipError::StorageType pychip_WriteClient_WriteAttributes(void * appContex return err.AsInteger(); } -chip::ChipError::StorageType pychip_ReadClient_ReadAttributes(void * appContext, DeviceProxy * device, size_t n, ...) +chip::ChipError::StorageType pychip_ReadClient_ReadAttributes(void * appContext, DeviceProxy * device, bool isSubscription, + uint32_t minInterval, uint32_t maxInterval, size_t n, ...) { CHIP_ERROR err = CHIP_NO_ERROR; @@ -250,12 +261,25 @@ chip::ChipError::StorageType pychip_ReadClient_ReadAttributes(void * appContext, VerifyOrExit(session.HasValue(), err = CHIP_ERROR_NOT_CONNECTED); { - app::InteractionModelEngine::GetInstance()->NewReadClient(&readClient, ReadClient::InteractionType::Read, callback.get()); + app::InteractionModelEngine::GetInstance()->NewReadClient( + &readClient, isSubscription ? ReadClient::InteractionType::Subscribe : ReadClient::InteractionType::Read, + callback.get()); ReadPrepareParams params(session.Value()); params.mpAttributePathParamsList = readPaths.get(); params.mAttributePathParamsListSize = n; - err = readClient->SendReadRequest(params); + if (isSubscription) + { + params.mMinIntervalFloorSeconds = minInterval; + params.mMaxIntervalCeilingSeconds = maxInterval; + + err = readClient->SendSubscribeRequest(params); + } + else + { + err = readClient->SendReadRequest(params); + } + if (err != CHIP_NO_ERROR) { readClient->Shutdown(); diff --git a/src/controller/python/templates/python-CHIPClusters-cpp.zapt b/src/controller/python/templates/python-CHIPClusters-cpp.zapt deleted file mode 100644 index 5ba06ea7836f03..00000000000000 --- a/src/controller/python/templates/python-CHIPClusters-cpp.zapt +++ /dev/null @@ -1,168 +0,0 @@ -{{> header}} - -#include -#include -#include -#include -#include -#include - -#include - -#include -#include - -using namespace chip; -using namespace chip::app; - -namespace { - -// Define pointers for external ZCL response delegates. - -using SuccessResponseDelegate = void(*)(); -using FailureResponseDelegate = void(*)(uint8_t); -SuccessResponseDelegate gSuccessResponseDelegate; -FailureResponseDelegate gFailureResponseDelegate; - -// Define callbacks for ZCL commands and attribute requests. - -#if CHIP_PROGRESS_LOGGING -std::string ByteSpanToString(chip::ByteSpan value) -{ - std::string strValue = ""; - for (size_t i = 0; i < value.size(); i++) - { - strValue += ' '; - strValue += std::to_string(value.data()[i]); - } - return strValue; -} -#endif - -void OnDefaultSuccessResponse(void * /* context */) -{ - if (gSuccessResponseDelegate != nullptr) - gSuccessResponseDelegate(); -} - -void OnDefaultFailureResponse(void * /* context */, uint8_t status) -{ - if (gFailureResponseDelegate != nullptr) - gFailureResponseDelegate(status); -} - - -template -void OnAttributeResponse(void * /* context */, AttributeType value) -{ - std::string strValue = std::to_string(value); - ChipLogProgress(Zcl, " attributeValue: %s", strValue.c_str()); - if (gSuccessResponseDelegate != nullptr) - gSuccessResponseDelegate(); -} - -template <> -void OnAttributeResponse(void * /* context */, chip::ByteSpan value) -{ - ChipLogProgress(Zcl, " attributeValue: (span of length %zd) %s", value.size(), ByteSpanToString(value).c_str()); - if (gSuccessResponseDelegate != nullptr) - gSuccessResponseDelegate(); -} - -template <> -void OnAttributeResponse(void * /* context */, chip::CharSpan value) -{ - ChipLogProgress(Zcl, " attributeValue: '%.*s'", static_cast(value.size()), value.data()); - if (gSuccessResponseDelegate != nullptr) - gSuccessResponseDelegate(); -} - -template <> -void OnAttributeResponse(void * /* context */, bool value) -{ - ChipLogProgress(Zcl, " attributeValue: %s", value ? "true" : "false"); - if (gSuccessResponseDelegate != nullptr) - gSuccessResponseDelegate(); -} - -{{#chip_client_clusters}} -{{#chip_server_cluster_attributes}} -{{#if isList}} -static void On{{asUpperCamelCase parent.name}}{{asUpperCamelCase name}}ListAttributeResponse(void * context, {{zapTypeToDecodableClusterObjectType type ns=parent.name isArgument=true}} list) -{ - {{! TODO: implementation }} - if (gSuccessResponseDelegate != nullptr) - gSuccessResponseDelegate(); -} -chip::Callback::Callback<{{asUpperCamelCase parent.name}}{{asUpperCamelCase name}}ListAttributeCallback> g{{asUpperCamelCase parent.name}}{{asUpperCamelCase name}}ListAttributeCallback{On{{asUpperCamelCase parent.name}}{{asUpperCamelCase name}}ListAttributeResponse, nullptr}; -{{/if}} -{{/chip_server_cluster_attributes}} -{{/chip_client_clusters}} - -chip::Callback::Callback gDefaultSuccessCallback{OnDefaultSuccessResponse, nullptr}; -chip::Callback::Callback gDefaultFailureCallback{OnDefaultFailureResponse, nullptr}; -chip::Callback::Callback gBooleanAttributeCallback{OnAttributeResponse, nullptr}; -chip::Callback::Callback gInt8uAttributeCallback{OnAttributeResponse, nullptr}; -chip::Callback::Callback gInt8sAttributeCallback{OnAttributeResponse, nullptr}; -chip::Callback::Callback gInt16uAttributeCallback{OnAttributeResponse, nullptr}; -chip::Callback::Callback gInt16sAttributeCallback{OnAttributeResponse, nullptr}; -chip::Callback::Callback gInt32uAttributeCallback{OnAttributeResponse, nullptr}; -chip::Callback::Callback gInt32sAttributeCallback{OnAttributeResponse, nullptr}; -chip::Callback::Callback gInt64uAttributeCallback{OnAttributeResponse, nullptr}; -chip::Callback::Callback gInt64sAttributeCallback{OnAttributeResponse, nullptr}; -chip::Callback::Callback gOctetStringAttributeCallback{OnAttributeResponse, nullptr}; -chip::Callback::Callback gCharStringAttributeCallback{OnAttributeResponse, nullptr}; - -} // namespace - -extern "C" { - -void chip_ime_SetSuccessResponseDelegate(SuccessResponseDelegate delegate) -{ - gSuccessResponseDelegate = delegate; -} - -void chip_ime_SetFailureResponseDelegate(FailureResponseDelegate delegate) -{ - gFailureResponseDelegate = delegate; -} - -{{#chip_client_clusters}} -// Cluster {{asUpperCamelCase name}} - -{{#chip_server_cluster_attributes}} -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; - cluster.Associate(device, ZCLendpointId); -{{#if isList}} - return cluster.ReadAttribute{{asUpperCamelCase name}}(g{{asUpperCamelCase parent.name}}{{asUpperCamelCase name}}ListAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -{{else}} - return cluster.ReadAttribute{{asUpperCamelCase name}}(g{{chipCallback.name}}AttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); -{{/if}} -} - -{{#if isReportableAttribute}} -{{#unless isList}} -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; - cluster.Associate(device, ZCLendpointId); -{{#if isList}} - chip::Callback::Callback<{{asUpperCamelCase parent.name}}{{asUpperCamelCase name}}ListAttributeCallback> * onSuccessCallback = new chip::Callback::Callback<{{asUpperCamelCase parent.name}}{{asUpperCamelCase name}}ListAttributeCallback>(On{{asUpperCamelCase parent.name}}{{asUpperCamelCase name}}ListAttributeResponse, nullptr); - return cluster.SubscribeAttribute{{asUpperCamelCase name}}(onSuccessCallback->Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval).AsInteger(); -{{else}} - return cluster.SubscribeAttribute{{asUpperCamelCase name}}(g{{chipCallback.name}}AttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval).AsInteger(); -{{/if}} -} -{{/unless}} -{{/if}} - -{{/chip_server_cluster_attributes}} - -// End of Cluster {{asUpperCamelCase name}} -{{/chip_client_clusters}} - -} diff --git a/src/controller/python/templates/python-CHIPClusters-py.zapt b/src/controller/python/templates/python-CHIPClusters-py.zapt index e22568b10ba1e2..baf1a695e92962 100644 --- a/src/controller/python/templates/python-CHIPClusters-py.zapt +++ b/src/controller/python/templates/python-CHIPClusters-py.zapt @@ -81,89 +81,7 @@ class ChipClusters: attribute["attributeName"]: attribute for attribute in clusterInfo["attributes"].values() } for clusterName, clusterInfo in ChipClusters._CLUSTER_NAME_DICT.items() } - def SendCommand(self, device: ctypes.c_void_p, cluster: str, command: str, endpoint: int, groupid: int, args, imEnabled): - func = getattr(self, "Cluster{}_Command{}".format(cluster, command), None) - if not func: - raise UnknownCommand(cluster, command) - funcCaller = self._ChipStack.Call if imEnabled else self._ChipStack.CallAsync - res = funcCaller(lambda: func(device, endpoint, groupid, **args)) - if res != 0: - raise self._ChipStack.ErrorToException(res) - - def ReadAttribute(self, device: ctypes.c_void_p, cluster: str, attribute: str, endpoint: int, groupid: int, imEnabled): - func = getattr(self, "Cluster{}_ReadAttribute{}".format(cluster, attribute), None) - if not func: - raise UnknownAttribute(cluster, attribute) - funcCaller = self._ChipStack.Call if imEnabled else self._ChipStack.CallAsync - res = funcCaller(lambda: func(device, endpoint, groupid)) - if res != 0: - raise self._ChipStack.ErrorToException(res) - - def SubscribeAttribute(self, device: ctypes.c_void_p, cluster: str, attribute: str, endpoint: int, minInterval: int, maxInterval: int, imEnabled): - func = getattr(self, "Cluster{}_SubscribeAttribute{}".format(cluster, attribute), None) - if not func: - raise UnknownAttribute(cluster, attribute) - funcCaller = self._ChipStack.Call if imEnabled else self._ChipStack.CallAsync - funcCaller(lambda: func(device, endpoint, minInterval, maxInterval)) - - def WriteAttribute(self, device: ctypes.c_void_p, cluster: str, attribute: str, endpoint: int, groupid: int, value, imEnabled): - func = getattr(self, "Cluster{}_WriteAttribute{}".format(cluster, attribute), None) - if not func: - raise UnknownAttribute(cluster, attribute) - funcCaller = self._ChipStack.Call if imEnabled else self._ChipStack.CallAsync - res = funcCaller(lambda: func(device, endpoint, groupid, value)) - if res != 0: - raise self._ChipStack.ErrorToException(res) - - # Cluster attributes - -{{#chip_client_clusters}} -{{#chip_server_cluster_attributes}} - def Cluster{{asUpperCamelCase parent.name}}_ReadAttribute{{asUpperCamelCase name}}(self, device: ctypes.c_void_p, ZCLendpoint: int, ZCLgroupid: int): - return self._chipLib.chip_ime_ReadAttribute_{{asUpperCamelCase parent.name}}_{{asUpperCamelCase name}}(device, ZCLendpoint, ZCLgroupid) -{{#if isReportableAttribute}} -{{#unless isList}} - def Cluster{{asUpperCamelCase parent.name}}_SubscribeAttribute{{asUpperCamelCase name}}(self, device: ctypes.c_void_p, ZCLendpoint: int, minInterval: int, maxInterval: int): - return self._chipLib.chip_ime_SubscribeAttribute_{{asUpperCamelCase parent.name}}_{{asUpperCamelCase name}}(device, ZCLendpoint, minInterval, maxInterval) -{{/unless}} -{{/if}} -{{/chip_server_cluster_attributes}} -{{/chip_client_clusters}} - # Init native functions def InitLib(self, chipLib): self._chipLib = chipLib - # Response delegate setters - self._chipLib.chip_ime_SetSuccessResponseDelegate.argtypes = [ChipClusters.SUCCESS_DELEGATE] - self._chipLib.chip_ime_SetSuccessResponseDelegate.restype = None - self._chipLib.chip_ime_SetFailureResponseDelegate.argtypes = [ChipClusters.FAILURE_DELEGATE] - self._chipLib.chip_ime_SetFailureResponseDelegate.res = None -{{#chip_client_clusters}} - # Cluster {{asUpperCamelCase name}} -{{#chip_server_cluster_attributes}} - # Cluster {{asUpperCamelCase parent.name}} ReadAttribute {{asUpperCamelCase name}} - self._chipLib.chip_ime_ReadAttribute_{{asUpperCamelCase parent.name}}_{{asUpperCamelCase name}}.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16] - self._chipLib.chip_ime_ReadAttribute_{{asUpperCamelCase parent.name}}_{{asUpperCamelCase name}}.restype = ctypes.c_uint32 -{{#if isReportableAttribute}} -{{#unless isList}} - # Cluster {{asUpperCamelCase parent.name}} SubscribeAttribute {{asUpperCamelCase name}} - self._chipLib.chip_ime_SubscribeAttribute_{{asUpperCamelCase parent.name}}_{{asUpperCamelCase name}}.argtypes = [ctypes.c_void_p, ctypes.c_uint8, ctypes.c_uint16, ctypes.c_uint16] - self._chipLib.chip_ime_SubscribeAttribute_{{asUpperCamelCase parent.name}}_{{asUpperCamelCase name}}.restype = ctypes.c_uint32 -{{/unless}} -{{/if}} -{{/chip_server_cluster_attributes}} -{{/chip_client_clusters}} - # Init response delegates - def HandleSuccess(): - self._ChipStack.callbackRes = 0 - self._ChipStack.completeEvent.set() - - def HandleFailure(status): - self._ChipStack.callbackRes = status - self._ChipStack.completeEvent.set() - - self._HandleSuccess = ChipClusters.SUCCESS_DELEGATE(HandleSuccess) - self._HandleFailure = ChipClusters.FAILURE_DELEGATE(HandleFailure) - self._chipLib.chip_ime_SetSuccessResponseDelegate(self._HandleSuccess) - self._chipLib.chip_ime_SetFailureResponseDelegate(self._HandleFailure) diff --git a/src/controller/python/templates/templates.json b/src/controller/python/templates/templates.json index c77a2aaf4e8709..859c98ad22b619 100644 --- a/src/controller/python/templates/templates.json +++ b/src/controller/python/templates/templates.json @@ -24,11 +24,6 @@ } ], "templates": [ - { - "path": "python-CHIPClusters-cpp.zapt", - "name": "CHIP ZCL API for Python (native code)", - "output": "src/controller/python/chip/clusters/CHIPClusters.cpp" - }, { "path": "python-CHIPClusters-py.zapt", "name": "CHIP ZCL API for Python", diff --git a/src/controller/python/test/test_scripts/base.py b/src/controller/python/test/test_scripts/base.py index 076c6427e061a3..b8e13681b03e95 100644 --- a/src/controller/python/test/test_scripts/base.py +++ b/src/controller/python/test/test_scripts/base.py @@ -16,6 +16,7 @@ # from dataclasses import dataclass +from inspect import Attribute from typing import Any import typing from chip import ChipDeviceCtrl @@ -315,23 +316,20 @@ class AttributeWriteRequest: return True def TestSubscription(self, nodeid: int, endpoint: int): - class _subscriptionHandler(IM.OnSubscriptionReport): - def __init__(self, path: IM.AttributePath, logger: logging.Logger): - super(_subscriptionHandler, self).__init__() - self.subscriptionReceived = 0 - self.path = path - self.countLock = threading.Lock() - self.cv = threading.Condition(self.countLock) - self.logger = logger - - def OnData(self, path: IM.AttributePath, subscriptionId: int, data: typing.Any) -> None: - if path != self.path: - return - logger.info( - f"Received report from server: path: {path}, value: {data}, subscriptionId: {subscriptionId}") - with self.countLock: - self.subscriptionReceived += 1 - self.cv.notify_all() + desiredPath = None + receivedUpdate = 0 + updateLock = threading.Lock() + updateCv = threading.Condition(updateLock) + + def OnValueChange(path: Clusters.Attribute.AttributePath, data: typing.Any) -> None: + nonlocal desiredPath, updateCv, updateLock, receivedUpdate + if path != desiredPath: + return + logger.info( + f"Received report from server: path: {path}, value: {data}") + with updateLock: + receivedUpdate += 1 + updateCv.notify_all() class _conductAttributeChange(threading.Thread): def __init__(self, devCtrl: ChipDeviceCtrl.ChipDeviceController, nodeid: int, endpoint: int): @@ -347,24 +345,22 @@ def run(self): "OnOff", "Toggle", self.nodeid, self.endpoint, 0, {}) try: - subscribedPath = IM.AttributePath( - nodeId=nodeid, endpointId=endpoint, clusterId=6, attributeId=0) + desiredPath = Clusters.Attribute.AttributePath( + EndpointId=1, ClusterId=6, AttributeId=0) # OnOff Cluster, OnOff Attribute - handler = _subscriptionHandler(subscribedPath, self.logger) - IM.SetAttributeReportCallback(subscribedPath, handler) - self.devCtrl.ZCLSubscribeAttribute( + subscription = self.devCtrl.ZCLSubscribeAttribute( "OnOff", "OnOff", nodeid, endpoint, 1, 10) + subscription.SetAttributeUpdateCallback(OnValueChange) changeThread = _conductAttributeChange( self.devCtrl, nodeid, endpoint) # Reset the number of subscriptions received as subscribing causes a callback. - handler.subscriptionReceived = 0 changeThread.start() - with handler.cv: - while handler.subscriptionReceived < 5: + with updateCv: + while receivedUpdate < 5: # We should observe 5 attribute changes # The changing thread will change the value after 3 seconds. If we're waiting more than 10, assume something # is really wrong and bail out here with some information. - if not handler.cv.wait(10.0): + if not updateCv.wait(10.0): self.logger.error( f"Failed to receive subscription update") break @@ -375,7 +371,7 @@ def run(self): # Thread join timed out self.logger.error(f"Failed to join change thread") return False - return True if handler.subscriptionReceived == 5 else False + return True if receivedUpdate == 5 else False except Exception as ex: self.logger.exception(f"Failed to finish API test: {ex}") diff --git a/src/controller/python/test/test_scripts/cluster_objects.py b/src/controller/python/test/test_scripts/cluster_objects.py index c1d1f584bea585..850fdb41632014 100644 --- a/src/controller/python/test/test_scripts/cluster_objects.py +++ b/src/controller/python/test/test_scripts/cluster_objects.py @@ -20,6 +20,7 @@ import logging from chip.clusters.Attribute import AttributePath, AttributeReadResult, AttributeStatus import chip.interaction_model +import asyncio logger = logging.getLogger('PythonMatterControllerTEST') logger.setLevel(logging.INFO) @@ -95,6 +96,28 @@ async def SendWriteRequest(cls, devCtrl): f"Item {i} is not expected, expect {expectedRes[i]} got {res[i]}") raise AssertionError("Read returned unexpected result.") + @classmethod + async def TestSubscribeAttribute(cls, devCtrl): + logger.info("Test Subscription") + sub = await devCtrl.ReadAttribute(nodeid=NODE_ID, attributes=[(1, Clusters.OnOff.Attributes.OnOff)], reportInterval=(3, 10)) + updated = False + + def subUpdate(path, value): + nonlocal updated + logger.info( + f"Received attribute update path {path}, New value {value}") + updated = True + sub.SetAttributeUpdateCallback(subUpdate) + req = Clusters.OnOff.Commands.On() + await devCtrl.SendCommand(nodeid=NODE_ID, endpoint=1, payload=req) + await asyncio.sleep(5) + req = Clusters.OnOff.Commands.Off() + await devCtrl.SendCommand(nodeid=NODE_ID, endpoint=1, payload=req) + await asyncio.sleep(5) + + if not updated: + raise AssertionError("Did not receive updated attribute") + @classmethod async def TestReadRequests(cls, devCtrl): ''' @@ -155,6 +178,7 @@ async def RunTest(cls, devCtrl): await cls.SendCommandWithResponse(devCtrl) await cls.SendWriteRequest(devCtrl) await cls.TestReadRequests(devCtrl) + await cls.TestSubscribeAttribute(devCtrl) except Exception as ex: logger.error( f"Unexpected error occurred when running tests: {ex}") From 489de972a8d51cb2a1ca8d62a50efb0ef5929bed Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Mon, 29 Nov 2021 16:19:25 -0500 Subject: [PATCH 09/42] Allow piecemeal migration from EmberAf non-enum-class enums to cluster-objects enum classes (#11900) * Enable us to migrate enums to enum class one by one. Introduces an explicit list of spec enums that are generated as not enum class. We can then drive this list down to 0. * Only generate untyped enums for enums we are already using. * Fix darwin tests to work with the new enum classes. * Fix Android codegen to work with the new enum classes. --- .../templates/app/cluster-objects.zapt | 4 + .../zap-templates/templates/app/enums.zapt | 2 + src/app/zap-templates/templates/app/helper.js | 82 ++ .../java/templates/CHIPReadCallbacks-src.zapt | 8 +- .../java/templates/partials/decode_value.zapt | 2 +- .../zap-generated/CHIPInvokeCallbacks.cpp | 150 +-- .../java/zap-generated/CHIPReadCallbacks.cpp | 26 +- .../templates/CHIPCallbackBridge-src.zapt | 2 + .../CHIP/templates/partials/decode_value.zapt | 20 +- .../CHIP/zap-generated/CHIPCallbackBridge.mm | 102 +- src/lib/support/JniReferences.h | 12 +- .../zap-generated/cluster-objects.h | 330 ++----- .../app-common/zap-generated/enums.h | 873 ------------------ 13 files changed, 312 insertions(+), 1301 deletions(-) diff --git a/src/app/zap-templates/templates/app/cluster-objects.zapt b/src/app/zap-templates/templates/app/cluster-objects.zapt index cff202f6144324..247b4e6b49407a 100644 --- a/src/app/zap-templates/templates/app/cluster-objects.zapt +++ b/src/app/zap-templates/templates/app/cluster-objects.zapt @@ -23,18 +23,22 @@ namespace Clusters { {{#zcl_clusters}} namespace {{asUpperCamelCase name}} { {{#zcl_enums}} +{{#if (isWeaklyTypedEnum label)}} // Need to convert consumers to using the new enum classes, so we // don't just have casts all over. #ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM +{{/if}} // Enum for {{label}} enum class {{asType label}} : {{asUnderlyingZclType type}} { {{#zcl_enum_items}} k{{asUpperCamelCase label}} = {{asHex value 2}}, {{/zcl_enum_items}} }; +{{#if (isWeaklyTypedEnum label)}} #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM using {{asType label}} = EmberAf{{asType label}}; #endif +{{/if}} {{/zcl_enums}} {{#zcl_bitmaps}} diff --git a/src/app/zap-templates/templates/app/enums.zapt b/src/app/zap-templates/templates/app/enums.zapt index b301702dee68c1..9046d6c9f7c425 100644 --- a/src/app/zap-templates/templates/app/enums.zapt +++ b/src/app/zap-templates/templates/app/enums.zapt @@ -10,6 +10,7 @@ {{#zcl_enums}} {{#unless (isStrEqual label "Status")}} {{#unless (isStrEqual label "ReportingDirection")}} +{{#if (isWeaklyTypedEnum label)}} // Enum for {{label}} enum EmberAf{{asType label}} : {{asUnderlyingZclType type}} { @@ -17,6 +18,7 @@ enum EmberAf{{asType label}} : {{asUnderlyingZclType type}} { {{ident}}EMBER_ZCL_{{asDelimitedMacro parent.label}}_{{asDelimitedMacro label}} = {{value}}, {{/zcl_enum_items}} }; +{{/if}} {{/unless}} {{/unless}} {{/zcl_enums}} diff --git a/src/app/zap-templates/templates/app/helper.js b/src/app/zap-templates/templates/app/helper.js index 838481f9ce437f..795eb0dbd3ae74 100644 --- a/src/app/zap-templates/templates/app/helper.js +++ b/src/app/zap-templates/templates/app/helper.js @@ -511,6 +511,87 @@ async function getResponseCommandName(responseRef, options) return queryCommand.selectCommandById(db, responseRef, pkgId).then(response => asUpperCamelCase(response.name)); } +// Allow-list of enums that we generate as enums, not enum classes. The goal is +// to drive this down to 0. +function isWeaklyTypedEnum(label) +{ + return [ + "ApplicationBasicStatus", + "ApplicationLauncherStatus", + "AttributeWritePermission", + "AudioOutputType", + "BarrierControlBarrierPosition", + "BarrierControlMovingState", + "BootReasonType", + "ChangeReasonEnum", + "ColorControlOptions", + "ColorLoopAction", + "ColorLoopDirection", + "ColorMode", + "ContentLaunchStatus", + "ContentLaunchStreamingType", + "DoorLockEventSource", + "DoorLockEventType", + "DoorLockOperatingMode", + "DoorLockOperationEventCode", + "DoorLockProgrammingEventCode", + "DoorLockState", + "DoorLockUserStatus", + "DoorLockUserType", + "DoorState", + "EnhancedColorMode", + "HardwareFaultType", + "HueDirection", + "HueMoveMode", + "HueStepMode", + "IasEnrollResponseCode", + "IasZoneState", + "IasZoneType", + "IdentifyEffectIdentifier", + "IdentifyEffectVariant", + "IdentifyIdentifyType", + "InterfaceType", + "KeypadInputCecKeyCode", + "KeypadInputStatus", + "KeypadLockout", + "LevelControlOptions", + "MediaInputType", + "MediaPlaybackState", + "MediaPlaybackStatus", + "MoveMode", + "NetworkCommissioningError", + "NetworkFaultType", + "NodeOperationalCertStatus", + "OTAAnnouncementReason", + "OTAApplyUpdateAction", + "OTADownloadProtocol", + "OTAQueryStatus", + "OnOffDelayedAllOffEffectVariant", + "OnOffDyingLightEffectVariant", + "OnOffEffectIdentifier", + "PHYRateType", + "RadioFaultType", + "RoutingRole", + "RegulatoryLocationType", + "SaturationMoveMode", + "SaturationStepMode", + "SecurityType", + "SetpointAdjustMode", + "SimpleEnum", + "StartUpOnOffValue", + "StatusCode", + "StepMode", + "TemperatureDisplayMode", + "ThermostatControlSequence", + "ThermostatRunningMode", + "ThermostatSystemMode", + "UpdateStateEnum", + "WcEndProductType", + "WcType", + "WiFiVersionType", + ].includes(label); +} + // // Module exports // @@ -527,3 +608,4 @@ exports.zapTypeToEncodableClusterObjectType = zapTypeToEncodableClusterObjectTyp exports.zapTypeToDecodableClusterObjectType = zapTypeToDecodableClusterObjectType; exports.zapTypeToPythonClusterObjectType = zapTypeToPythonClusterObjectType; exports.getResponseCommandName = getResponseCommandName; +exports.isWeaklyTypedEnum = isWeaklyTypedEnum; diff --git a/src/controller/java/templates/CHIPReadCallbacks-src.zapt b/src/controller/java/templates/CHIPReadCallbacks-src.zapt index 0f6542458d3667..b09192eb9b47a6 100644 --- a/src/controller/java/templates/CHIPReadCallbacks-src.zapt +++ b/src/controller/java/templates/CHIPReadCallbacks-src.zapt @@ -181,7 +181,7 @@ void CHIP{{asUpperCamelCase parent.name}}{{asUpperCamelCase name}}AttributeCallb {{/if}} {{#if isOptional}} - {{chipType}} {{asLowerCamelCase name}}Value; + {{zapTypeToDecodableClusterObjectType type forceNotOptional=true forceNotNullable=true ns=parent.parent.name}} {{asLowerCamelCase name}}Value; {{#if isNullable}} {{asLowerCamelCase name}}HasValue = entry.{{asLowerCamelCase name}}.HasValue(); if ({{asLowerCamelCase name}}HasValue) { @@ -201,7 +201,7 @@ void CHIP{{asUpperCamelCase parent.name}}{{asUpperCamelCase name}}AttributeCallb {{#unless isOptional}} {{#unless isNullable}} - {{chipType}} {{asLowerCamelCase name}}Value = entry.{{asLowerCamelCase name}}; + {{zapTypeToDecodableClusterObjectType type ns=parent.parent.name}} {{asLowerCamelCase name}}Value = entry.{{asLowerCamelCase name}}; {{/unless}} {{/unless}} @@ -265,13 +265,13 @@ void CHIP{{asUpperCamelCase parent.name}}{{asUpperCamelCase name}}AttributeCallb bool entryNull = false; {{#unless isStruct}} {{#if isNullable}} - {{chipType}} entryValue; + {{zapTypeToDecodableClusterObjectType type ns=parent.name forceNotList=true}} entryValue; entryNull = entry.IsNull(); if (!entryNull) { entryValue = entry.Value(); } {{else}} - {{chipType}} entryValue = entry; + {{zapTypeToDecodableClusterObjectType type ns=parent.name forceNotList=true}} entryValue = entry; {{/if}} {{/unless}} diff --git a/src/controller/java/templates/partials/decode_value.zapt b/src/controller/java/templates/partials/decode_value.zapt index 2f54f13450b58f..dbb89f2b03ad23 100644 --- a/src/controller/java/templates/partials/decode_value.zapt +++ b/src/controller/java/templates/partials/decode_value.zapt @@ -22,7 +22,7 @@ if ({{source}}.Value().IsNull()) { {{else}} std::string {{target}}ClassName = "java/lang/{{asJavaBasicTypeForZclType type true}}"; std::string {{target}}CtorSignature = "({{asJniSignature type false}})V"; -chip::JniReferences::GetInstance().CreateBoxedObject<{{chipType}}>({{target}}ClassName.c_str(), {{target}}CtorSignature.c_str(), {{>item}}, {{target}}); +chip::JniReferences::GetInstance().CreateBoxedObject<{{zapTypeToDecodableClusterObjectType type ns=parent.parent.name forceNotNullable=true forceNotOptional=true}}>({{target}}ClassName.c_str(), {{target}}CtorSignature.c_str(), {{>item}}, {{target}}); {{/if}} {{#if isOptional}} chip::JniReferences::GetInstance().CreateOptional({{target}}, {{target}}); diff --git a/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp b/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp index dec9e05de1f730..9ddca31bdd1c13 100644 --- a/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp @@ -145,8 +145,8 @@ void CHIPApplicationLauncherClusterLaunchAppResponseCallback::CallbackFn( std::string statusClassName = "java/lang/Integer"; std::string statusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(statusClassName.c_str(), statusCtorSignature.c_str(), - dataResponse.status, status); + chip::JniReferences::GetInstance().CreateBoxedObject( + statusClassName.c_str(), statusCtorSignature.c_str(), dataResponse.status, status); jobject data; data = chip::UtfString(env, dataResponse.data).jniValue(); @@ -214,9 +214,9 @@ void CHIPContentLauncherClusterLaunchContentResponseCallback::CallbackFn( std::string contentLaunchStatusClassName = "java/lang/Integer"; std::string contentLaunchStatusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(contentLaunchStatusClassName.c_str(), - contentLaunchStatusCtorSignature.c_str(), - dataResponse.contentLaunchStatus, contentLaunchStatus); + chip::JniReferences::GetInstance().CreateBoxedObject( + contentLaunchStatusClassName.c_str(), contentLaunchStatusCtorSignature.c_str(), dataResponse.contentLaunchStatus, + contentLaunchStatus); env->CallVoidMethod(javaCallbackRef, javaMethod, data, contentLaunchStatus); } @@ -280,9 +280,9 @@ void CHIPContentLauncherClusterLaunchURLResponseCallback::CallbackFn( std::string contentLaunchStatusClassName = "java/lang/Integer"; std::string contentLaunchStatusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(contentLaunchStatusClassName.c_str(), - contentLaunchStatusCtorSignature.c_str(), - dataResponse.contentLaunchStatus, contentLaunchStatus); + chip::JniReferences::GetInstance().CreateBoxedObject( + contentLaunchStatusClassName.c_str(), contentLaunchStatusCtorSignature.c_str(), dataResponse.contentLaunchStatus, + contentLaunchStatus); env->CallVoidMethod(javaCallbackRef, javaMethod, data, contentLaunchStatus); } @@ -343,8 +343,8 @@ void CHIPDiagnosticLogsClusterRetrieveLogsResponseCallback::CallbackFn( std::string statusClassName = "java/lang/Integer"; std::string statusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(statusClassName.c_str(), statusCtorSignature.c_str(), - dataResponse.status, status); + chip::JniReferences::GetInstance().CreateBoxedObject( + statusClassName.c_str(), statusCtorSignature.c_str(), dataResponse.status, status); jobject content; content = chip::ByteArray(env, dataResponse.content).jniValue(); @@ -1036,14 +1036,14 @@ void CHIPDoorLockClusterGetPinResponseCallback::CallbackFn( std::string userStatusClassName = "java/lang/Integer"; std::string userStatusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(userStatusClassName.c_str(), userStatusCtorSignature.c_str(), - dataResponse.userStatus, userStatus); + chip::JniReferences::GetInstance().CreateBoxedObject( + userStatusClassName.c_str(), userStatusCtorSignature.c_str(), dataResponse.userStatus, userStatus); jobject userType; std::string userTypeClassName = "java/lang/Integer"; std::string userTypeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(userTypeClassName.c_str(), userTypeCtorSignature.c_str(), - dataResponse.userType, userType); + chip::JniReferences::GetInstance().CreateBoxedObject( + userTypeClassName.c_str(), userTypeCtorSignature.c_str(), dataResponse.userType, userType); jobject pin; pin = chip::ByteArray(env, dataResponse.pin).jniValue(); @@ -1112,14 +1112,14 @@ void CHIPDoorLockClusterGetRfidResponseCallback::CallbackFn( std::string userStatusClassName = "java/lang/Integer"; std::string userStatusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(userStatusClassName.c_str(), userStatusCtorSignature.c_str(), - dataResponse.userStatus, userStatus); + chip::JniReferences::GetInstance().CreateBoxedObject( + userStatusClassName.c_str(), userStatusCtorSignature.c_str(), dataResponse.userStatus, userStatus); jobject userType; std::string userTypeClassName = "java/lang/Integer"; std::string userTypeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(userTypeClassName.c_str(), userTypeCtorSignature.c_str(), - dataResponse.userType, userType); + chip::JniReferences::GetInstance().CreateBoxedObject( + userTypeClassName.c_str(), userTypeCtorSignature.c_str(), dataResponse.userType, userType); jobject rfid; rfid = chip::ByteArray(env, dataResponse.rfid).jniValue(); @@ -1188,8 +1188,8 @@ void CHIPDoorLockClusterGetUserTypeResponseCallback::CallbackFn( std::string userTypeClassName = "java/lang/Integer"; std::string userTypeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(userTypeClassName.c_str(), userTypeCtorSignature.c_str(), - dataResponse.userType, userType); + chip::JniReferences::GetInstance().CreateBoxedObject( + userTypeClassName.c_str(), userTypeCtorSignature.c_str(), dataResponse.userType, userType); env->CallVoidMethod(javaCallbackRef, javaMethod, userId, userType); } @@ -1564,8 +1564,8 @@ void CHIPDoorLockClusterSetPinResponseCallback::CallbackFn( std::string statusClassName = "java/lang/Integer"; std::string statusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(statusClassName.c_str(), statusCtorSignature.c_str(), - dataResponse.status, status); + chip::JniReferences::GetInstance().CreateBoxedObject( + statusClassName.c_str(), statusCtorSignature.c_str(), dataResponse.status, status); env->CallVoidMethod(javaCallbackRef, javaMethod, status); } @@ -1624,8 +1624,8 @@ void CHIPDoorLockClusterSetRfidResponseCallback::CallbackFn( std::string statusClassName = "java/lang/Integer"; std::string statusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(statusClassName.c_str(), statusCtorSignature.c_str(), - dataResponse.status, status); + chip::JniReferences::GetInstance().CreateBoxedObject( + statusClassName.c_str(), statusCtorSignature.c_str(), dataResponse.status, status); env->CallVoidMethod(javaCallbackRef, javaMethod, status); } @@ -1990,8 +1990,8 @@ void CHIPGeneralCommissioningClusterArmFailSafeResponseCallback::CallbackFn( std::string errorCodeClassName = "java/lang/Integer"; std::string errorCodeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(errorCodeClassName.c_str(), errorCodeCtorSignature.c_str(), - dataResponse.errorCode, errorCode); + chip::JniReferences::GetInstance().CreateBoxedObject( + errorCodeClassName.c_str(), errorCodeCtorSignature.c_str(), dataResponse.errorCode, errorCode); jobject debugText; debugText = chip::UtfString(env, dataResponse.debugText).jniValue(); @@ -2058,8 +2058,8 @@ void CHIPGeneralCommissioningClusterCommissioningCompleteResponseCallback::Callb std::string errorCodeClassName = "java/lang/Integer"; std::string errorCodeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(errorCodeClassName.c_str(), errorCodeCtorSignature.c_str(), - dataResponse.errorCode, errorCode); + chip::JniReferences::GetInstance().CreateBoxedObject( + errorCodeClassName.c_str(), errorCodeCtorSignature.c_str(), dataResponse.errorCode, errorCode); jobject debugText; debugText = chip::UtfString(env, dataResponse.debugText).jniValue(); @@ -2126,8 +2126,8 @@ void CHIPGeneralCommissioningClusterSetRegulatoryConfigResponseCallback::Callbac std::string errorCodeClassName = "java/lang/Integer"; std::string errorCodeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(errorCodeClassName.c_str(), errorCodeCtorSignature.c_str(), - dataResponse.errorCode, errorCode); + chip::JniReferences::GetInstance().CreateBoxedObject( + errorCodeClassName.c_str(), errorCodeCtorSignature.c_str(), dataResponse.errorCode, errorCode); jobject debugText; debugText = chip::UtfString(env, dataResponse.debugText).jniValue(); @@ -2517,8 +2517,8 @@ void CHIPKeypadInputClusterSendKeyResponseCallback::CallbackFn( std::string statusClassName = "java/lang/Integer"; std::string statusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(statusClassName.c_str(), statusCtorSignature.c_str(), - dataResponse.status, status); + chip::JniReferences::GetInstance().CreateBoxedObject( + statusClassName.c_str(), statusCtorSignature.c_str(), dataResponse.status, status); env->CallVoidMethod(javaCallbackRef, javaMethod, status); } @@ -2579,9 +2579,9 @@ void CHIPMediaPlaybackClusterMediaFastForwardResponseCallback::CallbackFn( std::string mediaPlaybackStatusClassName = "java/lang/Integer"; std::string mediaPlaybackStatusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(mediaPlaybackStatusClassName.c_str(), - mediaPlaybackStatusCtorSignature.c_str(), - dataResponse.mediaPlaybackStatus, mediaPlaybackStatus); + chip::JniReferences::GetInstance().CreateBoxedObject( + mediaPlaybackStatusClassName.c_str(), mediaPlaybackStatusCtorSignature.c_str(), dataResponse.mediaPlaybackStatus, + mediaPlaybackStatus); env->CallVoidMethod(javaCallbackRef, javaMethod, mediaPlaybackStatus); } @@ -2641,9 +2641,9 @@ void CHIPMediaPlaybackClusterMediaNextResponseCallback::CallbackFn( std::string mediaPlaybackStatusClassName = "java/lang/Integer"; std::string mediaPlaybackStatusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(mediaPlaybackStatusClassName.c_str(), - mediaPlaybackStatusCtorSignature.c_str(), - dataResponse.mediaPlaybackStatus, mediaPlaybackStatus); + chip::JniReferences::GetInstance().CreateBoxedObject( + mediaPlaybackStatusClassName.c_str(), mediaPlaybackStatusCtorSignature.c_str(), dataResponse.mediaPlaybackStatus, + mediaPlaybackStatus); env->CallVoidMethod(javaCallbackRef, javaMethod, mediaPlaybackStatus); } @@ -2703,9 +2703,9 @@ void CHIPMediaPlaybackClusterMediaPauseResponseCallback::CallbackFn( std::string mediaPlaybackStatusClassName = "java/lang/Integer"; std::string mediaPlaybackStatusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(mediaPlaybackStatusClassName.c_str(), - mediaPlaybackStatusCtorSignature.c_str(), - dataResponse.mediaPlaybackStatus, mediaPlaybackStatus); + chip::JniReferences::GetInstance().CreateBoxedObject( + mediaPlaybackStatusClassName.c_str(), mediaPlaybackStatusCtorSignature.c_str(), dataResponse.mediaPlaybackStatus, + mediaPlaybackStatus); env->CallVoidMethod(javaCallbackRef, javaMethod, mediaPlaybackStatus); } @@ -2765,9 +2765,9 @@ void CHIPMediaPlaybackClusterMediaPlayResponseCallback::CallbackFn( std::string mediaPlaybackStatusClassName = "java/lang/Integer"; std::string mediaPlaybackStatusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(mediaPlaybackStatusClassName.c_str(), - mediaPlaybackStatusCtorSignature.c_str(), - dataResponse.mediaPlaybackStatus, mediaPlaybackStatus); + chip::JniReferences::GetInstance().CreateBoxedObject( + mediaPlaybackStatusClassName.c_str(), mediaPlaybackStatusCtorSignature.c_str(), dataResponse.mediaPlaybackStatus, + mediaPlaybackStatus); env->CallVoidMethod(javaCallbackRef, javaMethod, mediaPlaybackStatus); } @@ -2827,9 +2827,9 @@ void CHIPMediaPlaybackClusterMediaPreviousResponseCallback::CallbackFn( std::string mediaPlaybackStatusClassName = "java/lang/Integer"; std::string mediaPlaybackStatusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(mediaPlaybackStatusClassName.c_str(), - mediaPlaybackStatusCtorSignature.c_str(), - dataResponse.mediaPlaybackStatus, mediaPlaybackStatus); + chip::JniReferences::GetInstance().CreateBoxedObject( + mediaPlaybackStatusClassName.c_str(), mediaPlaybackStatusCtorSignature.c_str(), dataResponse.mediaPlaybackStatus, + mediaPlaybackStatus); env->CallVoidMethod(javaCallbackRef, javaMethod, mediaPlaybackStatus); } @@ -2889,9 +2889,9 @@ void CHIPMediaPlaybackClusterMediaRewindResponseCallback::CallbackFn( std::string mediaPlaybackStatusClassName = "java/lang/Integer"; std::string mediaPlaybackStatusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(mediaPlaybackStatusClassName.c_str(), - mediaPlaybackStatusCtorSignature.c_str(), - dataResponse.mediaPlaybackStatus, mediaPlaybackStatus); + chip::JniReferences::GetInstance().CreateBoxedObject( + mediaPlaybackStatusClassName.c_str(), mediaPlaybackStatusCtorSignature.c_str(), dataResponse.mediaPlaybackStatus, + mediaPlaybackStatus); env->CallVoidMethod(javaCallbackRef, javaMethod, mediaPlaybackStatus); } @@ -2951,9 +2951,9 @@ void CHIPMediaPlaybackClusterMediaSeekResponseCallback::CallbackFn( std::string mediaPlaybackStatusClassName = "java/lang/Integer"; std::string mediaPlaybackStatusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(mediaPlaybackStatusClassName.c_str(), - mediaPlaybackStatusCtorSignature.c_str(), - dataResponse.mediaPlaybackStatus, mediaPlaybackStatus); + chip::JniReferences::GetInstance().CreateBoxedObject( + mediaPlaybackStatusClassName.c_str(), mediaPlaybackStatusCtorSignature.c_str(), dataResponse.mediaPlaybackStatus, + mediaPlaybackStatus); env->CallVoidMethod(javaCallbackRef, javaMethod, mediaPlaybackStatus); } @@ -3014,9 +3014,9 @@ void CHIPMediaPlaybackClusterMediaSkipBackwardResponseCallback::CallbackFn( std::string mediaPlaybackStatusClassName = "java/lang/Integer"; std::string mediaPlaybackStatusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(mediaPlaybackStatusClassName.c_str(), - mediaPlaybackStatusCtorSignature.c_str(), - dataResponse.mediaPlaybackStatus, mediaPlaybackStatus); + chip::JniReferences::GetInstance().CreateBoxedObject( + mediaPlaybackStatusClassName.c_str(), mediaPlaybackStatusCtorSignature.c_str(), dataResponse.mediaPlaybackStatus, + mediaPlaybackStatus); env->CallVoidMethod(javaCallbackRef, javaMethod, mediaPlaybackStatus); } @@ -3077,9 +3077,9 @@ void CHIPMediaPlaybackClusterMediaSkipForwardResponseCallback::CallbackFn( std::string mediaPlaybackStatusClassName = "java/lang/Integer"; std::string mediaPlaybackStatusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(mediaPlaybackStatusClassName.c_str(), - mediaPlaybackStatusCtorSignature.c_str(), - dataResponse.mediaPlaybackStatus, mediaPlaybackStatus); + chip::JniReferences::GetInstance().CreateBoxedObject( + mediaPlaybackStatusClassName.c_str(), mediaPlaybackStatusCtorSignature.c_str(), dataResponse.mediaPlaybackStatus, + mediaPlaybackStatus); env->CallVoidMethod(javaCallbackRef, javaMethod, mediaPlaybackStatus); } @@ -3140,9 +3140,9 @@ void CHIPMediaPlaybackClusterMediaStartOverResponseCallback::CallbackFn( std::string mediaPlaybackStatusClassName = "java/lang/Integer"; std::string mediaPlaybackStatusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(mediaPlaybackStatusClassName.c_str(), - mediaPlaybackStatusCtorSignature.c_str(), - dataResponse.mediaPlaybackStatus, mediaPlaybackStatus); + chip::JniReferences::GetInstance().CreateBoxedObject( + mediaPlaybackStatusClassName.c_str(), mediaPlaybackStatusCtorSignature.c_str(), dataResponse.mediaPlaybackStatus, + mediaPlaybackStatus); env->CallVoidMethod(javaCallbackRef, javaMethod, mediaPlaybackStatus); } @@ -3202,9 +3202,9 @@ void CHIPMediaPlaybackClusterMediaStopResponseCallback::CallbackFn( std::string mediaPlaybackStatusClassName = "java/lang/Integer"; std::string mediaPlaybackStatusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(mediaPlaybackStatusClassName.c_str(), - mediaPlaybackStatusCtorSignature.c_str(), - dataResponse.mediaPlaybackStatus, mediaPlaybackStatus); + chip::JniReferences::GetInstance().CreateBoxedObject( + mediaPlaybackStatusClassName.c_str(), mediaPlaybackStatusCtorSignature.c_str(), dataResponse.mediaPlaybackStatus, + mediaPlaybackStatus); env->CallVoidMethod(javaCallbackRef, javaMethod, mediaPlaybackStatus); } @@ -3806,8 +3806,8 @@ void CHIPOtaSoftwareUpdateProviderClusterApplyUpdateResponseCallback::CallbackFn std::string actionClassName = "java/lang/Integer"; std::string actionCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(actionClassName.c_str(), actionCtorSignature.c_str(), - dataResponse.action, action); + chip::JniReferences::GetInstance().CreateBoxedObject( + actionClassName.c_str(), actionCtorSignature.c_str(), dataResponse.action, action); jobject delayedActionTime; std::string delayedActionTimeClassName = "java/lang/Long"; @@ -3880,8 +3880,8 @@ void CHIPOtaSoftwareUpdateProviderClusterQueryImageResponseCallback::CallbackFn( std::string statusClassName = "java/lang/Integer"; std::string statusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(statusClassName.c_str(), statusCtorSignature.c_str(), - dataResponse.status, status); + chip::JniReferences::GetInstance().CreateBoxedObject( + statusClassName.c_str(), statusCtorSignature.c_str(), dataResponse.status, status); jobject delayedActionTime; if (!dataResponse.delayedActionTime.HasValue()) { @@ -4746,8 +4746,8 @@ void CHIPTvChannelClusterChangeChannelResponseCallback::CallbackFn( std::string ErrorTypeClassName = "java/lang/Integer"; std::string ErrorTypeCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(ErrorTypeClassName.c_str(), ErrorTypeCtorSignature.c_str(), - dataResponse.errorType, ErrorType); + chip::JniReferences::GetInstance().CreateBoxedObject( + ErrorTypeClassName.c_str(), ErrorTypeCtorSignature.c_str(), dataResponse.errorType, ErrorType); env->CallVoidMethod(javaCallbackRef, javaMethod, ChannelMatch, ErrorType); } @@ -4809,8 +4809,8 @@ void CHIPTargetNavigatorClusterNavigateTargetResponseCallback::CallbackFn( std::string statusClassName = "java/lang/Integer"; std::string statusCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(statusClassName.c_str(), statusCtorSignature.c_str(), - dataResponse.status, status); + chip::JniReferences::GetInstance().CreateBoxedObject( + statusClassName.c_str(), statusCtorSignature.c_str(), dataResponse.status, status); jobject data; data = chip::UtfString(env, dataResponse.data).jniValue(); @@ -5059,8 +5059,8 @@ void CHIPTestClusterClusterTestEnumsResponseCallback::CallbackFn( std::string arg2ClassName = "java/lang/Integer"; std::string arg2CtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(arg2ClassName.c_str(), arg2CtorSignature.c_str(), - dataResponse.arg2, arg2); + chip::JniReferences::GetInstance().CreateBoxedObject( + arg2ClassName.c_str(), arg2CtorSignature.c_str(), dataResponse.arg2, arg2); env->CallVoidMethod(javaCallbackRef, javaMethod, arg1, arg2); } diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp index 5d63c7f38b3c39..91224b9f9a213f 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp @@ -762,7 +762,7 @@ void CHIPAudioOutputAudioOutputListAttributeCallback::CallbackFn( bool outputTypeNull = false; bool outputTypeHasValue = true; - uint8_t outputTypeValue = entry.outputType; + chip::app::Clusters::AudioOutput::AudioOutputType outputTypeValue = entry.outputType; jobject outputType = nullptr; if (!outputTypeNull && outputTypeHasValue) @@ -908,7 +908,7 @@ void CHIPBridgedActionsActionListAttributeCallback::CallbackFn( bool typeNull = false; bool typeHasValue = true; - uint8_t typeValue = entry.type; + chip::app::Clusters::BridgedActions::ActionTypeEnum typeValue = entry.type; jobject type = nullptr; if (!typeNull && typeHasValue) @@ -953,7 +953,7 @@ void CHIPBridgedActionsActionListAttributeCallback::CallbackFn( bool statusNull = false; bool statusHasValue = true; - uint8_t statusValue = entry.status; + chip::app::Clusters::BridgedActions::ActionStatusEnum statusValue = entry.status; jobject status = nullptr; if (!statusNull && statusHasValue) @@ -1089,7 +1089,7 @@ void CHIPBridgedActionsEndpointListAttributeCallback::CallbackFn( bool typeNull = false; bool typeHasValue = true; - uint8_t typeValue = entry.type; + chip::app::Clusters::BridgedActions::EndpointListTypeEnum typeValue = entry.type; jobject type = nullptr; if (!typeNull && typeHasValue) @@ -1267,9 +1267,9 @@ void CHIPContentLauncherSupportedStreamingTypesAttributeCallback::CallbackFn( auto iter = list.begin(); while (iter.Next()) { - auto & entry = iter.GetValue(); - bool entryNull = false; - uint8_t entryValue = entry; + auto & entry = iter.GetValue(); + bool entryNull = false; + chip::app::Clusters::ContentLauncher::ContentLaunchStreamingType entryValue = entry; jobject entryObject = nullptr; if (!entryNull) @@ -2058,7 +2058,7 @@ void CHIPGeneralDiagnosticsNetworkInterfacesAttributeCallback::CallbackFn( bool typeNull = false; bool typeHasValue = true; - uint8_t typeValue = entry.type; + chip::app::Clusters::GeneralDiagnostics::InterfaceType typeValue = entry.type; jobject type = nullptr; if (!typeNull && typeHasValue) @@ -2631,7 +2631,7 @@ void CHIPGroupKeyManagementGroupKeysAttributeCallback::CallbackFn( bool groupKeySecurityPolicyNull = false; bool groupKeySecurityPolicyHasValue = true; - uint8_t groupKeySecurityPolicyValue = entry.groupKeySecurityPolicy; + chip::app::Clusters::GroupKeyManagement::GroupKeySecurityPolicy groupKeySecurityPolicyValue = entry.groupKeySecurityPolicy; jobject groupKeySecurityPolicy = nullptr; if (!groupKeySecurityPolicyNull && groupKeySecurityPolicyHasValue) @@ -2997,7 +2997,7 @@ void CHIPMediaInputMediaInputListAttributeCallback::CallbackFn( bool inputTypeNull = false; bool inputTypeHasValue = true; - uint8_t inputTypeValue = entry.inputType; + chip::app::Clusters::MediaInput::MediaInputType inputTypeValue = entry.inputType; jobject inputType = nullptr; if (!inputTypeNull && inputTypeHasValue) @@ -6694,9 +6694,9 @@ void CHIPThreadNetworkDiagnosticsActiveNetworkFaultsListAttributeCallback::Callb auto iter = list.begin(); while (iter.Next()) { - auto & entry = iter.GetValue(); - bool entryNull = false; - uint8_t entryValue = entry; + auto & entry = iter.GetValue(); + bool entryNull = false; + chip::app::Clusters::ThreadNetworkDiagnostics::NetworkFault entryValue = entry; jobject entryObject = nullptr; if (!entryNull) diff --git a/src/darwin/Framework/CHIP/templates/CHIPCallbackBridge-src.zapt b/src/darwin/Framework/CHIP/templates/CHIPCallbackBridge-src.zapt index a4580e134c94b4..25db00bf195547 100644 --- a/src/darwin/Framework/CHIP/templates/CHIPCallbackBridge-src.zapt +++ b/src/darwin/Framework/CHIP/templates/CHIPCallbackBridge-src.zapt @@ -5,6 +5,8 @@ #import "CHIPStructsObjc.h" #import "CHIPCommandPayloadsObjc.h" +#include + {{#>CHIPCallbackBridge partial-type="Status" }}DefaultSuccessCallback{{/CHIPCallbackBridge}} {{#>CHIPCallbackBridge partial-type="CommandStatus" }}CommandSuccessCallback{{/CHIPCallbackBridge}} {{#>CHIPCallbackBridge type="Octet_String" isNullable=false ns="chip"}}OctetStringAttributeCallback{{/CHIPCallbackBridge}} diff --git a/src/darwin/Framework/CHIP/templates/partials/decode_value.zapt b/src/darwin/Framework/CHIP/templates/partials/decode_value.zapt index be60b0d8737870..5ef8dcbcf25de1 100644 --- a/src/darwin/Framework/CHIP/templates/partials/decode_value.zapt +++ b/src/darwin/Framework/CHIP/templates/partials/decode_value.zapt @@ -30,14 +30,18 @@ {{>decode_value target=(concat ../target "." (asStructPropertyName label)) source=(concat ../source "." (asLowerCamelCase label)) cluster=../cluster errorCode=errorCode depth=(incrementDepth depth) }} {{/zcl_struct_items_by_struct_name}} {{else}} - {{#if_is_bitmap type}} - {{target}} = [NSNumber numberWith{{asObjectiveCNumberType "" type false}}:{{source}}.Raw()]; - {{else if (isOctetString type)}} - {{target}} = [NSData dataWithBytes:{{source}}.data() length:{{source}}.size()]; - {{else if (isCharString type)}} - {{target}} = [[NSString alloc] initWithBytes:{{source}}.data() length:{{source}}.size() encoding:NSUTF8StringEncoding]; + {{#if_chip_enum type}} + {{target}} = [NSNumber numberWith{{asObjectiveCNumberType "" type false}}:chip::to_underlying({{source}})]; {{else}} - {{target}} = [NSNumber numberWith{{asObjectiveCNumberType "" type false}}:{{source}}]; - {{/if_is_bitmap}} + {{#if_is_bitmap type}} + {{target}} = [NSNumber numberWith{{asObjectiveCNumberType "" type false}}:{{source}}.Raw()]; + {{else if (isOctetString type)}} + {{target}} = [NSData dataWithBytes:{{source}}.data() length:{{source}}.size()]; + {{else if (isCharString type)}} + {{target}} = [[NSString alloc] initWithBytes:{{source}}.data() length:{{source}}.size() encoding:NSUTF8StringEncoding]; + {{else}} + {{target}} = [NSNumber numberWith{{asObjectiveCNumberType "" type false}}:{{source}}]; + {{/if_is_bitmap}} + {{/if_chip_enum}} {{/if_is_struct}} {{/if}} diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm index 038c2b7e6c0f8c..72fa02c1f9f079 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm @@ -21,6 +21,8 @@ #import "CHIPCommandPayloadsObjc.h" #import "CHIPStructsObjc.h" +#include + void CHIPDefaultSuccessCallbackBridge::OnSuccessFn(void * context) { DispatchSuccess(context, nil); }; void CHIPCommandSuccessCallbackBridge::OnSuccessFn(void * context, const chip::app::DataModel::NullObjectType &) @@ -231,7 +233,7 @@ void CHIPVendorIdAttributeCallbackBridge::OnSuccessFn(void * context, chip::VendorId value) { NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedShort:value]; + objCValue = [NSNumber numberWithUnsignedShort:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; @@ -242,7 +244,7 @@ if (value.IsNull()) { objCValue = nil; } else { - objCValue = [NSNumber numberWithUnsignedShort:value.Value()]; + objCValue = [NSNumber numberWithUnsignedShort:chip::to_underlying(value.Value())]; } DispatchSuccess(context, objCValue); }; @@ -278,7 +280,7 @@ CHIPAudioOutputClusterAudioOutputInfo * newElement_0; newElement_0 = [CHIPAudioOutputClusterAudioOutputInfo new]; newElement_0.index = [NSNumber numberWithUnsignedChar:entry_0.index]; - newElement_0.outputType = [NSNumber numberWithUnsignedChar:entry_0.outputType]; + newElement_0.outputType = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.outputType)]; newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.data() length:entry_0.name.size() encoding:NSUTF8StringEncoding]; @@ -306,10 +308,10 @@ newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.data() length:entry_0.name.size() encoding:NSUTF8StringEncoding]; - newElement_0.type = [NSNumber numberWithUnsignedChar:entry_0.type]; + newElement_0.type = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.type)]; newElement_0.endpointListID = [NSNumber numberWithUnsignedShort:entry_0.endpointListID]; newElement_0.supportedCommands = [NSNumber numberWithUnsignedShort:entry_0.supportedCommands]; - newElement_0.status = [NSNumber numberWithUnsignedChar:entry_0.status]; + newElement_0.status = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.status)]; [array_0 addObject:newElement_0]; } if (iter_0.GetStatus() != CHIP_NO_ERROR) { @@ -335,7 +337,7 @@ newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.data() length:entry_0.name.size() encoding:NSUTF8StringEncoding]; - newElement_0.type = [NSNumber numberWithUnsignedChar:entry_0.type]; + newElement_0.type = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.type)]; auto * array_NaN = [NSMutableArray new]; auto iter_NaN = entry_0.endpoints.begin(); while (iter_NaN.Next()) { @@ -386,7 +388,7 @@ while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedChar:entry_0]; + newElement_0 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0)]; [array_0 addObject:newElement_0]; } if (iter_0.GetStatus() != CHIP_NO_ERROR) { @@ -545,7 +547,7 @@ newElement_0.offPremiseServicesReachableIPv4 = [NSNumber numberWithBool:entry_0.offPremiseServicesReachableIPv4]; newElement_0.offPremiseServicesReachableIPv6 = [NSNumber numberWithBool:entry_0.offPremiseServicesReachableIPv6]; newElement_0.hardwareAddress = [NSData dataWithBytes:entry_0.hardwareAddress.data() length:entry_0.hardwareAddress.size()]; - newElement_0.type = [NSNumber numberWithUnsignedChar:entry_0.type]; + newElement_0.type = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.type)]; [array_0 addObject:newElement_0]; } if (iter_0.GetStatus() != CHIP_NO_ERROR) { @@ -653,7 +655,7 @@ newElement_0.groupKeyIndex = [NSNumber numberWithUnsignedShort:entry_0.groupKeyIndex]; newElement_0.groupKeyRoot = [NSData dataWithBytes:entry_0.groupKeyRoot.data() length:entry_0.groupKeyRoot.size()]; newElement_0.groupKeyEpochStartTime = [NSNumber numberWithUnsignedLongLong:entry_0.groupKeyEpochStartTime]; - newElement_0.groupKeySecurityPolicy = [NSNumber numberWithUnsignedChar:entry_0.groupKeySecurityPolicy]; + newElement_0.groupKeySecurityPolicy = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.groupKeySecurityPolicy)]; [array_0 addObject:newElement_0]; } if (iter_0.GetStatus() != CHIP_NO_ERROR) { @@ -675,7 +677,7 @@ CHIPMediaInputClusterMediaInputInfo * newElement_0; newElement_0 = [CHIPMediaInputClusterMediaInputInfo new]; newElement_0.index = [NSNumber numberWithUnsignedChar:entry_0.index]; - newElement_0.inputType = [NSNumber numberWithUnsignedChar:entry_0.inputType]; + newElement_0.inputType = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.inputType)]; newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.data() length:entry_0.name.size() encoding:NSUTF8StringEncoding]; @@ -995,7 +997,7 @@ newElement_0.nullableStruct = [CHIPTestClusterClusterSimpleStruct new]; newElement_0.nullableStruct.a = [NSNumber numberWithUnsignedChar:entry_0.nullableStruct.Value().a]; newElement_0.nullableStruct.b = [NSNumber numberWithBool:entry_0.nullableStruct.Value().b]; - newElement_0.nullableStruct.c = [NSNumber numberWithUnsignedChar:entry_0.nullableStruct.Value().c]; + newElement_0.nullableStruct.c = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.nullableStruct.Value().c)]; newElement_0.nullableStruct.d = [NSData dataWithBytes:entry_0.nullableStruct.Value().d.data() length:entry_0.nullableStruct.Value().d.size()]; newElement_0.nullableStruct.e = [[NSString alloc] initWithBytes:entry_0.nullableStruct.Value().e.data() @@ -1009,7 +1011,7 @@ newElement_0.optionalStruct = [CHIPTestClusterClusterSimpleStruct new]; newElement_0.optionalStruct.a = [NSNumber numberWithUnsignedChar:entry_0.optionalStruct.Value().a]; newElement_0.optionalStruct.b = [NSNumber numberWithBool:entry_0.optionalStruct.Value().b]; - newElement_0.optionalStruct.c = [NSNumber numberWithUnsignedChar:entry_0.optionalStruct.Value().c]; + newElement_0.optionalStruct.c = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.optionalStruct.Value().c)]; newElement_0.optionalStruct.d = [NSData dataWithBytes:entry_0.optionalStruct.Value().d.data() length:entry_0.optionalStruct.Value().d.size()]; newElement_0.optionalStruct.e = [[NSString alloc] initWithBytes:entry_0.optionalStruct.Value().e.data() @@ -1030,7 +1032,7 @@ [NSNumber numberWithUnsignedChar:entry_0.nullableOptionalStruct.Value().Value().a]; newElement_0.nullableOptionalStruct.b = [NSNumber numberWithBool:entry_0.nullableOptionalStruct.Value().Value().b]; newElement_0.nullableOptionalStruct.c = - [NSNumber numberWithUnsignedChar:entry_0.nullableOptionalStruct.Value().Value().c]; + [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.nullableOptionalStruct.Value().Value().c)]; newElement_0.nullableOptionalStruct.d = [NSData dataWithBytes:entry_0.nullableOptionalStruct.Value().Value().d.data() length:entry_0.nullableOptionalStruct.Value().Value().d.size()]; @@ -1055,7 +1057,7 @@ while (iter_NaN.Next()) { auto & entry_NaN = iter_NaN.GetValue(); NSNumber * newElement_NaN; - newElement_NaN = [NSNumber numberWithUnsignedChar:entry_NaN]; + newElement_NaN = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_NaN)]; [array_NaN addObject:newElement_NaN]; } if (iter_NaN.GetStatus() != CHIP_NO_ERROR) { @@ -1068,7 +1070,7 @@ while (iter_NaN.Next()) { auto & entry_NaN = iter_NaN.GetValue(); NSNumber * newElement_NaN; - newElement_NaN = [NSNumber numberWithUnsignedChar:entry_NaN]; + newElement_NaN = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_NaN)]; [array_NaN addObject:newElement_NaN]; } if (iter_NaN.GetStatus() != CHIP_NO_ERROR) { @@ -1086,7 +1088,7 @@ while (iter_NaN.Next()) { auto & entry_NaN = iter_NaN.GetValue(); NSNumber * newElement_NaN; - newElement_NaN = [NSNumber numberWithUnsignedChar:entry_NaN]; + newElement_NaN = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_NaN)]; [array_NaN addObject:newElement_NaN]; } if (iter_NaN.GetStatus() != CHIP_NO_ERROR) { @@ -1237,7 +1239,7 @@ while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedChar:entry_0]; + newElement_0 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0)]; [array_0 addObject:newElement_0]; } if (iter_0.GetStatus() != CHIP_NO_ERROR) { @@ -1266,7 +1268,7 @@ auto * response = [CHIPApplicationLauncherClusterLaunchAppResponseParams new]; { NSNumber * value; - value = [NSNumber numberWithUnsignedChar:data.status]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.status)]; response.status = value; } { @@ -1288,7 +1290,7 @@ } { NSNumber * value; - value = [NSNumber numberWithUnsignedChar:data.contentLaunchStatus]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.contentLaunchStatus)]; response.contentLaunchStatus = value; } DispatchSuccess(context, response); @@ -1305,7 +1307,7 @@ } { NSNumber * value; - value = [NSNumber numberWithUnsignedChar:data.contentLaunchStatus]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.contentLaunchStatus)]; response.contentLaunchStatus = value; } DispatchSuccess(context, response); @@ -1317,7 +1319,7 @@ auto * response = [CHIPDiagnosticLogsClusterRetrieveLogsResponseParams new]; { NSNumber * value; - value = [NSNumber numberWithUnsignedChar:data.status]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.status)]; response.status = value; } { @@ -1507,12 +1509,12 @@ } { NSNumber * value; - value = [NSNumber numberWithUnsignedChar:data.userStatus]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.userStatus)]; response.userStatus = value; } { NSNumber * value; - value = [NSNumber numberWithUnsignedChar:data.userType]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.userType)]; response.userType = value; } { @@ -1534,12 +1536,12 @@ } { NSNumber * value; - value = [NSNumber numberWithUnsignedChar:data.userStatus]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.userStatus)]; response.userStatus = value; } { NSNumber * value; - value = [NSNumber numberWithUnsignedChar:data.userType]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.userType)]; response.userType = value; } { @@ -1561,7 +1563,7 @@ } { NSNumber * value; - value = [NSNumber numberWithUnsignedChar:data.userType]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.userType)]; response.userType = value; } DispatchSuccess(context, response); @@ -1676,7 +1678,7 @@ auto * response = [CHIPDoorLockClusterSetPinResponseParams new]; { NSNumber * value; - value = [NSNumber numberWithUnsignedChar:data.status]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.status)]; response.status = value; } DispatchSuccess(context, response); @@ -1688,7 +1690,7 @@ auto * response = [CHIPDoorLockClusterSetRfidResponseParams new]; { NSNumber * value; - value = [NSNumber numberWithUnsignedChar:data.status]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.status)]; response.status = value; } DispatchSuccess(context, response); @@ -1760,7 +1762,7 @@ auto * response = [CHIPGeneralCommissioningClusterArmFailSafeResponseParams new]; { NSNumber * value; - value = [NSNumber numberWithUnsignedChar:data.errorCode]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.errorCode)]; response.errorCode = value; } { @@ -1777,7 +1779,7 @@ auto * response = [CHIPGeneralCommissioningClusterCommissioningCompleteResponseParams new]; { NSNumber * value; - value = [NSNumber numberWithUnsignedChar:data.errorCode]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.errorCode)]; response.errorCode = value; } { @@ -1794,7 +1796,7 @@ auto * response = [CHIPGeneralCommissioningClusterSetRegulatoryConfigResponseParams new]; { NSNumber * value; - value = [NSNumber numberWithUnsignedChar:data.errorCode]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.errorCode)]; response.errorCode = value; } { @@ -1908,7 +1910,7 @@ auto * response = [CHIPKeypadInputClusterSendKeyResponseParams new]; { NSNumber * value; - value = [NSNumber numberWithUnsignedChar:data.status]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.status)]; response.status = value; } DispatchSuccess(context, response); @@ -1920,7 +1922,7 @@ auto * response = [CHIPMediaPlaybackClusterMediaFastForwardResponseParams new]; { NSNumber * value; - value = [NSNumber numberWithUnsignedChar:data.mediaPlaybackStatus]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.mediaPlaybackStatus)]; response.mediaPlaybackStatus = value; } DispatchSuccess(context, response); @@ -1932,7 +1934,7 @@ auto * response = [CHIPMediaPlaybackClusterMediaNextResponseParams new]; { NSNumber * value; - value = [NSNumber numberWithUnsignedChar:data.mediaPlaybackStatus]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.mediaPlaybackStatus)]; response.mediaPlaybackStatus = value; } DispatchSuccess(context, response); @@ -1944,7 +1946,7 @@ auto * response = [CHIPMediaPlaybackClusterMediaPauseResponseParams new]; { NSNumber * value; - value = [NSNumber numberWithUnsignedChar:data.mediaPlaybackStatus]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.mediaPlaybackStatus)]; response.mediaPlaybackStatus = value; } DispatchSuccess(context, response); @@ -1956,7 +1958,7 @@ auto * response = [CHIPMediaPlaybackClusterMediaPlayResponseParams new]; { NSNumber * value; - value = [NSNumber numberWithUnsignedChar:data.mediaPlaybackStatus]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.mediaPlaybackStatus)]; response.mediaPlaybackStatus = value; } DispatchSuccess(context, response); @@ -1968,7 +1970,7 @@ auto * response = [CHIPMediaPlaybackClusterMediaPreviousResponseParams new]; { NSNumber * value; - value = [NSNumber numberWithUnsignedChar:data.mediaPlaybackStatus]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.mediaPlaybackStatus)]; response.mediaPlaybackStatus = value; } DispatchSuccess(context, response); @@ -1980,7 +1982,7 @@ auto * response = [CHIPMediaPlaybackClusterMediaRewindResponseParams new]; { NSNumber * value; - value = [NSNumber numberWithUnsignedChar:data.mediaPlaybackStatus]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.mediaPlaybackStatus)]; response.mediaPlaybackStatus = value; } DispatchSuccess(context, response); @@ -1992,7 +1994,7 @@ auto * response = [CHIPMediaPlaybackClusterMediaSeekResponseParams new]; { NSNumber * value; - value = [NSNumber numberWithUnsignedChar:data.mediaPlaybackStatus]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.mediaPlaybackStatus)]; response.mediaPlaybackStatus = value; } DispatchSuccess(context, response); @@ -2004,7 +2006,7 @@ auto * response = [CHIPMediaPlaybackClusterMediaSkipBackwardResponseParams new]; { NSNumber * value; - value = [NSNumber numberWithUnsignedChar:data.mediaPlaybackStatus]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.mediaPlaybackStatus)]; response.mediaPlaybackStatus = value; } DispatchSuccess(context, response); @@ -2016,7 +2018,7 @@ auto * response = [CHIPMediaPlaybackClusterMediaSkipForwardResponseParams new]; { NSNumber * value; - value = [NSNumber numberWithUnsignedChar:data.mediaPlaybackStatus]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.mediaPlaybackStatus)]; response.mediaPlaybackStatus = value; } DispatchSuccess(context, response); @@ -2028,7 +2030,7 @@ auto * response = [CHIPMediaPlaybackClusterMediaStartOverResponseParams new]; { NSNumber * value; - value = [NSNumber numberWithUnsignedChar:data.mediaPlaybackStatus]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.mediaPlaybackStatus)]; response.mediaPlaybackStatus = value; } DispatchSuccess(context, response); @@ -2040,7 +2042,7 @@ auto * response = [CHIPMediaPlaybackClusterMediaStopResponseParams new]; { NSNumber * value; - value = [NSNumber numberWithUnsignedChar:data.mediaPlaybackStatus]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.mediaPlaybackStatus)]; response.mediaPlaybackStatus = value; } DispatchSuccess(context, response); @@ -2229,7 +2231,7 @@ auto * response = [CHIPOtaSoftwareUpdateProviderClusterApplyUpdateResponseParams new]; { NSNumber * value; - value = [NSNumber numberWithUnsignedChar:data.action]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.action)]; response.action = value; } { @@ -2246,7 +2248,7 @@ auto * response = [CHIPOtaSoftwareUpdateProviderClusterQueryImageResponseParams new]; { NSNumber * value; - value = [NSNumber numberWithUnsignedChar:data.status]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.status)]; response.status = value; } { @@ -2600,7 +2602,7 @@ } { NSNumber * value; - value = [NSNumber numberWithUnsignedChar:data.errorType]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.errorType)]; response.errorType = value; } DispatchSuccess(context, response); @@ -2612,7 +2614,7 @@ auto * response = [CHIPTargetNavigatorClusterNavigateTargetResponseParams new]; { NSNumber * value; - value = [NSNumber numberWithUnsignedChar:data.status]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.status)]; response.status = value; } { @@ -2644,7 +2646,7 @@ value = [CHIPTestClusterClusterSimpleStruct new]; value.a = [NSNumber numberWithUnsignedChar:data.arg1.a]; value.b = [NSNumber numberWithBool:data.arg1.b]; - value.c = [NSNumber numberWithUnsignedChar:data.arg1.c]; + value.c = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.arg1.c)]; value.d = [NSData dataWithBytes:data.arg1.d.data() length:data.arg1.d.size()]; value.e = [[NSString alloc] initWithBytes:data.arg1.e.data() length:data.arg1.e.size() encoding:NSUTF8StringEncoding]; value.f = [NSNumber numberWithUnsignedChar:data.arg1.f.Raw()]; @@ -2673,12 +2675,12 @@ auto * response = [CHIPTestClusterClusterTestEnumsResponseParams new]; { NSNumber * value; - value = [NSNumber numberWithUnsignedShort:data.arg1]; + value = [NSNumber numberWithUnsignedShort:chip::to_underlying(data.arg1)]; response.arg1 = value; } { NSNumber * value; - value = [NSNumber numberWithUnsignedChar:data.arg2]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.arg2)]; response.arg2 = value; } DispatchSuccess(context, response); diff --git a/src/lib/support/JniReferences.h b/src/lib/support/JniReferences.h index a45cb3f0d15004..32a8e6d497d35f 100644 --- a/src/lib/support/JniReferences.h +++ b/src/lib/support/JniReferences.h @@ -20,6 +20,7 @@ #include #include #include +#include #include namespace chip { @@ -105,7 +106,7 @@ class JniReferences * Creates a boxed type (e.g. java.lang.Integer) based on the the class name ("java/lang/Integer"), constructor JNI signature * ("(I)V"), and value. */ - template + template ::value, int> = 0> CHIP_ERROR CreateBoxedObject(std::string boxedTypeClsName, std::string constructorSignature, T value, jobject & outObj) { JNIEnv * env = GetEnvForCurrentThread(); @@ -121,6 +122,15 @@ class JniReferences return err; } + /** + * Handling for strongly-typed enums. + */ + template ::value, int> = 0> + CHIP_ERROR CreateBoxedObject(std::string boxedTypeClsName, std::string constructorSignature, T value, jobject & outObj) + { + return CreateBoxedObject(boxedTypeClsName, constructorSignature, chip::to_underlying(value), outObj); + } + private: JniReferences() {} diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h index d7c494ecbb02b1..74f46c31b4fd85 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h @@ -832,7 +832,7 @@ enum class IdentifyEffectIdentifier : uint8_t kStopEffect = 0xFF, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using IdentifyEffectIdentifier = EmberAfIdentifyEffectIdentifier; +using IdentifyEffectIdentifier = EmberAfIdentifyEffectIdentifier; #endif // Need to convert consumers to using the new enum classes, so we // don't just have casts all over. @@ -843,7 +843,7 @@ enum class IdentifyEffectVariant : uint8_t kDefault = 0x00, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using IdentifyEffectVariant = EmberAfIdentifyEffectVariant; +using IdentifyEffectVariant = EmberAfIdentifyEffectVariant; #endif // Need to convert consumers to using the new enum classes, so we // don't just have casts all over. @@ -859,7 +859,7 @@ enum class IdentifyIdentifyType : uint8_t kActuator = 0x05, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using IdentifyIdentifyType = EmberAfIdentifyIdentifyType; +using IdentifyIdentifyType = EmberAfIdentifyIdentifyType; #endif namespace Commands { @@ -2407,7 +2407,7 @@ enum class OnOffDelayedAllOffEffectVariant : uint8_t k50PercentDimDownIn0p8SecondsThenFadeToOffIn12Seconds = 0x02, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using OnOffDelayedAllOffEffectVariant = EmberAfOnOffDelayedAllOffEffectVariant; +using OnOffDelayedAllOffEffectVariant = EmberAfOnOffDelayedAllOffEffectVariant; #endif // Need to convert consumers to using the new enum classes, so we // don't just have casts all over. @@ -2418,7 +2418,7 @@ enum class OnOffDyingLightEffectVariant : uint8_t k20PercenterDimUpIn0p5SecondsThenFadeToOffIn1Second = 0x00, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using OnOffDyingLightEffectVariant = EmberAfOnOffDyingLightEffectVariant; +using OnOffDyingLightEffectVariant = EmberAfOnOffDyingLightEffectVariant; #endif // Need to convert consumers to using the new enum classes, so we // don't just have casts all over. @@ -2430,7 +2430,7 @@ enum class OnOffEffectIdentifier : uint8_t kDyingLight = 0x01, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using OnOffEffectIdentifier = EmberAfOnOffEffectIdentifier; +using OnOffEffectIdentifier = EmberAfOnOffEffectIdentifier; #endif // Bitmap for OnOffControl @@ -2790,7 +2790,7 @@ enum class MoveMode : uint8_t kDown = 0x01, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using MoveMode = EmberAfMoveMode; +using MoveMode = EmberAfMoveMode; #endif // Need to convert consumers to using the new enum classes, so we // don't just have casts all over. @@ -2802,7 +2802,7 @@ enum class StepMode : uint8_t kDown = 0x01, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using StepMode = EmberAfStepMode; +using StepMode = EmberAfStepMode; #endif namespace Commands { @@ -4818,9 +4818,6 @@ struct TypeInfo } // namespace Attributes } // namespace PowerProfile namespace ApplianceControl { -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for ApplianceStatus enum class ApplianceStatus : uint8_t { @@ -4840,12 +4837,6 @@ enum class ApplianceStatus : uint8_t kSupercooling = 0x0E, kSuperheating = 0x0F, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using ApplianceStatus = EmberAfApplianceStatus; -#endif -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for CommandIdentification enum class CommandIdentification : uint8_t { @@ -4861,12 +4852,6 @@ enum class CommandIdentification : uint8_t kEnableEnergyControl = 0x0A, kDisableEnergyControl = 0x0B, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using CommandIdentification = EmberAfCommandIdentification; -#endif -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for WarningEvent enum class WarningEvent : uint8_t { @@ -4876,9 +4861,6 @@ enum class WarningEvent : uint8_t kWarning4OverallPowerBackBelowThePowerThresholdLevel = 0x03, kWarning5OverallPowerWillBePotentiallyAboveAvailablePowerLevelIfTheApplianceStarts = 0x04, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using WarningEvent = EmberAfWarningEvent; -#endif // Bitmap for RemoteEnableFlagsAndDeviceStatus2 enum class RemoteEnableFlagsAndDeviceStatus2 : uint8_t @@ -5616,21 +5598,12 @@ struct TypeInfo } // namespace Attributes } // namespace PollControl namespace BridgedActions { -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for ActionErrorEnum enum class ActionErrorEnum : uint8_t { kUnknown = 0x00, kInterrupted = 0x01, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using ActionErrorEnum = EmberAfActionErrorEnum; -#endif -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for ActionStatusEnum enum class ActionStatusEnum : uint8_t { @@ -5639,12 +5612,6 @@ enum class ActionStatusEnum : uint8_t kPaused = 0x02, kDisabled = 0x03, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using ActionStatusEnum = EmberAfActionStatusEnum; -#endif -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for ActionTypeEnum enum class ActionTypeEnum : uint8_t { @@ -5656,12 +5623,6 @@ enum class ActionTypeEnum : uint8_t kNotification = 0x05, kAlarm = 0x06, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using ActionTypeEnum = EmberAfActionTypeEnum; -#endif -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for EndpointListTypeEnum enum class EndpointListTypeEnum : uint8_t { @@ -5669,9 +5630,6 @@ enum class EndpointListTypeEnum : uint8_t kRoom = 0x01, kZone = 0x02, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using EndpointListTypeEnum = EmberAfEndpointListTypeEnum; -#endif // Bitmap for CommandBits enum class CommandBits : uint16_t @@ -6793,7 +6751,7 @@ enum class OTAApplyUpdateAction : uint8_t kDiscontinue = 0x02, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using OTAApplyUpdateAction = EmberAfOTAApplyUpdateAction; +using OTAApplyUpdateAction = EmberAfOTAApplyUpdateAction; #endif // Need to convert consumers to using the new enum classes, so we // don't just have casts all over. @@ -6807,7 +6765,7 @@ enum class OTADownloadProtocol : uint8_t kVendorSpecific = 0x03, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using OTADownloadProtocol = EmberAfOTADownloadProtocol; +using OTADownloadProtocol = EmberAfOTADownloadProtocol; #endif // Need to convert consumers to using the new enum classes, so we // don't just have casts all over. @@ -6820,7 +6778,7 @@ enum class OTAQueryStatus : uint8_t kNotAvailable = 0x02, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using OTAQueryStatus = EmberAfOTAQueryStatus; +using OTAQueryStatus = EmberAfOTAQueryStatus; #endif namespace Commands { @@ -7096,7 +7054,7 @@ enum class ChangeReasonEnum : uint8_t kDelayByProvider = 0x04, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using ChangeReasonEnum = EmberAfChangeReasonEnum; +using ChangeReasonEnum = EmberAfChangeReasonEnum; #endif // Need to convert consumers to using the new enum classes, so we // don't just have casts all over. @@ -7109,7 +7067,7 @@ enum class OTAAnnouncementReason : uint8_t kUrgentUpdateAvailable = 0x02, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using OTAAnnouncementReason = EmberAfOTAAnnouncementReason; +using OTAAnnouncementReason = EmberAfOTAAnnouncementReason; #endif // Need to convert consumers to using the new enum classes, so we // don't just have casts all over. @@ -7128,7 +7086,7 @@ enum class UpdateStateEnum : uint8_t kDelayedOnUserConsent = 0x08, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using UpdateStateEnum = EmberAfUpdateStateEnum; +using UpdateStateEnum = EmberAfUpdateStateEnum; #endif namespace Commands { @@ -7829,9 +7787,6 @@ struct TypeInfo } // namespace Attributes } // namespace PowerSource namespace GeneralCommissioning { -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for GeneralCommissioningError enum class GeneralCommissioningError : uint8_t { @@ -7839,9 +7794,6 @@ enum class GeneralCommissioningError : uint8_t kValueOutsideRange = 0x01, kInvalidAuthentication = 0x02, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using GeneralCommissioningError = EmberAfGeneralCommissioningError; -#endif // Need to convert consumers to using the new enum classes, so we // don't just have casts all over. #ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM @@ -7853,7 +7805,7 @@ enum class RegulatoryLocationType : uint8_t kIndoorOutdoor = 0x02, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using RegulatoryLocationType = EmberAfRegulatoryLocationType; +using RegulatoryLocationType = EmberAfRegulatoryLocationType; #endif namespace Structs { @@ -8213,7 +8165,7 @@ enum class NetworkCommissioningError : uint8_t kUnknownError = 0x13, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using NetworkCommissioningError = EmberAfNetworkCommissioningError; +using NetworkCommissioningError = EmberAfNetworkCommissioningError; #endif namespace Structs { @@ -8941,9 +8893,6 @@ struct TypeInfo } // namespace Attributes } // namespace NetworkCommissioning namespace DiagnosticLogs { -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for LogsIntent enum class LogsIntent : uint8_t { @@ -8951,12 +8900,6 @@ enum class LogsIntent : uint8_t kNetworkDiag = 0x01, kCrashLogs = 0x02, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using LogsIntent = EmberAfLogsIntent; -#endif -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for LogsStatus enum class LogsStatus : uint8_t { @@ -8966,21 +8909,12 @@ enum class LogsStatus : uint8_t kBusy = 0x03, kDenied = 0x04, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using LogsStatus = EmberAfLogsStatus; -#endif -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for LogsTransferProtocol enum class LogsTransferProtocol : uint8_t { kResponsePayload = 0x00, kBdx = 0x01, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using LogsTransferProtocol = EmberAfLogsTransferProtocol; -#endif namespace Commands { // Forward-declarations so we can reference these later. @@ -9116,7 +9050,7 @@ enum class BootReasonType : uint8_t kSoftwareReset = 0x06, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using BootReasonType = EmberAfBootReasonType; +using BootReasonType = EmberAfBootReasonType; #endif // Need to convert consumers to using the new enum classes, so we // don't just have casts all over. @@ -9137,7 +9071,7 @@ enum class HardwareFaultType : uint8_t kTamperDetected = 0x0A, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using HardwareFaultType = EmberAfHardwareFaultType; +using HardwareFaultType = EmberAfHardwareFaultType; #endif // Need to convert consumers to using the new enum classes, so we // don't just have casts all over. @@ -9152,7 +9086,7 @@ enum class InterfaceType : uint8_t kThread = 0x04, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using InterfaceType = EmberAfInterfaceType; +using InterfaceType = EmberAfInterfaceType; #endif // Need to convert consumers to using the new enum classes, so we // don't just have casts all over. @@ -9166,7 +9100,7 @@ enum class NetworkFaultType : uint8_t kConnectionFailed = 0x03, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using NetworkFaultType = EmberAfNetworkFaultType; +using NetworkFaultType = EmberAfNetworkFaultType; #endif // Need to convert consumers to using the new enum classes, so we // don't just have casts all over. @@ -9183,7 +9117,7 @@ enum class RadioFaultType : uint8_t kEthernetFault = 0x06, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using RadioFaultType = EmberAfRadioFaultType; +using RadioFaultType = EmberAfRadioFaultType; #endif namespace Structs { @@ -9670,9 +9604,6 @@ struct DecodableType } // namespace Events } // namespace SoftwareDiagnostics namespace ThreadNetworkDiagnostics { -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for NetworkFault enum class NetworkFault : uint8_t { @@ -9681,9 +9612,6 @@ enum class NetworkFault : uint8_t kHardwareFailure = 0x02, kNetworkJammed = 0x03, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using NetworkFault = EmberAfNetworkFault; -#endif // Need to convert consumers to using the new enum classes, so we // don't just have casts all over. #ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM @@ -9699,20 +9627,14 @@ enum class RoutingRole : uint8_t kLeader = 0x06, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using RoutingRole = EmberAfRoutingRole; +using RoutingRole = EmberAfRoutingRole; #endif -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for ThreadConnectionStatus enum class ThreadConnectionStatus : uint8_t { kConnected = 0x00, kNotConnected = 0x01, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using ThreadConnectionStatus = EmberAfThreadConnectionStatus; -#endif namespace Structs { namespace NeighborTable { @@ -10650,9 +10572,6 @@ struct DecodableType } // namespace Events } // namespace ThreadNetworkDiagnostics namespace WiFiNetworkDiagnostics { -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for AssociationFailureCause enum class AssociationFailureCause : uint8_t { @@ -10661,9 +10580,6 @@ enum class AssociationFailureCause : uint8_t kAuthenticationFailed = 0x02, kSsidNotFound = 0x03, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using AssociationFailureCause = EmberAfAssociationFailureCause; -#endif // Need to convert consumers to using the new enum classes, so we // don't just have casts all over. #ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM @@ -10678,20 +10594,14 @@ enum class SecurityType : uint8_t kWpa3 = 0x05, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using SecurityType = EmberAfSecurityType; +using SecurityType = EmberAfSecurityType; #endif -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for WiFiConnectionStatus enum class WiFiConnectionStatus : uint8_t { kConnected = 0x00, kNotConnected = 0x01, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using WiFiConnectionStatus = EmberAfWiFiConnectionStatus; -#endif // Need to convert consumers to using the new enum classes, so we // don't just have casts all over. #ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM @@ -10706,7 +10616,7 @@ enum class WiFiVersionType : uint8_t k80211ax = 0x05, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using WiFiVersionType = EmberAfWiFiVersionType; +using WiFiVersionType = EmberAfWiFiVersionType; #endif namespace Commands { @@ -11039,7 +10949,7 @@ enum class PHYRateType : uint8_t k400g = 0x09, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using PHYRateType = EmberAfPHYRateType; +using PHYRateType = EmberAfPHYRateType; #endif namespace Commands { @@ -11867,7 +11777,7 @@ enum class StatusCode : uint8_t kWindowNotOpen = 0x03, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using StatusCode = EmberAfStatusCode; +using StatusCode = EmberAfStatusCode; #endif namespace Commands { @@ -12038,7 +11948,7 @@ enum class NodeOperationalCertStatus : uint8_t kInvalidFabricIndex = 0x0B, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using NodeOperationalCertStatus = EmberAfNodeOperationalCertStatus; +using NodeOperationalCertStatus = EmberAfNodeOperationalCertStatus; #endif namespace Structs { @@ -13072,7 +12982,7 @@ enum class DoorLockOperationEventCode : uint8_t kManualUnlock = 0x0E, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using DoorLockOperationEventCode = EmberAfDoorLockOperationEventCode; +using DoorLockOperationEventCode = EmberAfDoorLockOperationEventCode; #endif // Need to convert consumers to using the new enum classes, so we // don't just have casts all over. @@ -13089,11 +12999,8 @@ enum class DoorLockProgrammingEventCode : uint8_t kIdDeleted = 0x06, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using DoorLockProgrammingEventCode = EmberAfDoorLockProgrammingEventCode; +using DoorLockProgrammingEventCode = EmberAfDoorLockProgrammingEventCode; #endif -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for DoorLockSetPinOrIdStatus enum class DoorLockSetPinOrIdStatus : uint8_t { @@ -13102,9 +13009,6 @@ enum class DoorLockSetPinOrIdStatus : uint8_t kMemoryFull = 0x02, kDuplicateCodeError = 0x03, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using DoorLockSetPinOrIdStatus = EmberAfDoorLockSetPinOrIdStatus; -#endif // Need to convert consumers to using the new enum classes, so we // don't just have casts all over. #ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM @@ -13117,7 +13021,7 @@ enum class DoorLockUserStatus : uint8_t kNotSupported = 0xFF, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using DoorLockUserStatus = EmberAfDoorLockUserStatus; +using DoorLockUserStatus = EmberAfDoorLockUserStatus; #endif // Need to convert consumers to using the new enum classes, so we // don't just have casts all over. @@ -13133,7 +13037,7 @@ enum class DoorLockUserType : uint8_t kNotSupported = 0xFF, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using DoorLockUserType = EmberAfDoorLockUserType; +using DoorLockUserType = EmberAfDoorLockUserType; #endif // Bitmap for DoorLockDayOfWeek @@ -16563,9 +16467,6 @@ struct TypeInfo } // namespace Attributes } // namespace BarrierControl namespace PumpConfigurationAndControl { -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for PumpControlMode enum class PumpControlMode : uint8_t { @@ -16576,12 +16477,6 @@ enum class PumpControlMode : uint8_t kConstantTemperature = 0x05, kAutomatic = 0x07, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using PumpControlMode = EmberAfPumpControlMode; -#endif -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for PumpOperationMode enum class PumpOperationMode : uint8_t { @@ -16590,9 +16485,6 @@ enum class PumpOperationMode : uint8_t kMaximum = 0x02, kLocal = 0x03, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using PumpOperationMode = EmberAfPumpOperationMode; -#endif // Bitmap for PumpStatus enum class PumpStatus : uint16_t @@ -17387,7 +17279,7 @@ enum class SetpointAdjustMode : uint8_t kHeatAndCoolSetpoints = 0x02, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using SetpointAdjustMode = EmberAfSetpointAdjustMode; +using SetpointAdjustMode = EmberAfSetpointAdjustMode; #endif // Bitmap for DayOfWeek @@ -18428,7 +18320,7 @@ enum class ColorLoopAction : uint8_t kActivateFromEnhancedCurrentHue = 0x02, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using ColorLoopAction = EmberAfColorLoopAction; +using ColorLoopAction = EmberAfColorLoopAction; #endif // Need to convert consumers to using the new enum classes, so we // don't just have casts all over. @@ -18440,7 +18332,7 @@ enum class ColorLoopDirection : uint8_t kIncrementHue = 0x01, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using ColorLoopDirection = EmberAfColorLoopDirection; +using ColorLoopDirection = EmberAfColorLoopDirection; #endif // Need to convert consumers to using the new enum classes, so we // don't just have casts all over. @@ -18453,7 +18345,7 @@ enum class ColorMode : uint8_t kColorTemperature = 0x02, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using ColorMode = EmberAfColorMode; +using ColorMode = EmberAfColorMode; #endif // Need to convert consumers to using the new enum classes, so we // don't just have casts all over. @@ -18467,7 +18359,7 @@ enum class HueDirection : uint8_t kDown = 0x03, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using HueDirection = EmberAfHueDirection; +using HueDirection = EmberAfHueDirection; #endif // Need to convert consumers to using the new enum classes, so we // don't just have casts all over. @@ -18480,7 +18372,7 @@ enum class HueMoveMode : uint8_t kDown = 0x03, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using HueMoveMode = EmberAfHueMoveMode; +using HueMoveMode = EmberAfHueMoveMode; #endif // Need to convert consumers to using the new enum classes, so we // don't just have casts all over. @@ -18492,7 +18384,7 @@ enum class HueStepMode : uint8_t kDown = 0x03, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using HueStepMode = EmberAfHueStepMode; +using HueStepMode = EmberAfHueStepMode; #endif // Need to convert consumers to using the new enum classes, so we // don't just have casts all over. @@ -18505,7 +18397,7 @@ enum class SaturationMoveMode : uint8_t kDown = 0x03, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using SaturationMoveMode = EmberAfSaturationMoveMode; +using SaturationMoveMode = EmberAfSaturationMoveMode; #endif // Need to convert consumers to using the new enum classes, so we // don't just have casts all over. @@ -18517,7 +18409,7 @@ enum class SaturationStepMode : uint8_t kDown = 0x03, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using SaturationStepMode = EmberAfSaturationStepMode; +using SaturationStepMode = EmberAfSaturationStepMode; #endif // Bitmap for ColorCapabilities @@ -20229,18 +20121,12 @@ struct TypeInfo } // namespace Attributes } // namespace BallastConfiguration namespace IlluminanceMeasurement { -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for LightSensorType enum class LightSensorType : uint8_t { kPhotodiode = 0x00, kCmos = 0x01, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using LightSensorType = EmberAfLightSensorType; -#endif namespace Attributes { namespace MeasuredValue { @@ -22963,7 +22849,7 @@ enum class IasEnrollResponseCode : uint8_t kTooManyZones = 0x03, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using IasEnrollResponseCode = EmberAfIasEnrollResponseCode; +using IasEnrollResponseCode = EmberAfIasEnrollResponseCode; #endif // Need to convert consumers to using the new enum classes, so we // don't just have casts all over. @@ -22989,7 +22875,7 @@ enum class IasZoneType : uint16_t kInvalidZoneType = 0xFFFF, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using IasZoneType = EmberAfIasZoneType; +using IasZoneType = EmberAfIasZoneType; #endif // Bitmap for IasZoneStatus @@ -23369,9 +23255,6 @@ struct TypeInfo } // namespace Attributes } // namespace IasZone namespace IasAce { -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for IasAceAlarmStatus enum class IasAceAlarmStatus : uint8_t { @@ -23383,12 +23266,6 @@ enum class IasAceAlarmStatus : uint8_t kFirePanic = 0x05, kEmergencyPanic = 0x06, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using IasAceAlarmStatus = EmberAfIasAceAlarmStatus; -#endif -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for IasAceArmMode enum class IasAceArmMode : uint8_t { @@ -23397,12 +23274,6 @@ enum class IasAceArmMode : uint8_t kArmNightSleepZonesOnly = 0x02, kArmAllZones = 0x03, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using IasAceArmMode = EmberAfIasAceArmMode; -#endif -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for IasAceArmNotification enum class IasAceArmNotification : uint8_t { @@ -23414,24 +23285,12 @@ enum class IasAceArmNotification : uint8_t kNotReadyToArm = 0x05, kAlreadyDisarmed = 0x06, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using IasAceArmNotification = EmberAfIasAceArmNotification; -#endif -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for IasAceAudibleNotification enum class IasAceAudibleNotification : uint8_t { kMute = 0x00, kDefaultSound = 0x01, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using IasAceAudibleNotification = EmberAfIasAceAudibleNotification; -#endif -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for IasAceBypassResult enum class IasAceBypassResult : uint8_t { @@ -23442,12 +23301,6 @@ enum class IasAceBypassResult : uint8_t kUnknownZoneId = 0x04, kInvalidArmDisarmCode = 0x05, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using IasAceBypassResult = EmberAfIasAceBypassResult; -#endif -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for IasAcePanelStatus enum class IasAcePanelStatus : uint8_t { @@ -23463,9 +23316,6 @@ enum class IasAcePanelStatus : uint8_t kArmingNight = 0x09, kArmingAway = 0x0A, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using IasAcePanelStatus = EmberAfIasAcePanelStatus; -#endif // Need to convert consumers to using the new enum classes, so we // don't just have casts all over. #ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM @@ -23490,7 +23340,7 @@ enum class IasZoneType : uint16_t kInvalidZoneType = 0xFFFF, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using IasZoneType = EmberAfIasZoneType; +using IasZoneType = EmberAfIasZoneType; #endif // Bitmap for IasZoneStatus @@ -24499,29 +24349,17 @@ struct TypeInfo } // namespace Attributes } // namespace WakeOnLan namespace TvChannel { -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for TvChannelErrorType enum class TvChannelErrorType : uint8_t { kMultipleMatches = 0x00, kNoMatches = 0x01, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using TvChannelErrorType = EmberAfTvChannelErrorType; -#endif -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for TvChannelLineupInfoType enum class TvChannelLineupInfoType : uint8_t { kMso = 0x00, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using TvChannelLineupInfoType = EmberAfTvChannelLineupInfoType; -#endif namespace Structs { namespace TvChannelInfo { @@ -24789,9 +24627,6 @@ struct TypeInfo } // namespace Attributes } // namespace TvChannel namespace TargetNavigator { -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for NavigateTargetStatus enum class NavigateTargetStatus : uint8_t { @@ -24799,9 +24634,6 @@ enum class NavigateTargetStatus : uint8_t kAppNotAvailable = 0x01, kSystemBusy = 0x02, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using NavigateTargetStatus = EmberAfNavigateTargetStatus; -#endif namespace Structs { namespace NavigateTargetTargetInfo { @@ -24970,7 +24802,7 @@ enum class MediaPlaybackState : uint8_t kBuffering = 0x03, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using MediaPlaybackState = EmberAfMediaPlaybackState; +using MediaPlaybackState = EmberAfMediaPlaybackState; #endif // Need to convert consumers to using the new enum classes, so we // don't just have casts all over. @@ -24986,7 +24818,7 @@ enum class MediaPlaybackStatus : uint8_t kSeekOutOfRange = 0x05, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using MediaPlaybackStatus = EmberAfMediaPlaybackStatus; +using MediaPlaybackStatus = EmberAfMediaPlaybackStatus; #endif namespace Structs { @@ -25892,7 +25724,7 @@ enum class MediaInputType : uint8_t kOther = 0x0B, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using MediaInputType = EmberAfMediaInputType; +using MediaInputType = EmberAfMediaInputType; #endif namespace Structs { @@ -26273,7 +26105,7 @@ enum class KeypadInputCecKeyCode : uint8_t kData = 0x76, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using KeypadInputCecKeyCode = EmberAfKeypadInputCecKeyCode; +using KeypadInputCecKeyCode = EmberAfKeypadInputCecKeyCode; #endif // Need to convert consumers to using the new enum classes, so we // don't just have casts all over. @@ -26286,7 +26118,7 @@ enum class KeypadInputStatus : uint8_t kInvalidKeyInCurrentState = 0x02, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using KeypadInputStatus = EmberAfKeypadInputStatus; +using KeypadInputStatus = EmberAfKeypadInputStatus; #endif namespace Commands { @@ -26393,21 +26225,12 @@ struct TypeInfo } // namespace Attributes } // namespace KeypadInput namespace ContentLauncher { -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for ContentLaunchMetricType enum class ContentLaunchMetricType : uint8_t { kPixels = 0x00, kPercentage = 0x01, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using ContentLaunchMetricType = EmberAfContentLaunchMetricType; -#endif -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for ContentLaunchParameterEnum enum class ContentLaunchParameterEnum : uint8_t { @@ -26423,9 +26246,6 @@ enum class ContentLaunchParameterEnum : uint8_t kSportsTeam = 0x09, kVideo = 0x0A, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using ContentLaunchParameterEnum = EmberAfContentLaunchParameterEnum; -#endif // Need to convert consumers to using the new enum classes, so we // don't just have casts all over. #ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM @@ -26437,7 +26257,7 @@ enum class ContentLaunchStatus : uint8_t kAuthFailed = 0x02, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using ContentLaunchStatus = EmberAfContentLaunchStatus; +using ContentLaunchStatus = EmberAfContentLaunchStatus; #endif // Need to convert consumers to using the new enum classes, so we // don't just have casts all over. @@ -26449,7 +26269,7 @@ enum class ContentLaunchStreamingType : uint8_t kHls = 0x01, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using ContentLaunchStreamingType = EmberAfContentLaunchStreamingType; +using ContentLaunchStreamingType = EmberAfContentLaunchStreamingType; #endif namespace Structs { @@ -26797,7 +26617,7 @@ enum class AudioOutputType : uint8_t kOther = 0x05, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using AudioOutputType = EmberAfAudioOutputType; +using AudioOutputType = EmberAfAudioOutputType; #endif namespace Structs { @@ -26965,7 +26785,7 @@ enum class ApplicationLauncherStatus : uint8_t kSystemBusy = 0x02, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using ApplicationLauncherStatus = EmberAfApplicationLauncherStatus; +using ApplicationLauncherStatus = EmberAfApplicationLauncherStatus; #endif namespace Structs { @@ -27149,7 +26969,7 @@ enum class ApplicationBasicStatus : uint8_t kActiveVisibleNotFocus = 0x03, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using ApplicationBasicStatus = EmberAfApplicationBasicStatus; +using ApplicationBasicStatus = EmberAfApplicationBasicStatus; #endif namespace Commands { @@ -27453,7 +27273,7 @@ enum class SimpleEnum : uint8_t kValueC = 0x03, }; #else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using SimpleEnum = EmberAfSimpleEnum; +using SimpleEnum = EmberAfSimpleEnum; #endif // Bitmap for SimpleBitmap @@ -29352,9 +29172,6 @@ struct DecodableType } // namespace Events } // namespace TestCluster namespace Messaging { -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for EventId enum class EventId : uint8_t { @@ -29440,36 +29257,18 @@ enum class EventId : uint8_t kManufacturerSpecificH = 0xE7, kManufacturerSpecificI = 0xE8, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using EventId = EmberAfEventId; -#endif -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for MessagingControlConfirmation enum class MessagingControlConfirmation : uint8_t { kNotRequired = 0x00, kRequired = 0x80, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using MessagingControlConfirmation = EmberAfMessagingControlConfirmation; -#endif -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for MessagingControlEnhancedConfirmation enum class MessagingControlEnhancedConfirmation : uint8_t { kNotRequired = 0x00, kRequired = 0x20, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using MessagingControlEnhancedConfirmation = EmberAfMessagingControlEnhancedConfirmation; -#endif -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for MessagingControlImportance enum class MessagingControlImportance : uint8_t { @@ -29478,12 +29277,6 @@ enum class MessagingControlImportance : uint8_t kHigh = 0x08, kCritical = 0x0C, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using MessagingControlImportance = EmberAfMessagingControlImportance; -#endif -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for MessagingControlTransmission enum class MessagingControlTransmission : uint8_t { @@ -29492,9 +29285,6 @@ enum class MessagingControlTransmission : uint8_t kAnonymous = 0x02, kReserved = 0x03, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using MessagingControlTransmission = EmberAfMessagingControlTransmission; -#endif // Bitmap for MessagingConfirmationControl enum class MessagingConfirmationControl : uint8_t @@ -30153,9 +29943,6 @@ struct TypeInfo } // namespace Attributes } // namespace MeterIdentification namespace ApplianceEventsAndAlert { -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for EventIdentification enum class EventIdentification : uint8_t { @@ -30165,9 +29952,6 @@ enum class EventIdentification : uint8_t kSwitchingOff = 0x06, kWrongData = 0x07, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using EventIdentification = EmberAfEventIdentification; -#endif // Bitmap for AlertCount enum class AlertCount : uint8_t @@ -32382,18 +32166,12 @@ struct TypeInfo } // namespace Attributes } // namespace Binding namespace GroupKeyManagement { -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for GroupKeySecurityPolicy enum class GroupKeySecurityPolicy : uint8_t { kStandard = 0x00, kLowLatency = 0x01, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using GroupKeySecurityPolicy = EmberAfGroupKeySecurityPolicy; -#endif namespace Structs { namespace GroupKey { diff --git a/zzz_generated/app-common/app-common/zap-generated/enums.h b/zzz_generated/app-common/app-common/zap-generated/enums.h index 26501d1cfbeac6..bf4ca18310ea12 100644 --- a/zzz_generated/app-common/app-common/zap-generated/enums.h +++ b/zzz_generated/app-common/app-common/zap-generated/enums.h @@ -24,94 +24,6 @@ // ZCL enums -// Enum for ActionErrorEnum -enum EmberAfActionErrorEnum : uint8_t -{ - EMBER_ZCL_ACTION_ERROR_ENUM_UNKNOWN = 0, - EMBER_ZCL_ACTION_ERROR_ENUM_INTERRUPTED = 1, -}; - -// Enum for ActionStatusEnum -enum EmberAfActionStatusEnum : uint8_t -{ - EMBER_ZCL_ACTION_STATUS_ENUM_INACTIVE = 0, - EMBER_ZCL_ACTION_STATUS_ENUM_ACTIVE = 1, - EMBER_ZCL_ACTION_STATUS_ENUM_PAUSED = 2, - EMBER_ZCL_ACTION_STATUS_ENUM_DISABLED = 3, -}; - -// Enum for ActionTypeEnum -enum EmberAfActionTypeEnum : uint8_t -{ - EMBER_ZCL_ACTION_TYPE_ENUM_OTHER = 0, - EMBER_ZCL_ACTION_TYPE_ENUM_SCENE = 1, - EMBER_ZCL_ACTION_TYPE_ENUM_SEQUENCE = 2, - EMBER_ZCL_ACTION_TYPE_ENUM_AUTOMATION = 3, - EMBER_ZCL_ACTION_TYPE_ENUM_EXCEPTION = 4, - EMBER_ZCL_ACTION_TYPE_ENUM_NOTIFICATION = 5, - EMBER_ZCL_ACTION_TYPE_ENUM_ALARM = 6, -}; - -// Enum for AlertCountType -enum EmberAfAlertCountType : uint8_t -{ - EMBER_ZCL_ALERT_COUNT_TYPE_UNSTRUCTURED = 0, -}; - -// Enum for AlertStructureCategory -enum EmberAfAlertStructureCategory : uint16_t -{ - EMBER_ZCL_ALERT_STRUCTURE_CATEGORY_WARNING = 256, - EMBER_ZCL_ALERT_STRUCTURE_CATEGORY_DANGER = 512, - EMBER_ZCL_ALERT_STRUCTURE_CATEGORY_FAILURE = 768, -}; - -// Enum for AlertStructurePresenceRecovery -enum EmberAfAlertStructurePresenceRecovery : uint16_t -{ - EMBER_ZCL_ALERT_STRUCTURE_PRESENCE_RECOVERY_RECOVERY = 0, - EMBER_ZCL_ALERT_STRUCTURE_PRESENCE_RECOVERY_PRESENCE = 4096, -}; - -// Enum for AmiRegistrationState -enum EmberAfAmiRegistrationState : uint8_t -{ - EMBER_ZCL_AMI_REGISTRATION_STATE_UNREGISTERED = 0, - EMBER_ZCL_AMI_REGISTRATION_STATE_JOINING_NETWORK = 1, - EMBER_ZCL_AMI_REGISTRATION_STATE_JOINED_NETWORK = 2, - EMBER_ZCL_AMI_REGISTRATION_STATE_SUBMITTED_REGISTRATION_REQUEST = 3, - EMBER_ZCL_AMI_REGISTRATION_STATE_REGISTRATION_REJECTED = 4, - EMBER_ZCL_AMI_REGISTRATION_STATE_REGISTERED = 5, - EMBER_ZCL_AMI_REGISTRATION_STATE_REGISTERATION_NOT_POSSIBLE = 6, -}; - -// Enum for AnonymousDataState -enum EmberAfAnonymousDataState : uint8_t -{ - EMBER_ZCL_ANONYMOUS_DATA_STATE_NO_SOURCE_FOUND = 0, - EMBER_ZCL_ANONYMOUS_DATA_STATE_SOURCE_FOUND = 1, -}; - -// Enum for ApplianceStatus -enum EmberAfApplianceStatus : uint8_t -{ - EMBER_ZCL_APPLIANCE_STATUS_OFF = 1, - EMBER_ZCL_APPLIANCE_STATUS_STAND_BY = 2, - EMBER_ZCL_APPLIANCE_STATUS_PROGRAMMED = 3, - EMBER_ZCL_APPLIANCE_STATUS_PROGRAMMED_WAITING_TO_START = 4, - EMBER_ZCL_APPLIANCE_STATUS_RUNNING = 5, - EMBER_ZCL_APPLIANCE_STATUS_PAUSE = 6, - EMBER_ZCL_APPLIANCE_STATUS_END_PROGRAMMED = 7, - EMBER_ZCL_APPLIANCE_STATUS_FAILURE = 8, - EMBER_ZCL_APPLIANCE_STATUS_PROGRAMME_INTERRUPTED = 9, - EMBER_ZCL_APPLIANCE_STATUS_IDLE = 10, - EMBER_ZCL_APPLIANCE_STATUS_RINSE_HOLD = 11, - EMBER_ZCL_APPLIANCE_STATUS_SERVICE = 12, - EMBER_ZCL_APPLIANCE_STATUS_SUPERFREEZING = 13, - EMBER_ZCL_APPLIANCE_STATUS_SUPERCOOLING = 14, - EMBER_ZCL_APPLIANCE_STATUS_SUPERHEATING = 15, -}; - // Enum for ApplicationBasicStatus enum EmberAfApplicationBasicStatus : uint8_t { @@ -129,15 +41,6 @@ enum EmberAfApplicationLauncherStatus : uint8_t EMBER_ZCL_APPLICATION_LAUNCHER_STATUS_SYSTEM_BUSY = 2, }; -// Enum for AssociationFailureCause -enum EmberAfAssociationFailureCause : uint8_t -{ - EMBER_ZCL_ASSOCIATION_FAILURE_CAUSE_UNKNOWN = 0, - EMBER_ZCL_ASSOCIATION_FAILURE_CAUSE_ASSOCIATION_FAILED = 1, - EMBER_ZCL_ASSOCIATION_FAILURE_CAUSE_AUTHENTICATION_FAILED = 2, - EMBER_ZCL_ASSOCIATION_FAILURE_CAUSE_SSID_NOT_FOUND = 3, -}; - // Enum for AttributeWritePermission enum EmberAfAttributeWritePermission : uint8_t { @@ -177,69 +80,6 @@ enum EmberAfBarrierControlMovingState : uint8_t EMBER_ZCL_BARRIER_CONTROL_MOVING_STATE_OPENING = 2, }; -// Enum for BatChargeFaultType -enum EmberAfBatChargeFaultType : uint8_t -{ - EMBER_ZCL_BAT_CHARGE_FAULT_TYPE_UNSPECFIED = 0, - EMBER_ZCL_BAT_CHARGE_FAULT_TYPE_AMBIENT_TOO_HOT = 1, - EMBER_ZCL_BAT_CHARGE_FAULT_TYPE_AMBIENT_TOO_COLD = 2, - EMBER_ZCL_BAT_CHARGE_FAULT_TYPE_BATTERY_TOO_HOT = 3, - EMBER_ZCL_BAT_CHARGE_FAULT_TYPE_BATTERY_TOO_COLD = 4, - EMBER_ZCL_BAT_CHARGE_FAULT_TYPE_BATTERY_ABSENT = 5, - EMBER_ZCL_BAT_CHARGE_FAULT_TYPE_BATTERY_OVER_VOLTAGE = 6, - EMBER_ZCL_BAT_CHARGE_FAULT_TYPE_BATTERY_UNDER_VOLTAGE = 7, - EMBER_ZCL_BAT_CHARGE_FAULT_TYPE_CHARGER_OVER_VOLTAGE = 8, - EMBER_ZCL_BAT_CHARGE_FAULT_TYPE_CHARGER_UNDER_VOLTAGE = 9, - EMBER_ZCL_BAT_CHARGE_FAULT_TYPE_SAFETY_TIMEOUT = 10, -}; - -// Enum for BatChargeLevel -enum EmberAfBatChargeLevel : uint8_t -{ - EMBER_ZCL_BAT_CHARGE_LEVEL_OK = 0, - EMBER_ZCL_BAT_CHARGE_LEVEL_WARNING = 1, - EMBER_ZCL_BAT_CHARGE_LEVEL_CRITICAL = 2, -}; - -// Enum for BatChargeState -enum EmberAfBatChargeState : uint8_t -{ - EMBER_ZCL_BAT_CHARGE_STATE_UNKNOWN = 0, - EMBER_ZCL_BAT_CHARGE_STATE_IS_CHARGING = 1, - EMBER_ZCL_BAT_CHARGE_STATE_IS_AT_FULL_CHARGE = 2, - EMBER_ZCL_BAT_CHARGE_STATE_IS_NOT_CHARGING = 3, -}; - -// Enum for BatFaultType -enum EmberAfBatFaultType : uint8_t -{ - EMBER_ZCL_BAT_FAULT_TYPE_UNSPECFIED = 0, - EMBER_ZCL_BAT_FAULT_TYPE_OVER_TEMP = 1, - EMBER_ZCL_BAT_FAULT_TYPE_UNDER_TEMP = 2, -}; - -// Enum for BatReplaceability -enum EmberAfBatReplaceability : uint8_t -{ - EMBER_ZCL_BAT_REPLACEABILITY_UNSPECIFIED = 0, - EMBER_ZCL_BAT_REPLACEABILITY_NOT_REPLACEABLE = 1, - EMBER_ZCL_BAT_REPLACEABILITY_USER_REPLACEABLE = 2, - EMBER_ZCL_BAT_REPLACEABILITY_FACTORY_REPLACEABLE = 3, -}; - -// Enum for BatterySize -enum EmberAfBatterySize : uint8_t -{ - EMBER_ZCL_BATTERY_SIZE_NO_BATTERY = 0, - EMBER_ZCL_BATTERY_SIZE_BUILT_IN = 1, - EMBER_ZCL_BATTERY_SIZE_OTHER = 2, - EMBER_ZCL_BATTERY_SIZE_AA = 3, - EMBER_ZCL_BATTERY_SIZE_AAA = 4, - EMBER_ZCL_BATTERY_SIZE_C = 5, - EMBER_ZCL_BATTERY_SIZE_D = 6, - EMBER_ZCL_BATTERY_SIZE_UNKNOWN = 255, -}; - // Enum for BootReasonType enum EmberAfBootReasonType : uint8_t { @@ -252,13 +92,6 @@ enum EmberAfBootReasonType : uint8_t EMBER_ZCL_BOOT_REASON_TYPE_SOFTWARE_RESET = 6, }; -// Enum for CecedSpecificationVersion -enum EmberAfCecedSpecificationVersion : uint8_t -{ - EMBER_ZCL_CECED_SPECIFICATION_VERSION_COMPLIANT_WITH_V10_NOT_CERTIFIED = 16, - EMBER_ZCL_CECED_SPECIFICATION_VERSION_COMPLIANT_WITH_V10_CERTIFIED = 26, -}; - // Enum for ChangeReasonEnum enum EmberAfChangeReasonEnum : uint8_t { @@ -298,45 +131,6 @@ enum EmberAfColorMode : uint8_t EMBER_ZCL_COLOR_MODE_COLOR_TEMPERATURE = 2, }; -// Enum for CommandIdentification -enum EmberAfCommandIdentification : uint8_t -{ - EMBER_ZCL_COMMAND_IDENTIFICATION_START = 1, - EMBER_ZCL_COMMAND_IDENTIFICATION_STOP = 2, - EMBER_ZCL_COMMAND_IDENTIFICATION_PAUSE = 3, - EMBER_ZCL_COMMAND_IDENTIFICATION_START_SUPERFREEZING = 4, - EMBER_ZCL_COMMAND_IDENTIFICATION_STOP_SUPERFREEZING = 5, - EMBER_ZCL_COMMAND_IDENTIFICATION_START_SUPERCOOLING = 6, - EMBER_ZCL_COMMAND_IDENTIFICATION_STOP_SUPERCOOLING = 7, - EMBER_ZCL_COMMAND_IDENTIFICATION_DISABLE_GAS = 8, - EMBER_ZCL_COMMAND_IDENTIFICATION_ENABLE_GAS = 9, - EMBER_ZCL_COMMAND_IDENTIFICATION_ENABLE_ENERGY_CONTROL = 10, - EMBER_ZCL_COMMAND_IDENTIFICATION_DISABLE_ENERGY_CONTROL = 11, -}; - -// Enum for ContentLaunchMetricType -enum EmberAfContentLaunchMetricType : uint8_t -{ - EMBER_ZCL_CONTENT_LAUNCH_METRIC_TYPE_PIXELS = 0, - EMBER_ZCL_CONTENT_LAUNCH_METRIC_TYPE_PERCENTAGE = 1, -}; - -// Enum for ContentLaunchParameterEnum -enum EmberAfContentLaunchParameterEnum : uint8_t -{ - EMBER_ZCL_CONTENT_LAUNCH_PARAMETER_ENUM_ACTOR = 0, - EMBER_ZCL_CONTENT_LAUNCH_PARAMETER_ENUM_CHANNEL = 1, - EMBER_ZCL_CONTENT_LAUNCH_PARAMETER_ENUM_CHARACTER = 2, - EMBER_ZCL_CONTENT_LAUNCH_PARAMETER_ENUM_EVENT = 3, - EMBER_ZCL_CONTENT_LAUNCH_PARAMETER_ENUM_FRANCHISE = 4, - EMBER_ZCL_CONTENT_LAUNCH_PARAMETER_ENUM_GENRE = 5, - EMBER_ZCL_CONTENT_LAUNCH_PARAMETER_ENUM_LEAGUE = 6, - EMBER_ZCL_CONTENT_LAUNCH_PARAMETER_ENUM_POPULARITY = 7, - EMBER_ZCL_CONTENT_LAUNCH_PARAMETER_ENUM_SPORT = 8, - EMBER_ZCL_CONTENT_LAUNCH_PARAMETER_ENUM_SPORTS_TEAM = 9, - EMBER_ZCL_CONTENT_LAUNCH_PARAMETER_ENUM_VIDEO = 10, -}; - // Enum for ContentLaunchStatus enum EmberAfContentLaunchStatus : uint8_t { @@ -352,28 +146,6 @@ enum EmberAfContentLaunchStreamingType : uint8_t EMBER_ZCL_CONTENT_LAUNCH_STREAMING_TYPE_HLS = 1, }; -// Enum for DataQualityId -enum EmberAfDataQualityId : uint16_t -{ - EMBER_ZCL_DATA_QUALITY_ID_ALL_DATA_CERTIFIED = 0, - EMBER_ZCL_DATA_QUALITY_ID_ONLY_INSTANTANEOUS_POWER_NOT_CERTIFIED = 1, - EMBER_ZCL_DATA_QUALITY_ID_ONLY_CUMULATED_CONSUMPTION_NOT_CERTIFIED = 2, - EMBER_ZCL_DATA_QUALITY_ID_NOT_CERTIFIED_DATA = 3, -}; - -// Enum for DehumidifcationLockout -enum EmberAfDehumidifcationLockout : uint8_t -{ - EMBER_ZCL_DEHUMIDIFCATION_LOCKOUT_NOT_ALLOWED = 0, - EMBER_ZCL_DEHUMIDIFCATION_LOCKOUT_ALLOWED = 1, -}; - -// Enum for DeviceStatus2Structure -enum EmberAfDeviceStatus2Structure : uint8_t -{ - EMBER_ZCL_DEVICE_STATUS2_STRUCTURE_IRIS_SYMPTOM_CODE = 32, -}; - // Enum for DoorLockEventSource enum EmberAfDoorLockEventSource : uint8_t { @@ -435,30 +207,6 @@ enum EmberAfDoorLockProgrammingEventCode : uint8_t EMBER_ZCL_DOOR_LOCK_PROGRAMMING_EVENT_CODE_ID_DELETED = 6, }; -// Enum for DoorLockSecurityLevel -enum EmberAfDoorLockSecurityLevel : uint8_t -{ - EMBER_ZCL_DOOR_LOCK_SECURITY_LEVEL_NETWORK_SECURITY = 0, - EMBER_ZCL_DOOR_LOCK_SECURITY_LEVEL_APS_SECURITY = 1, -}; - -// Enum for DoorLockSetPinOrIdStatus -enum EmberAfDoorLockSetPinOrIdStatus : uint8_t -{ - EMBER_ZCL_DOOR_LOCK_SET_PIN_OR_ID_STATUS_SUCCESS = 0, - EMBER_ZCL_DOOR_LOCK_SET_PIN_OR_ID_STATUS_GENERAL_FAILURE = 1, - EMBER_ZCL_DOOR_LOCK_SET_PIN_OR_ID_STATUS_MEMORY_FULL = 2, - EMBER_ZCL_DOOR_LOCK_SET_PIN_OR_ID_STATUS_DUPLICATE_CODE_ERROR = 3, -}; - -// Enum for DoorLockSoundVolume -enum EmberAfDoorLockSoundVolume : uint8_t -{ - EMBER_ZCL_DOOR_LOCK_SOUND_VOLUME_SILENT = 0, - EMBER_ZCL_DOOR_LOCK_SOUND_VOLUME_LOW = 1, - EMBER_ZCL_DOOR_LOCK_SOUND_VOLUME_HIGH = 2, -}; - // Enum for DoorLockState enum EmberAfDoorLockState : uint8_t { @@ -467,21 +215,6 @@ enum EmberAfDoorLockState : uint8_t EMBER_ZCL_DOOR_LOCK_STATE_UNLOCKED = 2, }; -// Enum for DoorLockType -enum EmberAfDoorLockType : uint8_t -{ - EMBER_ZCL_DOOR_LOCK_TYPE_DEAD_BOLT = 0, - EMBER_ZCL_DOOR_LOCK_TYPE_MAGNETIC = 1, - EMBER_ZCL_DOOR_LOCK_TYPE_MORTISE = 2, - EMBER_ZCL_DOOR_LOCK_TYPE_RIM = 3, - EMBER_ZCL_DOOR_LOCK_TYPE_LATCH_BOLT = 4, - EMBER_ZCL_DOOR_LOCK_TYPE_CYLINDRICAL = 5, - EMBER_ZCL_DOOR_LOCK_TYPE_TUBULAR = 6, - EMBER_ZCL_DOOR_LOCK_TYPE_INTERCONNECTED = 7, - EMBER_ZCL_DOOR_LOCK_TYPE_DEAD_LATCH = 8, - EMBER_ZCL_DOOR_LOCK_TYPE_OTHER = 9, -}; - // Enum for DoorLockUserStatus enum EmberAfDoorLockUserStatus : uint8_t { @@ -512,14 +245,6 @@ enum EmberAfDoorState : uint8_t EMBER_ZCL_DOOR_STATE_ERROR_UNSPECIFIED = 4, }; -// Enum for EndpointListTypeEnum -enum EmberAfEndpointListTypeEnum : uint8_t -{ - EMBER_ZCL_ENDPOINT_LIST_TYPE_ENUM_OTHER = 0, - EMBER_ZCL_ENDPOINT_LIST_TYPE_ENUM_ROOM = 1, - EMBER_ZCL_ENDPOINT_LIST_TYPE_ENUM_ZONE = 2, -}; - // Enum for EnhancedColorMode enum EmberAfEnhancedColorMode : uint8_t { @@ -529,171 +254,6 @@ enum EmberAfEnhancedColorMode : uint8_t EMBER_ZCL_ENHANCED_COLOR_MODE_ENHANCED_CURRENT_HUE_AND_CURRENT_SATURATION = 3, }; -// Enum for EventId -enum EmberAfEventId : uint8_t -{ - EMBER_ZCL_EVENT_ID_METER_COVER_REMOVED = 0, - EMBER_ZCL_EVENT_ID_METER_COVER_CLOSED = 1, - EMBER_ZCL_EVENT_ID_STRONG_MAGNETIC_FIELD = 2, - EMBER_ZCL_EVENT_ID_NO_STRONG_MAGNETIC_FIELD = 3, - EMBER_ZCL_EVENT_ID_BATTERY_FAILURE = 4, - EMBER_ZCL_EVENT_ID_LOW_BATTERY = 5, - EMBER_ZCL_EVENT_ID_PROGRAM_MEMORY_ERROR = 6, - EMBER_ZCL_EVENT_ID_RAM_ERROR = 7, - EMBER_ZCL_EVENT_ID_NV_MEMORY_ERROR = 8, - EMBER_ZCL_EVENT_ID_MEASUREMENT_SYSTEM_ERROR = 9, - EMBER_ZCL_EVENT_ID_WATCHDOG_ERROR = 10, - EMBER_ZCL_EVENT_ID_SUPPLY_DISCONNECT_FAILURE = 11, - EMBER_ZCL_EVENT_ID_SUPPLY_CONNECT_FAILURE = 12, - EMBER_ZCL_EVENT_ID_MEASURMENT_SOFTWARE_CHANGED = 13, - EMBER_ZCL_EVENT_ID_DST_ENABLED = 14, - EMBER_ZCL_EVENT_ID_DST_DISABLED = 15, - EMBER_ZCL_EVENT_ID_CLOCK_ADJ_BACKWARD = 16, - EMBER_ZCL_EVENT_ID_CLOCK_ADJ_FORWARD = 17, - EMBER_ZCL_EVENT_ID_CLOCK_INVALID = 18, - EMBER_ZCL_EVENT_ID_COMMS_ERROR_HAN = 19, - EMBER_ZCL_EVENT_ID_COMMS_OK_HAN = 20, - EMBER_ZCL_EVENT_ID_FRAUD_ATTEMPT = 21, - EMBER_ZCL_EVENT_ID_POWER_LOSS = 22, - EMBER_ZCL_EVENT_ID_INCORRECT_PROTOCOL = 23, - EMBER_ZCL_EVENT_ID_UNUSUAL_HAN_TRAFFIC = 24, - EMBER_ZCL_EVENT_ID_UNEXPECTED_CLOCK_CHANGE = 25, - EMBER_ZCL_EVENT_ID_COMMS_USING_UNAUTHENTICATED_COMPONENT = 26, - EMBER_ZCL_EVENT_ID_ERROR_REG_CLEAR = 27, - EMBER_ZCL_EVENT_ID_ALARM_REG_CLEAR = 28, - EMBER_ZCL_EVENT_ID_UNEXPECTED_HW_RESET = 29, - EMBER_ZCL_EVENT_ID_UNEXPECTED_PROGRAM_EXECUTION = 30, - EMBER_ZCL_EVENT_ID_EVENT_LOG_CLEARED = 31, - EMBER_ZCL_EVENT_ID_MANUAL_DISCONNECT = 32, - EMBER_ZCL_EVENT_ID_MANUAL_CONNECT = 33, - EMBER_ZCL_EVENT_ID_REMOTE_DISCONNECTION = 34, - EMBER_ZCL_EVENT_ID_LOCAL_DISCONNECTION = 35, - EMBER_ZCL_EVENT_ID_LIMIT_THRESHOLD_EXCEEDED = 36, - EMBER_ZCL_EVENT_ID_LIMIT_THRESHOLD_OK = 37, - EMBER_ZCL_EVENT_ID_LIMIT_THRESHOLD_CHANGED = 38, - EMBER_ZCL_EVENT_ID_MAXIMUM_DEMAND_EXCEEDED = 39, - EMBER_ZCL_EVENT_ID_PROFILE_CLEARED = 40, - EMBER_ZCL_EVENT_ID_FIRMWARE_READY_FOR_ACTIVATION = 41, - EMBER_ZCL_EVENT_ID_FIRMWARE_ACTIVATED = 42, - EMBER_ZCL_EVENT_ID_PATCH_FAILURE = 43, - EMBER_ZCL_EVENT_ID_TOU_TARIFF_ACTIVATION = 44, - EMBER_ZCL_EVENT_ID_8X8_TARIFFACTIVATED = 45, - EMBER_ZCL_EVENT_ID_SINGLE_TARIFF_RATE_ACTIVATED = 46, - EMBER_ZCL_EVENT_ID_ASYNCHRONOUS_BILLING_OCCURRED = 47, - EMBER_ZCL_EVENT_ID_SYNCHRONOUS_BILLING_OCCURRED = 48, - EMBER_ZCL_EVENT_ID_INCORRECT_POLARITY = 128, - EMBER_ZCL_EVENT_ID_CURRENT_NO_VOLTAGE = 129, - EMBER_ZCL_EVENT_ID_UNDER_VOLTAGE = 130, - EMBER_ZCL_EVENT_ID_OVER_VOLTAGE = 131, - EMBER_ZCL_EVENT_ID_NORMAL_VOLTAGE = 132, - EMBER_ZCL_EVENT_ID_PF_BELOW_THRESHOLD = 133, - EMBER_ZCL_EVENT_ID_PF_ABOVE_THRESHOLD = 134, - EMBER_ZCL_EVENT_ID_TERMINAL_COVER_REMOVED = 135, - EMBER_ZCL_EVENT_ID_TERMINAL_COVER_CLOSED = 136, - EMBER_ZCL_EVENT_ID_REVERSE_FLOW = 160, - EMBER_ZCL_EVENT_ID_TILT_TAMPER = 161, - EMBER_ZCL_EVENT_ID_BATTERY_COVER_REMOVED = 162, - EMBER_ZCL_EVENT_ID_BATTERY_COVER_CLOSED = 163, - EMBER_ZCL_EVENT_ID_EXCESS_FLOW = 164, - EMBER_ZCL_EVENT_ID_CREDIT_OK = 192, - EMBER_ZCL_EVENT_ID_LOW_CREDIT = 193, - EMBER_ZCL_EVENT_ID_EMERGENCY_CREDIT_IN_USE = 192, - EMBER_ZCL_EVENT_ID_EMERGENCY_CREDIT_EXHAUSTED = 193, - EMBER_ZCL_EVENT_ID_ZERO_CREDIT_EC_NOT_SELECTED = 194, - EMBER_ZCL_EVENT_ID_SUPPLY_ON = 195, - EMBER_ZCL_EVENT_ID_SUPPLY_OFF_AARMED = 196, - EMBER_ZCL_EVENT_ID_SUPPLY_OFF = 197, - EMBER_ZCL_EVENT_ID_DISCOUNT_APPLIED = 198, - EMBER_ZCL_EVENT_ID_MANUFACTURER_SPECIFIC_A = 224, - EMBER_ZCL_EVENT_ID_MANUFACTURER_SPECIFIC_B = 225, - EMBER_ZCL_EVENT_ID_MANUFACTURER_SPECIFIC_C = 226, - EMBER_ZCL_EVENT_ID_MANUFACTURER_SPECIFIC_D = 227, - EMBER_ZCL_EVENT_ID_MANUFACTURER_SPECIFIC_E = 228, - EMBER_ZCL_EVENT_ID_MANUFACTURER_SPECIFIC_F = 229, - EMBER_ZCL_EVENT_ID_MANUFACTURER_SPECIFIC_G = 230, - EMBER_ZCL_EVENT_ID_MANUFACTURER_SPECIFIC_H = 231, - EMBER_ZCL_EVENT_ID_MANUFACTURER_SPECIFIC_I = 232, -}; - -// Enum for EventIdentification -enum EmberAfEventIdentification : uint8_t -{ - EMBER_ZCL_EVENT_IDENTIFICATION_END_OF_CYCLE = 1, - EMBER_ZCL_EVENT_IDENTIFICATION_TEMPERATURE_REACHED = 4, - EMBER_ZCL_EVENT_IDENTIFICATION_END_OF_COOKING = 5, - EMBER_ZCL_EVENT_IDENTIFICATION_SWITCHING_OFF = 6, - EMBER_ZCL_EVENT_IDENTIFICATION_WRONG_DATA = 7, -}; - -// Enum for FanMode -enum EmberAfFanMode : uint8_t -{ - EMBER_ZCL_FAN_MODE_OFF = 0, - EMBER_ZCL_FAN_MODE_LOW = 1, - EMBER_ZCL_FAN_MODE_MEDIUM = 2, - EMBER_ZCL_FAN_MODE_HIGH = 3, - EMBER_ZCL_FAN_MODE_ON = 4, - EMBER_ZCL_FAN_MODE_AUTO = 5, - EMBER_ZCL_FAN_MODE_SMART = 6, -}; - -// Enum for FanModeSequence -enum EmberAfFanModeSequence : uint8_t -{ - EMBER_ZCL_FAN_MODE_SEQUENCE_LOW_MED_HIGH = 0, - EMBER_ZCL_FAN_MODE_SEQUENCE_LOW_HIGH = 1, - EMBER_ZCL_FAN_MODE_SEQUENCE_LOW_MED_HIGH_AUTO = 2, - EMBER_ZCL_FAN_MODE_SEQUENCE_LOW_HIGH_AUTO = 3, - EMBER_ZCL_FAN_MODE_SEQUENCE_ON_AUTO = 4, -}; - -// Enum for GeneralCommissioningError -enum EmberAfGeneralCommissioningError : uint8_t -{ - EMBER_ZCL_GENERAL_COMMISSIONING_ERROR_OK = 0, - EMBER_ZCL_GENERAL_COMMISSIONING_ERROR_VALUE_OUTSIDE_RANGE = 1, - EMBER_ZCL_GENERAL_COMMISSIONING_ERROR_INVALID_AUTHENTICATION = 2, -}; - -// Enum for GenericDeviceClass -enum EmberAfGenericDeviceClass : uint8_t -{ - EMBER_ZCL_GENERIC_DEVICE_CLASS_LIGHTING = 0, -}; - -// Enum for GenericDeviceType -enum EmberAfGenericDeviceType : uint8_t -{ - EMBER_ZCL_GENERIC_DEVICE_TYPE_INCANDESCENT = 0, - EMBER_ZCL_GENERIC_DEVICE_TYPE_SPOTLIGHT_HALOGEN = 1, - EMBER_ZCL_GENERIC_DEVICE_TYPE_HALOGEN_BULB = 2, - EMBER_ZCL_GENERIC_DEVICE_TYPE_CFL = 3, - EMBER_ZCL_GENERIC_DEVICE_TYPE_LINEAR_FLOURESCENT = 4, - EMBER_ZCL_GENERIC_DEVICE_TYPE_LED_BULB = 5, - EMBER_ZCL_GENERIC_DEVICE_TYPE_SPOTLIGHT_LED = 6, - EMBER_ZCL_GENERIC_DEVICE_TYPE_LED_STRIP = 7, - EMBER_ZCL_GENERIC_DEVICE_TYPE_LED_TUBE = 8, - EMBER_ZCL_GENERIC_DEVICE_TYPE_GENERIC_INDOOR_FIXTURE = 9, - EMBER_ZCL_GENERIC_DEVICE_TYPE_GENERIC_OUTDOOR_FIXTURE = 10, - EMBER_ZCL_GENERIC_DEVICE_TYPE_PENDANT_FIXTURE = 11, - EMBER_ZCL_GENERIC_DEVICE_TYPE_FLOOR_STANDING_FIXTURE = 12, - EMBER_ZCL_GENERIC_DEVICE_TYPE_GENERIC_CONTROLLER = 224, - EMBER_ZCL_GENERIC_DEVICE_TYPE_WALL_SWITCH = 225, - EMBER_ZCL_GENERIC_DEVICE_TYPE_PORTABLE_REMOTE_CONTROLLER = 226, - EMBER_ZCL_GENERIC_DEVICE_TYPE_MOTION_OR_LIGHT_SENSOR = 227, - EMBER_ZCL_GENERIC_DEVICE_TYPE_GENERIC_ACTUATOR = 240, - EMBER_ZCL_GENERIC_DEVICE_TYPE_PLUGIN_UNIT = 241, - EMBER_ZCL_GENERIC_DEVICE_TYPE_RETROFIT_ACTUATOR = 242, - EMBER_ZCL_GENERIC_DEVICE_TYPE_UNSPECIFIED = 255, -}; - -// Enum for GroupKeySecurityPolicy -enum EmberAfGroupKeySecurityPolicy : uint8_t -{ - EMBER_ZCL_GROUP_KEY_SECURITY_POLICY_STANDARD = 0, - EMBER_ZCL_GROUP_KEY_SECURITY_POLICY_LOW_LATENCY = 1, -}; - // Enum for HardwareFaultType enum EmberAfHardwareFaultType : uint8_t { @@ -734,73 +294,6 @@ enum EmberAfHueStepMode : uint8_t EMBER_ZCL_HUE_STEP_MODE_DOWN = 3, }; -// Enum for IasAceAlarmStatus -enum EmberAfIasAceAlarmStatus : uint8_t -{ - EMBER_ZCL_IAS_ACE_ALARM_STATUS_NO_ALARM = 0, - EMBER_ZCL_IAS_ACE_ALARM_STATUS_BURGLAR = 1, - EMBER_ZCL_IAS_ACE_ALARM_STATUS_FIRE = 2, - EMBER_ZCL_IAS_ACE_ALARM_STATUS_EMERGENCY = 3, - EMBER_ZCL_IAS_ACE_ALARM_STATUS_POLICE_PANIC = 4, - EMBER_ZCL_IAS_ACE_ALARM_STATUS_FIRE_PANIC = 5, - EMBER_ZCL_IAS_ACE_ALARM_STATUS_EMERGENCY_PANIC = 6, -}; - -// Enum for IasAceArmMode -enum EmberAfIasAceArmMode : uint8_t -{ - EMBER_ZCL_IAS_ACE_ARM_MODE_DISARM = 0, - EMBER_ZCL_IAS_ACE_ARM_MODE_ARM_DAY_HOME_ZONES_ONLY = 1, - EMBER_ZCL_IAS_ACE_ARM_MODE_ARM_NIGHT_SLEEP_ZONES_ONLY = 2, - EMBER_ZCL_IAS_ACE_ARM_MODE_ARM_ALL_ZONES = 3, -}; - -// Enum for IasAceArmNotification -enum EmberAfIasAceArmNotification : uint8_t -{ - EMBER_ZCL_IAS_ACE_ARM_NOTIFICATION_ALL_ZONES_DISARMED = 0, - EMBER_ZCL_IAS_ACE_ARM_NOTIFICATION_ONLY_DAY_HOME_ZONES_ARMED = 1, - EMBER_ZCL_IAS_ACE_ARM_NOTIFICATION_ONLY_NIGHT_SLEEP_ZONES_ARMED = 2, - EMBER_ZCL_IAS_ACE_ARM_NOTIFICATION_ALL_ZONES_ARMED = 3, - EMBER_ZCL_IAS_ACE_ARM_NOTIFICATION_INVALID_ARM_DISARM_CODE = 4, - EMBER_ZCL_IAS_ACE_ARM_NOTIFICATION_NOT_READY_TO_ARM = 5, - EMBER_ZCL_IAS_ACE_ARM_NOTIFICATION_ALREADY_DISARMED = 6, -}; - -// Enum for IasAceAudibleNotification -enum EmberAfIasAceAudibleNotification : uint8_t -{ - EMBER_ZCL_IAS_ACE_AUDIBLE_NOTIFICATION_MUTE = 0, - EMBER_ZCL_IAS_ACE_AUDIBLE_NOTIFICATION_DEFAULT_SOUND = 1, -}; - -// Enum for IasAceBypassResult -enum EmberAfIasAceBypassResult : uint8_t -{ - EMBER_ZCL_IAS_ACE_BYPASS_RESULT_ZONE_BYPASSED = 0, - EMBER_ZCL_IAS_ACE_BYPASS_RESULT_ZONE_NOT_BYPASSED = 1, - EMBER_ZCL_IAS_ACE_BYPASS_RESULT_NOT_ALLOWED = 2, - EMBER_ZCL_IAS_ACE_BYPASS_RESULT_INVALID_ZONE_ID = 3, - EMBER_ZCL_IAS_ACE_BYPASS_RESULT_UNKNOWN_ZONE_ID = 4, - EMBER_ZCL_IAS_ACE_BYPASS_RESULT_INVALID_ARM_DISARM_CODE = 5, -}; - -// Enum for IasAcePanelStatus -enum EmberAfIasAcePanelStatus : uint8_t -{ - EMBER_ZCL_IAS_ACE_PANEL_STATUS_PANEL_DISARMED = 0, - EMBER_ZCL_IAS_ACE_PANEL_STATUS_ARMED_STAY = 1, - EMBER_ZCL_IAS_ACE_PANEL_STATUS_ARMED_NIGHT = 2, - EMBER_ZCL_IAS_ACE_PANEL_STATUS_ARMED_AWAY = 3, - EMBER_ZCL_IAS_ACE_PANEL_STATUS_EXIT_DELAY = 4, - EMBER_ZCL_IAS_ACE_PANEL_STATUS_ENTRY_DELAY = 5, - EMBER_ZCL_IAS_ACE_PANEL_STATUS_NOT_READY_TO_ARM = 6, - EMBER_ZCL_IAS_ACE_PANEL_STATUS_IN_ALARM = 7, - EMBER_ZCL_IAS_ACE_PANEL_STATUS_ARMING_STAY = 8, - EMBER_ZCL_IAS_ACE_PANEL_STATUS_ARMING_NIGHT = 9, - EMBER_ZCL_IAS_ACE_PANEL_STATUS_ARMING_AWAY = 10, -}; - // Enum for IasEnrollResponseCode enum EmberAfIasEnrollResponseCode : uint8_t { @@ -993,46 +486,6 @@ enum EmberAfLevelControlOptions : uint8_t EMBER_ZCL_LEVEL_CONTROL_OPTIONS_COUPLE_COLOR_TEMP_TO_LEVEL = 2, }; -// Enum for LevelStatus -enum EmberAfLevelStatus : uint8_t -{ - EMBER_ZCL_LEVEL_STATUS_ON_TARGET = 0, - EMBER_ZCL_LEVEL_STATUS_BELOW_TARGET = 1, - EMBER_ZCL_LEVEL_STATUS_ABOVE_TARGET = 2, -}; - -// Enum for LightSensorType -enum EmberAfLightSensorType : uint8_t -{ - EMBER_ZCL_LIGHT_SENSOR_TYPE_PHOTODIODE = 0, - EMBER_ZCL_LIGHT_SENSOR_TYPE_CMOS = 1, -}; - -// Enum for LogsIntent -enum EmberAfLogsIntent : uint8_t -{ - EMBER_ZCL_LOGS_INTENT_END_USER_SUPPORT = 0, - EMBER_ZCL_LOGS_INTENT_NETWORK_DIAG = 1, - EMBER_ZCL_LOGS_INTENT_CRASH_LOGS = 2, -}; - -// Enum for LogsStatus -enum EmberAfLogsStatus : uint8_t -{ - EMBER_ZCL_LOGS_STATUS_SUCCESS = 0, - EMBER_ZCL_LOGS_STATUS_EXHAUSTED = 1, - EMBER_ZCL_LOGS_STATUS_NO_LOGS = 2, - EMBER_ZCL_LOGS_STATUS_BUSY = 3, - EMBER_ZCL_LOGS_STATUS_DENIED = 4, -}; - -// Enum for LogsTransferProtocol -enum EmberAfLogsTransferProtocol : uint8_t -{ - EMBER_ZCL_LOGS_TRANSFER_PROTOCOL_RESPONSE_PAYLOAD = 0, - EMBER_ZCL_LOGS_TRANSFER_PROTOCOL_BDX = 1, -}; - // Enum for MediaInputType enum EmberAfMediaInputType : uint8_t { @@ -1070,50 +523,6 @@ enum EmberAfMediaPlaybackStatus : uint8_t EMBER_ZCL_MEDIA_PLAYBACK_STATUS_SEEK_OUT_OF_RANGE = 5, }; -// Enum for MessagingControlConfirmation -enum EmberAfMessagingControlConfirmation : uint8_t -{ - EMBER_ZCL_MESSAGING_CONTROL_CONFIRMATION_NOT_REQUIRED = 0, - EMBER_ZCL_MESSAGING_CONTROL_CONFIRMATION_REQUIRED = 128, -}; - -// Enum for MessagingControlEnhancedConfirmation -enum EmberAfMessagingControlEnhancedConfirmation : uint8_t -{ - EMBER_ZCL_MESSAGING_CONTROL_ENHANCED_CONFIRMATION_NOT_REQUIRED = 0, - EMBER_ZCL_MESSAGING_CONTROL_ENHANCED_CONFIRMATION_REQUIRED = 32, -}; - -// Enum for MessagingControlImportance -enum EmberAfMessagingControlImportance : uint8_t -{ - EMBER_ZCL_MESSAGING_CONTROL_IMPORTANCE_LOW = 0, - EMBER_ZCL_MESSAGING_CONTROL_IMPORTANCE_MEDIUM = 4, - EMBER_ZCL_MESSAGING_CONTROL_IMPORTANCE_HIGH = 8, - EMBER_ZCL_MESSAGING_CONTROL_IMPORTANCE_CRITICAL = 12, -}; - -// Enum for MessagingControlTransmission -enum EmberAfMessagingControlTransmission : uint8_t -{ - EMBER_ZCL_MESSAGING_CONTROL_TRANSMISSION_NORMAL = 0, - EMBER_ZCL_MESSAGING_CONTROL_TRANSMISSION_NORMAL_AND_ANONYMOUS = 1, - EMBER_ZCL_MESSAGING_CONTROL_TRANSMISSION_ANONYMOUS = 2, - EMBER_ZCL_MESSAGING_CONTROL_TRANSMISSION_RESERVED = 3, -}; - -// Enum for MeterTypeId -enum EmberAfMeterTypeId : uint16_t -{ - EMBER_ZCL_METER_TYPE_ID_UTILITY_PRIMARY_METER = 0, - EMBER_ZCL_METER_TYPE_ID_UTILITY_PRODUCTION_METER = 1, - EMBER_ZCL_METER_TYPE_ID_UTILITY_SECONDARY_METER = 2, - EMBER_ZCL_METER_TYPE_ID_PRIVATE_PRIMARY_METER = 256, - EMBER_ZCL_METER_TYPE_ID_PRIVATE_PRODUCTION_METER = 257, - EMBER_ZCL_METER_TYPE_ID_PRIVATE_SECONDARY_METERS = 258, - EMBER_ZCL_METER_TYPE_ID_GENERIC_METER = 272, -}; - // Enum for MoveMode enum EmberAfMoveMode : uint8_t { @@ -1121,14 +530,6 @@ enum EmberAfMoveMode : uint8_t EMBER_ZCL_MOVE_MODE_DOWN = 1, }; -// Enum for NavigateTargetStatus -enum EmberAfNavigateTargetStatus : uint8_t -{ - EMBER_ZCL_NAVIGATE_TARGET_STATUS_SUCCESS = 0, - EMBER_ZCL_NAVIGATE_TARGET_STATUS_APP_NOT_AVAILABLE = 1, - EMBER_ZCL_NAVIGATE_TARGET_STATUS_SYSTEM_BUSY = 2, -}; - // Enum for NetworkCommissioningError enum EmberAfNetworkCommissioningError : uint8_t { @@ -1154,15 +555,6 @@ enum EmberAfNetworkCommissioningError : uint8_t EMBER_ZCL_NETWORK_COMMISSIONING_ERROR_UNKNOWN_ERROR = 19, }; -// Enum for NetworkFault -enum EmberAfNetworkFault : uint8_t -{ - EMBER_ZCL_NETWORK_FAULT_UNSPECIFIED = 0, - EMBER_ZCL_NETWORK_FAULT_LINK_DOWN = 1, - EMBER_ZCL_NETWORK_FAULT_HARDWARE_FAILURE = 2, - EMBER_ZCL_NETWORK_FAULT_NETWORK_JAMMED = 3, -}; - // Enum for NetworkFaultType enum EmberAfNetworkFaultType : uint8_t { @@ -1220,15 +612,6 @@ enum EmberAfOTAQueryStatus : uint8_t EMBER_ZCL_OTA_QUERY_STATUS_NOT_AVAILABLE = 2, }; -// Enum for OccupancySensorType -enum EmberAfOccupancySensorType : uint8_t -{ - EMBER_ZCL_OCCUPANCY_SENSOR_TYPE_PIR = 0, - EMBER_ZCL_OCCUPANCY_SENSOR_TYPE_ULTRASONIC = 1, - EMBER_ZCL_OCCUPANCY_SENSOR_TYPE_PIR_AND_ULTRASONIC = 2, - EMBER_ZCL_OCCUPANCY_SENSOR_TYPE_PHYSICAL_CONTACT = 3, -}; - // Enum for OnOffDelayedAllOffEffectVariant enum EmberAfOnOffDelayedAllOffEffectVariant : uint8_t { @@ -1250,13 +633,6 @@ enum EmberAfOnOffEffectIdentifier : uint8_t EMBER_ZCL_ON_OFF_EFFECT_IDENTIFIER_DYING_LIGHT = 1, }; -// Enum for OperatingMode -enum EmberAfOperatingMode : uint8_t -{ - EMBER_ZCL_OPERATING_MODE_NORMAL = 0, - EMBER_ZCL_OPERATING_MODE_CONFIGURE = 1, -}; - // Enum for PHYRateType enum EmberAfPHYRateType : uint8_t { @@ -1272,96 +648,6 @@ enum EmberAfPHYRateType : uint8_t EMBER_ZCL_PHY_RATE_TYPE_400_G = 9, }; -// Enum for PhysicalEnvironment -enum EmberAfPhysicalEnvironment : uint8_t -{ - EMBER_ZCL_PHYSICAL_ENVIRONMENT_UNSPECIFIED = 0, - EMBER_ZCL_PHYSICAL_ENVIRONMENT_FIRST_PROFILE_SPECIFIED_VALUE = 1, - EMBER_ZCL_PHYSICAL_ENVIRONMENT_LAST_PROFILE_SPECIFIED_VALUE = 127, - EMBER_ZCL_PHYSICAL_ENVIRONMENT_UNKNOWN = 255, -}; - -// Enum for PowerProfileState -enum EmberAfPowerProfileState : uint8_t -{ - EMBER_ZCL_POWER_PROFILE_STATE_POWER_PROFILE_WAITING_TO_START = 1, - EMBER_ZCL_POWER_PROFILE_STATE_POWER_PROFILE_STARTED = 2, - EMBER_ZCL_POWER_PROFILE_STATE_ENERGY_PHASE_RUNNING = 3, - EMBER_ZCL_POWER_PROFILE_STATE_ENERGY_PHASE_ENDED = 4, - EMBER_ZCL_POWER_PROFILE_STATE_ENERGY_PHASE_WAITING_TO_START = 5, - EMBER_ZCL_POWER_PROFILE_STATE_ENERGY_PHASE_STARTED = 6, - EMBER_ZCL_POWER_PROFILE_STATE_POWER_PROFILE_ENDED = 7, - EMBER_ZCL_POWER_PROFILE_STATE_PROFILE_READY_FOR_SCHEDULING = 8, - EMBER_ZCL_POWER_PROFILE_STATE_POWER_PROFILE_SCHEDULED = 9, -}; - -// Enum for PowerSource -enum EmberAfPowerSource : uint8_t -{ - EMBER_ZCL_POWER_SOURCE_UNKNOWN = 0, - EMBER_ZCL_POWER_SOURCE_SINGLE_PHASE_MAINS = 1, - EMBER_ZCL_POWER_SOURCE_THREE_PHASE_MAINS = 2, - EMBER_ZCL_POWER_SOURCE_BATTERY = 3, - EMBER_ZCL_POWER_SOURCE_DC_SOURCE = 4, - EMBER_ZCL_POWER_SOURCE_EMERGENCY_MAINS_CONSTANT_POWER = 5, - EMBER_ZCL_POWER_SOURCE_EMERGENCY_MAINS_TRANSFER_SWITCH = 6, - EMBER_ZCL_POWER_SOURCE_BATTERY_BACKUP = 128, -}; - -// Enum for PowerSourceStatus -enum EmberAfPowerSourceStatus : uint8_t -{ - EMBER_ZCL_POWER_SOURCE_STATUS_UNSPECFIED = 0, - EMBER_ZCL_POWER_SOURCE_STATUS_ACTIVE = 1, - EMBER_ZCL_POWER_SOURCE_STATUS_STANDBY = 2, - EMBER_ZCL_POWER_SOURCE_STATUS_UNAVAILABLE = 3, -}; - -// Enum for ProductCode -enum EmberAfProductCode : uint8_t -{ - EMBER_ZCL_PRODUCT_CODE_MANUFACTURER_DEFINED = 0, - EMBER_ZCL_PRODUCT_CODE_ITERNATIONAL_ARTICLE_NUMBER = 1, - EMBER_ZCL_PRODUCT_CODE_GLOBAL_TRADE_ITEM_NUMBER = 2, - EMBER_ZCL_PRODUCT_CODE_UNIVERSAL_PRODUCT_CODE = 3, - EMBER_ZCL_PRODUCT_CODE_STOCK_KEEPING_UNIT = 4, -}; - -// Enum for ProductTypeId -enum EmberAfProductTypeId : uint16_t -{ - EMBER_ZCL_PRODUCT_TYPE_ID_WHITE_GOODS = 0, - EMBER_ZCL_PRODUCT_TYPE_ID_DISHWASHER = 22017, - EMBER_ZCL_PRODUCT_TYPE_ID_TUMBLE_DRYER = 22018, - EMBER_ZCL_PRODUCT_TYPE_ID_WASHER_DRYER = 22019, - EMBER_ZCL_PRODUCT_TYPE_ID_WASHING_MACHINE = 22020, - EMBER_ZCL_PRODUCT_TYPE_ID_HOBS = 24067, - EMBER_ZCL_PRODUCT_TYPE_ID_INDUCTION_HOBS = 24073, - EMBER_ZCL_PRODUCT_TYPE_ID_OVEN = 24065, - EMBER_ZCL_PRODUCT_TYPE_ID_ELECTRICAL_OVEN = 24070, - EMBER_ZCL_PRODUCT_TYPE_ID_REFRIGERATOR_FREEZER = 26113, -}; - -// Enum for PumpControlMode -enum EmberAfPumpControlMode : uint8_t -{ - EMBER_ZCL_PUMP_CONTROL_MODE_CONSTANT_SPEED = 0, - EMBER_ZCL_PUMP_CONTROL_MODE_CONSTANT_PRESSURE = 1, - EMBER_ZCL_PUMP_CONTROL_MODE_PROPORTIONAL_PRESSURE = 2, - EMBER_ZCL_PUMP_CONTROL_MODE_CONSTANT_FLOW = 3, - EMBER_ZCL_PUMP_CONTROL_MODE_CONSTANT_TEMPERATURE = 5, - EMBER_ZCL_PUMP_CONTROL_MODE_AUTOMATIC = 7, -}; - -// Enum for PumpOperationMode -enum EmberAfPumpOperationMode : uint8_t -{ - EMBER_ZCL_PUMP_OPERATION_MODE_NORMAL = 0, - EMBER_ZCL_PUMP_OPERATION_MODE_MINIMUM = 1, - EMBER_ZCL_PUMP_OPERATION_MODE_MAXIMUM = 2, - EMBER_ZCL_PUMP_OPERATION_MODE_LOCAL = 3, -}; - // Enum for RadioFaultType enum EmberAfRadioFaultType : uint8_t { @@ -1382,29 +668,6 @@ enum EmberAfRegulatoryLocationType : uint8_t EMBER_ZCL_REGULATORY_LOCATION_TYPE_INDOOR_OUTDOOR = 2, }; -// Enum for RelativeHumidityDisplay -enum EmberAfRelativeHumidityDisplay : uint8_t -{ - EMBER_ZCL_RELATIVE_HUMIDITY_DISPLAY_NOT_DISPLAYED = 0, - EMBER_ZCL_RELATIVE_HUMIDITY_DISPLAY_DISPLAYED = 1, -}; - -// Enum for RelativeHumidityMode -enum EmberAfRelativeHumidityMode : uint8_t -{ - EMBER_ZCL_RELATIVE_HUMIDITY_MODE_MEASURE_LOCALLY = 0, - EMBER_ZCL_RELATIVE_HUMIDITY_MODE_UPDATED_OVER_THE_NETWORK = 1, -}; - -// Enum for RemoteEnableFlags -enum EmberAfRemoteEnableFlags : uint8_t -{ - EMBER_ZCL_REMOTE_ENABLE_FLAGS_DISABLED = 0, - EMBER_ZCL_REMOTE_ENABLE_FLAGS_TEMPORARILY_LOCKED_DISABLED = 7, - EMBER_ZCL_REMOTE_ENABLE_FLAGS_ENABLED_REMOTE_CONTROL = 15, - EMBER_ZCL_REMOTE_ENABLE_FLAGS_ENABLED_REMOTE_AND_ENERGY_CONTROL = 1, -}; - // Enum for RoutingRole enum EmberAfRoutingRole : uint8_t { @@ -1460,41 +723,6 @@ enum EmberAfSimpleEnum : uint8_t EMBER_ZCL_SIMPLE_ENUM_VALUE_C = 3, }; -// Enum for SquawkLevel -enum EmberAfSquawkLevel : uint8_t -{ - EMBER_ZCL_SQUAWK_LEVEL_LOW_LEVEL = 0, - EMBER_ZCL_SQUAWK_LEVEL_MEDIUM_LEVEL = 1, - EMBER_ZCL_SQUAWK_LEVEL_HIGH_LEVEL = 2, - EMBER_ZCL_SQUAWK_LEVEL_VERY_HIGH_LEVEL = 2, -}; - -// Enum for SquawkMode -enum EmberAfSquawkMode : uint8_t -{ - EMBER_ZCL_SQUAWK_MODE_SYSTEM_IS_ARMED = 0, - EMBER_ZCL_SQUAWK_MODE_SYSTEM_IS_DISARMED = 1, -}; - -// Enum for SquawkStobe -enum EmberAfSquawkStobe : uint8_t -{ - EMBER_ZCL_SQUAWK_STOBE_NO_STROBE = 0, - EMBER_ZCL_SQUAWK_STOBE_USE_STROBE = 1, -}; - -// Enum for StartOfWeek -enum EmberAfStartOfWeek : uint8_t -{ - EMBER_ZCL_START_OF_WEEK_SUNDAY = 0, - EMBER_ZCL_START_OF_WEEK_MONDAY = 1, - EMBER_ZCL_START_OF_WEEK_TUESDAY = 2, - EMBER_ZCL_START_OF_WEEK_WEDNESDAY = 3, - EMBER_ZCL_START_OF_WEEK_THURSDAY = 4, - EMBER_ZCL_START_OF_WEEK_FRIDAY = 5, - EMBER_ZCL_START_OF_WEEK_SATURDAY = 6, -}; - // Enum for StartUpOnOffValue enum EmberAfStartUpOnOffValue : uint8_t { @@ -1519,22 +747,6 @@ enum EmberAfStepMode : uint8_t EMBER_ZCL_STEP_MODE_DOWN = 1, }; -// Enum for SwitchActions -enum EmberAfSwitchActions : uint8_t -{ - EMBER_ZCL_SWITCH_ACTIONS_ON = 0, - EMBER_ZCL_SWITCH_ACTIONS_OFF = 1, - EMBER_ZCL_SWITCH_ACTIONS_TOGGLE = 2, -}; - -// Enum for SwitchType -enum EmberAfSwitchType : uint8_t -{ - EMBER_ZCL_SWITCH_TYPE_TOGGLE = 0, - EMBER_ZCL_SWITCH_TYPE_MOMENTARY = 1, - EMBER_ZCL_SWITCH_TYPE_MULTI_FUNCTION = 2, -}; - // Enum for TemperatureDisplayMode enum EmberAfTemperatureDisplayMode : uint8_t { @@ -1542,13 +754,6 @@ enum EmberAfTemperatureDisplayMode : uint8_t EMBER_ZCL_TEMPERATURE_DISPLAY_MODE_FAHRENHEIT = 1, }; -// Enum for TemperatureSetpointHold -enum EmberAfTemperatureSetpointHold : uint8_t -{ - EMBER_ZCL_TEMPERATURE_SETPOINT_HOLD_SETPOINT_HOLD_OFF = 0, - EMBER_ZCL_TEMPERATURE_SETPOINT_HOLD_SETPOINT_HOLD_ON = 1, -}; - // Enum for ThermostatControlSequence enum EmberAfThermostatControlSequence : uint8_t { @@ -1580,33 +785,6 @@ enum EmberAfThermostatSystemMode : uint8_t EMBER_ZCL_THERMOSTAT_SYSTEM_MODE_FAN_ONLY = 7, }; -// Enum for ThreadConnectionStatus -enum EmberAfThreadConnectionStatus : uint8_t -{ - EMBER_ZCL_THREAD_CONNECTION_STATUS_CONNECTED = 0, - EMBER_ZCL_THREAD_CONNECTION_STATUS_NOT_CONNECTED = 1, -}; - -// Enum for TimeEncoding -enum EmberAfTimeEncoding : uint8_t -{ - EMBER_ZCL_TIME_ENCODING_RELATIVE = 0, - EMBER_ZCL_TIME_ENCODING_ABSOLUTE = 64, -}; - -// Enum for TvChannelErrorType -enum EmberAfTvChannelErrorType : uint8_t -{ - EMBER_ZCL_TV_CHANNEL_ERROR_TYPE_MULTIPLE_MATCHES = 0, - EMBER_ZCL_TV_CHANNEL_ERROR_TYPE_NO_MATCHES = 1, -}; - -// Enum for TvChannelLineupInfoType -enum EmberAfTvChannelLineupInfoType : uint8_t -{ - EMBER_ZCL_TV_CHANNEL_LINEUP_INFO_TYPE_MSO = 0, -}; - // Enum for UpdateStateEnum enum EmberAfUpdateStateEnum : uint8_t { @@ -1621,35 +799,6 @@ enum EmberAfUpdateStateEnum : uint8_t EMBER_ZCL_UPDATE_STATE_ENUM_DELAYED_ON_USER_CONSENT = 8, }; -// Enum for WarningEvent -enum EmberAfWarningEvent : uint8_t -{ - EMBER_ZCL_WARNING_EVENT_WARNING1_OVERALL_POWER_ABOVE_AVAILABLE_POWER_LEVEL = 0, - EMBER_ZCL_WARNING_EVENT_WARNING2_OVERALL_POWER_ABOVE_POWER_THRESHOLD_LEVEL = 1, - EMBER_ZCL_WARNING_EVENT_WARNING3_OVERALL_POWER_BACK_BELOW_THE_AVAILABLE_POWER_LEVEL = 2, - EMBER_ZCL_WARNING_EVENT_WARNING4_OVERALL_POWER_BACK_BELOW_THE_POWER_THRESHOLD_LEVEL = 3, - EMBER_ZCL_WARNING_EVENT_WARNING5_OVERALL_POWER_WILL_BE_POTENTIALLY_ABOVE_AVAILABLE_POWER_LEVEL_IF_THE_APPLIANCE_STARTS = 4, -}; - -// Enum for WarningMode -enum EmberAfWarningMode : uint8_t -{ - EMBER_ZCL_WARNING_MODE_STOP = 0, - EMBER_ZCL_WARNING_MODE_BURGLAR = 1, - EMBER_ZCL_WARNING_MODE_FIRE = 2, - EMBER_ZCL_WARNING_MODE_EMERGENCY = 3, - EMBER_ZCL_WARNING_MODE_POLICE_PANIC = 4, - EMBER_ZCL_WARNING_MODE_FIRE_PANIC = 5, - EMBER_ZCL_WARNING_MODE_EMERGENCY_PANIC = 6, -}; - -// Enum for WarningStobe -enum EmberAfWarningStobe : uint8_t -{ - EMBER_ZCL_WARNING_STOBE_NO_STROBE = 0, - EMBER_ZCL_WARNING_STOBE_USE_STROBE = 1, -}; - // Enum for WcEndProductType enum EmberAfWcEndProductType : uint8_t { @@ -1696,13 +845,6 @@ enum EmberAfWcType : uint8_t EMBER_ZCL_WC_TYPE_UNKNOWN = 255, }; -// Enum for WiFiConnectionStatus -enum EmberAfWiFiConnectionStatus : uint8_t -{ - EMBER_ZCL_WI_FI_CONNECTION_STATUS_CONNECTED = 0, - EMBER_ZCL_WI_FI_CONNECTION_STATUS_NOT_CONNECTED = 1, -}; - // Enum for WiFiVersionType enum EmberAfWiFiVersionType : uint8_t { @@ -1714,21 +856,6 @@ enum EmberAfWiFiVersionType : uint8_t EMBER_ZCL_WI_FI_VERSION_TYPE_802__11AX = 5, }; -// Enum for WiredCurrentType -enum EmberAfWiredCurrentType : uint8_t -{ - EMBER_ZCL_WIRED_CURRENT_TYPE_AC = 0, - EMBER_ZCL_WIRED_CURRENT_TYPE_DC = 1, -}; - -// Enum for WiredFaultType -enum EmberAfWiredFaultType : uint8_t -{ - EMBER_ZCL_WIRED_FAULT_TYPE_UNSPECFIED = 0, - EMBER_ZCL_WIRED_FAULT_TYPE_OVER_VOLTAGE = 1, - EMBER_ZCL_WIRED_FAULT_TYPE_UNDER_VOLTAGE = 2, -}; - #define EMBER_AF_ALARM_MASK_GENERAL_HW_FAULT (1) #define EMBER_AF_ALARM_MASK_GENERAL_HW_FAULT_OFFSET (0) #define EMBER_AF_ALARM_MASK_GENERAL_SW_FAULT (2) From 50c8e543df47378c26f175f8b2d513002fb5912e Mon Sep 17 00:00:00 2001 From: Miles Bintz Date: Mon, 29 Nov 2021 17:56:26 -0600 Subject: [PATCH 10/42] Use "#include " unconditionally in InetInterface.cpp (#12334) --- src/inet/InetInterface.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/inet/InetInterface.cpp b/src/inet/InetInterface.cpp index ed6ce664cb6a8b..77bc7e9e419e73 100644 --- a/src/inet/InetInterface.cpp +++ b/src/inet/InetInterface.cpp @@ -49,13 +49,9 @@ #ifdef HAVE_SYS_SOCKIO_H #include #endif /* HAVE_SYS_SOCKIO_H */ +#include #include #include -#ifdef __ANDROID__ -#include "ifaddrs-android.h" -#else // !defined(__ANDROID__) -#include -#endif // !defined(__ANDROID__) #endif // CHIP_SYSTEM_CONFIG_USE_SOCKETS && CHIP_SYSTEM_CONFIG_USE_BSD_IFADDRS #if CHIP_SYSTEM_CONFIG_USE_ZEPHYR_NET_IF From c93f6848c72aa12c45c89a20cafed46f30d524ec Mon Sep 17 00:00:00 2001 From: Douglas Rocha Ferraz <2106161+rochaferraz@users.noreply.github.com> Date: Mon, 29 Nov 2021 18:56:54 -0500 Subject: [PATCH 11/42] new: Pigweed RPC signed int support (#12330) Change-Id: I6a5c37af1643a2d2be50bd22c120f4701795d44e Co-authored-by: Doug Ferraz --- .../pigweed/protos/attributes_service.proto | 119 +++++++++++++++++- .../common/pigweed/rpc_services/Attributes.h | 21 ++++ 2 files changed, 138 insertions(+), 2 deletions(-) diff --git a/examples/common/pigweed/protos/attributes_service.proto b/examples/common/pigweed/protos/attributes_service.proto index 2802c445f36a77..2705498450d658 100644 --- a/examples/common/pigweed/protos/attributes_service.proto +++ b/examples/common/pigweed/protos/attributes_service.proto @@ -70,9 +70,121 @@ enum AttributeType { ZCL_UNKNOWN_ATTRIBUTE_TYPE = 0xFF; // Unknown } +enum ClusterType { + ZCL_INVALID_CLUSTER_ID = 0x0000; + ZCL_POWER_CONFIG_CLUSTER_ID = 0x0001; + ZCL_DEVICE_TEMP_CLUSTER_ID = 0x0002; + ZCL_IDENTIFY_CLUSTER_ID = 0x0003; + ZCL_GROUPS_CLUSTER_ID = 0x0004; + ZCL_SCENES_CLUSTER_ID = 0x0005; + ZCL_ON_OFF_CLUSTER_ID = 0x0006; + ZCL_ON_OFF_SWITCH_CONFIG_CLUSTER_ID = 0x0007; + ZCL_LEVEL_CONTROL_CLUSTER_ID = 0x0008; + ZCL_ALARM_CLUSTER_ID = 0x0009; + ZCL_TIME_CLUSTER_ID = 0x000A; + ZCL_BINARY_INPUT_BASIC_CLUSTER_ID = 0x000F; + ZCL_POWER_PROFILE_CLUSTER_ID = 0x001A; + ZCL_APPLIANCE_CONTROL_CLUSTER_ID = 0x001B; + ZCL_DESCRIPTOR_CLUSTER_ID = 0x001D; + ZCL_POLL_CONTROL_CLUSTER_ID = 0x0020; + ZCL_BRIDGED_ACTIONS_CLUSTER_ID = 0x0025; + ZCL_BASIC_CLUSTER_ID = 0x0028; + ZCL_OTA_PROVIDER_CLUSTER_ID = 0x0029; + ZCL_OTA_REQUESTOR_CLUSTER_ID = 0x002A; + ZCL_POWER_SOURCE_CLUSTER_ID = 0x002F; + ZCL_GENERAL_COMMISSIONING_CLUSTER_ID = 0x0030; + ZCL_NETWORK_COMMISSIONING_CLUSTER_ID = 0x0031; + ZCL_DIAGNOSTIC_LOGS_CLUSTER_ID = 0x0032; + ZCL_GENERAL_DIAGNOSTICS_CLUSTER_ID = 0x0033; + ZCL_SOFTWARE_DIAGNOSTICS_CLUSTER_ID = 0x0034; + ZCL_THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID = 0x0035; + ZCL_WIFI_NETWORK_DIAGNOSTICS_CLUSTER_ID = 0x0036; + ZCL_ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER_ID = 0x0037; + ZCL_BRIDGED_DEVICE_BASIC_CLUSTER_ID = 0x0039; + ZCL_SWITCH_CLUSTER_ID = 0x003B; + ZCL_ADMINISTRATOR_COMMISSIONING_CLUSTER_ID = 0x003C; + ZCL_OPERATIONAL_CREDENTIALS_CLUSTER_ID = 0x003E; + ZCL_FIXED_LABEL_CLUSTER_ID = 0x0040; + ZCL_BOOLEAN_STATE_CLUSTER_ID = 0x0045; + ZCL_MODE_SELECT_CLUSTER_ID = 0x0050; + ZCL_SHADE_CONFIG_CLUSTER_ID = 0x0100; + ZCL_DOOR_LOCK_CLUSTER_ID = 0x0101; + ZCL_WINDOW_COVERING_CLUSTER_ID = 0x0102; + ZCL_BARRIER_CONTROL_CLUSTER_ID = 0x0103; + ZCL_PUMP_CONFIG_CONTROL_CLUSTER_ID = 0x0200; + ZCL_THERMOSTAT_CLUSTER_ID = 0x0201; + ZCL_FAN_CONTROL_CLUSTER_ID = 0x0202; + ZCL_DEHUMID_CONTROL_CLUSTER_ID = 0x0203; + ZCL_THERMOSTAT_UI_CONFIG_CLUSTER_ID = 0x0204; + ZCL_COLOR_CONTROL_CLUSTER_ID = 0x0300; + ZCL_BALLAST_CONFIGURATION_CLUSTER_ID = 0x0301; + ZCL_ILLUMINANCE_MEASUREMENT_CLUSTER_ID = 0x0400; + ZCL_TEMP_MEASUREMENT_CLUSTER_ID = 0x0402; + ZCL_PRESSURE_MEASUREMENT_CLUSTER_ID = 0x0403; + ZCL_FLOW_MEASUREMENT_CLUSTER_ID = 0x0404; + ZCL_RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER_ID = 0x0405; + ZCL_OCCUPANCY_SENSING_CLUSTER_ID = 0x0406; + ZCL_CARBON_MONOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 0x040C; + ZCL_CARBON_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 0x040D; + ZCL_ETHYLENE_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 0x040E; + ZCL_ETHYLENE_OXIDE_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 0x040F; + ZCL_HYDROGEN_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 0x0410; + ZCL_HYDROGEN_SULPHIDE_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 0x0411; + ZCL_NITRIC_OXIDE_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 0x0412; + ZCL_NITROGEN_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 0x0413; + ZCL_OXYGEN_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 0x0414; + ZCL_OZONE_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 0x0415; + ZCL_SULFUR_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 0x0416; + ZCL_DISSOLVED_OXYGEN_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 0x0417; + ZCL_BROMATE_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 0x0418; + ZCL_CHLORAMINES_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 0x0419; + ZCL_CHLORINE_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 0x041A; + ZCL_FECAL_COLIFORM_AND_E_COLI_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 0x041B; + ZCL_FLUORIDE_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 0x041C; + ZCL_HALOACETIC_ACIDS_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 0x041D; + ZCL_TOTAL_TRIHALOMETHANES_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 0x041E; + ZCL_TOTAL_COLIFORM_BACTERIA_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 0x041F; + ZCL_TURBIDITY_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 0x0420; + ZCL_COPPER_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 0x0421; + ZCL_LEAD_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 0x0422; + ZCL_MANGANESE_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 0x0423; + ZCL_SULFATE_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 0x0424; + ZCL_BROMODICHLOROMETHANE_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 0x0425; + ZCL_BROMOFORM_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 0x0426; + ZCL_CHLORODIBROMOMETHANE_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 0x0427; + ZCL_CHLOROFORM_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 0x0428; + ZCL_SODIUM_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 0x0429; + ZCL_IAS_ZONE_CLUSTER_ID = 0x0500; + ZCL_IAS_ACE_CLUSTER_ID = 0x0501; + ZCL_IAS_WD_CLUSTER_ID = 0x0502; + ZCL_WAKE_ON_LAN_CLUSTER_ID = 0x0503; + ZCL_TV_CHANNEL_CLUSTER_ID = 0x0504; + ZCL_TARGET_NAVIGATOR_CLUSTER_ID = 0x0505; + ZCL_MEDIA_PLAYBACK_CLUSTER_ID = 0x0506; + ZCL_MEDIA_INPUT_CLUSTER_ID = 0x0507; + ZCL_LOW_POWER_CLUSTER_ID = 0x0508; + ZCL_KEYPAD_INPUT_CLUSTER_ID = 0x0509; + ZCL_CONTENT_LAUNCH_CLUSTER_ID = 0x050A; + ZCL_AUDIO_OUTPUT_CLUSTER_ID = 0x050B; + ZCL_APPLICATION_LAUNCHER_CLUSTER_ID = 0x050C; + ZCL_APPLICATION_BASIC_CLUSTER_ID = 0x050D; + ZCL_ACCOUNT_LOGIN_CLUSTER_ID = 0x050E; + ZCL_TEST_CLUSTER_ID = 0x050F; + ZCL_MESSAGING_CLUSTER_ID = 0x0703; + ZCL_APPLIANCE_IDENTIFICATION_CLUSTER_ID = 0x0B00; + ZCL_METER_IDENTIFICATION_CLUSTER_ID = 0x0B01; + ZCL_APPLIANCE_EVENTS_AND_ALERT_CLUSTER_ID = 0x0B02; + ZCL_APPLIANCE_STATISTICS_CLUSTER_ID = 0x0B03; + ZCL_ELECTRICAL_MEASUREMENT_CLUSTER_ID = 0x0B04; + ZCL_BINDING_CLUSTER_ID = 0xF000; + ZCL_GROUP_KEY_MANAGEMENT_CLUSTER_ID = 0xF004; + ZCL_SAMPLE_MFG_SPECIFIC_CLUSTER_ID = 0xFC00; +} + + message AttributeMetadata { uint32 endpoint = 1; - uint32 cluster = 2; + ClusterType cluster = 2; uint32 attribute_id = 3; AttributeType type = 4; } @@ -84,6 +196,9 @@ message AttributeData { uint32 data_uint16 = 3; uint32 data_uint32 = 4; bytes data_bytes = 5; + int32 data_int8 = 6; + int32 data_int16 = 7; + int32 data_int32 = 8; }; } @@ -95,4 +210,4 @@ message AttributeWrite { service Attributes { rpc Write(AttributeWrite) returns (pw.protobuf.Empty){} rpc Read(AttributeMetadata) returns (AttributeData){} -} \ No newline at end of file +} diff --git a/examples/common/pigweed/rpc_services/Attributes.h b/examples/common/pigweed/rpc_services/Attributes.h index 58dd977adf3afa..6b48fb96f6c62a 100644 --- a/examples/common/pigweed/rpc_services/Attributes.h +++ b/examples/common/pigweed/rpc_services/Attributes.h @@ -49,6 +49,15 @@ class Attributes : public generated::Attributes case chip_rpc_AttributeData_data_uint32_tag: data = &request.data.data.data_uint32; break; + case chip_rpc_AttributeData_data_int8_tag: + data = &request.data.data.data_int8; + break; + case chip_rpc_AttributeData_data_int16_tag: + data = &request.data.data.data_int16; + break; + case chip_rpc_AttributeData_data_int32_tag: + data = &request.data.data.data_int32; + break; case chip_rpc_AttributeData_data_bytes_tag: data = &request.data.data.data_bytes; break; @@ -108,9 +117,21 @@ class Attributes : public generated::Attributes case chip_rpc_AttributeType_ZCL_INT56U_ATTRIBUTE_TYPE: case chip_rpc_AttributeType_ZCL_INT64U_ATTRIBUTE_TYPE: case chip_rpc_AttributeType_ZCL_INT8S_ATTRIBUTE_TYPE: + data = &response.data.data_int8; + size = sizeof(response.data.data_int8); + response.which_data = chip_rpc_AttributeData_data_int8_tag; + break; case chip_rpc_AttributeType_ZCL_INT16S_ATTRIBUTE_TYPE: + data = &response.data.data_int16; + size = sizeof(response.data.data_int16); + response.which_data = chip_rpc_AttributeData_data_int16_tag; + break; case chip_rpc_AttributeType_ZCL_INT24S_ATTRIBUTE_TYPE: case chip_rpc_AttributeType_ZCL_INT32S_ATTRIBUTE_TYPE: + data = &response.data.data_int32; + size = sizeof(response.data.data_int32); + response.which_data = chip_rpc_AttributeData_data_int32_tag; + break; case chip_rpc_AttributeType_ZCL_INT40S_ATTRIBUTE_TYPE: case chip_rpc_AttributeType_ZCL_INT48S_ATTRIBUTE_TYPE: case chip_rpc_AttributeType_ZCL_INT56S_ATTRIBUTE_TYPE: From 6c3004ecaff0e232222a741e20e190e62ee01582 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Mon, 29 Nov 2021 18:59:16 -0500 Subject: [PATCH 12/42] Enable some complex type tests. (#12315) Codegen fixes are as follows: * CHIPClusters: just skip structs-inside-structs as command arguments. This is pretty much dead code anyway, that is close to being removed, and existing uses of it don't involve such arguments. * java: skip structs-inside-structs inside command arguments for now, so codegen does not fail. * darwin: fix shadowing problems in handling of lists-inside-structs-indside-lists. --- src/app/tests/suites/TestCluster.yaml | 9 +- .../templates/app/CHIPClusters-src.zapt | 5 +- .../templates/app/CHIPClusters.zapt | 2 +- .../zcl/data-model/chip/test-cluster.xml | 2 +- .../data_model/controller-clusters.zap | 6 +- .../java/templates/ChipClusters-java.zapt | 6 +- .../java/templates/ClusterInfo-java.zapt | 6 +- .../partials/java_type_for_argument.zapt | 2 +- .../java/zap-generated/CHIPClusters-JNI.cpp | 122 + .../chip/devicecontroller/ChipClusters.java | 36 + .../devicecontroller/ClusterInfoMapping.java | 118 + .../python/chip/clusters/CHIPClusters.py | 35 + .../CHIP/templates/partials/encode_value.zapt | 18 +- .../CHIP/templates/partials/test_cluster.zapt | 4 +- .../CHIP/templates/partials/test_value.zapt | 12 +- .../CHIP/zap-generated/CHIPClustersObjc.h | 10 + .../CHIP/zap-generated/CHIPClustersObjc.mm | 511 +++- .../zap-generated/CHIPTestClustersObjc.mm | 856 +++--- .../Framework/CHIPTests/CHIPClustersTests.m | 960 +++++-- .../zap-generated/cluster-objects.h | 2 +- .../zap-generated/cluster/Commands.h | 354 ++- .../chip-tool/zap-generated/test/Commands.h | 2427 ++++++++++------- .../zap-generated/CHIPClusters.cpp | 146 + .../zap-generated/CHIPClusters.h | 8 + 24 files changed, 3751 insertions(+), 1906 deletions(-) diff --git a/src/app/tests/suites/TestCluster.yaml b/src/app/tests/suites/TestCluster.yaml index 9c566f158f06fd..2b828da8a5afa2 100644 --- a/src/app/tests/suites/TestCluster.yaml +++ b/src/app/tests/suites/TestCluster.yaml @@ -912,7 +912,6 @@ tests: - label: "Send Test Command With Nested Struct Argument and arg1.c.b is true" - disabled: true command: "testNestedStructArgumentRequest" arguments: values: @@ -939,7 +938,6 @@ tests: value: true - label: "Send Test Command With Nested Struct Argument arg1.c.b is false" - disabled: true command: "testNestedStructArgumentRequest" arguments: values: @@ -968,7 +966,6 @@ tests: - label: "Send Test Command With Nested Struct List Argument and all fields b of arg1.d are true" - disabled: true command: "testNestedStructListArgumentRequest" arguments: values: @@ -1023,12 +1020,11 @@ tests: response: values: - name: "value" - value: false + value: true - label: "Send Test Command With Nested Struct List Argument and some fields b of arg1.d are false" - disabled: true command: "testNestedStructListArgumentRequest" arguments: values: @@ -1236,7 +1232,6 @@ tests: - label: "Send Test Command With List of Nested Struct List Argument and all fields b of elements of arg1.d are true" - disabled: true command: "testListNestedStructListArgumentRequest" arguments: values: @@ -1298,7 +1293,6 @@ tests: - label: "Send Test Command With Nested Struct List Argument and some fields b of elements of arg1.d are false" - disabled: true command: "testListNestedStructListArgumentRequest" arguments: values: @@ -2084,7 +2078,6 @@ tests: - label: "Read attribute NULLABLE_CHAR_STRING" command: "readAttribute" attribute: "nullable_char_string" - disabled: true response: value: "☉T☉" diff --git a/src/app/zap-templates/templates/app/CHIPClusters-src.zapt b/src/app/zap-templates/templates/app/CHIPClusters-src.zapt index 6b1e7da2919d78..5c49b83443ec4d 100644 --- a/src/app/zap-templates/templates/app/CHIPClusters-src.zapt +++ b/src/app/zap-templates/templates/app/CHIPClusters-src.zapt @@ -22,7 +22,7 @@ namespace Controller { // {{asUpperCamelCase name}} Cluster Commands {{#chip_cluster_commands}} -CHIP_ERROR {{asUpperCamelCase clusterName}}Cluster::{{asUpperCamelCase name}}(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback{{#chip_cluster_command_arguments_with_structs_expanded}}, {{chipType}} {{asLowerCamelCase label}}{{/chip_cluster_command_arguments_with_structs_expanded}}) +CHIP_ERROR {{asUpperCamelCase clusterName}}Cluster::{{asUpperCamelCase name}}(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback{{#chip_cluster_command_arguments_with_structs_expanded}}{{#if_is_struct type}}{{else}}, {{chipType}} {{asLowerCamelCase label}}{{/if_is_struct}}{{/chip_cluster_command_arguments_with_structs_expanded}}) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -44,6 +44,8 @@ CHIP_ERROR {{asUpperCamelCase clusterName}}Cluster::{{asUpperCamelCase name}}(Ca SuccessOrExit(err = sender->PrepareCommand(cmdParams)); {{#chip_cluster_command_arguments_with_structs_expanded}} +{{#if_is_struct type}} +{{else}} {{#first}} VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); {{/first}} @@ -53,6 +55,7 @@ CHIP_ERROR {{asUpperCamelCase clusterName}}Cluster::{{asUpperCamelCase name}}(Ca {{else}} SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), {{asLowerCamelCase label}})); {{/if}} +{{/if_is_struct}} {{else}} // Command takes no arguments. {{/chip_cluster_command_arguments_with_structs_expanded}} diff --git a/src/app/zap-templates/templates/app/CHIPClusters.zapt b/src/app/zap-templates/templates/app/CHIPClusters.zapt index c74ab861a2caa0..77da2fa5450716 100644 --- a/src/app/zap-templates/templates/app/CHIPClusters.zapt +++ b/src/app/zap-templates/templates/app/CHIPClusters.zapt @@ -25,7 +25,7 @@ public: // Cluster Commands {{/first}} - CHIP_ERROR {{asUpperCamelCase name}}(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback{{#chip_cluster_command_arguments_with_structs_expanded}}, {{chipType}} {{asLowerCamelCase label}}{{/chip_cluster_command_arguments_with_structs_expanded}}); + CHIP_ERROR {{asUpperCamelCase name}}(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback{{#chip_cluster_command_arguments_with_structs_expanded}}{{#if_is_struct type}}{{else}}, {{chipType}} {{asLowerCamelCase label}}{{/if_is_struct}}{{/chip_cluster_command_arguments_with_structs_expanded}}); {{/chip_cluster_commands}} // Cluster Attributes diff --git a/src/app/zap-templates/zcl/data-model/chip/test-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/test-cluster.xml index cc7077484a7e70..78715c6b13ba2e 100644 --- a/src/app/zap-templates/zcl/data-model/chip/test-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/test-cluster.xml @@ -272,7 +272,7 @@ limitations under the License. - + Command that takes an argument which is a list of Nested Struct List. The response returns false if there is some struct in arg1 (either diff --git a/src/controller/data_model/controller-clusters.zap b/src/controller/data_model/controller-clusters.zap index 16561f3198789f..72ef81e0dd91d3 100644 --- a/src/controller/data_model/controller-clusters.zap +++ b/src/controller/data_model/controller-clusters.zap @@ -11520,7 +11520,7 @@ "mfgCode": null, "source": "client", "incoming": 0, - "outgoing": 0 + "outgoing": 1 }, { "name": "TestListStructArgumentRequest", @@ -11544,7 +11544,7 @@ "mfgCode": null, "source": "client", "incoming": 0, - "outgoing": 0 + "outgoing": 1 }, { "name": "TestListNestedStructListArgumentRequest", @@ -11552,7 +11552,7 @@ "mfgCode": null, "source": "client", "incoming": 0, - "outgoing": 0 + "outgoing": 1 }, { "name": "TestListInt8UReverseRequest", diff --git a/src/controller/java/templates/ChipClusters-java.zapt b/src/controller/java/templates/ChipClusters-java.zapt index 0d625aaf5b78df..a85fd0be71039e 100644 --- a/src/controller/java/templates/ChipClusters-java.zapt +++ b/src/controller/java/templates/ChipClusters-java.zapt @@ -79,14 +79,14 @@ public class ChipClusters { {{#chip_cluster_commands}} public void {{asLowerCamelCase name}}({{#if hasSpecificResponse}}{{asUpperCamelCase responseName}}Callback{{else}}DefaultClusterCallback{{/if}} callback - {{#chip_cluster_command_arguments_with_structs_expanded}}{{>java_type_for_argument}} {{asLowerCamelCase label}}{{/chip_cluster_command_arguments_with_structs_expanded}}) { - {{asLowerCamelCase name}}(chipClusterPtr, callback{{#chip_cluster_command_arguments_with_structs_expanded}}, {{asLowerCamelCase label}}{{/chip_cluster_command_arguments_with_structs_expanded}}); + {{#chip_cluster_command_arguments_with_structs_expanded}}{{#if_is_struct type}}{{else}}{{>java_type_for_argument}} {{asLowerCamelCase label}}{{/if_is_struct}}{{/chip_cluster_command_arguments_with_structs_expanded}}) { + {{asLowerCamelCase name}}(chipClusterPtr, callback{{#chip_cluster_command_arguments_with_structs_expanded}}{{#if_is_struct type}}{{else}}, {{asLowerCamelCase label}}{{/if_is_struct}}{{/chip_cluster_command_arguments_with_structs_expanded}}); } {{/chip_cluster_commands}} {{#chip_cluster_commands}} private native void {{asLowerCamelCase name}}(long chipClusterPtr, {{#if hasSpecificResponse}}{{asUpperCamelCase responseName}}Callback{{else}}DefaultClusterCallback{{/if}} Callback - {{#chip_cluster_command_arguments_with_structs_expanded}}{{>java_type_for_argument}} {{asLowerCamelCase label}}{{/chip_cluster_command_arguments_with_structs_expanded}}); + {{#chip_cluster_command_arguments_with_structs_expanded}}{{#if_is_struct type}}{{else}}{{>java_type_for_argument}} {{asLowerCamelCase label}}{{/if_is_struct}}{{/chip_cluster_command_arguments_with_structs_expanded}}); {{/chip_cluster_commands}} {{#chip_cluster_responses}} public interface {{asUpperCamelCase name}}Callback { diff --git a/src/controller/java/templates/ClusterInfo-java.zapt b/src/controller/java/templates/ClusterInfo-java.zapt index 6d6c37d83d49ed..e3d42f80092542 100644 --- a/src/controller/java/templates/ClusterInfo-java.zapt +++ b/src/controller/java/templates/ClusterInfo-java.zapt @@ -271,9 +271,12 @@ public class ClusterInfoMapping { {{! TODO: fill out parameter types }} {{#if (zcl_command_arguments_count this.id)}} {{#chip_cluster_command_arguments_with_structs_expanded}} + {{#if_is_struct type}} + {{else}} CommandParameterInfo {{asLowerCamelCase ../../name}}{{asLowerCamelCase ../name}}{{asLowerCamelCase label}}CommandParameterInfo = new CommandParameterInfo("{{asLowerCamelCase label}}", {{asJavaBasicType type}}.class); {{asLowerCamelCase ../../name}}{{asLowerCamelCase ../name}}CommandParams.put("{{asLowerCamelCase label}}",{{asLowerCamelCase ../../name}}{{asLowerCamelCase ../name}}{{asLowerCamelCase label}}CommandParameterInfo); {{#not_last}} {{/not_last}} + {{/if_is_struct}} {{/chip_cluster_command_arguments_with_structs_expanded}} {{else}} {{/if}} @@ -283,9 +286,10 @@ public class ClusterInfoMapping { (cluster, callback, commandArguments) -> { ((ChipClusters.{{asUpperCamelCase ../name}}Cluster) cluster) .{{asLowerCamelCase name}}((ChipClusters.{{asUpperCamelCase ../name}}Cluster.{{asUpperCamelCase responseName}}Callback) callback - {{#chip_cluster_command_arguments_with_structs_expanded}}, + {{#chip_cluster_command_arguments_with_structs_expanded}}{{#if_is_struct type}}{{else}}, ({{#if isOptional}}Optional<{{/if}}{{asJavaBoxedType type}}{{#if isOptional}}>{{/if}}) commandArguments.get("{{asLowerCamelCase label}}") + {{/if_is_struct}} {{/chip_cluster_command_arguments_with_structs_expanded}} ); }, diff --git a/src/controller/java/templates/partials/java_type_for_argument.zapt b/src/controller/java/templates/partials/java_type_for_argument.zapt index 6944bc8df648e6..7b8f65d10bacf8 100644 --- a/src/controller/java/templates/partials/java_type_for_argument.zapt +++ b/src/controller/java/templates/partials/java_type_for_argument.zapt @@ -1 +1 @@ -, {{#if isOptional}}Optional<{{else if isNullable}}@Nullable {{/if}}{{asJavaBoxedType type}}{{#if isOptional}}>{{/if}} \ No newline at end of file +{{#if_is_struct type}}{{else}}, {{#if isOptional}}Optional<{{else if isNullable}}@Nullable {{/if}}{{asJavaBoxedType type}}{{#if isOptional}}>{{/if}}{{/if_is_struct}} \ No newline at end of file diff --git a/src/controller/java/zap-generated/CHIPClusters-JNI.cpp b/src/controller/java/zap-generated/CHIPClusters-JNI.cpp index 6856f592e17723..fd633a08d910ba 100644 --- a/src/controller/java/zap-generated/CHIPClusters-JNI.cpp +++ b/src/controller/java/zap-generated/CHIPClusters-JNI.cpp @@ -24458,6 +24458,47 @@ JNI_METHOD(void, TestClusterCluster, testListInt8UReverseRequest) onSuccess.release(); onFailure.release(); } +JNI_METHOD(void, TestClusterCluster, testListNestedStructListArgumentRequest) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject a, jobject b, jobject c, jobject d, jobject e, + jbyteArray f, jobject g) +{ + chip::DeviceLayer::StackLock lock; + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster; + + chip::app::Clusters::TestCluster::Commands::TestListNestedStructListArgumentRequest::Type request; + + request.arg1 = chip::app::DataModel::List(); + + std::unique_ptr + onSuccess(Platform::New(callback), + Platform::Delete); + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + VerifyOrReturn(onFailure.get() != nullptr, + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + + cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn(err == CHIP_NO_ERROR, + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", + CHIP_ERROR_INCORRECT_STATE)); + + onSuccess.release(); + onFailure.release(); +} JNI_METHOD(void, TestClusterCluster, testListStructArgumentRequest) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject a, jobject b, jobject c, jbyteArray d, jstring e, jobject f, jobject g, jobject h) @@ -24499,6 +24540,87 @@ JNI_METHOD(void, TestClusterCluster, testListStructArgumentRequest) onSuccess.release(); onFailure.release(); } +JNI_METHOD(void, TestClusterCluster, testNestedStructArgumentRequest) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject a, jobject b, jobject c) +{ + chip::DeviceLayer::StackLock lock; + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster; + + chip::app::Clusters::TestCluster::Commands::TestNestedStructArgumentRequest::Type request; + + request.arg1 = chip::app::Clusters::TestCluster::Structs::NestedStruct::Type(); + + std::unique_ptr + onSuccess(Platform::New(callback), + Platform::Delete); + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + VerifyOrReturn(onFailure.get() != nullptr, + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + + cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn(err == CHIP_NO_ERROR, + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", + CHIP_ERROR_INCORRECT_STATE)); + + onSuccess.release(); + onFailure.release(); +} +JNI_METHOD(void, TestClusterCluster, testNestedStructListArgumentRequest) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject a, jobject b, jobject c, jobject d, jobject e, + jbyteArray f, jobject g) +{ + chip::DeviceLayer::StackLock lock; + CHIP_ERROR err = CHIP_NO_ERROR; + TestClusterCluster * cppCluster; + + chip::app::Clusters::TestCluster::Commands::TestNestedStructListArgumentRequest::Type request; + + request.arg1 = chip::app::Clusters::TestCluster::Structs::NestedStructList::Type(); + + std::unique_ptr + onSuccess(Platform::New(callback), + Platform::Delete); + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + VerifyOrReturn(onFailure.get() != nullptr, + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native callback", CHIP_ERROR_NO_MEMORY)); + + cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error getting native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + err = cppCluster->InvokeCommand(request, onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn(err == CHIP_NO_ERROR, + AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error invoking command", + CHIP_ERROR_INCORRECT_STATE)); + + onSuccess.release(); + onFailure.release(); +} JNI_METHOD(void, TestClusterCluster, testNotHandled)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { chip::DeviceLayer::StackLock lock; diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java index bba7968edb445f..8071305635fa7a 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java @@ -10727,6 +10727,11 @@ public void testListInt8UReverseRequest( testListInt8UReverseRequest(chipClusterPtr, callback, arg1); } + public void testListNestedStructListArgumentRequest( + BooleanResponseCallback callback, Integer a, Boolean b, Long e, byte[] f, Integer g) { + testListNestedStructListArgumentRequest(chipClusterPtr, callback, a, b, e, f, g); + } + public void testListStructArgumentRequest( BooleanResponseCallback callback, Integer a, @@ -10740,6 +10745,16 @@ public void testListStructArgumentRequest( testListStructArgumentRequest(chipClusterPtr, callback, a, b, c, d, e, f, g, h); } + public void testNestedStructArgumentRequest( + BooleanResponseCallback callback, Integer a, Boolean b) { + testNestedStructArgumentRequest(chipClusterPtr, callback, a, b); + } + + public void testNestedStructListArgumentRequest( + BooleanResponseCallback callback, Integer a, Boolean b, Long e, byte[] f, Integer g) { + testNestedStructListArgumentRequest(chipClusterPtr, callback, a, b, e, f, g); + } + public void testNotHandled(DefaultClusterCallback callback) { testNotHandled(chipClusterPtr, callback); } @@ -10796,6 +10811,15 @@ private native void testListInt8UArgumentRequest( private native void testListInt8UReverseRequest( long chipClusterPtr, TestListInt8UReverseResponseCallback Callback, Integer arg1); + private native void testListNestedStructListArgumentRequest( + long chipClusterPtr, + BooleanResponseCallback Callback, + Integer a, + Boolean b, + Long e, + byte[] f, + Integer g); + private native void testListStructArgumentRequest( long chipClusterPtr, BooleanResponseCallback Callback, @@ -10808,6 +10832,18 @@ private native void testListStructArgumentRequest( Float g, Double h); + private native void testNestedStructArgumentRequest( + long chipClusterPtr, BooleanResponseCallback Callback, Integer a, Boolean b); + + private native void testNestedStructListArgumentRequest( + long chipClusterPtr, + BooleanResponseCallback Callback, + Integer a, + Boolean b, + Long e, + byte[] f, + Integer g); + private native void testNotHandled(long chipClusterPtr, DefaultClusterCallback Callback); private native void testNullableOptionalRequest( diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java index 672bf418bbe006..75d4634ad9ef13 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java @@ -7917,6 +7917,52 @@ public Map> getCommandMap() { testClustertestListInt8UReverseRequestCommandParams); testClusterClusterInteractionInfoMap.put( "testListInt8UReverseRequest", testClustertestListInt8UReverseRequestInteractionInfo); + Map + testClustertestListNestedStructListArgumentRequestCommandParams = + new LinkedHashMap(); + CommandParameterInfo testClustertestListNestedStructListArgumentRequestaCommandParameterInfo = + new CommandParameterInfo("a", int.class); + testClustertestListNestedStructListArgumentRequestCommandParams.put( + "a", testClustertestListNestedStructListArgumentRequestaCommandParameterInfo); + + CommandParameterInfo testClustertestListNestedStructListArgumentRequestbCommandParameterInfo = + new CommandParameterInfo("b", boolean.class); + testClustertestListNestedStructListArgumentRequestCommandParams.put( + "b", testClustertestListNestedStructListArgumentRequestbCommandParameterInfo); + + CommandParameterInfo testClustertestListNestedStructListArgumentRequesteCommandParameterInfo = + new CommandParameterInfo("e", long.class); + testClustertestListNestedStructListArgumentRequestCommandParams.put( + "e", testClustertestListNestedStructListArgumentRequesteCommandParameterInfo); + + CommandParameterInfo testClustertestListNestedStructListArgumentRequestfCommandParameterInfo = + new CommandParameterInfo("f", byte[].class); + testClustertestListNestedStructListArgumentRequestCommandParams.put( + "f", testClustertestListNestedStructListArgumentRequestfCommandParameterInfo); + + CommandParameterInfo testClustertestListNestedStructListArgumentRequestgCommandParameterInfo = + new CommandParameterInfo("g", int.class); + testClustertestListNestedStructListArgumentRequestCommandParams.put( + "g", testClustertestListNestedStructListArgumentRequestgCommandParameterInfo); + + // Populate commands + InteractionInfo testClustertestListNestedStructListArgumentRequestInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.TestClusterCluster) cluster) + .testListNestedStructListArgumentRequest( + (ChipClusters.TestClusterCluster.BooleanResponseCallback) callback, + (Integer) commandArguments.get("a"), + (Boolean) commandArguments.get("b"), + (Long) commandArguments.get("e"), + (byte[]) commandArguments.get("f"), + (Integer) commandArguments.get("g")); + }, + () -> new DelegatedBooleanResponseCallback(), + testClustertestListNestedStructListArgumentRequestCommandParams); + testClusterClusterInteractionInfoMap.put( + "testListNestedStructListArgumentRequest", + testClustertestListNestedStructListArgumentRequestInteractionInfo); Map testClustertestListStructArgumentRequestCommandParams = new LinkedHashMap(); CommandParameterInfo testClustertestListStructArgumentRequestaCommandParameterInfo = @@ -7979,6 +8025,78 @@ public Map> getCommandMap() { testClustertestListStructArgumentRequestCommandParams); testClusterClusterInteractionInfoMap.put( "testListStructArgumentRequest", testClustertestListStructArgumentRequestInteractionInfo); + Map testClustertestNestedStructArgumentRequestCommandParams = + new LinkedHashMap(); + CommandParameterInfo testClustertestNestedStructArgumentRequestaCommandParameterInfo = + new CommandParameterInfo("a", int.class); + testClustertestNestedStructArgumentRequestCommandParams.put( + "a", testClustertestNestedStructArgumentRequestaCommandParameterInfo); + + CommandParameterInfo testClustertestNestedStructArgumentRequestbCommandParameterInfo = + new CommandParameterInfo("b", boolean.class); + testClustertestNestedStructArgumentRequestCommandParams.put( + "b", testClustertestNestedStructArgumentRequestbCommandParameterInfo); + + // Populate commands + InteractionInfo testClustertestNestedStructArgumentRequestInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.TestClusterCluster) cluster) + .testNestedStructArgumentRequest( + (ChipClusters.TestClusterCluster.BooleanResponseCallback) callback, + (Integer) commandArguments.get("a"), + (Boolean) commandArguments.get("b")); + }, + () -> new DelegatedBooleanResponseCallback(), + testClustertestNestedStructArgumentRequestCommandParams); + testClusterClusterInteractionInfoMap.put( + "testNestedStructArgumentRequest", + testClustertestNestedStructArgumentRequestInteractionInfo); + Map testClustertestNestedStructListArgumentRequestCommandParams = + new LinkedHashMap(); + CommandParameterInfo testClustertestNestedStructListArgumentRequestaCommandParameterInfo = + new CommandParameterInfo("a", int.class); + testClustertestNestedStructListArgumentRequestCommandParams.put( + "a", testClustertestNestedStructListArgumentRequestaCommandParameterInfo); + + CommandParameterInfo testClustertestNestedStructListArgumentRequestbCommandParameterInfo = + new CommandParameterInfo("b", boolean.class); + testClustertestNestedStructListArgumentRequestCommandParams.put( + "b", testClustertestNestedStructListArgumentRequestbCommandParameterInfo); + + CommandParameterInfo testClustertestNestedStructListArgumentRequesteCommandParameterInfo = + new CommandParameterInfo("e", long.class); + testClustertestNestedStructListArgumentRequestCommandParams.put( + "e", testClustertestNestedStructListArgumentRequesteCommandParameterInfo); + + CommandParameterInfo testClustertestNestedStructListArgumentRequestfCommandParameterInfo = + new CommandParameterInfo("f", byte[].class); + testClustertestNestedStructListArgumentRequestCommandParams.put( + "f", testClustertestNestedStructListArgumentRequestfCommandParameterInfo); + + CommandParameterInfo testClustertestNestedStructListArgumentRequestgCommandParameterInfo = + new CommandParameterInfo("g", int.class); + testClustertestNestedStructListArgumentRequestCommandParams.put( + "g", testClustertestNestedStructListArgumentRequestgCommandParameterInfo); + + // Populate commands + InteractionInfo testClustertestNestedStructListArgumentRequestInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.TestClusterCluster) cluster) + .testNestedStructListArgumentRequest( + (ChipClusters.TestClusterCluster.BooleanResponseCallback) callback, + (Integer) commandArguments.get("a"), + (Boolean) commandArguments.get("b"), + (Long) commandArguments.get("e"), + (byte[]) commandArguments.get("f"), + (Integer) commandArguments.get("g")); + }, + () -> new DelegatedBooleanResponseCallback(), + testClustertestNestedStructListArgumentRequestCommandParams); + testClusterClusterInteractionInfoMap.put( + "testNestedStructListArgumentRequest", + testClustertestNestedStructListArgumentRequestInteractionInfo); Map testClustertestNotHandledCommandParams = new LinkedHashMap(); // Populate commands diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index fc1e66f46b50c8..7061df2e9d6e38 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -3687,6 +3687,19 @@ class ChipClusters: "arg1": "int", }, }, + 0x0000000C: { + "commandId": 0x0000000C, + "commandName": "TestListNestedStructListArgumentRequest", + "args": { + "a": "int", + "b": "bool", + "c": "", + "d": "", + "e": "int", + "f": "bytes", + "g": "int", + }, + }, 0x00000009: { "commandId": 0x00000009, "commandName": "TestListStructArgumentRequest", @@ -3701,6 +3714,28 @@ class ChipClusters: "h": "", }, }, + 0x00000008: { + "commandId": 0x00000008, + "commandName": "TestNestedStructArgumentRequest", + "args": { + "a": "int", + "b": "bool", + "c": "", + }, + }, + 0x0000000B: { + "commandId": 0x0000000B, + "commandName": "TestNestedStructListArgumentRequest", + "args": { + "a": "int", + "b": "bool", + "c": "", + "d": "", + "e": "int", + "f": "bytes", + "g": "int", + }, + }, 0x00000001: { "commandId": 0x00000001, "commandName": "TestNotHandled", diff --git a/src/darwin/Framework/CHIP/templates/partials/encode_value.zapt b/src/darwin/Framework/CHIP/templates/partials/encode_value.zapt index 5e198542e10b7d..fb3bfea4be65e2 100644 --- a/src/darwin/Framework/CHIP/templates/partials/encode_value.zapt +++ b/src/darwin/Framework/CHIP/templates/partials/encode_value.zapt @@ -18,25 +18,25 @@ we are right now it may not (e.g. for a nullable list we're inside an "else" block here). }} { - using ListType = std::remove_reference_t; - using ListMemberType = ListMemberTypeGetter::Type; + using ListType_{{depth}} = std::remove_reference_t; + using ListMemberType_{{depth}} = ListMemberTypeGetter::Type; if ({{source}}.count != 0) { - auto * listHolder_{{depth}} = new ListHolder({{source}}.count); + auto * listHolder_{{depth}} = new ListHolder({{source}}.count); if (listHolder_{{depth}} == nullptr || listHolder_{{depth}}->mList == nullptr) { {{errorCode}} } listFreer.add(listHolder_{{depth}}); - for (size_t i = 0; i < {{source}}.count; ++i) { - if (![{{source}}[i] isKindOfClass:[{{asObjectiveCClass type cluster forceNotList=true}} class]]) { + for (size_t i_{{depth}} = 0; i_{{depth}} < {{source}}.count; ++i_{{depth}}) { + if (![{{source}}[i_{{depth}}] isKindOfClass:[{{asObjectiveCClass type cluster forceNotList=true}} class]]) { // Wrong kind of value. {{errorCode}} } - auto element_{{depth}} = ({{asObjectiveCClass type cluster forceNotList=true}} *){{source}}[i]; - {{>encode_value target=(concat "listHolder_" depth "->mList[i]") source=(concat "element_" depth) cluster=cluster errorCode=errorCode depth=(incrementDepth depth) isArray=false}} + auto element_{{depth}} = ({{asObjectiveCClass type cluster forceNotList=true}} *){{source}}[i_{{depth}}]; + {{>encode_value target=(concat "listHolder_" depth "->mList[i_" depth "]") source=(concat "element_" depth) cluster=cluster errorCode=errorCode depth=(incrementDepth depth) isArray=false}} } - {{target}} = ListType(listHolder_{{depth}}->mList, {{source}}.count); + {{target}} = ListType_{{depth}}(listHolder_{{depth}}->mList, {{source}}.count); } else { - {{target}} = ListType(); + {{target}} = ListType_{{depth}}(); } } {{else if (isOctetString type)}} diff --git a/src/darwin/Framework/CHIP/templates/partials/test_cluster.zapt b/src/darwin/Framework/CHIP/templates/partials/test_cluster.zapt index 163650e05e568e..3ba5976acaf0d9 100644 --- a/src/darwin/Framework/CHIP/templates/partials/test_cluster.zapt +++ b/src/darwin/Framework/CHIP/templates/partials/test_cluster.zapt @@ -28,7 +28,7 @@ bool testSendCluster{{parent.filename}}_{{asTestIndex index}}_{{asUpperCamelCase __auto_type * params = [[CHIP{{asUpperCamelCase cluster}}Cluster{{asUpperCamelCase command}}Params alloc] init]; {{/if}} {{#chip_tests_item_parameters}} - {{>test_value target=(concat "params." (asStructPropertyName label)) definedValue=definedValue cluster=parent.cluster}} + {{>test_value target=(concat "params." (asStructPropertyName label)) definedValue=definedValue cluster=parent.cluster depth=0}} {{/chip_tests_item_parameters}} [cluster {{asLowerCamelCase command}}With {{~#if commandObject.arguments.length~}} @@ -63,7 +63,7 @@ bool testSendCluster{{parent.filename}}_{{asTestIndex index}}_{{asUpperCamelCase {{else if isWriteAttribute}} {{#chip_tests_item_parameters}} id {{asLowerCamelCase name}}Argument; - {{>test_value target=(concat (asLowerCamelCase name) "Argument") definedValue=definedValue cluster=parent.cluster}} + {{>test_value target=(concat (asLowerCamelCase name) "Argument") definedValue=definedValue cluster=parent.cluster depth=0}} {{/chip_tests_item_parameters}} [cluster writeAttribute{{asUpperCamelCase attribute}}WithValue:{{#chip_tests_item_parameters}}{{asLowerCamelCase name}}Argument{{/chip_tests_item_parameters}} completionHandler:^(NSError * _Nullable err) { {{/if}} diff --git a/src/darwin/Framework/CHIP/templates/partials/test_value.zapt b/src/darwin/Framework/CHIP/templates/partials/test_value.zapt index 4ba3752ee15bcf..ed0ce1a6a9c292 100644 --- a/src/darwin/Framework/CHIP/templates/partials/test_value.zapt +++ b/src/darwin/Framework/CHIP/templates/partials/test_value.zapt @@ -1,19 +1,19 @@ {{#if isOptional}} {{! Just go ahead and assign to the value, stripping the optionality bit off. }} - {{>test_value target=target definedValue=definedValue cluster=cluster isOptional=false}} + {{>test_value target=target definedValue=definedValue cluster=cluster isOptional=false depth=(incrementDepth depth)}} {{else if isNullable}} {{#if (isLiteralNull definedValue)}} {{target}} = nil; {{else}} - {{>test_value target=target definedValue=definedValue cluster=cluster isNullable=false}} + {{>test_value target=target definedValue=definedValue cluster=cluster isNullable=false depth=(incrementDepth depth)}} {{/if}} {{else if isArray}} { - NSMutableArray * temp = [[NSMutableArray alloc] init]; + NSMutableArray * temp_{{depth}} = [[NSMutableArray alloc] init]; {{#each definedValue}} - {{>test_value target=(concat "temp[" @index "]") definedValue=this cluster=../cluster type=../type isArray=false}} + {{>test_value target=(concat "temp_" ../depth "[" @index "]") definedValue=this cluster=../cluster depth=(incrementDepth ../depth) type=../type isArray=false}} {{/each}} - {{target}} = temp; + {{target}} = temp_{{depth}}; } {{else}} {{#if_is_struct type}} @@ -21,7 +21,7 @@ {{#zcl_struct_items_by_struct_name type}} {{! target may be some place where we lost type information (e.g. an id), so add explicit cast when trying to assign to our properties. }} - {{>test_value target=(concat "((CHIP" (asUpperCamelCase ../cluster) "Cluster" (asUpperCamelCase ../type) " *)" ../target ")." (asStructPropertyName label)) definedValue=(lookup ../definedValue name) cluster=../cluster}} + {{>test_value target=(concat "((CHIP" (asUpperCamelCase ../cluster) "Cluster" (asUpperCamelCase ../type) " *)" ../target ")." (asStructPropertyName label)) definedValue=(lookup ../definedValue name) cluster=../cluster depth=(incrementDepth ../depth)}} {{/zcl_struct_items_by_struct_name}} {{else if (isCharString type)}} diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h index 99f67f66c8caba..8575601940f36f 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h @@ -3271,9 +3271,19 @@ NS_ASSUME_NONNULL_BEGIN - (void)testListInt8UReverseRequestWithParams:(CHIPTestClusterClusterTestListInt8UReverseRequestParams *)params completionHandler:(void (^)(CHIPTestClusterClusterTestListInt8UReverseResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; +- (void)testListNestedStructListArgumentRequestWithParams: + (CHIPTestClusterClusterTestListNestedStructListArgumentRequestParams *)params + completionHandler:(void (^)(CHIPTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; - (void)testListStructArgumentRequestWithParams:(CHIPTestClusterClusterTestListStructArgumentRequestParams *)params completionHandler:(void (^)(CHIPTestClusterClusterBooleanResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; +- (void)testNestedStructArgumentRequestWithParams:(CHIPTestClusterClusterTestNestedStructArgumentRequestParams *)params + completionHandler:(void (^)(CHIPTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)testNestedStructListArgumentRequestWithParams:(CHIPTestClusterClusterTestNestedStructListArgumentRequestParams *)params + completionHandler:(void (^)(CHIPTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; - (void)testNotHandledWithCompletionHandler:(StatusCompletion)completionHandler; - (void)testNullableOptionalRequestWithParams:(CHIPTestClusterClusterTestNullableOptionalRequestParams * _Nullable)params completionHandler:(void (^)(CHIPTestClusterClusterTestNullableOptionalResponseParams * _Nullable data, diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm index 79056f5aecd3b3..76fd6d24667d38 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm @@ -8725,25 +8725,25 @@ - (void)getGroupMembershipWithParams:(CHIPGroupsClusterGetGroupMembershipParams ListFreer listFreer; Groups::Commands::GetGroupMembership::Type request; { - using ListType = std::remove_reference_t; - using ListMemberType = ListMemberTypeGetter::Type; + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; if (params.groupList.count != 0) { - auto * listHolder_0 = new ListHolder(params.groupList.count); + auto * listHolder_0 = new ListHolder(params.groupList.count); if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { return; } listFreer.add(listHolder_0); - for (size_t i = 0; i < params.groupList.count; ++i) { - if (![params.groupList[i] isKindOfClass:[NSNumber class]]) { + for (size_t i_0 = 0; i_0 < params.groupList.count; ++i_0) { + if (![params.groupList[i_0] isKindOfClass:[NSNumber class]]) { // Wrong kind of value. return; } - auto element_0 = (NSNumber *) params.groupList[i]; - listHolder_0->mList[i] = element_0.unsignedShortValue; + auto element_0 = (NSNumber *) params.groupList[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedShortValue; } - request.groupList = ListType(listHolder_0->mList, params.groupList.count); + request.groupList = ListType_0(listHolder_0->mList, params.groupList.count); } else { - request.groupList = ListType(); + request.groupList = ListType_0(); } } @@ -11668,26 +11668,26 @@ - (void)queryImageWithParams:(CHIPOtaSoftwareUpdateProviderClusterQueryImagePara request.productId = params.productId.unsignedShortValue; request.softwareVersion = params.softwareVersion.unsignedIntValue; { - using ListType = std::remove_reference_t; - using ListMemberType = ListMemberTypeGetter::Type; + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; if (params.protocolsSupported.count != 0) { - auto * listHolder_0 = new ListHolder(params.protocolsSupported.count); + auto * listHolder_0 = new ListHolder(params.protocolsSupported.count); if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { return; } listFreer.add(listHolder_0); - for (size_t i = 0; i < params.protocolsSupported.count; ++i) { - if (![params.protocolsSupported[i] isKindOfClass:[NSNumber class]]) { + for (size_t i_0 = 0; i_0 < params.protocolsSupported.count; ++i_0) { + if (![params.protocolsSupported[i_0] isKindOfClass:[NSNumber class]]) { // Wrong kind of value. return; } - auto element_0 = (NSNumber *) params.protocolsSupported[i]; - listHolder_0->mList[i] - = static_castmList[i])>>(element_0.unsignedCharValue); + auto element_0 = (NSNumber *) params.protocolsSupported[i_0]; + listHolder_0->mList[i_0] + = static_castmList[i_0])>>(element_0.unsignedCharValue); } - request.protocolsSupported = ListType(listHolder_0->mList, params.protocolsSupported.count); + request.protocolsSupported = ListType_0(listHolder_0->mList, params.protocolsSupported.count); } else { - request.protocolsSupported = ListType(); + request.protocolsSupported = ListType_0(); } } if (params.hardwareVersion != nil) { @@ -14951,27 +14951,27 @@ - (void)addSceneWithParams:(CHIPScenesClusterAddSceneParams *)params request.transitionTime = params.transitionTime.unsignedShortValue; request.sceneName = [self asCharSpan:params.sceneName]; { - using ListType = std::remove_reference_t; - using ListMemberType = ListMemberTypeGetter::Type; + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; if (params.extensionFieldSets.count != 0) { - auto * listHolder_0 = new ListHolder(params.extensionFieldSets.count); + auto * listHolder_0 = new ListHolder(params.extensionFieldSets.count); if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { return; } listFreer.add(listHolder_0); - for (size_t i = 0; i < params.extensionFieldSets.count; ++i) { - if (![params.extensionFieldSets[i] isKindOfClass:[CHIPScenesClusterSceneExtensionFieldSet class]]) { + for (size_t i_0 = 0; i_0 < params.extensionFieldSets.count; ++i_0) { + if (![params.extensionFieldSets[i_0] isKindOfClass:[CHIPScenesClusterSceneExtensionFieldSet class]]) { // Wrong kind of value. return; } - auto element_0 = (CHIPScenesClusterSceneExtensionFieldSet *) params.extensionFieldSets[i]; - listHolder_0->mList[i].clusterId = element_0.clusterId.unsignedIntValue; - listHolder_0->mList[i].length = element_0.length.unsignedCharValue; - listHolder_0->mList[i].value = element_0.value.unsignedCharValue; + auto element_0 = (CHIPScenesClusterSceneExtensionFieldSet *) params.extensionFieldSets[i_0]; + listHolder_0->mList[i_0].clusterId = element_0.clusterId.unsignedIntValue; + listHolder_0->mList[i_0].length = element_0.length.unsignedCharValue; + listHolder_0->mList[i_0].value = element_0.value.unsignedCharValue; } - request.extensionFieldSets = ListType(listHolder_0->mList, params.extensionFieldSets.count); + request.extensionFieldSets = ListType_0(listHolder_0->mList, params.extensionFieldSets.count); } else { - request.extensionFieldSets = ListType(); + request.extensionFieldSets = ListType_0(); } } @@ -16352,25 +16352,25 @@ - (void)testListInt8UArgumentRequestWithParams:(CHIPTestClusterClusterTestListIn ListFreer listFreer; TestCluster::Commands::TestListInt8UArgumentRequest::Type request; { - using ListType = std::remove_reference_t; - using ListMemberType = ListMemberTypeGetter::Type; + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; if (params.arg1.count != 0) { - auto * listHolder_0 = new ListHolder(params.arg1.count); + auto * listHolder_0 = new ListHolder(params.arg1.count); if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { return; } listFreer.add(listHolder_0); - for (size_t i = 0; i < params.arg1.count; ++i) { - if (![params.arg1[i] isKindOfClass:[NSNumber class]]) { + for (size_t i_0 = 0; i_0 < params.arg1.count; ++i_0) { + if (![params.arg1[i_0] isKindOfClass:[NSNumber class]]) { // Wrong kind of value. return; } - auto element_0 = (NSNumber *) params.arg1[i]; - listHolder_0->mList[i] = element_0.unsignedCharValue; + auto element_0 = (NSNumber *) params.arg1[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedCharValue; } - request.arg1 = ListType(listHolder_0->mList, params.arg1.count); + request.arg1 = ListType_0(listHolder_0->mList, params.arg1.count); } else { - request.arg1 = ListType(); + request.arg1 = ListType_0(); } } @@ -16393,25 +16393,25 @@ - (void)testListInt8UReverseRequestWithParams:(CHIPTestClusterClusterTestListInt ListFreer listFreer; TestCluster::Commands::TestListInt8UReverseRequest::Type request; { - using ListType = std::remove_reference_t; - using ListMemberType = ListMemberTypeGetter::Type; + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; if (params.arg1.count != 0) { - auto * listHolder_0 = new ListHolder(params.arg1.count); + auto * listHolder_0 = new ListHolder(params.arg1.count); if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { return; } listFreer.add(listHolder_0); - for (size_t i = 0; i < params.arg1.count; ++i) { - if (![params.arg1[i] isKindOfClass:[NSNumber class]]) { + for (size_t i_0 = 0; i_0 < params.arg1.count; ++i_0) { + if (![params.arg1[i_0] isKindOfClass:[NSNumber class]]) { // Wrong kind of value. return; } - auto element_0 = (NSNumber *) params.arg1[i]; - listHolder_0->mList[i] = element_0.unsignedCharValue; + auto element_0 = (NSNumber *) params.arg1[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedCharValue; } - request.arg1 = ListType(listHolder_0->mList, params.arg1.count); + request.arg1 = ListType_0(listHolder_0->mList, params.arg1.count); } else { - request.arg1 = ListType(); + request.arg1 = ListType_0(); } } @@ -16427,6 +16427,156 @@ new CHIPTestClusterClusterTestListInt8UReverseResponseCallbackBridge( }); } +- (void)testListNestedStructListArgumentRequestWithParams: + (CHIPTestClusterClusterTestListNestedStructListArgumentRequestParams *)params + completionHandler:(void (^)(CHIPTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + ListFreer listFreer; + TestCluster::Commands::TestListNestedStructListArgumentRequest::Type request; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (params.arg1.count != 0) { + auto * listHolder_0 = new ListHolder(params.arg1.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < params.arg1.count; ++i_0) { + if (![params.arg1[i_0] isKindOfClass:[CHIPTestClusterClusterNestedStructList class]]) { + // Wrong kind of value. + return; + } + auto element_0 = (CHIPTestClusterClusterNestedStructList *) params.arg1[i_0]; + listHolder_0->mList[i_0].a = element_0.a.unsignedCharValue; + listHolder_0->mList[i_0].b = element_0.b.boolValue; + listHolder_0->mList[i_0].c.a = element_0.c.a.unsignedCharValue; + listHolder_0->mList[i_0].c.b = element_0.c.b.boolValue; + listHolder_0->mList[i_0].c.c + = static_castmList[i_0].c.c)>>(element_0.c.c.unsignedCharValue); + listHolder_0->mList[i_0].c.d = [self asByteSpan:element_0.c.d]; + listHolder_0->mList[i_0].c.e = [self asCharSpan:element_0.c.e]; + listHolder_0->mList[i_0].c.f + = static_castmList[i_0].c.f)>>(element_0.c.f.unsignedCharValue); + listHolder_0->mList[i_0].c.g = element_0.c.g.floatValue; + listHolder_0->mList[i_0].c.h = element_0.c.h.doubleValue; + { + using ListType_2 = std::remove_reference_tmList[i_0].d)>; + using ListMemberType_2 = ListMemberTypeGetter::Type; + if (element_0.d.count != 0) { + auto * listHolder_2 = new ListHolder(element_0.d.count); + if (listHolder_2 == nullptr || listHolder_2->mList == nullptr) { + return; + } + listFreer.add(listHolder_2); + for (size_t i_2 = 0; i_2 < element_0.d.count; ++i_2) { + if (![element_0.d[i_2] isKindOfClass:[CHIPTestClusterClusterSimpleStruct class]]) { + // Wrong kind of value. + return; + } + auto element_2 = (CHIPTestClusterClusterSimpleStruct *) element_0.d[i_2]; + listHolder_2->mList[i_2].a = element_2.a.unsignedCharValue; + listHolder_2->mList[i_2].b = element_2.b.boolValue; + listHolder_2->mList[i_2].c = static_castmList[i_2].c)>>( + element_2.c.unsignedCharValue); + listHolder_2->mList[i_2].d = [self asByteSpan:element_2.d]; + listHolder_2->mList[i_2].e = [self asCharSpan:element_2.e]; + listHolder_2->mList[i_2].f = static_castmList[i_2].f)>>( + element_2.f.unsignedCharValue); + listHolder_2->mList[i_2].g = element_2.g.floatValue; + listHolder_2->mList[i_2].h = element_2.h.doubleValue; + } + listHolder_0->mList[i_0].d = ListType_2(listHolder_2->mList, element_0.d.count); + } else { + listHolder_0->mList[i_0].d = ListType_2(); + } + } + { + using ListType_2 = std::remove_reference_tmList[i_0].e)>; + using ListMemberType_2 = ListMemberTypeGetter::Type; + if (element_0.e.count != 0) { + auto * listHolder_2 = new ListHolder(element_0.e.count); + if (listHolder_2 == nullptr || listHolder_2->mList == nullptr) { + return; + } + listFreer.add(listHolder_2); + for (size_t i_2 = 0; i_2 < element_0.e.count; ++i_2) { + if (![element_0.e[i_2] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return; + } + auto element_2 = (NSNumber *) element_0.e[i_2]; + listHolder_2->mList[i_2] = element_2.unsignedIntValue; + } + listHolder_0->mList[i_0].e = ListType_2(listHolder_2->mList, element_0.e.count); + } else { + listHolder_0->mList[i_0].e = ListType_2(); + } + } + { + using ListType_2 = std::remove_reference_tmList[i_0].f)>; + using ListMemberType_2 = ListMemberTypeGetter::Type; + if (element_0.f.count != 0) { + auto * listHolder_2 = new ListHolder(element_0.f.count); + if (listHolder_2 == nullptr || listHolder_2->mList == nullptr) { + return; + } + listFreer.add(listHolder_2); + for (size_t i_2 = 0; i_2 < element_0.f.count; ++i_2) { + if (![element_0.f[i_2] isKindOfClass:[NSData class]]) { + // Wrong kind of value. + return; + } + auto element_2 = (NSData *) element_0.f[i_2]; + listHolder_2->mList[i_2] = [self asByteSpan:element_2]; + } + listHolder_0->mList[i_0].f = ListType_2(listHolder_2->mList, element_0.f.count); + } else { + listHolder_0->mList[i_0].f = ListType_2(); + } + } + { + using ListType_2 = std::remove_reference_tmList[i_0].g)>; + using ListMemberType_2 = ListMemberTypeGetter::Type; + if (element_0.g.count != 0) { + auto * listHolder_2 = new ListHolder(element_0.g.count); + if (listHolder_2 == nullptr || listHolder_2->mList == nullptr) { + return; + } + listFreer.add(listHolder_2); + for (size_t i_2 = 0; i_2 < element_0.g.count; ++i_2) { + if (![element_0.g[i_2] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return; + } + auto element_2 = (NSNumber *) element_0.g[i_2]; + listHolder_2->mList[i_2] = element_2.unsignedCharValue; + } + listHolder_0->mList[i_0].g = ListType_2(listHolder_2->mList, element_0.g.count); + } else { + listHolder_0->mList[i_0].g = ListType_2(); + } + } + } + request.arg1 = ListType_0(listHolder_0->mList, params.arg1.count); + } else { + request.arg1 = ListType_0(); + } + } + + new CHIPTestClusterClusterBooleanResponseCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable value) { + completionHandler(value, error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)testListStructArgumentRequestWithParams:(CHIPTestClusterClusterTestListStructArgumentRequestParams *)params completionHandler:(void (^)(CHIPTestClusterClusterBooleanResponseParams * _Nullable data, NSError * _Nullable error))completionHandler @@ -16434,34 +16584,189 @@ - (void)testListStructArgumentRequestWithParams:(CHIPTestClusterClusterTestListS ListFreer listFreer; TestCluster::Commands::TestListStructArgumentRequest::Type request; { - using ListType = std::remove_reference_t; - using ListMemberType = ListMemberTypeGetter::Type; + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; if (params.arg1.count != 0) { - auto * listHolder_0 = new ListHolder(params.arg1.count); + auto * listHolder_0 = new ListHolder(params.arg1.count); if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { return; } listFreer.add(listHolder_0); - for (size_t i = 0; i < params.arg1.count; ++i) { - if (![params.arg1[i] isKindOfClass:[CHIPTestClusterClusterSimpleStruct class]]) { + for (size_t i_0 = 0; i_0 < params.arg1.count; ++i_0) { + if (![params.arg1[i_0] isKindOfClass:[CHIPTestClusterClusterSimpleStruct class]]) { + // Wrong kind of value. + return; + } + auto element_0 = (CHIPTestClusterClusterSimpleStruct *) params.arg1[i_0]; + listHolder_0->mList[i_0].a = element_0.a.unsignedCharValue; + listHolder_0->mList[i_0].b = element_0.b.boolValue; + listHolder_0->mList[i_0].c + = static_castmList[i_0].c)>>(element_0.c.unsignedCharValue); + listHolder_0->mList[i_0].d = [self asByteSpan:element_0.d]; + listHolder_0->mList[i_0].e = [self asCharSpan:element_0.e]; + listHolder_0->mList[i_0].f + = static_castmList[i_0].f)>>(element_0.f.unsignedCharValue); + listHolder_0->mList[i_0].g = element_0.g.floatValue; + listHolder_0->mList[i_0].h = element_0.h.doubleValue; + } + request.arg1 = ListType_0(listHolder_0->mList, params.arg1.count); + } else { + request.arg1 = ListType_0(); + } + } + + new CHIPTestClusterClusterBooleanResponseCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable value) { + completionHandler(value, error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)testNestedStructArgumentRequestWithParams:(CHIPTestClusterClusterTestNestedStructArgumentRequestParams *)params + completionHandler:(void (^)(CHIPTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + ListFreer listFreer; + TestCluster::Commands::TestNestedStructArgumentRequest::Type request; + request.arg1.a = params.arg1.a.unsignedCharValue; + request.arg1.b = params.arg1.b.boolValue; + request.arg1.c.a = params.arg1.c.a.unsignedCharValue; + request.arg1.c.b = params.arg1.c.b.boolValue; + request.arg1.c.c = static_cast>(params.arg1.c.c.unsignedCharValue); + request.arg1.c.d = [self asByteSpan:params.arg1.c.d]; + request.arg1.c.e = [self asCharSpan:params.arg1.c.e]; + request.arg1.c.f = static_cast>(params.arg1.c.f.unsignedCharValue); + request.arg1.c.g = params.arg1.c.g.floatValue; + request.arg1.c.h = params.arg1.c.h.doubleValue; + + new CHIPTestClusterClusterBooleanResponseCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable value) { + completionHandler(value, error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand(request, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)testNestedStructListArgumentRequestWithParams:(CHIPTestClusterClusterTestNestedStructListArgumentRequestParams *)params + completionHandler:(void (^)(CHIPTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + ListFreer listFreer; + TestCluster::Commands::TestNestedStructListArgumentRequest::Type request; + request.arg1.a = params.arg1.a.unsignedCharValue; + request.arg1.b = params.arg1.b.boolValue; + request.arg1.c.a = params.arg1.c.a.unsignedCharValue; + request.arg1.c.b = params.arg1.c.b.boolValue; + request.arg1.c.c = static_cast>(params.arg1.c.c.unsignedCharValue); + request.arg1.c.d = [self asByteSpan:params.arg1.c.d]; + request.arg1.c.e = [self asCharSpan:params.arg1.c.e]; + request.arg1.c.f = static_cast>(params.arg1.c.f.unsignedCharValue); + request.arg1.c.g = params.arg1.c.g.floatValue; + request.arg1.c.h = params.arg1.c.h.doubleValue; + { + using ListType_1 = std::remove_reference_t; + using ListMemberType_1 = ListMemberTypeGetter::Type; + if (params.arg1.d.count != 0) { + auto * listHolder_1 = new ListHolder(params.arg1.d.count); + if (listHolder_1 == nullptr || listHolder_1->mList == nullptr) { + return; + } + listFreer.add(listHolder_1); + for (size_t i_1 = 0; i_1 < params.arg1.d.count; ++i_1) { + if (![params.arg1.d[i_1] isKindOfClass:[CHIPTestClusterClusterSimpleStruct class]]) { + // Wrong kind of value. + return; + } + auto element_1 = (CHIPTestClusterClusterSimpleStruct *) params.arg1.d[i_1]; + listHolder_1->mList[i_1].a = element_1.a.unsignedCharValue; + listHolder_1->mList[i_1].b = element_1.b.boolValue; + listHolder_1->mList[i_1].c + = static_castmList[i_1].c)>>(element_1.c.unsignedCharValue); + listHolder_1->mList[i_1].d = [self asByteSpan:element_1.d]; + listHolder_1->mList[i_1].e = [self asCharSpan:element_1.e]; + listHolder_1->mList[i_1].f + = static_castmList[i_1].f)>>(element_1.f.unsignedCharValue); + listHolder_1->mList[i_1].g = element_1.g.floatValue; + listHolder_1->mList[i_1].h = element_1.h.doubleValue; + } + request.arg1.d = ListType_1(listHolder_1->mList, params.arg1.d.count); + } else { + request.arg1.d = ListType_1(); + } + } + { + using ListType_1 = std::remove_reference_t; + using ListMemberType_1 = ListMemberTypeGetter::Type; + if (params.arg1.e.count != 0) { + auto * listHolder_1 = new ListHolder(params.arg1.e.count); + if (listHolder_1 == nullptr || listHolder_1->mList == nullptr) { + return; + } + listFreer.add(listHolder_1); + for (size_t i_1 = 0; i_1 < params.arg1.e.count; ++i_1) { + if (![params.arg1.e[i_1] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return; + } + auto element_1 = (NSNumber *) params.arg1.e[i_1]; + listHolder_1->mList[i_1] = element_1.unsignedIntValue; + } + request.arg1.e = ListType_1(listHolder_1->mList, params.arg1.e.count); + } else { + request.arg1.e = ListType_1(); + } + } + { + using ListType_1 = std::remove_reference_t; + using ListMemberType_1 = ListMemberTypeGetter::Type; + if (params.arg1.f.count != 0) { + auto * listHolder_1 = new ListHolder(params.arg1.f.count); + if (listHolder_1 == nullptr || listHolder_1->mList == nullptr) { + return; + } + listFreer.add(listHolder_1); + for (size_t i_1 = 0; i_1 < params.arg1.f.count; ++i_1) { + if (![params.arg1.f[i_1] isKindOfClass:[NSData class]]) { + // Wrong kind of value. + return; + } + auto element_1 = (NSData *) params.arg1.f[i_1]; + listHolder_1->mList[i_1] = [self asByteSpan:element_1]; + } + request.arg1.f = ListType_1(listHolder_1->mList, params.arg1.f.count); + } else { + request.arg1.f = ListType_1(); + } + } + { + using ListType_1 = std::remove_reference_t; + using ListMemberType_1 = ListMemberTypeGetter::Type; + if (params.arg1.g.count != 0) { + auto * listHolder_1 = new ListHolder(params.arg1.g.count); + if (listHolder_1 == nullptr || listHolder_1->mList == nullptr) { + return; + } + listFreer.add(listHolder_1); + for (size_t i_1 = 0; i_1 < params.arg1.g.count; ++i_1) { + if (![params.arg1.g[i_1] isKindOfClass:[NSNumber class]]) { // Wrong kind of value. return; } - auto element_0 = (CHIPTestClusterClusterSimpleStruct *) params.arg1[i]; - listHolder_0->mList[i].a = element_0.a.unsignedCharValue; - listHolder_0->mList[i].b = element_0.b.boolValue; - listHolder_0->mList[i].c - = static_castmList[i].c)>>(element_0.c.unsignedCharValue); - listHolder_0->mList[i].d = [self asByteSpan:element_0.d]; - listHolder_0->mList[i].e = [self asCharSpan:element_0.e]; - listHolder_0->mList[i].f - = static_castmList[i].f)>>(element_0.f.unsignedCharValue); - listHolder_0->mList[i].g = element_0.g.floatValue; - listHolder_0->mList[i].h = element_0.h.doubleValue; + auto element_1 = (NSNumber *) params.arg1.g[i_1]; + listHolder_1->mList[i_1] = element_1.unsignedCharValue; } - request.arg1 = ListType(listHolder_0->mList, params.arg1.count); + request.arg1.g = ListType_1(listHolder_1->mList, params.arg1.g.count); } else { - request.arg1 = ListType(); + request.arg1.g = ListType_1(); } } @@ -17498,25 +17803,25 @@ new CHIPDefaultSuccessCallbackBridge( using TypeInfo = TestCluster::Attributes::ListInt8u::TypeInfo; TypeInfo::Type cppValue; { - using ListType = std::remove_reference_t; - using ListMemberType = ListMemberTypeGetter::Type; + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); + auto * listHolder_0 = new ListHolder(value.count); if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { return CHIP_ERROR_INVALID_ARGUMENT; } listFreer.add(listHolder_0); - for (size_t i = 0; i < value.count; ++i) { - if (![value[i] isKindOfClass:[NSNumber class]]) { + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - auto element_0 = (NSNumber *) value[i]; - listHolder_0->mList[i] = element_0.unsignedCharValue; + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedCharValue; } - cppValue = ListType(listHolder_0->mList, value.count); + cppValue = ListType_0(listHolder_0->mList, value.count); } else { - cppValue = ListType(); + cppValue = ListType_0(); } } auto successFn = Callback::FromCancelable(success); @@ -17553,25 +17858,25 @@ new CHIPDefaultSuccessCallbackBridge( using TypeInfo = TestCluster::Attributes::ListOctetString::TypeInfo; TypeInfo::Type cppValue; { - using ListType = std::remove_reference_t; - using ListMemberType = ListMemberTypeGetter::Type; + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); + auto * listHolder_0 = new ListHolder(value.count); if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { return CHIP_ERROR_INVALID_ARGUMENT; } listFreer.add(listHolder_0); - for (size_t i = 0; i < value.count; ++i) { - if (![value[i] isKindOfClass:[NSData class]]) { + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSData class]]) { // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - auto element_0 = (NSData *) value[i]; - listHolder_0->mList[i] = [self asByteSpan:element_0]; + auto element_0 = (NSData *) value[i_0]; + listHolder_0->mList[i_0] = [self asByteSpan:element_0]; } - cppValue = ListType(listHolder_0->mList, value.count); + cppValue = ListType_0(listHolder_0->mList, value.count); } else { - cppValue = ListType(); + cppValue = ListType_0(); } } auto successFn = Callback::FromCancelable(success); @@ -17608,26 +17913,26 @@ new CHIPDefaultSuccessCallbackBridge( using TypeInfo = TestCluster::Attributes::ListStructOctetString::TypeInfo; TypeInfo::Type cppValue; { - using ListType = std::remove_reference_t; - using ListMemberType = ListMemberTypeGetter::Type; + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); + auto * listHolder_0 = new ListHolder(value.count); if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { return CHIP_ERROR_INVALID_ARGUMENT; } listFreer.add(listHolder_0); - for (size_t i = 0; i < value.count; ++i) { - if (![value[i] isKindOfClass:[CHIPTestClusterClusterTestListStructOctet class]]) { + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[CHIPTestClusterClusterTestListStructOctet class]]) { // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - auto element_0 = (CHIPTestClusterClusterTestListStructOctet *) value[i]; - listHolder_0->mList[i].fabricIndex = element_0.fabricIndex.unsignedLongLongValue; - listHolder_0->mList[i].operationalCert = [self asByteSpan:element_0.operationalCert]; + auto element_0 = (CHIPTestClusterClusterTestListStructOctet *) value[i_0]; + listHolder_0->mList[i_0].fabricIndex = element_0.fabricIndex.unsignedLongLongValue; + listHolder_0->mList[i_0].operationalCert = [self asByteSpan:element_0.operationalCert]; } - cppValue = ListType(listHolder_0->mList, value.count); + cppValue = ListType_0(listHolder_0->mList, value.count); } else { - cppValue = ListType(); + cppValue = ListType_0(); } } auto successFn = Callback::FromCancelable(success); @@ -19232,25 +19537,25 @@ - (void)setWeeklyScheduleWithParams:(CHIPThermostatClusterSetWeeklyScheduleParam request.modeForSequence = static_cast>(params.modeForSequence.unsignedCharValue); { - using ListType = std::remove_reference_t; - using ListMemberType = ListMemberTypeGetter::Type; + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; if (params.payload.count != 0) { - auto * listHolder_0 = new ListHolder(params.payload.count); + auto * listHolder_0 = new ListHolder(params.payload.count); if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { return; } listFreer.add(listHolder_0); - for (size_t i = 0; i < params.payload.count; ++i) { - if (![params.payload[i] isKindOfClass:[NSNumber class]]) { + for (size_t i_0 = 0; i_0 < params.payload.count; ++i_0) { + if (![params.payload[i_0] isKindOfClass:[NSNumber class]]) { // Wrong kind of value. return; } - auto element_0 = (NSNumber *) params.payload[i]; - listHolder_0->mList[i] = element_0.unsignedCharValue; + auto element_0 = (NSNumber *) params.payload[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedCharValue; } - request.payload = ListType(listHolder_0->mList, params.payload.count); + request.payload = ListType_0(listHolder_0->mList, params.payload.count); } else { - request.payload = ListType(); + request.payload = ListType_0(); } } diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm index 3ca97c020c54f4..195c6bc4f5e12c 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm @@ -276,25 +276,25 @@ new CHIPDefaultSuccessCallbackBridge( using TypeInfo = ApplicationLauncher::Attributes::ApplicationLauncherList::TypeInfo; TypeInfo::Type cppValue; { - using ListType = std::remove_reference_t; - using ListMemberType = ListMemberTypeGetter::Type; + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); + auto * listHolder_0 = new ListHolder(value.count); if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { return CHIP_ERROR_INVALID_ARGUMENT; } listFreer.add(listHolder_0); - for (size_t i = 0; i < value.count; ++i) { - if (![value[i] isKindOfClass:[NSNumber class]]) { + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - auto element_0 = (NSNumber *) value[i]; - listHolder_0->mList[i] = element_0.unsignedShortValue; + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedShortValue; } - cppValue = ListType(listHolder_0->mList, value.count); + cppValue = ListType_0(listHolder_0->mList, value.count); } else { - cppValue = ListType(); + cppValue = ListType_0(); } } auto successFn = Callback::FromCancelable(success); @@ -382,29 +382,29 @@ new CHIPDefaultSuccessCallbackBridge( using TypeInfo = AudioOutput::Attributes::AudioOutputList::TypeInfo; TypeInfo::Type cppValue; { - using ListType = std::remove_reference_t; - using ListMemberType = ListMemberTypeGetter::Type; + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); + auto * listHolder_0 = new ListHolder(value.count); if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { return CHIP_ERROR_INVALID_ARGUMENT; } listFreer.add(listHolder_0); - for (size_t i = 0; i < value.count; ++i) { - if (![value[i] isKindOfClass:[CHIPAudioOutputClusterAudioOutputInfo class]]) { + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[CHIPAudioOutputClusterAudioOutputInfo class]]) { // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - auto element_0 = (CHIPAudioOutputClusterAudioOutputInfo *) value[i]; - listHolder_0->mList[i].index = element_0.index.unsignedCharValue; - listHolder_0->mList[i].outputType - = static_castmList[i].outputType)>>( + auto element_0 = (CHIPAudioOutputClusterAudioOutputInfo *) value[i_0]; + listHolder_0->mList[i_0].index = element_0.index.unsignedCharValue; + listHolder_0->mList[i_0].outputType + = static_castmList[i_0].outputType)>>( element_0.outputType.unsignedCharValue); - listHolder_0->mList[i].name = [self asCharSpan:element_0.name]; + listHolder_0->mList[i_0].name = [self asCharSpan:element_0.name]; } - cppValue = ListType(listHolder_0->mList, value.count); + cppValue = ListType_0(listHolder_0->mList, value.count); } else { - cppValue = ListType(); + cppValue = ListType_0(); } } auto successFn = Callback::FromCancelable(success); @@ -1028,33 +1028,34 @@ new CHIPDefaultSuccessCallbackBridge( using TypeInfo = BridgedActions::Attributes::ActionList::TypeInfo; TypeInfo::Type cppValue; { - using ListType = std::remove_reference_t; - using ListMemberType = ListMemberTypeGetter::Type; + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); + auto * listHolder_0 = new ListHolder(value.count); if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { return CHIP_ERROR_INVALID_ARGUMENT; } listFreer.add(listHolder_0); - for (size_t i = 0; i < value.count; ++i) { - if (![value[i] isKindOfClass:[CHIPBridgedActionsClusterActionStruct class]]) { + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[CHIPBridgedActionsClusterActionStruct class]]) { // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - auto element_0 = (CHIPBridgedActionsClusterActionStruct *) value[i]; - listHolder_0->mList[i].actionID = element_0.actionID.unsignedShortValue; - listHolder_0->mList[i].name = [self asCharSpan:element_0.name]; - listHolder_0->mList[i].type = static_castmList[i].type)>>( - element_0.type.unsignedCharValue); - listHolder_0->mList[i].endpointListID = element_0.endpointListID.unsignedShortValue; - listHolder_0->mList[i].supportedCommands = element_0.supportedCommands.unsignedShortValue; - listHolder_0->mList[i].status - = static_castmList[i].status)>>( + auto element_0 = (CHIPBridgedActionsClusterActionStruct *) value[i_0]; + listHolder_0->mList[i_0].actionID = element_0.actionID.unsignedShortValue; + listHolder_0->mList[i_0].name = [self asCharSpan:element_0.name]; + listHolder_0->mList[i_0].type + = static_castmList[i_0].type)>>( + element_0.type.unsignedCharValue); + listHolder_0->mList[i_0].endpointListID = element_0.endpointListID.unsignedShortValue; + listHolder_0->mList[i_0].supportedCommands = element_0.supportedCommands.unsignedShortValue; + listHolder_0->mList[i_0].status + = static_castmList[i_0].status)>>( element_0.status.unsignedCharValue); } - cppValue = ListType(listHolder_0->mList, value.count); + cppValue = ListType_0(listHolder_0->mList, value.count); } else { - cppValue = ListType(); + cppValue = ListType_0(); } } auto successFn = Callback::FromCancelable(success); @@ -1075,50 +1076,51 @@ new CHIPDefaultSuccessCallbackBridge( using TypeInfo = BridgedActions::Attributes::EndpointList::TypeInfo; TypeInfo::Type cppValue; { - using ListType = std::remove_reference_t; - using ListMemberType = ListMemberTypeGetter::Type; + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); + auto * listHolder_0 = new ListHolder(value.count); if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { return CHIP_ERROR_INVALID_ARGUMENT; } listFreer.add(listHolder_0); - for (size_t i = 0; i < value.count; ++i) { - if (![value[i] isKindOfClass:[CHIPBridgedActionsClusterEndpointListStruct class]]) { + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[CHIPBridgedActionsClusterEndpointListStruct class]]) { // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - auto element_0 = (CHIPBridgedActionsClusterEndpointListStruct *) value[i]; - listHolder_0->mList[i].endpointListID = element_0.endpointListID.unsignedShortValue; - listHolder_0->mList[i].name = [self asCharSpan:element_0.name]; - listHolder_0->mList[i].type = static_castmList[i].type)>>( - element_0.type.unsignedCharValue); + auto element_0 = (CHIPBridgedActionsClusterEndpointListStruct *) value[i_0]; + listHolder_0->mList[i_0].endpointListID = element_0.endpointListID.unsignedShortValue; + listHolder_0->mList[i_0].name = [self asCharSpan:element_0.name]; + listHolder_0->mList[i_0].type + = static_castmList[i_0].type)>>( + element_0.type.unsignedCharValue); { - using ListType = std::remove_reference_tmList[i].endpoints)>; - using ListMemberType = ListMemberTypeGetter::Type; + using ListType_2 = std::remove_reference_tmList[i_0].endpoints)>; + using ListMemberType_2 = ListMemberTypeGetter::Type; if (element_0.endpoints.count != 0) { - auto * listHolder_2 = new ListHolder(element_0.endpoints.count); + auto * listHolder_2 = new ListHolder(element_0.endpoints.count); if (listHolder_2 == nullptr || listHolder_2->mList == nullptr) { return CHIP_ERROR_INVALID_ARGUMENT; } listFreer.add(listHolder_2); - for (size_t i = 0; i < element_0.endpoints.count; ++i) { - if (![element_0.endpoints[i] isKindOfClass:[NSNumber class]]) { + for (size_t i_2 = 0; i_2 < element_0.endpoints.count; ++i_2) { + if (![element_0.endpoints[i_2] isKindOfClass:[NSNumber class]]) { // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - auto element_2 = (NSNumber *) element_0.endpoints[i]; - listHolder_2->mList[i] = element_2.unsignedShortValue; + auto element_2 = (NSNumber *) element_0.endpoints[i_2]; + listHolder_2->mList[i_2] = element_2.unsignedShortValue; } - listHolder_0->mList[i].endpoints = ListType(listHolder_2->mList, element_0.endpoints.count); + listHolder_0->mList[i_0].endpoints = ListType_2(listHolder_2->mList, element_0.endpoints.count); } else { - listHolder_0->mList[i].endpoints = ListType(); + listHolder_0->mList[i_0].endpoints = ListType_2(); } } } - cppValue = ListType(listHolder_0->mList, value.count); + cppValue = ListType_0(listHolder_0->mList, value.count); } else { - cppValue = ListType(); + cppValue = ListType_0(); } } auto successFn = Callback::FromCancelable(success); @@ -2191,25 +2193,25 @@ new CHIPDefaultSuccessCallbackBridge( using TypeInfo = ContentLauncher::Attributes::AcceptsHeaderList::TypeInfo; TypeInfo::Type cppValue; { - using ListType = std::remove_reference_t; - using ListMemberType = ListMemberTypeGetter::Type; + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); + auto * listHolder_0 = new ListHolder(value.count); if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { return CHIP_ERROR_INVALID_ARGUMENT; } listFreer.add(listHolder_0); - for (size_t i = 0; i < value.count; ++i) { - if (![value[i] isKindOfClass:[NSData class]]) { + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSData class]]) { // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - auto element_0 = (NSData *) value[i]; - listHolder_0->mList[i] = [self asByteSpan:element_0]; + auto element_0 = (NSData *) value[i_0]; + listHolder_0->mList[i_0] = [self asByteSpan:element_0]; } - cppValue = ListType(listHolder_0->mList, value.count); + cppValue = ListType_0(listHolder_0->mList, value.count); } else { - cppValue = ListType(); + cppValue = ListType_0(); } } auto successFn = Callback::FromCancelable(success); @@ -2231,26 +2233,26 @@ new CHIPDefaultSuccessCallbackBridge( using TypeInfo = ContentLauncher::Attributes::SupportedStreamingTypes::TypeInfo; TypeInfo::Type cppValue; { - using ListType = std::remove_reference_t; - using ListMemberType = ListMemberTypeGetter::Type; + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); + auto * listHolder_0 = new ListHolder(value.count); if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { return CHIP_ERROR_INVALID_ARGUMENT; } listFreer.add(listHolder_0); - for (size_t i = 0; i < value.count; ++i) { - if (![value[i] isKindOfClass:[NSNumber class]]) { + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - auto element_0 = (NSNumber *) value[i]; - listHolder_0->mList[i] - = static_castmList[i])>>(element_0.unsignedCharValue); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] + = static_castmList[i_0])>>(element_0.unsignedCharValue); } - cppValue = ListType(listHolder_0->mList, value.count); + cppValue = ListType_0(listHolder_0->mList, value.count); } else { - cppValue = ListType(); + cppValue = ListType_0(); } } auto successFn = Callback::FromCancelable(success); @@ -2302,26 +2304,26 @@ new CHIPDefaultSuccessCallbackBridge( using TypeInfo = Descriptor::Attributes::DeviceList::TypeInfo; TypeInfo::Type cppValue; { - using ListType = std::remove_reference_t; - using ListMemberType = ListMemberTypeGetter::Type; + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); + auto * listHolder_0 = new ListHolder(value.count); if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { return CHIP_ERROR_INVALID_ARGUMENT; } listFreer.add(listHolder_0); - for (size_t i = 0; i < value.count; ++i) { - if (![value[i] isKindOfClass:[CHIPDescriptorClusterDeviceType class]]) { + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[CHIPDescriptorClusterDeviceType class]]) { // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - auto element_0 = (CHIPDescriptorClusterDeviceType *) value[i]; - listHolder_0->mList[i].type = element_0.type.unsignedIntValue; - listHolder_0->mList[i].revision = element_0.revision.unsignedShortValue; + auto element_0 = (CHIPDescriptorClusterDeviceType *) value[i_0]; + listHolder_0->mList[i_0].type = element_0.type.unsignedIntValue; + listHolder_0->mList[i_0].revision = element_0.revision.unsignedShortValue; } - cppValue = ListType(listHolder_0->mList, value.count); + cppValue = ListType_0(listHolder_0->mList, value.count); } else { - cppValue = ListType(); + cppValue = ListType_0(); } } auto successFn = Callback::FromCancelable(success); @@ -2342,25 +2344,25 @@ new CHIPDefaultSuccessCallbackBridge( using TypeInfo = Descriptor::Attributes::ServerList::TypeInfo; TypeInfo::Type cppValue; { - using ListType = std::remove_reference_t; - using ListMemberType = ListMemberTypeGetter::Type; + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); + auto * listHolder_0 = new ListHolder(value.count); if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { return CHIP_ERROR_INVALID_ARGUMENT; } listFreer.add(listHolder_0); - for (size_t i = 0; i < value.count; ++i) { - if (![value[i] isKindOfClass:[NSNumber class]]) { + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - auto element_0 = (NSNumber *) value[i]; - listHolder_0->mList[i] = element_0.unsignedIntValue; + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } - cppValue = ListType(listHolder_0->mList, value.count); + cppValue = ListType_0(listHolder_0->mList, value.count); } else { - cppValue = ListType(); + cppValue = ListType_0(); } } auto successFn = Callback::FromCancelable(success); @@ -2381,25 +2383,25 @@ new CHIPDefaultSuccessCallbackBridge( using TypeInfo = Descriptor::Attributes::ClientList::TypeInfo; TypeInfo::Type cppValue; { - using ListType = std::remove_reference_t; - using ListMemberType = ListMemberTypeGetter::Type; + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); + auto * listHolder_0 = new ListHolder(value.count); if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { return CHIP_ERROR_INVALID_ARGUMENT; } listFreer.add(listHolder_0); - for (size_t i = 0; i < value.count; ++i) { - if (![value[i] isKindOfClass:[NSNumber class]]) { + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - auto element_0 = (NSNumber *) value[i]; - listHolder_0->mList[i] = element_0.unsignedIntValue; + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedIntValue; } - cppValue = ListType(listHolder_0->mList, value.count); + cppValue = ListType_0(listHolder_0->mList, value.count); } else { - cppValue = ListType(); + cppValue = ListType_0(); } } auto successFn = Callback::FromCancelable(success); @@ -2420,25 +2422,25 @@ new CHIPDefaultSuccessCallbackBridge( using TypeInfo = Descriptor::Attributes::PartsList::TypeInfo; TypeInfo::Type cppValue; { - using ListType = std::remove_reference_t; - using ListMemberType = ListMemberTypeGetter::Type; + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); + auto * listHolder_0 = new ListHolder(value.count); if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { return CHIP_ERROR_INVALID_ARGUMENT; } listFreer.add(listHolder_0); - for (size_t i = 0; i < value.count; ++i) { - if (![value[i] isKindOfClass:[NSNumber class]]) { + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - auto element_0 = (NSNumber *) value[i]; - listHolder_0->mList[i] = element_0.unsignedShortValue; + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedShortValue; } - cppValue = ListType(listHolder_0->mList, value.count); + cppValue = ListType_0(listHolder_0->mList, value.count); } else { - cppValue = ListType(); + cppValue = ListType_0(); } } auto successFn = Callback::FromCancelable(success); @@ -3028,26 +3030,26 @@ new CHIPDefaultSuccessCallbackBridge( using TypeInfo = FixedLabel::Attributes::LabelList::TypeInfo; TypeInfo::Type cppValue; { - using ListType = std::remove_reference_t; - using ListMemberType = ListMemberTypeGetter::Type; + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); + auto * listHolder_0 = new ListHolder(value.count); if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { return CHIP_ERROR_INVALID_ARGUMENT; } listFreer.add(listHolder_0); - for (size_t i = 0; i < value.count; ++i) { - if (![value[i] isKindOfClass:[CHIPFixedLabelClusterLabelStruct class]]) { + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[CHIPFixedLabelClusterLabelStruct class]]) { // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - auto element_0 = (CHIPFixedLabelClusterLabelStruct *) value[i]; - listHolder_0->mList[i].label = [self asCharSpan:element_0.label]; - listHolder_0->mList[i].value = [self asCharSpan:element_0.value]; + auto element_0 = (CHIPFixedLabelClusterLabelStruct *) value[i_0]; + listHolder_0->mList[i_0].label = [self asCharSpan:element_0.label]; + listHolder_0->mList[i_0].value = [self asCharSpan:element_0.value]; } - cppValue = ListType(listHolder_0->mList, value.count); + cppValue = ListType_0(listHolder_0->mList, value.count); } else { - cppValue = ListType(); + cppValue = ListType_0(); } } auto successFn = Callback::FromCancelable(success); @@ -3203,25 +3205,25 @@ new CHIPDefaultSuccessCallbackBridge( using TypeInfo = GeneralCommissioning::Attributes::BasicCommissioningInfoList::TypeInfo; TypeInfo::Type cppValue; { - using ListType = std::remove_reference_t; - using ListMemberType = ListMemberTypeGetter::Type; + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); + auto * listHolder_0 = new ListHolder(value.count); if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { return CHIP_ERROR_INVALID_ARGUMENT; } listFreer.add(listHolder_0); - for (size_t i = 0; i < value.count; ++i) { - if (![value[i] isKindOfClass:[CHIPGeneralCommissioningClusterBasicCommissioningInfoType class]]) { + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[CHIPGeneralCommissioningClusterBasicCommissioningInfoType class]]) { // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - auto element_0 = (CHIPGeneralCommissioningClusterBasicCommissioningInfoType *) value[i]; - listHolder_0->mList[i].failSafeExpiryLengthMs = element_0.failSafeExpiryLengthMs.unsignedIntValue; + auto element_0 = (CHIPGeneralCommissioningClusterBasicCommissioningInfoType *) value[i_0]; + listHolder_0->mList[i_0].failSafeExpiryLengthMs = element_0.failSafeExpiryLengthMs.unsignedIntValue; } - cppValue = ListType(listHolder_0->mList, value.count); + cppValue = ListType_0(listHolder_0->mList, value.count); } else { - cppValue = ListType(); + cppValue = ListType_0(); } } auto successFn = Callback::FromCancelable(success); @@ -3273,33 +3275,34 @@ new CHIPDefaultSuccessCallbackBridge( using TypeInfo = GeneralDiagnostics::Attributes::NetworkInterfaces::TypeInfo; TypeInfo::Type cppValue; { - using ListType = std::remove_reference_t; - using ListMemberType = ListMemberTypeGetter::Type; + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); + auto * listHolder_0 = new ListHolder(value.count); if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { return CHIP_ERROR_INVALID_ARGUMENT; } listFreer.add(listHolder_0); - for (size_t i = 0; i < value.count; ++i) { - if (![value[i] isKindOfClass:[CHIPGeneralDiagnosticsClusterNetworkInterfaceType class]]) { + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[CHIPGeneralDiagnosticsClusterNetworkInterfaceType class]]) { // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - auto element_0 = (CHIPGeneralDiagnosticsClusterNetworkInterfaceType *) value[i]; - listHolder_0->mList[i].name = [self asCharSpan:element_0.name]; - listHolder_0->mList[i].fabricConnected = element_0.fabricConnected.boolValue; - listHolder_0->mList[i].offPremiseServicesReachableIPv4 + auto element_0 = (CHIPGeneralDiagnosticsClusterNetworkInterfaceType *) value[i_0]; + listHolder_0->mList[i_0].name = [self asCharSpan:element_0.name]; + listHolder_0->mList[i_0].fabricConnected = element_0.fabricConnected.boolValue; + listHolder_0->mList[i_0].offPremiseServicesReachableIPv4 = element_0.offPremiseServicesReachableIPv4.boolValue; - listHolder_0->mList[i].offPremiseServicesReachableIPv6 + listHolder_0->mList[i_0].offPremiseServicesReachableIPv6 = element_0.offPremiseServicesReachableIPv6.boolValue; - listHolder_0->mList[i].hardwareAddress = [self asByteSpan:element_0.hardwareAddress]; - listHolder_0->mList[i].type = static_castmList[i].type)>>( - element_0.type.unsignedCharValue); + listHolder_0->mList[i_0].hardwareAddress = [self asByteSpan:element_0.hardwareAddress]; + listHolder_0->mList[i_0].type + = static_castmList[i_0].type)>>( + element_0.type.unsignedCharValue); } - cppValue = ListType(listHolder_0->mList, value.count); + cppValue = ListType_0(listHolder_0->mList, value.count); } else { - cppValue = ListType(); + cppValue = ListType_0(); } } auto successFn = Callback::FromCancelable(success); @@ -3393,25 +3396,25 @@ new CHIPDefaultSuccessCallbackBridge( using TypeInfo = GeneralDiagnostics::Attributes::ActiveHardwareFaults::TypeInfo; TypeInfo::Type cppValue; { - using ListType = std::remove_reference_t; - using ListMemberType = ListMemberTypeGetter::Type; + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); + auto * listHolder_0 = new ListHolder(value.count); if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { return CHIP_ERROR_INVALID_ARGUMENT; } listFreer.add(listHolder_0); - for (size_t i = 0; i < value.count; ++i) { - if (![value[i] isKindOfClass:[NSNumber class]]) { + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - auto element_0 = (NSNumber *) value[i]; - listHolder_0->mList[i] = element_0.unsignedCharValue; + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedCharValue; } - cppValue = ListType(listHolder_0->mList, value.count); + cppValue = ListType_0(listHolder_0->mList, value.count); } else { - cppValue = ListType(); + cppValue = ListType_0(); } } auto successFn = Callback::FromCancelable(success); @@ -3432,25 +3435,25 @@ new CHIPDefaultSuccessCallbackBridge( using TypeInfo = GeneralDiagnostics::Attributes::ActiveRadioFaults::TypeInfo; TypeInfo::Type cppValue; { - using ListType = std::remove_reference_t; - using ListMemberType = ListMemberTypeGetter::Type; + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); + auto * listHolder_0 = new ListHolder(value.count); if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { return CHIP_ERROR_INVALID_ARGUMENT; } listFreer.add(listHolder_0); - for (size_t i = 0; i < value.count; ++i) { - if (![value[i] isKindOfClass:[NSNumber class]]) { + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - auto element_0 = (NSNumber *) value[i]; - listHolder_0->mList[i] = element_0.unsignedCharValue; + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedCharValue; } - cppValue = ListType(listHolder_0->mList, value.count); + cppValue = ListType_0(listHolder_0->mList, value.count); } else { - cppValue = ListType(); + cppValue = ListType_0(); } } auto successFn = Callback::FromCancelable(success); @@ -3471,25 +3474,25 @@ new CHIPDefaultSuccessCallbackBridge( using TypeInfo = GeneralDiagnostics::Attributes::ActiveNetworkFaults::TypeInfo; TypeInfo::Type cppValue; { - using ListType = std::remove_reference_t; - using ListMemberType = ListMemberTypeGetter::Type; + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); + auto * listHolder_0 = new ListHolder(value.count); if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { return CHIP_ERROR_INVALID_ARGUMENT; } listFreer.add(listHolder_0); - for (size_t i = 0; i < value.count; ++i) { - if (![value[i] isKindOfClass:[NSNumber class]]) { + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - auto element_0 = (NSNumber *) value[i]; - listHolder_0->mList[i] = element_0.unsignedCharValue; + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedCharValue; } - cppValue = ListType(listHolder_0->mList, value.count); + cppValue = ListType_0(listHolder_0->mList, value.count); } else { - cppValue = ListType(); + cppValue = ListType_0(); } } auto successFn = Callback::FromCancelable(success); @@ -3541,27 +3544,27 @@ new CHIPDefaultSuccessCallbackBridge( using TypeInfo = GroupKeyManagement::Attributes::Groups::TypeInfo; TypeInfo::Type cppValue; { - using ListType = std::remove_reference_t; - using ListMemberType = ListMemberTypeGetter::Type; + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); + auto * listHolder_0 = new ListHolder(value.count); if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { return CHIP_ERROR_INVALID_ARGUMENT; } listFreer.add(listHolder_0); - for (size_t i = 0; i < value.count; ++i) { - if (![value[i] isKindOfClass:[CHIPGroupKeyManagementClusterGroupState class]]) { + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[CHIPGroupKeyManagementClusterGroupState class]]) { // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - auto element_0 = (CHIPGroupKeyManagementClusterGroupState *) value[i]; - listHolder_0->mList[i].vendorId = element_0.vendorId.unsignedShortValue; - listHolder_0->mList[i].vendorGroupId = element_0.vendorGroupId.unsignedShortValue; - listHolder_0->mList[i].groupKeySetIndex = element_0.groupKeySetIndex.unsignedShortValue; + auto element_0 = (CHIPGroupKeyManagementClusterGroupState *) value[i_0]; + listHolder_0->mList[i_0].vendorId = element_0.vendorId.unsignedShortValue; + listHolder_0->mList[i_0].vendorGroupId = element_0.vendorGroupId.unsignedShortValue; + listHolder_0->mList[i_0].groupKeySetIndex = element_0.groupKeySetIndex.unsignedShortValue; } - cppValue = ListType(listHolder_0->mList, value.count); + cppValue = ListType_0(listHolder_0->mList, value.count); } else { - cppValue = ListType(); + cppValue = ListType_0(); } } auto successFn = Callback::FromCancelable(success); @@ -3582,31 +3585,31 @@ new CHIPDefaultSuccessCallbackBridge( using TypeInfo = GroupKeyManagement::Attributes::GroupKeys::TypeInfo; TypeInfo::Type cppValue; { - using ListType = std::remove_reference_t; - using ListMemberType = ListMemberTypeGetter::Type; + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); + auto * listHolder_0 = new ListHolder(value.count); if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { return CHIP_ERROR_INVALID_ARGUMENT; } listFreer.add(listHolder_0); - for (size_t i = 0; i < value.count; ++i) { - if (![value[i] isKindOfClass:[CHIPGroupKeyManagementClusterGroupKey class]]) { + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[CHIPGroupKeyManagementClusterGroupKey class]]) { // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - auto element_0 = (CHIPGroupKeyManagementClusterGroupKey *) value[i]; - listHolder_0->mList[i].vendorId = element_0.vendorId.unsignedShortValue; - listHolder_0->mList[i].groupKeyIndex = element_0.groupKeyIndex.unsignedShortValue; - listHolder_0->mList[i].groupKeyRoot = [self asByteSpan:element_0.groupKeyRoot]; - listHolder_0->mList[i].groupKeyEpochStartTime = element_0.groupKeyEpochStartTime.unsignedLongLongValue; - listHolder_0->mList[i].groupKeySecurityPolicy - = static_castmList[i].groupKeySecurityPolicy)>>( + auto element_0 = (CHIPGroupKeyManagementClusterGroupKey *) value[i_0]; + listHolder_0->mList[i_0].vendorId = element_0.vendorId.unsignedShortValue; + listHolder_0->mList[i_0].groupKeyIndex = element_0.groupKeyIndex.unsignedShortValue; + listHolder_0->mList[i_0].groupKeyRoot = [self asByteSpan:element_0.groupKeyRoot]; + listHolder_0->mList[i_0].groupKeyEpochStartTime = element_0.groupKeyEpochStartTime.unsignedLongLongValue; + listHolder_0->mList[i_0].groupKeySecurityPolicy + = static_castmList[i_0].groupKeySecurityPolicy)>>( element_0.groupKeySecurityPolicy.unsignedCharValue); } - cppValue = ListType(listHolder_0->mList, value.count); + cppValue = ListType_0(listHolder_0->mList, value.count); } else { - cppValue = ListType(); + cppValue = ListType_0(); } } auto successFn = Callback::FromCancelable(success); @@ -4116,30 +4119,30 @@ new CHIPDefaultSuccessCallbackBridge( using TypeInfo = MediaInput::Attributes::MediaInputList::TypeInfo; TypeInfo::Type cppValue; { - using ListType = std::remove_reference_t; - using ListMemberType = ListMemberTypeGetter::Type; + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); + auto * listHolder_0 = new ListHolder(value.count); if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { return CHIP_ERROR_INVALID_ARGUMENT; } listFreer.add(listHolder_0); - for (size_t i = 0; i < value.count; ++i) { - if (![value[i] isKindOfClass:[CHIPMediaInputClusterMediaInputInfo class]]) { + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[CHIPMediaInputClusterMediaInputInfo class]]) { // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - auto element_0 = (CHIPMediaInputClusterMediaInputInfo *) value[i]; - listHolder_0->mList[i].index = element_0.index.unsignedCharValue; - listHolder_0->mList[i].inputType - = static_castmList[i].inputType)>>( + auto element_0 = (CHIPMediaInputClusterMediaInputInfo *) value[i_0]; + listHolder_0->mList[i_0].index = element_0.index.unsignedCharValue; + listHolder_0->mList[i_0].inputType + = static_castmList[i_0].inputType)>>( element_0.inputType.unsignedCharValue); - listHolder_0->mList[i].name = [self asCharSpan:element_0.name]; - listHolder_0->mList[i].description = [self asCharSpan:element_0.descriptionString]; + listHolder_0->mList[i_0].name = [self asCharSpan:element_0.name]; + listHolder_0->mList[i_0].description = [self asCharSpan:element_0.descriptionString]; } - cppValue = ListType(listHolder_0->mList, value.count); + cppValue = ListType_0(listHolder_0->mList, value.count); } else { - cppValue = ListType(); + cppValue = ListType_0(); } } auto successFn = Callback::FromCancelable(success); @@ -4402,27 +4405,27 @@ new CHIPDefaultSuccessCallbackBridge( using TypeInfo = ModeSelect::Attributes::SupportedModes::TypeInfo; TypeInfo::Type cppValue; { - using ListType = std::remove_reference_t; - using ListMemberType = ListMemberTypeGetter::Type; + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); + auto * listHolder_0 = new ListHolder(value.count); if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { return CHIP_ERROR_INVALID_ARGUMENT; } listFreer.add(listHolder_0); - for (size_t i = 0; i < value.count; ++i) { - if (![value[i] isKindOfClass:[CHIPModeSelectClusterModeOptionStruct class]]) { + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[CHIPModeSelectClusterModeOptionStruct class]]) { // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - auto element_0 = (CHIPModeSelectClusterModeOptionStruct *) value[i]; - listHolder_0->mList[i].label = [self asCharSpan:element_0.label]; - listHolder_0->mList[i].mode = element_0.mode.unsignedCharValue; - listHolder_0->mList[i].semanticTag = element_0.semanticTag.unsignedIntValue; + auto element_0 = (CHIPModeSelectClusterModeOptionStruct *) value[i_0]; + listHolder_0->mList[i_0].label = [self asCharSpan:element_0.label]; + listHolder_0->mList[i_0].mode = element_0.mode.unsignedCharValue; + listHolder_0->mList[i_0].semanticTag = element_0.semanticTag.unsignedIntValue; } - cppValue = ListType(listHolder_0->mList, value.count); + cppValue = ListType_0(listHolder_0->mList, value.count); } else { - cppValue = ListType(); + cppValue = ListType_0(); } } auto successFn = Callback::FromCancelable(success); @@ -4859,30 +4862,30 @@ new CHIPDefaultSuccessCallbackBridge( using TypeInfo = OperationalCredentials::Attributes::FabricsList::TypeInfo; TypeInfo::Type cppValue; { - using ListType = std::remove_reference_t; - using ListMemberType = ListMemberTypeGetter::Type; + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); + auto * listHolder_0 = new ListHolder(value.count); if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { return CHIP_ERROR_INVALID_ARGUMENT; } listFreer.add(listHolder_0); - for (size_t i = 0; i < value.count; ++i) { - if (![value[i] isKindOfClass:[CHIPOperationalCredentialsClusterFabricDescriptor class]]) { + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[CHIPOperationalCredentialsClusterFabricDescriptor class]]) { // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - auto element_0 = (CHIPOperationalCredentialsClusterFabricDescriptor *) value[i]; - listHolder_0->mList[i].fabricIndex = element_0.fabricIndex.unsignedCharValue; - listHolder_0->mList[i].rootPublicKey = [self asByteSpan:element_0.rootPublicKey]; - listHolder_0->mList[i].vendorId = element_0.vendorId.unsignedShortValue; - listHolder_0->mList[i].fabricId = element_0.fabricId.unsignedLongLongValue; - listHolder_0->mList[i].nodeId = element_0.nodeId.unsignedLongLongValue; - listHolder_0->mList[i].label = [self asCharSpan:element_0.label]; + auto element_0 = (CHIPOperationalCredentialsClusterFabricDescriptor *) value[i_0]; + listHolder_0->mList[i_0].fabricIndex = element_0.fabricIndex.unsignedCharValue; + listHolder_0->mList[i_0].rootPublicKey = [self asByteSpan:element_0.rootPublicKey]; + listHolder_0->mList[i_0].vendorId = element_0.vendorId.unsignedShortValue; + listHolder_0->mList[i_0].fabricId = element_0.fabricId.unsignedLongLongValue; + listHolder_0->mList[i_0].nodeId = element_0.nodeId.unsignedLongLongValue; + listHolder_0->mList[i_0].label = [self asCharSpan:element_0.label]; } - cppValue = ListType(listHolder_0->mList, value.count); + cppValue = ListType_0(listHolder_0->mList, value.count); } else { - cppValue = ListType(); + cppValue = ListType_0(); } } auto successFn = Callback::FromCancelable(success); @@ -4940,25 +4943,25 @@ new CHIPDefaultSuccessCallbackBridge( using TypeInfo = OperationalCredentials::Attributes::TrustedRootCertificates::TypeInfo; TypeInfo::Type cppValue; { - using ListType = std::remove_reference_t; - using ListMemberType = ListMemberTypeGetter::Type; + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); + auto * listHolder_0 = new ListHolder(value.count); if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { return CHIP_ERROR_INVALID_ARGUMENT; } listFreer.add(listHolder_0); - for (size_t i = 0; i < value.count; ++i) { - if (![value[i] isKindOfClass:[NSData class]]) { + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSData class]]) { // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - auto element_0 = (NSData *) value[i]; - listHolder_0->mList[i] = [self asByteSpan:element_0]; + auto element_0 = (NSData *) value[i_0]; + listHolder_0->mList[i_0] = [self asByteSpan:element_0]; } - cppValue = ListType(listHolder_0->mList, value.count); + cppValue = ListType_0(listHolder_0->mList, value.count); } else { - cppValue = ListType(); + cppValue = ListType_0(); } } auto successFn = Callback::FromCancelable(success); @@ -5155,25 +5158,25 @@ new CHIPDefaultSuccessCallbackBridge( using TypeInfo = PowerSource::Attributes::ActiveBatteryFaults::TypeInfo; TypeInfo::Type cppValue; { - using ListType = std::remove_reference_t; - using ListMemberType = ListMemberTypeGetter::Type; + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); + auto * listHolder_0 = new ListHolder(value.count); if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { return CHIP_ERROR_INVALID_ARGUMENT; } listFreer.add(listHolder_0); - for (size_t i = 0; i < value.count; ++i) { - if (![value[i] isKindOfClass:[NSNumber class]]) { + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - auto element_0 = (NSNumber *) value[i]; - listHolder_0->mList[i] = element_0.unsignedCharValue; + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedCharValue; } - cppValue = ListType(listHolder_0->mList, value.count); + cppValue = ListType_0(listHolder_0->mList, value.count); } else { - cppValue = ListType(); + cppValue = ListType_0(); } } auto successFn = Callback::FromCancelable(success); @@ -5981,29 +5984,29 @@ new CHIPDefaultSuccessCallbackBridge( using TypeInfo = SoftwareDiagnostics::Attributes::ThreadMetrics::TypeInfo; TypeInfo::Type cppValue; { - using ListType = std::remove_reference_t; - using ListMemberType = ListMemberTypeGetter::Type; + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); + auto * listHolder_0 = new ListHolder(value.count); if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { return CHIP_ERROR_INVALID_ARGUMENT; } listFreer.add(listHolder_0); - for (size_t i = 0; i < value.count; ++i) { - if (![value[i] isKindOfClass:[CHIPSoftwareDiagnosticsClusterThreadMetrics class]]) { + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[CHIPSoftwareDiagnosticsClusterThreadMetrics class]]) { // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - auto element_0 = (CHIPSoftwareDiagnosticsClusterThreadMetrics *) value[i]; - listHolder_0->mList[i].id = element_0.id.unsignedLongLongValue; - listHolder_0->mList[i].name = [self asCharSpan:element_0.name]; - listHolder_0->mList[i].stackFreeCurrent = element_0.stackFreeCurrent.unsignedIntValue; - listHolder_0->mList[i].stackFreeMinimum = element_0.stackFreeMinimum.unsignedIntValue; - listHolder_0->mList[i].stackSize = element_0.stackSize.unsignedIntValue; + auto element_0 = (CHIPSoftwareDiagnosticsClusterThreadMetrics *) value[i_0]; + listHolder_0->mList[i_0].id = element_0.id.unsignedLongLongValue; + listHolder_0->mList[i_0].name = [self asCharSpan:element_0.name]; + listHolder_0->mList[i_0].stackFreeCurrent = element_0.stackFreeCurrent.unsignedIntValue; + listHolder_0->mList[i_0].stackFreeMinimum = element_0.stackFreeMinimum.unsignedIntValue; + listHolder_0->mList[i_0].stackSize = element_0.stackSize.unsignedIntValue; } - cppValue = ListType(listHolder_0->mList, value.count); + cppValue = ListType_0(listHolder_0->mList, value.count); } else { - cppValue = ListType(); + cppValue = ListType_0(); } } auto successFn = Callback::FromCancelable(success); @@ -6231,29 +6234,29 @@ new CHIPDefaultSuccessCallbackBridge( using TypeInfo = TvChannel::Attributes::TvChannelList::TypeInfo; TypeInfo::Type cppValue; { - using ListType = std::remove_reference_t; - using ListMemberType = ListMemberTypeGetter::Type; + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); + auto * listHolder_0 = new ListHolder(value.count); if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { return CHIP_ERROR_INVALID_ARGUMENT; } listFreer.add(listHolder_0); - for (size_t i = 0; i < value.count; ++i) { - if (![value[i] isKindOfClass:[CHIPTvChannelClusterTvChannelInfo class]]) { + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[CHIPTvChannelClusterTvChannelInfo class]]) { // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - auto element_0 = (CHIPTvChannelClusterTvChannelInfo *) value[i]; - listHolder_0->mList[i].majorNumber = element_0.majorNumber.unsignedShortValue; - listHolder_0->mList[i].minorNumber = element_0.minorNumber.unsignedShortValue; - listHolder_0->mList[i].name = [self asCharSpan:element_0.name]; - listHolder_0->mList[i].callSign = [self asCharSpan:element_0.callSign]; - listHolder_0->mList[i].affiliateCallSign = [self asCharSpan:element_0.affiliateCallSign]; + auto element_0 = (CHIPTvChannelClusterTvChannelInfo *) value[i_0]; + listHolder_0->mList[i_0].majorNumber = element_0.majorNumber.unsignedShortValue; + listHolder_0->mList[i_0].minorNumber = element_0.minorNumber.unsignedShortValue; + listHolder_0->mList[i_0].name = [self asCharSpan:element_0.name]; + listHolder_0->mList[i_0].callSign = [self asCharSpan:element_0.callSign]; + listHolder_0->mList[i_0].affiliateCallSign = [self asCharSpan:element_0.affiliateCallSign]; } - cppValue = ListType(listHolder_0->mList, value.count); + cppValue = ListType_0(listHolder_0->mList, value.count); } else { - cppValue = ListType(); + cppValue = ListType_0(); } } auto successFn = Callback::FromCancelable(success); @@ -6341,26 +6344,26 @@ new CHIPDefaultSuccessCallbackBridge( using TypeInfo = TargetNavigator::Attributes::TargetNavigatorList::TypeInfo; TypeInfo::Type cppValue; { - using ListType = std::remove_reference_t; - using ListMemberType = ListMemberTypeGetter::Type; + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); + auto * listHolder_0 = new ListHolder(value.count); if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { return CHIP_ERROR_INVALID_ARGUMENT; } listFreer.add(listHolder_0); - for (size_t i = 0; i < value.count; ++i) { - if (![value[i] isKindOfClass:[CHIPTargetNavigatorClusterNavigateTargetTargetInfo class]]) { + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[CHIPTargetNavigatorClusterNavigateTargetTargetInfo class]]) { // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - auto element_0 = (CHIPTargetNavigatorClusterNavigateTargetTargetInfo *) value[i]; - listHolder_0->mList[i].identifier = element_0.identifier.unsignedCharValue; - listHolder_0->mList[i].name = [self asCharSpan:element_0.name]; + auto element_0 = (CHIPTargetNavigatorClusterNavigateTargetTargetInfo *) value[i_0]; + listHolder_0->mList[i_0].identifier = element_0.identifier.unsignedCharValue; + listHolder_0->mList[i_0].name = [self asCharSpan:element_0.name]; } - cppValue = ListType(listHolder_0->mList, value.count); + cppValue = ListType_0(listHolder_0->mList, value.count); } else { - cppValue = ListType(); + cppValue = ListType_0(); } } auto successFn = Callback::FromCancelable(success); @@ -6516,32 +6519,32 @@ new CHIPDefaultSuccessCallbackBridge( using TypeInfo = TestCluster::Attributes::ListNullablesAndOptionalsStruct::TypeInfo; TypeInfo::Type cppValue; { - using ListType = std::remove_reference_t; - using ListMemberType = ListMemberTypeGetter::Type; + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); + auto * listHolder_0 = new ListHolder(value.count); if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { return CHIP_ERROR_INVALID_ARGUMENT; } listFreer.add(listHolder_0); - for (size_t i = 0; i < value.count; ++i) { - if (![value[i] isKindOfClass:[CHIPTestClusterClusterNullablesAndOptionalsStruct class]]) { + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[CHIPTestClusterClusterNullablesAndOptionalsStruct class]]) { // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - auto element_0 = (CHIPTestClusterClusterNullablesAndOptionalsStruct *) value[i]; + auto element_0 = (CHIPTestClusterClusterNullablesAndOptionalsStruct *) value[i_0]; if (element_0.nullableInt == nil) { - listHolder_0->mList[i].nullableInt.SetNull(); + listHolder_0->mList[i_0].nullableInt.SetNull(); } else { - auto & nonNullValue_2 = listHolder_0->mList[i].nullableInt.SetNonNull(); + auto & nonNullValue_2 = listHolder_0->mList[i_0].nullableInt.SetNonNull(); nonNullValue_2 = element_0.nullableInt.unsignedShortValue; } if (element_0.optionalInt != nil) { - auto & definedValue_2 = listHolder_0->mList[i].optionalInt.Emplace(); + auto & definedValue_2 = listHolder_0->mList[i_0].optionalInt.Emplace(); definedValue_2 = element_0.optionalInt.unsignedShortValue; } if (element_0.nullableOptionalInt != nil) { - auto & definedValue_2 = listHolder_0->mList[i].nullableOptionalInt.Emplace(); + auto & definedValue_2 = listHolder_0->mList[i_0].nullableOptionalInt.Emplace(); if (element_0.nullableOptionalInt == nil) { definedValue_2.SetNull(); } else { @@ -6550,17 +6553,17 @@ new CHIPDefaultSuccessCallbackBridge( } } if (element_0.nullableString == nil) { - listHolder_0->mList[i].nullableString.SetNull(); + listHolder_0->mList[i_0].nullableString.SetNull(); } else { - auto & nonNullValue_2 = listHolder_0->mList[i].nullableString.SetNonNull(); + auto & nonNullValue_2 = listHolder_0->mList[i_0].nullableString.SetNonNull(); nonNullValue_2 = [self asCharSpan:element_0.nullableString]; } if (element_0.optionalString != nil) { - auto & definedValue_2 = listHolder_0->mList[i].optionalString.Emplace(); + auto & definedValue_2 = listHolder_0->mList[i_0].optionalString.Emplace(); definedValue_2 = [self asCharSpan:element_0.optionalString]; } if (element_0.nullableOptionalString != nil) { - auto & definedValue_2 = listHolder_0->mList[i].nullableOptionalString.Emplace(); + auto & definedValue_2 = listHolder_0->mList[i_0].nullableOptionalString.Emplace(); if (element_0.nullableOptionalString == nil) { definedValue_2.SetNull(); } else { @@ -6569,9 +6572,9 @@ new CHIPDefaultSuccessCallbackBridge( } } if (element_0.nullableStruct == nil) { - listHolder_0->mList[i].nullableStruct.SetNull(); + listHolder_0->mList[i_0].nullableStruct.SetNull(); } else { - auto & nonNullValue_2 = listHolder_0->mList[i].nullableStruct.SetNonNull(); + auto & nonNullValue_2 = listHolder_0->mList[i_0].nullableStruct.SetNonNull(); nonNullValue_2.a = element_0.nullableStruct.a.unsignedCharValue; nonNullValue_2.b = element_0.nullableStruct.b.boolValue; nonNullValue_2.c = static_cast>( @@ -6584,7 +6587,7 @@ new CHIPDefaultSuccessCallbackBridge( nonNullValue_2.h = element_0.nullableStruct.h.doubleValue; } if (element_0.optionalStruct != nil) { - auto & definedValue_2 = listHolder_0->mList[i].optionalStruct.Emplace(); + auto & definedValue_2 = listHolder_0->mList[i_0].optionalStruct.Emplace(); definedValue_2.a = element_0.optionalStruct.a.unsignedCharValue; definedValue_2.b = element_0.optionalStruct.b.boolValue; definedValue_2.c = static_cast>( @@ -6597,7 +6600,7 @@ new CHIPDefaultSuccessCallbackBridge( definedValue_2.h = element_0.optionalStruct.h.doubleValue; } if (element_0.nullableOptionalStruct != nil) { - auto & definedValue_2 = listHolder_0->mList[i].nullableOptionalStruct.Emplace(); + auto & definedValue_2 = listHolder_0->mList[i_0].nullableOptionalStruct.Emplace(); if (element_0.nullableOptionalStruct == nil) { definedValue_2.SetNull(); } else { @@ -6615,97 +6618,98 @@ new CHIPDefaultSuccessCallbackBridge( } } if (element_0.nullableList == nil) { - listHolder_0->mList[i].nullableList.SetNull(); + listHolder_0->mList[i_0].nullableList.SetNull(); } else { - auto & nonNullValue_2 = listHolder_0->mList[i].nullableList.SetNonNull(); + auto & nonNullValue_2 = listHolder_0->mList[i_0].nullableList.SetNonNull(); { - using ListType = std::remove_reference_t; - using ListMemberType = ListMemberTypeGetter::Type; + using ListType_3 = std::remove_reference_t; + using ListMemberType_3 = ListMemberTypeGetter::Type; if (element_0.nullableList.count != 0) { - auto * listHolder_3 = new ListHolder(element_0.nullableList.count); + auto * listHolder_3 = new ListHolder(element_0.nullableList.count); if (listHolder_3 == nullptr || listHolder_3->mList == nullptr) { return CHIP_ERROR_INVALID_ARGUMENT; } listFreer.add(listHolder_3); - for (size_t i = 0; i < element_0.nullableList.count; ++i) { - if (![element_0.nullableList[i] isKindOfClass:[NSNumber class]]) { + for (size_t i_3 = 0; i_3 < element_0.nullableList.count; ++i_3) { + if (![element_0.nullableList[i_3] isKindOfClass:[NSNumber class]]) { // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - auto element_3 = (NSNumber *) element_0.nullableList[i]; - listHolder_3->mList[i] - = static_castmList[i])>>( + auto element_3 = (NSNumber *) element_0.nullableList[i_3]; + listHolder_3->mList[i_3] + = static_castmList[i_3])>>( element_3.unsignedCharValue); } - nonNullValue_2 = ListType(listHolder_3->mList, element_0.nullableList.count); + nonNullValue_2 = ListType_3(listHolder_3->mList, element_0.nullableList.count); } else { - nonNullValue_2 = ListType(); + nonNullValue_2 = ListType_3(); } } } if (element_0.optionalList != nil) { - auto & definedValue_2 = listHolder_0->mList[i].optionalList.Emplace(); + auto & definedValue_2 = listHolder_0->mList[i_0].optionalList.Emplace(); { - using ListType = std::remove_reference_t; - using ListMemberType = ListMemberTypeGetter::Type; + using ListType_3 = std::remove_reference_t; + using ListMemberType_3 = ListMemberTypeGetter::Type; if (element_0.optionalList.count != 0) { - auto * listHolder_3 = new ListHolder(element_0.optionalList.count); + auto * listHolder_3 = new ListHolder(element_0.optionalList.count); if (listHolder_3 == nullptr || listHolder_3->mList == nullptr) { return CHIP_ERROR_INVALID_ARGUMENT; } listFreer.add(listHolder_3); - for (size_t i = 0; i < element_0.optionalList.count; ++i) { - if (![element_0.optionalList[i] isKindOfClass:[NSNumber class]]) { + for (size_t i_3 = 0; i_3 < element_0.optionalList.count; ++i_3) { + if (![element_0.optionalList[i_3] isKindOfClass:[NSNumber class]]) { // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - auto element_3 = (NSNumber *) element_0.optionalList[i]; - listHolder_3->mList[i] - = static_castmList[i])>>( + auto element_3 = (NSNumber *) element_0.optionalList[i_3]; + listHolder_3->mList[i_3] + = static_castmList[i_3])>>( element_3.unsignedCharValue); } - definedValue_2 = ListType(listHolder_3->mList, element_0.optionalList.count); + definedValue_2 = ListType_3(listHolder_3->mList, element_0.optionalList.count); } else { - definedValue_2 = ListType(); + definedValue_2 = ListType_3(); } } } if (element_0.nullableOptionalList != nil) { - auto & definedValue_2 = listHolder_0->mList[i].nullableOptionalList.Emplace(); + auto & definedValue_2 = listHolder_0->mList[i_0].nullableOptionalList.Emplace(); if (element_0.nullableOptionalList == nil) { definedValue_2.SetNull(); } else { auto & nonNullValue_3 = definedValue_2.SetNonNull(); { - using ListType = std::remove_reference_t; - using ListMemberType = ListMemberTypeGetter::Type; + using ListType_4 = std::remove_reference_t; + using ListMemberType_4 = ListMemberTypeGetter::Type; if (element_0.nullableOptionalList.count != 0) { - auto * listHolder_4 = new ListHolder(element_0.nullableOptionalList.count); + auto * listHolder_4 + = new ListHolder(element_0.nullableOptionalList.count); if (listHolder_4 == nullptr || listHolder_4->mList == nullptr) { return CHIP_ERROR_INVALID_ARGUMENT; } listFreer.add(listHolder_4); - for (size_t i = 0; i < element_0.nullableOptionalList.count; ++i) { - if (![element_0.nullableOptionalList[i] isKindOfClass:[NSNumber class]]) { + for (size_t i_4 = 0; i_4 < element_0.nullableOptionalList.count; ++i_4) { + if (![element_0.nullableOptionalList[i_4] isKindOfClass:[NSNumber class]]) { // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - auto element_4 = (NSNumber *) element_0.nullableOptionalList[i]; - listHolder_4->mList[i] - = static_castmList[i])>>( + auto element_4 = (NSNumber *) element_0.nullableOptionalList[i_4]; + listHolder_4->mList[i_4] + = static_castmList[i_4])>>( element_4.unsignedCharValue); } - nonNullValue_3 = ListType(listHolder_4->mList, element_0.nullableOptionalList.count); + nonNullValue_3 = ListType_4(listHolder_4->mList, element_0.nullableOptionalList.count); } else { - nonNullValue_3 = ListType(); + nonNullValue_3 = ListType_4(); } } } } } - cppValue = ListType(listHolder_0->mList, value.count); + cppValue = ListType_0(listHolder_0->mList, value.count); } else { - cppValue = ListType(); + cppValue = ListType_0(); } } auto successFn = Callback::FromCancelable(success); @@ -7113,38 +7117,38 @@ new CHIPDefaultSuccessCallbackBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::NeighborTableList::TypeInfo; TypeInfo::Type cppValue; { - using ListType = std::remove_reference_t; - using ListMemberType = ListMemberTypeGetter::Type; + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); + auto * listHolder_0 = new ListHolder(value.count); if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { return CHIP_ERROR_INVALID_ARGUMENT; } listFreer.add(listHolder_0); - for (size_t i = 0; i < value.count; ++i) { - if (![value[i] isKindOfClass:[CHIPThreadNetworkDiagnosticsClusterNeighborTable class]]) { + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[CHIPThreadNetworkDiagnosticsClusterNeighborTable class]]) { // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - auto element_0 = (CHIPThreadNetworkDiagnosticsClusterNeighborTable *) value[i]; - listHolder_0->mList[i].extAddress = element_0.extAddress.unsignedLongLongValue; - listHolder_0->mList[i].age = element_0.age.unsignedIntValue; - listHolder_0->mList[i].rloc16 = element_0.rloc16.unsignedShortValue; - listHolder_0->mList[i].linkFrameCounter = element_0.linkFrameCounter.unsignedIntValue; - listHolder_0->mList[i].mleFrameCounter = element_0.mleFrameCounter.unsignedIntValue; - listHolder_0->mList[i].lqi = element_0.lqi.unsignedCharValue; - listHolder_0->mList[i].averageRssi = element_0.averageRssi.charValue; - listHolder_0->mList[i].lastRssi = element_0.lastRssi.charValue; - listHolder_0->mList[i].frameErrorRate = element_0.frameErrorRate.unsignedCharValue; - listHolder_0->mList[i].messageErrorRate = element_0.messageErrorRate.unsignedCharValue; - listHolder_0->mList[i].rxOnWhenIdle = element_0.rxOnWhenIdle.boolValue; - listHolder_0->mList[i].fullThreadDevice = element_0.fullThreadDevice.boolValue; - listHolder_0->mList[i].fullNetworkData = element_0.fullNetworkData.boolValue; - listHolder_0->mList[i].isChild = element_0.isChild.boolValue; + auto element_0 = (CHIPThreadNetworkDiagnosticsClusterNeighborTable *) value[i_0]; + listHolder_0->mList[i_0].extAddress = element_0.extAddress.unsignedLongLongValue; + listHolder_0->mList[i_0].age = element_0.age.unsignedIntValue; + listHolder_0->mList[i_0].rloc16 = element_0.rloc16.unsignedShortValue; + listHolder_0->mList[i_0].linkFrameCounter = element_0.linkFrameCounter.unsignedIntValue; + listHolder_0->mList[i_0].mleFrameCounter = element_0.mleFrameCounter.unsignedIntValue; + listHolder_0->mList[i_0].lqi = element_0.lqi.unsignedCharValue; + listHolder_0->mList[i_0].averageRssi = element_0.averageRssi.charValue; + listHolder_0->mList[i_0].lastRssi = element_0.lastRssi.charValue; + listHolder_0->mList[i_0].frameErrorRate = element_0.frameErrorRate.unsignedCharValue; + listHolder_0->mList[i_0].messageErrorRate = element_0.messageErrorRate.unsignedCharValue; + listHolder_0->mList[i_0].rxOnWhenIdle = element_0.rxOnWhenIdle.boolValue; + listHolder_0->mList[i_0].fullThreadDevice = element_0.fullThreadDevice.boolValue; + listHolder_0->mList[i_0].fullNetworkData = element_0.fullNetworkData.boolValue; + listHolder_0->mList[i_0].isChild = element_0.isChild.boolValue; } - cppValue = ListType(listHolder_0->mList, value.count); + cppValue = ListType_0(listHolder_0->mList, value.count); } else { - cppValue = ListType(); + cppValue = ListType_0(); } } auto successFn = Callback::FromCancelable(success); @@ -7165,34 +7169,34 @@ new CHIPDefaultSuccessCallbackBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouteTableList::TypeInfo; TypeInfo::Type cppValue; { - using ListType = std::remove_reference_t; - using ListMemberType = ListMemberTypeGetter::Type; + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); + auto * listHolder_0 = new ListHolder(value.count); if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { return CHIP_ERROR_INVALID_ARGUMENT; } listFreer.add(listHolder_0); - for (size_t i = 0; i < value.count; ++i) { - if (![value[i] isKindOfClass:[CHIPThreadNetworkDiagnosticsClusterRouteTable class]]) { + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[CHIPThreadNetworkDiagnosticsClusterRouteTable class]]) { // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - auto element_0 = (CHIPThreadNetworkDiagnosticsClusterRouteTable *) value[i]; - listHolder_0->mList[i].extAddress = element_0.extAddress.unsignedLongLongValue; - listHolder_0->mList[i].rloc16 = element_0.rloc16.unsignedShortValue; - listHolder_0->mList[i].routerId = element_0.routerId.unsignedCharValue; - listHolder_0->mList[i].nextHop = element_0.nextHop.unsignedCharValue; - listHolder_0->mList[i].pathCost = element_0.pathCost.unsignedCharValue; - listHolder_0->mList[i].LQIIn = element_0.lqiIn.unsignedCharValue; - listHolder_0->mList[i].LQIOut = element_0.lqiOut.unsignedCharValue; - listHolder_0->mList[i].age = element_0.age.unsignedCharValue; - listHolder_0->mList[i].allocated = element_0.allocated.boolValue; - listHolder_0->mList[i].linkEstablished = element_0.linkEstablished.boolValue; + auto element_0 = (CHIPThreadNetworkDiagnosticsClusterRouteTable *) value[i_0]; + listHolder_0->mList[i_0].extAddress = element_0.extAddress.unsignedLongLongValue; + listHolder_0->mList[i_0].rloc16 = element_0.rloc16.unsignedShortValue; + listHolder_0->mList[i_0].routerId = element_0.routerId.unsignedCharValue; + listHolder_0->mList[i_0].nextHop = element_0.nextHop.unsignedCharValue; + listHolder_0->mList[i_0].pathCost = element_0.pathCost.unsignedCharValue; + listHolder_0->mList[i_0].LQIIn = element_0.lqiIn.unsignedCharValue; + listHolder_0->mList[i_0].LQIOut = element_0.lqiOut.unsignedCharValue; + listHolder_0->mList[i_0].age = element_0.age.unsignedCharValue; + listHolder_0->mList[i_0].allocated = element_0.allocated.boolValue; + listHolder_0->mList[i_0].linkEstablished = element_0.linkEstablished.boolValue; } - cppValue = ListType(listHolder_0->mList, value.count); + cppValue = ListType_0(listHolder_0->mList, value.count); } else { - cppValue = ListType(); + cppValue = ListType_0(); } } auto successFn = Callback::FromCancelable(success); @@ -8123,26 +8127,26 @@ new CHIPDefaultSuccessCallbackBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::SecurityPolicy::TypeInfo; TypeInfo::Type cppValue; { - using ListType = std::remove_reference_t; - using ListMemberType = ListMemberTypeGetter::Type; + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); + auto * listHolder_0 = new ListHolder(value.count); if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { return CHIP_ERROR_INVALID_ARGUMENT; } listFreer.add(listHolder_0); - for (size_t i = 0; i < value.count; ++i) { - if (![value[i] isKindOfClass:[CHIPThreadNetworkDiagnosticsClusterSecurityPolicy class]]) { + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[CHIPThreadNetworkDiagnosticsClusterSecurityPolicy class]]) { // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - auto element_0 = (CHIPThreadNetworkDiagnosticsClusterSecurityPolicy *) value[i]; - listHolder_0->mList[i].rotationTime = element_0.rotationTime.unsignedShortValue; - listHolder_0->mList[i].flags = element_0.flags.unsignedShortValue; + auto element_0 = (CHIPThreadNetworkDiagnosticsClusterSecurityPolicy *) value[i_0]; + listHolder_0->mList[i_0].rotationTime = element_0.rotationTime.unsignedShortValue; + listHolder_0->mList[i_0].flags = element_0.flags.unsignedShortValue; } - cppValue = ListType(listHolder_0->mList, value.count); + cppValue = ListType_0(listHolder_0->mList, value.count); } else { - cppValue = ListType(); + cppValue = ListType_0(); } } auto successFn = Callback::FromCancelable(success); @@ -8182,36 +8186,36 @@ new CHIPDefaultSuccessCallbackBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::OperationalDatasetComponents::TypeInfo; TypeInfo::Type cppValue; { - using ListType = std::remove_reference_t; - using ListMemberType = ListMemberTypeGetter::Type; + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); + auto * listHolder_0 = new ListHolder(value.count); if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { return CHIP_ERROR_INVALID_ARGUMENT; } listFreer.add(listHolder_0); - for (size_t i = 0; i < value.count; ++i) { - if (![value[i] isKindOfClass:[CHIPThreadNetworkDiagnosticsClusterOperationalDatasetComponents class]]) { + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[CHIPThreadNetworkDiagnosticsClusterOperationalDatasetComponents class]]) { // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - auto element_0 = (CHIPThreadNetworkDiagnosticsClusterOperationalDatasetComponents *) value[i]; - listHolder_0->mList[i].activeTimestampPresent = element_0.activeTimestampPresent.boolValue; - listHolder_0->mList[i].pendingTimestampPresent = element_0.pendingTimestampPresent.boolValue; - listHolder_0->mList[i].masterKeyPresent = element_0.masterKeyPresent.boolValue; - listHolder_0->mList[i].networkNamePresent = element_0.networkNamePresent.boolValue; - listHolder_0->mList[i].extendedPanIdPresent = element_0.extendedPanIdPresent.boolValue; - listHolder_0->mList[i].meshLocalPrefixPresent = element_0.meshLocalPrefixPresent.boolValue; - listHolder_0->mList[i].delayPresent = element_0.delayPresent.boolValue; - listHolder_0->mList[i].panIdPresent = element_0.panIdPresent.boolValue; - listHolder_0->mList[i].channelPresent = element_0.channelPresent.boolValue; - listHolder_0->mList[i].pskcPresent = element_0.pskcPresent.boolValue; - listHolder_0->mList[i].securityPolicyPresent = element_0.securityPolicyPresent.boolValue; - listHolder_0->mList[i].channelMaskPresent = element_0.channelMaskPresent.boolValue; + auto element_0 = (CHIPThreadNetworkDiagnosticsClusterOperationalDatasetComponents *) value[i_0]; + listHolder_0->mList[i_0].activeTimestampPresent = element_0.activeTimestampPresent.boolValue; + listHolder_0->mList[i_0].pendingTimestampPresent = element_0.pendingTimestampPresent.boolValue; + listHolder_0->mList[i_0].masterKeyPresent = element_0.masterKeyPresent.boolValue; + listHolder_0->mList[i_0].networkNamePresent = element_0.networkNamePresent.boolValue; + listHolder_0->mList[i_0].extendedPanIdPresent = element_0.extendedPanIdPresent.boolValue; + listHolder_0->mList[i_0].meshLocalPrefixPresent = element_0.meshLocalPrefixPresent.boolValue; + listHolder_0->mList[i_0].delayPresent = element_0.delayPresent.boolValue; + listHolder_0->mList[i_0].panIdPresent = element_0.panIdPresent.boolValue; + listHolder_0->mList[i_0].channelPresent = element_0.channelPresent.boolValue; + listHolder_0->mList[i_0].pskcPresent = element_0.pskcPresent.boolValue; + listHolder_0->mList[i_0].securityPolicyPresent = element_0.securityPolicyPresent.boolValue; + listHolder_0->mList[i_0].channelMaskPresent = element_0.channelMaskPresent.boolValue; } - cppValue = ListType(listHolder_0->mList, value.count); + cppValue = ListType_0(listHolder_0->mList, value.count); } else { - cppValue = ListType(); + cppValue = ListType_0(); } } auto successFn = Callback::FromCancelable(success); @@ -8233,26 +8237,26 @@ new CHIPDefaultSuccessCallbackBridge( using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveNetworkFaultsList::TypeInfo; TypeInfo::Type cppValue; { - using ListType = std::remove_reference_t; - using ListMemberType = ListMemberTypeGetter::Type; + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); + auto * listHolder_0 = new ListHolder(value.count); if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { return CHIP_ERROR_INVALID_ARGUMENT; } listFreer.add(listHolder_0); - for (size_t i = 0; i < value.count; ++i) { - if (![value[i] isKindOfClass:[NSNumber class]]) { + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - auto element_0 = (NSNumber *) value[i]; - listHolder_0->mList[i] - = static_castmList[i])>>(element_0.unsignedCharValue); + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] + = static_castmList[i_0])>>(element_0.unsignedCharValue); } - cppValue = ListType(listHolder_0->mList, value.count); + cppValue = ListType_0(listHolder_0->mList, value.count); } else { - cppValue = ListType(); + cppValue = ListType_0(); } } auto successFn = Callback::FromCancelable(success); diff --git a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m index 97cb01ca6fa604..fe88d4b7fea619 100644 --- a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m +++ b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m @@ -21584,7 +21584,294 @@ - (void)testSendClusterTestCluster_000130_TestStructArgumentRequest [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000131_SimpleStructEchoRequest +- (void)testSendClusterTestCluster_000131_TestNestedStructArgumentRequest +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Send Test Command With Nested Struct Argument and arg1.c.b is true"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + __auto_type * params = [[CHIPTestClusterClusterTestNestedStructArgumentRequestParams alloc] init]; + params.arg1 = [[CHIPTestClusterClusterNestedStruct alloc] init]; + ((CHIPTestClusterClusterNestedStruct *) params.arg1).a = [NSNumber numberWithUnsignedChar:0]; + ((CHIPTestClusterClusterNestedStruct *) params.arg1).b = [NSNumber numberWithBool:true]; + ((CHIPTestClusterClusterNestedStruct *) params.arg1).c = [[CHIPTestClusterClusterSimpleStruct alloc] init]; + ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStruct *) params.arg1).c).a = + [NSNumber numberWithUnsignedChar:0]; + ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStruct *) params.arg1).c).b = + [NSNumber numberWithBool:true]; + ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStruct *) params.arg1).c).c = + [NSNumber numberWithUnsignedChar:2]; + ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStruct *) params.arg1).c).d = + [[NSData alloc] initWithBytes:"octet_string" length:12]; + ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStruct *) params.arg1).c).e = @"char_string"; + ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStruct *) params.arg1).c).f = + [NSNumber numberWithUnsignedChar:1]; + ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStruct *) params.arg1).c).g = + [NSNumber numberWithFloat:0]; + ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStruct *) params.arg1).c).h = + [NSNumber numberWithDouble:0]; + + [cluster + testNestedStructArgumentRequestWithParams:params + completionHandler:^( + CHIPTestClusterClusterBooleanResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Send Test Command With Nested Struct Argument and arg1.c.b is true Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = values.value; + XCTAssertEqual([actualValue boolValue], true); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000132_TestNestedStructArgumentRequest +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Send Test Command With Nested Struct Argument arg1.c.b is false"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + __auto_type * params = [[CHIPTestClusterClusterTestNestedStructArgumentRequestParams alloc] init]; + params.arg1 = [[CHIPTestClusterClusterNestedStruct alloc] init]; + ((CHIPTestClusterClusterNestedStruct *) params.arg1).a = [NSNumber numberWithUnsignedChar:0]; + ((CHIPTestClusterClusterNestedStruct *) params.arg1).b = [NSNumber numberWithBool:true]; + ((CHIPTestClusterClusterNestedStruct *) params.arg1).c = [[CHIPTestClusterClusterSimpleStruct alloc] init]; + ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStruct *) params.arg1).c).a = + [NSNumber numberWithUnsignedChar:0]; + ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStruct *) params.arg1).c).b = + [NSNumber numberWithBool:false]; + ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStruct *) params.arg1).c).c = + [NSNumber numberWithUnsignedChar:2]; + ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStruct *) params.arg1).c).d = + [[NSData alloc] initWithBytes:"octet_string" length:12]; + ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStruct *) params.arg1).c).e = @"char_string"; + ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStruct *) params.arg1).c).f = + [NSNumber numberWithUnsignedChar:1]; + ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStruct *) params.arg1).c).g = + [NSNumber numberWithFloat:0]; + ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStruct *) params.arg1).c).h = + [NSNumber numberWithDouble:0]; + + [cluster testNestedStructArgumentRequestWithParams:params + completionHandler:^( + CHIPTestClusterClusterBooleanResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Send Test Command With Nested Struct Argument arg1.c.b is false Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = values.value; + XCTAssertEqual([actualValue boolValue], false); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000133_TestNestedStructListArgumentRequest +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Send Test Command With Nested Struct List Argument and all fields b of arg1.d are true"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + __auto_type * params = [[CHIPTestClusterClusterTestNestedStructListArgumentRequestParams alloc] init]; + params.arg1 = [[CHIPTestClusterClusterNestedStructList alloc] init]; + ((CHIPTestClusterClusterNestedStructList *) params.arg1).a = [NSNumber numberWithUnsignedChar:0]; + ((CHIPTestClusterClusterNestedStructList *) params.arg1).b = [NSNumber numberWithBool:true]; + ((CHIPTestClusterClusterNestedStructList *) params.arg1).c = [[CHIPTestClusterClusterSimpleStruct alloc] init]; + ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStructList *) params.arg1).c).a = + [NSNumber numberWithUnsignedChar:0]; + ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStructList *) params.arg1).c).b = + [NSNumber numberWithBool:true]; + ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStructList *) params.arg1).c).c = + [NSNumber numberWithUnsignedChar:2]; + ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStructList *) params.arg1).c).d = + [[NSData alloc] initWithBytes:"octet_string" length:12]; + ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStructList *) params.arg1).c).e = @"char_string"; + ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStructList *) params.arg1).c).f = + [NSNumber numberWithUnsignedChar:1]; + ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStructList *) params.arg1).c).g = + [NSNumber numberWithFloat:0]; + ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStructList *) params.arg1).c).h = + [NSNumber numberWithDouble:0]; + + { + NSMutableArray * temp_1 = [[NSMutableArray alloc] init]; + temp_1[0] = [[CHIPTestClusterClusterSimpleStruct alloc] init]; + ((CHIPTestClusterClusterSimpleStruct *) temp_1[0]).a = [NSNumber numberWithUnsignedChar:1]; + ((CHIPTestClusterClusterSimpleStruct *) temp_1[0]).b = [NSNumber numberWithBool:true]; + ((CHIPTestClusterClusterSimpleStruct *) temp_1[0]).c = [NSNumber numberWithUnsignedChar:3]; + ((CHIPTestClusterClusterSimpleStruct *) temp_1[0]).d = [[NSData alloc] initWithBytes:"nested_octet_string" length:19]; + ((CHIPTestClusterClusterSimpleStruct *) temp_1[0]).e = @"nested_char_string"; + ((CHIPTestClusterClusterSimpleStruct *) temp_1[0]).f = [NSNumber numberWithUnsignedChar:1]; + ((CHIPTestClusterClusterSimpleStruct *) temp_1[0]).g = [NSNumber numberWithFloat:0]; + ((CHIPTestClusterClusterSimpleStruct *) temp_1[0]).h = [NSNumber numberWithDouble:0]; + + temp_1[1] = [[CHIPTestClusterClusterSimpleStruct alloc] init]; + ((CHIPTestClusterClusterSimpleStruct *) temp_1[1]).a = [NSNumber numberWithUnsignedChar:2]; + ((CHIPTestClusterClusterSimpleStruct *) temp_1[1]).b = [NSNumber numberWithBool:true]; + ((CHIPTestClusterClusterSimpleStruct *) temp_1[1]).c = [NSNumber numberWithUnsignedChar:3]; + ((CHIPTestClusterClusterSimpleStruct *) temp_1[1]).d = [[NSData alloc] initWithBytes:"nested_octet_string" length:19]; + ((CHIPTestClusterClusterSimpleStruct *) temp_1[1]).e = @"nested_char_string"; + ((CHIPTestClusterClusterSimpleStruct *) temp_1[1]).f = [NSNumber numberWithUnsignedChar:1]; + ((CHIPTestClusterClusterSimpleStruct *) temp_1[1]).g = [NSNumber numberWithFloat:0]; + ((CHIPTestClusterClusterSimpleStruct *) temp_1[1]).h = [NSNumber numberWithDouble:0]; + + ((CHIPTestClusterClusterNestedStructList *) params.arg1).d = temp_1; + } + { + NSMutableArray * temp_1 = [[NSMutableArray alloc] init]; + temp_1[0] = [NSNumber numberWithUnsignedInt:1UL]; + temp_1[1] = [NSNumber numberWithUnsignedInt:2UL]; + temp_1[2] = [NSNumber numberWithUnsignedInt:3UL]; + ((CHIPTestClusterClusterNestedStructList *) params.arg1).e = temp_1; + } + { + NSMutableArray * temp_1 = [[NSMutableArray alloc] init]; + temp_1[0] = [[NSData alloc] initWithBytes:"octet_string_1" length:14]; + temp_1[1] = [[NSData alloc] initWithBytes:"octect_string_2" length:15]; + temp_1[2] = [[NSData alloc] initWithBytes:"octet_string_3" length:14]; + ((CHIPTestClusterClusterNestedStructList *) params.arg1).f = temp_1; + } + { + NSMutableArray * temp_1 = [[NSMutableArray alloc] init]; + temp_1[0] = [NSNumber numberWithUnsignedChar:0]; + temp_1[1] = [NSNumber numberWithUnsignedChar:255]; + ((CHIPTestClusterClusterNestedStructList *) params.arg1).g = temp_1; + } + + [cluster testNestedStructListArgumentRequestWithParams:params + completionHandler:^(CHIPTestClusterClusterBooleanResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Send Test Command With Nested Struct List Argument and all fields b of arg1.d " + @"are true Error: %@", + err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = values.value; + XCTAssertEqual([actualValue boolValue], true); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000134_TestNestedStructListArgumentRequest +{ + XCTestExpectation * expectation = [self + expectationWithDescription:@"Send Test Command With Nested Struct List Argument and some fields b of arg1.d are false"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + __auto_type * params = [[CHIPTestClusterClusterTestNestedStructListArgumentRequestParams alloc] init]; + params.arg1 = [[CHIPTestClusterClusterNestedStructList alloc] init]; + ((CHIPTestClusterClusterNestedStructList *) params.arg1).a = [NSNumber numberWithUnsignedChar:0]; + ((CHIPTestClusterClusterNestedStructList *) params.arg1).b = [NSNumber numberWithBool:true]; + ((CHIPTestClusterClusterNestedStructList *) params.arg1).c = [[CHIPTestClusterClusterSimpleStruct alloc] init]; + ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStructList *) params.arg1).c).a = + [NSNumber numberWithUnsignedChar:0]; + ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStructList *) params.arg1).c).b = + [NSNumber numberWithBool:true]; + ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStructList *) params.arg1).c).c = + [NSNumber numberWithUnsignedChar:2]; + ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStructList *) params.arg1).c).d = + [[NSData alloc] initWithBytes:"octet_string" length:12]; + ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStructList *) params.arg1).c).e = @"char_string"; + ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStructList *) params.arg1).c).f = + [NSNumber numberWithUnsignedChar:1]; + ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStructList *) params.arg1).c).g = + [NSNumber numberWithFloat:0]; + ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStructList *) params.arg1).c).h = + [NSNumber numberWithDouble:0]; + + { + NSMutableArray * temp_1 = [[NSMutableArray alloc] init]; + temp_1[0] = [[CHIPTestClusterClusterSimpleStruct alloc] init]; + ((CHIPTestClusterClusterSimpleStruct *) temp_1[0]).a = [NSNumber numberWithUnsignedChar:1]; + ((CHIPTestClusterClusterSimpleStruct *) temp_1[0]).b = [NSNumber numberWithBool:true]; + ((CHIPTestClusterClusterSimpleStruct *) temp_1[0]).c = [NSNumber numberWithUnsignedChar:3]; + ((CHIPTestClusterClusterSimpleStruct *) temp_1[0]).d = [[NSData alloc] initWithBytes:"nested_octet_string" length:19]; + ((CHIPTestClusterClusterSimpleStruct *) temp_1[0]).e = @"nested_char_string"; + ((CHIPTestClusterClusterSimpleStruct *) temp_1[0]).f = [NSNumber numberWithUnsignedChar:1]; + ((CHIPTestClusterClusterSimpleStruct *) temp_1[0]).g = [NSNumber numberWithFloat:0]; + ((CHIPTestClusterClusterSimpleStruct *) temp_1[0]).h = [NSNumber numberWithDouble:0]; + + temp_1[1] = [[CHIPTestClusterClusterSimpleStruct alloc] init]; + ((CHIPTestClusterClusterSimpleStruct *) temp_1[1]).a = [NSNumber numberWithUnsignedChar:2]; + ((CHIPTestClusterClusterSimpleStruct *) temp_1[1]).b = [NSNumber numberWithBool:false]; + ((CHIPTestClusterClusterSimpleStruct *) temp_1[1]).c = [NSNumber numberWithUnsignedChar:3]; + ((CHIPTestClusterClusterSimpleStruct *) temp_1[1]).d = [[NSData alloc] initWithBytes:"nested_octet_string" length:19]; + ((CHIPTestClusterClusterSimpleStruct *) temp_1[1]).e = @"nested_char_string"; + ((CHIPTestClusterClusterSimpleStruct *) temp_1[1]).f = [NSNumber numberWithUnsignedChar:1]; + ((CHIPTestClusterClusterSimpleStruct *) temp_1[1]).g = [NSNumber numberWithFloat:0]; + ((CHIPTestClusterClusterSimpleStruct *) temp_1[1]).h = [NSNumber numberWithDouble:0]; + + ((CHIPTestClusterClusterNestedStructList *) params.arg1).d = temp_1; + } + { + NSMutableArray * temp_1 = [[NSMutableArray alloc] init]; + temp_1[0] = [NSNumber numberWithUnsignedInt:1UL]; + temp_1[1] = [NSNumber numberWithUnsignedInt:2UL]; + temp_1[2] = [NSNumber numberWithUnsignedInt:3UL]; + ((CHIPTestClusterClusterNestedStructList *) params.arg1).e = temp_1; + } + { + NSMutableArray * temp_1 = [[NSMutableArray alloc] init]; + temp_1[0] = [[NSData alloc] initWithBytes:"octet_string_1" length:14]; + temp_1[1] = [[NSData alloc] initWithBytes:"octect_string_2" length:15]; + temp_1[2] = [[NSData alloc] initWithBytes:"octet_string_3" length:14]; + ((CHIPTestClusterClusterNestedStructList *) params.arg1).f = temp_1; + } + { + NSMutableArray * temp_1 = [[NSMutableArray alloc] init]; + temp_1[0] = [NSNumber numberWithUnsignedChar:0]; + temp_1[1] = [NSNumber numberWithUnsignedChar:255]; + ((CHIPTestClusterClusterNestedStructList *) params.arg1).g = temp_1; + } + + [cluster testNestedStructListArgumentRequestWithParams:params + completionHandler:^(CHIPTestClusterClusterBooleanResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Send Test Command With Nested Struct List Argument and some fields b of " + @"arg1.d are false Error: %@", + err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = values.value; + XCTAssertEqual([actualValue boolValue], false); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000135_SimpleStructEchoRequest { XCTestExpectation * expectation = [self expectationWithDescription:@"Send Test Command With Struct Argument and see what we get back"]; @@ -21631,7 +21918,7 @@ - (void)testSendClusterTestCluster_000131_SimpleStructEchoRequest [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000132_TestListInt8UArgumentRequest +- (void)testSendClusterTestCluster_000136_TestListInt8UArgumentRequest { XCTestExpectation * expectation = [self expectationWithDescription:@"Send Test Command With List of INT8U and none of them is set to 0"]; @@ -21643,17 +21930,17 @@ - (void)testSendClusterTestCluster_000132_TestListInt8UArgumentRequest __auto_type * params = [[CHIPTestClusterClusterTestListInt8UArgumentRequestParams alloc] init]; { - NSMutableArray * temp = [[NSMutableArray alloc] init]; - temp[0] = [NSNumber numberWithUnsignedChar:1]; - temp[1] = [NSNumber numberWithUnsignedChar:2]; - temp[2] = [NSNumber numberWithUnsignedChar:3]; - temp[3] = [NSNumber numberWithUnsignedChar:4]; - temp[4] = [NSNumber numberWithUnsignedChar:5]; - temp[5] = [NSNumber numberWithUnsignedChar:6]; - temp[6] = [NSNumber numberWithUnsignedChar:7]; - temp[7] = [NSNumber numberWithUnsignedChar:8]; - temp[8] = [NSNumber numberWithUnsignedChar:9]; - params.arg1 = temp; + NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; + temp_0[0] = [NSNumber numberWithUnsignedChar:1]; + temp_0[1] = [NSNumber numberWithUnsignedChar:2]; + temp_0[2] = [NSNumber numberWithUnsignedChar:3]; + temp_0[3] = [NSNumber numberWithUnsignedChar:4]; + temp_0[4] = [NSNumber numberWithUnsignedChar:5]; + temp_0[5] = [NSNumber numberWithUnsignedChar:6]; + temp_0[6] = [NSNumber numberWithUnsignedChar:7]; + temp_0[7] = [NSNumber numberWithUnsignedChar:8]; + temp_0[8] = [NSNumber numberWithUnsignedChar:9]; + params.arg1 = temp_0; } [cluster testListInt8UArgumentRequestWithParams:params completionHandler:^( @@ -21672,7 +21959,7 @@ - (void)testSendClusterTestCluster_000132_TestListInt8UArgumentRequest [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000133_TestListInt8UArgumentRequest +- (void)testSendClusterTestCluster_000137_TestListInt8UArgumentRequest { XCTestExpectation * expectation = [self expectationWithDescription:@"Send Test Command With List of INT8U and one of them is set to 0"]; @@ -21684,18 +21971,18 @@ - (void)testSendClusterTestCluster_000133_TestListInt8UArgumentRequest __auto_type * params = [[CHIPTestClusterClusterTestListInt8UArgumentRequestParams alloc] init]; { - NSMutableArray * temp = [[NSMutableArray alloc] init]; - temp[0] = [NSNumber numberWithUnsignedChar:1]; - temp[1] = [NSNumber numberWithUnsignedChar:2]; - temp[2] = [NSNumber numberWithUnsignedChar:3]; - temp[3] = [NSNumber numberWithUnsignedChar:4]; - temp[4] = [NSNumber numberWithUnsignedChar:5]; - temp[5] = [NSNumber numberWithUnsignedChar:6]; - temp[6] = [NSNumber numberWithUnsignedChar:7]; - temp[7] = [NSNumber numberWithUnsignedChar:8]; - temp[8] = [NSNumber numberWithUnsignedChar:9]; - temp[9] = [NSNumber numberWithUnsignedChar:0]; - params.arg1 = temp; + NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; + temp_0[0] = [NSNumber numberWithUnsignedChar:1]; + temp_0[1] = [NSNumber numberWithUnsignedChar:2]; + temp_0[2] = [NSNumber numberWithUnsignedChar:3]; + temp_0[3] = [NSNumber numberWithUnsignedChar:4]; + temp_0[4] = [NSNumber numberWithUnsignedChar:5]; + temp_0[5] = [NSNumber numberWithUnsignedChar:6]; + temp_0[6] = [NSNumber numberWithUnsignedChar:7]; + temp_0[7] = [NSNumber numberWithUnsignedChar:8]; + temp_0[8] = [NSNumber numberWithUnsignedChar:9]; + temp_0[9] = [NSNumber numberWithUnsignedChar:0]; + params.arg1 = temp_0; } [cluster testListInt8UArgumentRequestWithParams:params completionHandler:^( @@ -21714,7 +22001,7 @@ - (void)testSendClusterTestCluster_000133_TestListInt8UArgumentRequest [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000134_TestListInt8UReverseRequest +- (void)testSendClusterTestCluster_000138_TestListInt8UReverseRequest { XCTestExpectation * expectation = [self expectationWithDescription:@"Send Test Command With List of INT8U and get it reversed"]; @@ -21725,17 +22012,17 @@ - (void)testSendClusterTestCluster_000134_TestListInt8UReverseRequest __auto_type * params = [[CHIPTestClusterClusterTestListInt8UReverseRequestParams alloc] init]; { - NSMutableArray * temp = [[NSMutableArray alloc] init]; - temp[0] = [NSNumber numberWithUnsignedChar:1]; - temp[1] = [NSNumber numberWithUnsignedChar:2]; - temp[2] = [NSNumber numberWithUnsignedChar:3]; - temp[3] = [NSNumber numberWithUnsignedChar:4]; - temp[4] = [NSNumber numberWithUnsignedChar:5]; - temp[5] = [NSNumber numberWithUnsignedChar:6]; - temp[6] = [NSNumber numberWithUnsignedChar:7]; - temp[7] = [NSNumber numberWithUnsignedChar:8]; - temp[8] = [NSNumber numberWithUnsignedChar:9]; - params.arg1 = temp; + NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; + temp_0[0] = [NSNumber numberWithUnsignedChar:1]; + temp_0[1] = [NSNumber numberWithUnsignedChar:2]; + temp_0[2] = [NSNumber numberWithUnsignedChar:3]; + temp_0[3] = [NSNumber numberWithUnsignedChar:4]; + temp_0[4] = [NSNumber numberWithUnsignedChar:5]; + temp_0[5] = [NSNumber numberWithUnsignedChar:6]; + temp_0[6] = [NSNumber numberWithUnsignedChar:7]; + temp_0[7] = [NSNumber numberWithUnsignedChar:8]; + temp_0[8] = [NSNumber numberWithUnsignedChar:9]; + params.arg1 = temp_0; } [cluster testListInt8UReverseRequestWithParams:params completionHandler:^(CHIPTestClusterClusterTestListInt8UReverseResponseParams * _Nullable values, @@ -21763,7 +22050,7 @@ - (void)testSendClusterTestCluster_000134_TestListInt8UReverseRequest [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000135_TestListInt8UReverseRequest +- (void)testSendClusterTestCluster_000139_TestListInt8UReverseRequest { XCTestExpectation * expectation = [self expectationWithDescription:@"Send Test Command With empty List of INT8U and get an empty list back"]; @@ -21775,8 +22062,8 @@ - (void)testSendClusterTestCluster_000135_TestListInt8UReverseRequest __auto_type * params = [[CHIPTestClusterClusterTestListInt8UReverseRequestParams alloc] init]; { - NSMutableArray * temp = [[NSMutableArray alloc] init]; - params.arg1 = temp; + NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; + params.arg1 = temp_0; } [cluster testListInt8UReverseRequestWithParams:params completionHandler:^(CHIPTestClusterClusterTestListInt8UReverseResponseParams * _Nullable values, @@ -21795,7 +22082,7 @@ - (void)testSendClusterTestCluster_000135_TestListInt8UReverseRequest [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000136_TestListStructArgumentRequest +- (void)testSendClusterTestCluster_000140_TestListStructArgumentRequest { XCTestExpectation * expectation = [self expectationWithDescription:@"Send Test Command With List of Struct Argument and arg1.b of first item is true"]; @@ -21807,28 +22094,28 @@ - (void)testSendClusterTestCluster_000136_TestListStructArgumentRequest __auto_type * params = [[CHIPTestClusterClusterTestListStructArgumentRequestParams alloc] init]; { - NSMutableArray * temp = [[NSMutableArray alloc] init]; - temp[0] = [[CHIPTestClusterClusterSimpleStruct alloc] init]; - ((CHIPTestClusterClusterSimpleStruct *) temp[0]).a = [NSNumber numberWithUnsignedChar:0]; - ((CHIPTestClusterClusterSimpleStruct *) temp[0]).b = [NSNumber numberWithBool:true]; - ((CHIPTestClusterClusterSimpleStruct *) temp[0]).c = [NSNumber numberWithUnsignedChar:2]; - ((CHIPTestClusterClusterSimpleStruct *) temp[0]).d = [[NSData alloc] initWithBytes:"first_octet_string" length:18]; - ((CHIPTestClusterClusterSimpleStruct *) temp[0]).e = @"first_char_string"; - ((CHIPTestClusterClusterSimpleStruct *) temp[0]).f = [NSNumber numberWithUnsignedChar:1]; - ((CHIPTestClusterClusterSimpleStruct *) temp[0]).g = [NSNumber numberWithFloat:0]; - ((CHIPTestClusterClusterSimpleStruct *) temp[0]).h = [NSNumber numberWithDouble:0]; - - temp[1] = [[CHIPTestClusterClusterSimpleStruct alloc] init]; - ((CHIPTestClusterClusterSimpleStruct *) temp[1]).a = [NSNumber numberWithUnsignedChar:1]; - ((CHIPTestClusterClusterSimpleStruct *) temp[1]).b = [NSNumber numberWithBool:true]; - ((CHIPTestClusterClusterSimpleStruct *) temp[1]).c = [NSNumber numberWithUnsignedChar:3]; - ((CHIPTestClusterClusterSimpleStruct *) temp[1]).d = [[NSData alloc] initWithBytes:"second_octet_string" length:19]; - ((CHIPTestClusterClusterSimpleStruct *) temp[1]).e = @"second_char_string"; - ((CHIPTestClusterClusterSimpleStruct *) temp[1]).f = [NSNumber numberWithUnsignedChar:1]; - ((CHIPTestClusterClusterSimpleStruct *) temp[1]).g = [NSNumber numberWithFloat:0]; - ((CHIPTestClusterClusterSimpleStruct *) temp[1]).h = [NSNumber numberWithDouble:0]; - - params.arg1 = temp; + NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; + temp_0[0] = [[CHIPTestClusterClusterSimpleStruct alloc] init]; + ((CHIPTestClusterClusterSimpleStruct *) temp_0[0]).a = [NSNumber numberWithUnsignedChar:0]; + ((CHIPTestClusterClusterSimpleStruct *) temp_0[0]).b = [NSNumber numberWithBool:true]; + ((CHIPTestClusterClusterSimpleStruct *) temp_0[0]).c = [NSNumber numberWithUnsignedChar:2]; + ((CHIPTestClusterClusterSimpleStruct *) temp_0[0]).d = [[NSData alloc] initWithBytes:"first_octet_string" length:18]; + ((CHIPTestClusterClusterSimpleStruct *) temp_0[0]).e = @"first_char_string"; + ((CHIPTestClusterClusterSimpleStruct *) temp_0[0]).f = [NSNumber numberWithUnsignedChar:1]; + ((CHIPTestClusterClusterSimpleStruct *) temp_0[0]).g = [NSNumber numberWithFloat:0]; + ((CHIPTestClusterClusterSimpleStruct *) temp_0[0]).h = [NSNumber numberWithDouble:0]; + + temp_0[1] = [[CHIPTestClusterClusterSimpleStruct alloc] init]; + ((CHIPTestClusterClusterSimpleStruct *) temp_0[1]).a = [NSNumber numberWithUnsignedChar:1]; + ((CHIPTestClusterClusterSimpleStruct *) temp_0[1]).b = [NSNumber numberWithBool:true]; + ((CHIPTestClusterClusterSimpleStruct *) temp_0[1]).c = [NSNumber numberWithUnsignedChar:3]; + ((CHIPTestClusterClusterSimpleStruct *) temp_0[1]).d = [[NSData alloc] initWithBytes:"second_octet_string" length:19]; + ((CHIPTestClusterClusterSimpleStruct *) temp_0[1]).e = @"second_char_string"; + ((CHIPTestClusterClusterSimpleStruct *) temp_0[1]).f = [NSNumber numberWithUnsignedChar:1]; + ((CHIPTestClusterClusterSimpleStruct *) temp_0[1]).g = [NSNumber numberWithFloat:0]; + ((CHIPTestClusterClusterSimpleStruct *) temp_0[1]).h = [NSNumber numberWithDouble:0]; + + params.arg1 = temp_0; } [cluster testListStructArgumentRequestWithParams:params @@ -21850,7 +22137,7 @@ - (void)testSendClusterTestCluster_000136_TestListStructArgumentRequest [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000137_TestListStructArgumentRequest +- (void)testSendClusterTestCluster_000141_TestListStructArgumentRequest { XCTestExpectation * expectation = [self expectationWithDescription:@"Send Test Command With List of Struct Argument and arg1.b of first item is false"]; @@ -21862,28 +22149,28 @@ - (void)testSendClusterTestCluster_000137_TestListStructArgumentRequest __auto_type * params = [[CHIPTestClusterClusterTestListStructArgumentRequestParams alloc] init]; { - NSMutableArray * temp = [[NSMutableArray alloc] init]; - temp[0] = [[CHIPTestClusterClusterSimpleStruct alloc] init]; - ((CHIPTestClusterClusterSimpleStruct *) temp[0]).a = [NSNumber numberWithUnsignedChar:1]; - ((CHIPTestClusterClusterSimpleStruct *) temp[0]).b = [NSNumber numberWithBool:true]; - ((CHIPTestClusterClusterSimpleStruct *) temp[0]).c = [NSNumber numberWithUnsignedChar:3]; - ((CHIPTestClusterClusterSimpleStruct *) temp[0]).d = [[NSData alloc] initWithBytes:"second_octet_string" length:19]; - ((CHIPTestClusterClusterSimpleStruct *) temp[0]).e = @"second_char_string"; - ((CHIPTestClusterClusterSimpleStruct *) temp[0]).f = [NSNumber numberWithUnsignedChar:1]; - ((CHIPTestClusterClusterSimpleStruct *) temp[0]).g = [NSNumber numberWithFloat:0]; - ((CHIPTestClusterClusterSimpleStruct *) temp[0]).h = [NSNumber numberWithDouble:0]; - - temp[1] = [[CHIPTestClusterClusterSimpleStruct alloc] init]; - ((CHIPTestClusterClusterSimpleStruct *) temp[1]).a = [NSNumber numberWithUnsignedChar:0]; - ((CHIPTestClusterClusterSimpleStruct *) temp[1]).b = [NSNumber numberWithBool:false]; - ((CHIPTestClusterClusterSimpleStruct *) temp[1]).c = [NSNumber numberWithUnsignedChar:2]; - ((CHIPTestClusterClusterSimpleStruct *) temp[1]).d = [[NSData alloc] initWithBytes:"first_octet_string" length:18]; - ((CHIPTestClusterClusterSimpleStruct *) temp[1]).e = @"first_char_string"; - ((CHIPTestClusterClusterSimpleStruct *) temp[1]).f = [NSNumber numberWithUnsignedChar:1]; - ((CHIPTestClusterClusterSimpleStruct *) temp[1]).g = [NSNumber numberWithFloat:0]; - ((CHIPTestClusterClusterSimpleStruct *) temp[1]).h = [NSNumber numberWithDouble:0]; - - params.arg1 = temp; + NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; + temp_0[0] = [[CHIPTestClusterClusterSimpleStruct alloc] init]; + ((CHIPTestClusterClusterSimpleStruct *) temp_0[0]).a = [NSNumber numberWithUnsignedChar:1]; + ((CHIPTestClusterClusterSimpleStruct *) temp_0[0]).b = [NSNumber numberWithBool:true]; + ((CHIPTestClusterClusterSimpleStruct *) temp_0[0]).c = [NSNumber numberWithUnsignedChar:3]; + ((CHIPTestClusterClusterSimpleStruct *) temp_0[0]).d = [[NSData alloc] initWithBytes:"second_octet_string" length:19]; + ((CHIPTestClusterClusterSimpleStruct *) temp_0[0]).e = @"second_char_string"; + ((CHIPTestClusterClusterSimpleStruct *) temp_0[0]).f = [NSNumber numberWithUnsignedChar:1]; + ((CHIPTestClusterClusterSimpleStruct *) temp_0[0]).g = [NSNumber numberWithFloat:0]; + ((CHIPTestClusterClusterSimpleStruct *) temp_0[0]).h = [NSNumber numberWithDouble:0]; + + temp_0[1] = [[CHIPTestClusterClusterSimpleStruct alloc] init]; + ((CHIPTestClusterClusterSimpleStruct *) temp_0[1]).a = [NSNumber numberWithUnsignedChar:0]; + ((CHIPTestClusterClusterSimpleStruct *) temp_0[1]).b = [NSNumber numberWithBool:false]; + ((CHIPTestClusterClusterSimpleStruct *) temp_0[1]).c = [NSNumber numberWithUnsignedChar:2]; + ((CHIPTestClusterClusterSimpleStruct *) temp_0[1]).d = [[NSData alloc] initWithBytes:"first_octet_string" length:18]; + ((CHIPTestClusterClusterSimpleStruct *) temp_0[1]).e = @"first_char_string"; + ((CHIPTestClusterClusterSimpleStruct *) temp_0[1]).f = [NSNumber numberWithUnsignedChar:1]; + ((CHIPTestClusterClusterSimpleStruct *) temp_0[1]).g = [NSNumber numberWithFloat:0]; + ((CHIPTestClusterClusterSimpleStruct *) temp_0[1]).h = [NSNumber numberWithDouble:0]; + + params.arg1 = temp_0; } [cluster testListStructArgumentRequestWithParams:params @@ -21905,7 +22192,207 @@ - (void)testSendClusterTestCluster_000137_TestListStructArgumentRequest [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000138_WriteAttribute +- (void)testSendClusterTestCluster_000142_TestListNestedStructListArgumentRequest +{ + XCTestExpectation * expectation = + [self expectationWithDescription: + @"Send Test Command With List of Nested Struct List Argument and all fields b of elements of arg1.d are true"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + __auto_type * params = [[CHIPTestClusterClusterTestListNestedStructListArgumentRequestParams alloc] init]; + { + NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; + temp_0[0] = [[CHIPTestClusterClusterNestedStructList alloc] init]; + ((CHIPTestClusterClusterNestedStructList *) temp_0[0]).a = [NSNumber numberWithUnsignedChar:0]; + ((CHIPTestClusterClusterNestedStructList *) temp_0[0]).b = [NSNumber numberWithBool:true]; + ((CHIPTestClusterClusterNestedStructList *) temp_0[0]).c = [[CHIPTestClusterClusterSimpleStruct alloc] init]; + ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStructList *) temp_0[0]).c).a = + [NSNumber numberWithUnsignedChar:0]; + ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStructList *) temp_0[0]).c).b = + [NSNumber numberWithBool:true]; + ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStructList *) temp_0[0]).c).c = + [NSNumber numberWithUnsignedChar:2]; + ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStructList *) temp_0[0]).c).d = + [[NSData alloc] initWithBytes:"octet_string" length:12]; + ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStructList *) temp_0[0]).c).e = @"char_string"; + ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStructList *) temp_0[0]).c).f = + [NSNumber numberWithUnsignedChar:1]; + ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStructList *) temp_0[0]).c).g = + [NSNumber numberWithFloat:0]; + ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStructList *) temp_0[0]).c).h = + [NSNumber numberWithDouble:0]; + + { + NSMutableArray * temp_2 = [[NSMutableArray alloc] init]; + temp_2[0] = [[CHIPTestClusterClusterSimpleStruct alloc] init]; + ((CHIPTestClusterClusterSimpleStruct *) temp_2[0]).a = [NSNumber numberWithUnsignedChar:1]; + ((CHIPTestClusterClusterSimpleStruct *) temp_2[0]).b = [NSNumber numberWithBool:true]; + ((CHIPTestClusterClusterSimpleStruct *) temp_2[0]).c = [NSNumber numberWithUnsignedChar:3]; + ((CHIPTestClusterClusterSimpleStruct *) temp_2[0]).d = [[NSData alloc] initWithBytes:"nested_octet_string" length:19]; + ((CHIPTestClusterClusterSimpleStruct *) temp_2[0]).e = @"nested_char_string"; + ((CHIPTestClusterClusterSimpleStruct *) temp_2[0]).f = [NSNumber numberWithUnsignedChar:1]; + ((CHIPTestClusterClusterSimpleStruct *) temp_2[0]).g = [NSNumber numberWithFloat:0]; + ((CHIPTestClusterClusterSimpleStruct *) temp_2[0]).h = [NSNumber numberWithDouble:0]; + + temp_2[1] = [[CHIPTestClusterClusterSimpleStruct alloc] init]; + ((CHIPTestClusterClusterSimpleStruct *) temp_2[1]).a = [NSNumber numberWithUnsignedChar:2]; + ((CHIPTestClusterClusterSimpleStruct *) temp_2[1]).b = [NSNumber numberWithBool:true]; + ((CHIPTestClusterClusterSimpleStruct *) temp_2[1]).c = [NSNumber numberWithUnsignedChar:3]; + ((CHIPTestClusterClusterSimpleStruct *) temp_2[1]).d = [[NSData alloc] initWithBytes:"nested_octet_string" length:19]; + ((CHIPTestClusterClusterSimpleStruct *) temp_2[1]).e = @"nested_char_string"; + ((CHIPTestClusterClusterSimpleStruct *) temp_2[1]).f = [NSNumber numberWithUnsignedChar:1]; + ((CHIPTestClusterClusterSimpleStruct *) temp_2[1]).g = [NSNumber numberWithFloat:0]; + ((CHIPTestClusterClusterSimpleStruct *) temp_2[1]).h = [NSNumber numberWithDouble:0]; + + ((CHIPTestClusterClusterNestedStructList *) temp_0[0]).d = temp_2; + } + { + NSMutableArray * temp_2 = [[NSMutableArray alloc] init]; + temp_2[0] = [NSNumber numberWithUnsignedInt:1UL]; + temp_2[1] = [NSNumber numberWithUnsignedInt:2UL]; + temp_2[2] = [NSNumber numberWithUnsignedInt:3UL]; + ((CHIPTestClusterClusterNestedStructList *) temp_0[0]).e = temp_2; + } + { + NSMutableArray * temp_2 = [[NSMutableArray alloc] init]; + temp_2[0] = [[NSData alloc] initWithBytes:"octet_string_1" length:14]; + temp_2[1] = [[NSData alloc] initWithBytes:"octect_string_2" length:15]; + temp_2[2] = [[NSData alloc] initWithBytes:"octet_string_3" length:14]; + ((CHIPTestClusterClusterNestedStructList *) temp_0[0]).f = temp_2; + } + { + NSMutableArray * temp_2 = [[NSMutableArray alloc] init]; + temp_2[0] = [NSNumber numberWithUnsignedChar:0]; + temp_2[1] = [NSNumber numberWithUnsignedChar:255]; + ((CHIPTestClusterClusterNestedStructList *) temp_0[0]).g = temp_2; + } + + params.arg1 = temp_0; + } + [cluster testListNestedStructListArgumentRequestWithParams:params + completionHandler:^(CHIPTestClusterClusterBooleanResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Send Test Command With List of Nested Struct List Argument and all fields " + @"b of elements of arg1.d are true Error: %@", + err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = values.value; + XCTAssertEqual([actualValue boolValue], true); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000143_TestListNestedStructListArgumentRequest +{ + XCTestExpectation * expectation = + [self expectationWithDescription: + @"Send Test Command With Nested Struct List Argument and some fields b of elements of arg1.d are false"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + __auto_type * params = [[CHIPTestClusterClusterTestListNestedStructListArgumentRequestParams alloc] init]; + { + NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; + temp_0[0] = [[CHIPTestClusterClusterNestedStructList alloc] init]; + ((CHIPTestClusterClusterNestedStructList *) temp_0[0]).a = [NSNumber numberWithUnsignedChar:0]; + ((CHIPTestClusterClusterNestedStructList *) temp_0[0]).b = [NSNumber numberWithBool:true]; + ((CHIPTestClusterClusterNestedStructList *) temp_0[0]).c = [[CHIPTestClusterClusterSimpleStruct alloc] init]; + ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStructList *) temp_0[0]).c).a = + [NSNumber numberWithUnsignedChar:0]; + ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStructList *) temp_0[0]).c).b = + [NSNumber numberWithBool:true]; + ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStructList *) temp_0[0]).c).c = + [NSNumber numberWithUnsignedChar:2]; + ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStructList *) temp_0[0]).c).d = + [[NSData alloc] initWithBytes:"octet_string" length:12]; + ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStructList *) temp_0[0]).c).e = @"char_string"; + ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStructList *) temp_0[0]).c).f = + [NSNumber numberWithUnsignedChar:1]; + ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStructList *) temp_0[0]).c).g = + [NSNumber numberWithFloat:0]; + ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStructList *) temp_0[0]).c).h = + [NSNumber numberWithDouble:0]; + + { + NSMutableArray * temp_2 = [[NSMutableArray alloc] init]; + temp_2[0] = [[CHIPTestClusterClusterSimpleStruct alloc] init]; + ((CHIPTestClusterClusterSimpleStruct *) temp_2[0]).a = [NSNumber numberWithUnsignedChar:1]; + ((CHIPTestClusterClusterSimpleStruct *) temp_2[0]).b = [NSNumber numberWithBool:true]; + ((CHIPTestClusterClusterSimpleStruct *) temp_2[0]).c = [NSNumber numberWithUnsignedChar:3]; + ((CHIPTestClusterClusterSimpleStruct *) temp_2[0]).d = [[NSData alloc] initWithBytes:"nested_octet_string" length:19]; + ((CHIPTestClusterClusterSimpleStruct *) temp_2[0]).e = @"nested_char_string"; + ((CHIPTestClusterClusterSimpleStruct *) temp_2[0]).f = [NSNumber numberWithUnsignedChar:1]; + ((CHIPTestClusterClusterSimpleStruct *) temp_2[0]).g = [NSNumber numberWithFloat:0]; + ((CHIPTestClusterClusterSimpleStruct *) temp_2[0]).h = [NSNumber numberWithDouble:0]; + + temp_2[1] = [[CHIPTestClusterClusterSimpleStruct alloc] init]; + ((CHIPTestClusterClusterSimpleStruct *) temp_2[1]).a = [NSNumber numberWithUnsignedChar:2]; + ((CHIPTestClusterClusterSimpleStruct *) temp_2[1]).b = [NSNumber numberWithBool:false]; + ((CHIPTestClusterClusterSimpleStruct *) temp_2[1]).c = [NSNumber numberWithUnsignedChar:3]; + ((CHIPTestClusterClusterSimpleStruct *) temp_2[1]).d = [[NSData alloc] initWithBytes:"nested_octet_string" length:19]; + ((CHIPTestClusterClusterSimpleStruct *) temp_2[1]).e = @"nested_char_string"; + ((CHIPTestClusterClusterSimpleStruct *) temp_2[1]).f = [NSNumber numberWithUnsignedChar:1]; + ((CHIPTestClusterClusterSimpleStruct *) temp_2[1]).g = [NSNumber numberWithFloat:0]; + ((CHIPTestClusterClusterSimpleStruct *) temp_2[1]).h = [NSNumber numberWithDouble:0]; + + ((CHIPTestClusterClusterNestedStructList *) temp_0[0]).d = temp_2; + } + { + NSMutableArray * temp_2 = [[NSMutableArray alloc] init]; + temp_2[0] = [NSNumber numberWithUnsignedInt:1UL]; + temp_2[1] = [NSNumber numberWithUnsignedInt:2UL]; + temp_2[2] = [NSNumber numberWithUnsignedInt:3UL]; + ((CHIPTestClusterClusterNestedStructList *) temp_0[0]).e = temp_2; + } + { + NSMutableArray * temp_2 = [[NSMutableArray alloc] init]; + temp_2[0] = [[NSData alloc] initWithBytes:"octet_string_1" length:14]; + temp_2[1] = [[NSData alloc] initWithBytes:"octect_string_2" length:15]; + temp_2[2] = [[NSData alloc] initWithBytes:"octet_string_3" length:14]; + ((CHIPTestClusterClusterNestedStructList *) temp_0[0]).f = temp_2; + } + { + NSMutableArray * temp_2 = [[NSMutableArray alloc] init]; + temp_2[0] = [NSNumber numberWithUnsignedChar:0]; + temp_2[1] = [NSNumber numberWithUnsignedChar:255]; + ((CHIPTestClusterClusterNestedStructList *) temp_0[0]).g = temp_2; + } + + params.arg1 = temp_0; + } + [cluster testListNestedStructListArgumentRequestWithParams:params + completionHandler:^(CHIPTestClusterClusterBooleanResponseParams * _Nullable values, + NSError * _Nullable err) { + NSLog(@"Send Test Command With Nested Struct List Argument and some fields b of " + @"elements of arg1.d are false Error: %@", + err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = values.value; + XCTAssertEqual([actualValue boolValue], false); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000144_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute LIST With List of INT8U and none of them is set to 0"]; @@ -21917,12 +22404,12 @@ - (void)testSendClusterTestCluster_000138_WriteAttribute id listInt8uArgument; { - NSMutableArray * temp = [[NSMutableArray alloc] init]; - temp[0] = [NSNumber numberWithUnsignedChar:1]; - temp[1] = [NSNumber numberWithUnsignedChar:2]; - temp[2] = [NSNumber numberWithUnsignedChar:3]; - temp[3] = [NSNumber numberWithUnsignedChar:4]; - listInt8uArgument = temp; + NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; + temp_0[0] = [NSNumber numberWithUnsignedChar:1]; + temp_0[1] = [NSNumber numberWithUnsignedChar:2]; + temp_0[2] = [NSNumber numberWithUnsignedChar:3]; + temp_0[3] = [NSNumber numberWithUnsignedChar:4]; + listInt8uArgument = temp_0; } [cluster writeAttributeListInt8uWithValue:listInt8uArgument completionHandler:^(NSError * _Nullable err) { @@ -21935,7 +22422,7 @@ - (void)testSendClusterTestCluster_000138_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000139_ReadAttribute +- (void)testSendClusterTestCluster_000145_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute LIST With List of INT8U"]; @@ -21963,7 +22450,7 @@ - (void)testSendClusterTestCluster_000139_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000140_WriteAttribute +- (void)testSendClusterTestCluster_000146_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute LIST With List of OCTET_STRING"]; @@ -21974,12 +22461,12 @@ - (void)testSendClusterTestCluster_000140_WriteAttribute id listOctetStringArgument; { - NSMutableArray * temp = [[NSMutableArray alloc] init]; - temp[0] = [[NSData alloc] initWithBytes:"Test0" length:5]; - temp[1] = [[NSData alloc] initWithBytes:"Test1" length:5]; - temp[2] = [[NSData alloc] initWithBytes:"Test2" length:5]; - temp[3] = [[NSData alloc] initWithBytes:"Test3" length:5]; - listOctetStringArgument = temp; + NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; + temp_0[0] = [[NSData alloc] initWithBytes:"Test0" length:5]; + temp_0[1] = [[NSData alloc] initWithBytes:"Test1" length:5]; + temp_0[2] = [[NSData alloc] initWithBytes:"Test2" length:5]; + temp_0[3] = [[NSData alloc] initWithBytes:"Test3" length:5]; + listOctetStringArgument = temp_0; } [cluster writeAttributeListOctetStringWithValue:listOctetStringArgument completionHandler:^(NSError * _Nullable err) { @@ -21992,7 +22479,7 @@ - (void)testSendClusterTestCluster_000140_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000141_ReadAttribute +- (void)testSendClusterTestCluster_000147_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute LIST With List of OCTET_STRING"]; @@ -22020,7 +22507,7 @@ - (void)testSendClusterTestCluster_000141_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000142_WriteAttribute +- (void)testSendClusterTestCluster_000148_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute LIST With List of LIST_STRUCT_OCTET_STRING"]; @@ -22032,24 +22519,24 @@ - (void)testSendClusterTestCluster_000142_WriteAttribute id listStructOctetStringArgument; { - NSMutableArray * temp = [[NSMutableArray alloc] init]; - temp[0] = [[CHIPTestClusterClusterTestListStructOctet alloc] init]; - ((CHIPTestClusterClusterTestListStructOctet *) temp[0]).fabricIndex = [NSNumber numberWithUnsignedLongLong:0ULL]; - ((CHIPTestClusterClusterTestListStructOctet *) temp[0]).operationalCert = [[NSData alloc] initWithBytes:"Test0" length:5]; + NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; + temp_0[0] = [[CHIPTestClusterClusterTestListStructOctet alloc] init]; + ((CHIPTestClusterClusterTestListStructOctet *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedLongLong:0ULL]; + ((CHIPTestClusterClusterTestListStructOctet *) temp_0[0]).operationalCert = [[NSData alloc] initWithBytes:"Test0" length:5]; - temp[1] = [[CHIPTestClusterClusterTestListStructOctet alloc] init]; - ((CHIPTestClusterClusterTestListStructOctet *) temp[1]).fabricIndex = [NSNumber numberWithUnsignedLongLong:1ULL]; - ((CHIPTestClusterClusterTestListStructOctet *) temp[1]).operationalCert = [[NSData alloc] initWithBytes:"Test1" length:5]; + temp_0[1] = [[CHIPTestClusterClusterTestListStructOctet alloc] init]; + ((CHIPTestClusterClusterTestListStructOctet *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedLongLong:1ULL]; + ((CHIPTestClusterClusterTestListStructOctet *) temp_0[1]).operationalCert = [[NSData alloc] initWithBytes:"Test1" length:5]; - temp[2] = [[CHIPTestClusterClusterTestListStructOctet alloc] init]; - ((CHIPTestClusterClusterTestListStructOctet *) temp[2]).fabricIndex = [NSNumber numberWithUnsignedLongLong:2ULL]; - ((CHIPTestClusterClusterTestListStructOctet *) temp[2]).operationalCert = [[NSData alloc] initWithBytes:"Test2" length:5]; + temp_0[2] = [[CHIPTestClusterClusterTestListStructOctet alloc] init]; + ((CHIPTestClusterClusterTestListStructOctet *) temp_0[2]).fabricIndex = [NSNumber numberWithUnsignedLongLong:2ULL]; + ((CHIPTestClusterClusterTestListStructOctet *) temp_0[2]).operationalCert = [[NSData alloc] initWithBytes:"Test2" length:5]; - temp[3] = [[CHIPTestClusterClusterTestListStructOctet alloc] init]; - ((CHIPTestClusterClusterTestListStructOctet *) temp[3]).fabricIndex = [NSNumber numberWithUnsignedLongLong:3ULL]; - ((CHIPTestClusterClusterTestListStructOctet *) temp[3]).operationalCert = [[NSData alloc] initWithBytes:"Test3" length:5]; + temp_0[3] = [[CHIPTestClusterClusterTestListStructOctet alloc] init]; + ((CHIPTestClusterClusterTestListStructOctet *) temp_0[3]).fabricIndex = [NSNumber numberWithUnsignedLongLong:3ULL]; + ((CHIPTestClusterClusterTestListStructOctet *) temp_0[3]).operationalCert = [[NSData alloc] initWithBytes:"Test3" length:5]; - listStructOctetStringArgument = temp; + listStructOctetStringArgument = temp_0; } [cluster writeAttributeListStructOctetStringWithValue:listStructOctetStringArgument completionHandler:^(NSError * _Nullable err) { @@ -22062,7 +22549,7 @@ - (void)testSendClusterTestCluster_000142_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000143_ReadAttribute +- (void)testSendClusterTestCluster_000149_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute LIST With List of LIST_STRUCT_OCTET_STRING"]; @@ -22103,7 +22590,7 @@ - (void)testSendClusterTestCluster_000143_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000144_TestNullableOptionalRequest +- (void)testSendClusterTestCluster_000150_TestNullableOptionalRequest { XCTestExpectation * expectation = [self expectationWithDescription:@"Send Test Command with optional arg set."]; @@ -22144,7 +22631,7 @@ - (void)testSendClusterTestCluster_000144_TestNullableOptionalRequest [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000145_TestNullableOptionalRequest +- (void)testSendClusterTestCluster_000151_TestNullableOptionalRequest { XCTestExpectation * expectation = [self expectationWithDescription:@"Send Test Command without its optional arg."]; @@ -22171,7 +22658,7 @@ - (void)testSendClusterTestCluster_000145_TestNullableOptionalRequest [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000146_WriteAttribute +- (void)testSendClusterTestCluster_000152_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_BOOLEAN null"]; @@ -22193,7 +22680,7 @@ - (void)testSendClusterTestCluster_000146_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000147_ReadAttribute +- (void)testSendClusterTestCluster_000153_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_BOOLEAN null"]; @@ -22217,7 +22704,7 @@ - (void)testSendClusterTestCluster_000147_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000148_WriteAttribute +- (void)testSendClusterTestCluster_000154_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_BOOLEAN True"]; @@ -22239,7 +22726,7 @@ - (void)testSendClusterTestCluster_000148_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000149_ReadAttribute +- (void)testSendClusterTestCluster_000155_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_BOOLEAN True"]; @@ -22264,7 +22751,7 @@ - (void)testSendClusterTestCluster_000149_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000150_WriteAttribute +- (void)testSendClusterTestCluster_000156_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_BITMAP8 Max Value"]; @@ -22286,7 +22773,7 @@ - (void)testSendClusterTestCluster_000150_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000151_ReadAttribute +- (void)testSendClusterTestCluster_000157_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_BITMAP8 Max Value"]; @@ -22311,7 +22798,7 @@ - (void)testSendClusterTestCluster_000151_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000152_WriteAttribute +- (void)testSendClusterTestCluster_000158_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_BITMAP8 Invalid Value"]; @@ -22332,7 +22819,7 @@ - (void)testSendClusterTestCluster_000152_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000153_ReadAttribute +- (void)testSendClusterTestCluster_000159_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_BITMAP8 unchanged Value"]; @@ -22357,7 +22844,7 @@ - (void)testSendClusterTestCluster_000153_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000154_WriteAttribute +- (void)testSendClusterTestCluster_000160_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_BITMAP8 null Value"]; @@ -22379,7 +22866,7 @@ - (void)testSendClusterTestCluster_000154_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000155_ReadAttribute +- (void)testSendClusterTestCluster_000161_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_BITMAP8 null Value"]; @@ -22403,7 +22890,7 @@ - (void)testSendClusterTestCluster_000155_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000156_WriteAttribute +- (void)testSendClusterTestCluster_000162_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_BITMAP16 Max Value"]; @@ -22425,7 +22912,7 @@ - (void)testSendClusterTestCluster_000156_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000157_ReadAttribute +- (void)testSendClusterTestCluster_000163_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_BITMAP16 Max Value"]; @@ -22450,7 +22937,7 @@ - (void)testSendClusterTestCluster_000157_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000158_WriteAttribute +- (void)testSendClusterTestCluster_000164_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_BITMAP16 Invalid Value"]; @@ -22471,7 +22958,7 @@ - (void)testSendClusterTestCluster_000158_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000159_ReadAttribute +- (void)testSendClusterTestCluster_000165_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_BITMAP16 unchanged Value"]; @@ -22496,7 +22983,7 @@ - (void)testSendClusterTestCluster_000159_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000160_WriteAttribute +- (void)testSendClusterTestCluster_000166_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_BITMAP16 null Value"]; @@ -22518,7 +23005,7 @@ - (void)testSendClusterTestCluster_000160_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000161_ReadAttribute +- (void)testSendClusterTestCluster_000167_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_BITMAP16 null Value"]; @@ -22542,7 +23029,7 @@ - (void)testSendClusterTestCluster_000161_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000162_WriteAttribute +- (void)testSendClusterTestCluster_000168_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_BITMAP32 Max Value"]; @@ -22564,7 +23051,7 @@ - (void)testSendClusterTestCluster_000162_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000163_ReadAttribute +- (void)testSendClusterTestCluster_000169_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_BITMAP32 Max Value"]; @@ -22589,7 +23076,7 @@ - (void)testSendClusterTestCluster_000163_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000164_WriteAttribute +- (void)testSendClusterTestCluster_000170_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_BITMAP32 Invalid Value"]; @@ -22610,7 +23097,7 @@ - (void)testSendClusterTestCluster_000164_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000165_ReadAttribute +- (void)testSendClusterTestCluster_000171_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_BITMAP32 unchanged Value"]; @@ -22635,7 +23122,7 @@ - (void)testSendClusterTestCluster_000165_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000166_WriteAttribute +- (void)testSendClusterTestCluster_000172_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_BITMAP32 null Value"]; @@ -22657,7 +23144,7 @@ - (void)testSendClusterTestCluster_000166_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000167_ReadAttribute +- (void)testSendClusterTestCluster_000173_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_BITMAP32 null Value"]; @@ -22681,7 +23168,7 @@ - (void)testSendClusterTestCluster_000167_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000168_WriteAttribute +- (void)testSendClusterTestCluster_000174_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_BITMAP64 Max Value"]; @@ -22703,7 +23190,7 @@ - (void)testSendClusterTestCluster_000168_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000169_ReadAttribute +- (void)testSendClusterTestCluster_000175_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_BITMAP64 Max Value"]; @@ -22728,7 +23215,7 @@ - (void)testSendClusterTestCluster_000169_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000170_WriteAttribute +- (void)testSendClusterTestCluster_000176_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_BITMAP64 Invalid Value"]; @@ -22749,7 +23236,7 @@ - (void)testSendClusterTestCluster_000170_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000171_ReadAttribute +- (void)testSendClusterTestCluster_000177_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_BITMAP64 unchanged Value"]; @@ -22774,7 +23261,7 @@ - (void)testSendClusterTestCluster_000171_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000172_WriteAttribute +- (void)testSendClusterTestCluster_000178_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_BITMAP64 null Value"]; @@ -22796,7 +23283,7 @@ - (void)testSendClusterTestCluster_000172_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000173_ReadAttribute +- (void)testSendClusterTestCluster_000179_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_BITMAP64 null Value"]; @@ -22820,7 +23307,7 @@ - (void)testSendClusterTestCluster_000173_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000174_WriteAttribute +- (void)testSendClusterTestCluster_000180_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_INT8U Max Value"]; @@ -22842,7 +23329,7 @@ - (void)testSendClusterTestCluster_000174_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000175_ReadAttribute +- (void)testSendClusterTestCluster_000181_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_INT8U Max Value"]; @@ -22867,7 +23354,7 @@ - (void)testSendClusterTestCluster_000175_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000176_WriteAttribute +- (void)testSendClusterTestCluster_000182_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_INT8U Invalid Value"]; @@ -22888,7 +23375,7 @@ - (void)testSendClusterTestCluster_000176_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000177_ReadAttribute +- (void)testSendClusterTestCluster_000183_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_INT8U unchanged Value"]; @@ -22913,7 +23400,7 @@ - (void)testSendClusterTestCluster_000177_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000178_WriteAttribute +- (void)testSendClusterTestCluster_000184_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_INT8U null Value"]; @@ -22935,7 +23422,7 @@ - (void)testSendClusterTestCluster_000178_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000179_ReadAttribute +- (void)testSendClusterTestCluster_000185_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_INT8U null Value"]; @@ -22959,7 +23446,7 @@ - (void)testSendClusterTestCluster_000179_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000180_WriteAttribute +- (void)testSendClusterTestCluster_000186_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_INT16U Max Value"]; @@ -22981,7 +23468,7 @@ - (void)testSendClusterTestCluster_000180_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000181_ReadAttribute +- (void)testSendClusterTestCluster_000187_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_INT16U Max Value"]; @@ -23006,7 +23493,7 @@ - (void)testSendClusterTestCluster_000181_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000182_WriteAttribute +- (void)testSendClusterTestCluster_000188_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_INT16U Invalid Value"]; @@ -23027,7 +23514,7 @@ - (void)testSendClusterTestCluster_000182_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000183_ReadAttribute +- (void)testSendClusterTestCluster_000189_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_INT16U unchanged Value"]; @@ -23052,7 +23539,7 @@ - (void)testSendClusterTestCluster_000183_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000184_WriteAttribute +- (void)testSendClusterTestCluster_000190_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_INT16U null Value"]; @@ -23074,7 +23561,7 @@ - (void)testSendClusterTestCluster_000184_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000185_ReadAttribute +- (void)testSendClusterTestCluster_000191_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_INT16U null Value"]; @@ -23098,7 +23585,7 @@ - (void)testSendClusterTestCluster_000185_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000186_WriteAttribute +- (void)testSendClusterTestCluster_000192_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_INT32U Max Value"]; @@ -23120,7 +23607,7 @@ - (void)testSendClusterTestCluster_000186_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000187_ReadAttribute +- (void)testSendClusterTestCluster_000193_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_INT32U Max Value"]; @@ -23145,7 +23632,7 @@ - (void)testSendClusterTestCluster_000187_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000188_WriteAttribute +- (void)testSendClusterTestCluster_000194_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_INT32U Invalid Value"]; @@ -23166,7 +23653,7 @@ - (void)testSendClusterTestCluster_000188_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000189_ReadAttribute +- (void)testSendClusterTestCluster_000195_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_INT32U unchanged Value"]; @@ -23191,7 +23678,7 @@ - (void)testSendClusterTestCluster_000189_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000190_WriteAttribute +- (void)testSendClusterTestCluster_000196_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_INT32U null Value"]; @@ -23213,7 +23700,7 @@ - (void)testSendClusterTestCluster_000190_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000191_ReadAttribute +- (void)testSendClusterTestCluster_000197_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_INT32U null Value"]; @@ -23237,7 +23724,7 @@ - (void)testSendClusterTestCluster_000191_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000192_WriteAttribute +- (void)testSendClusterTestCluster_000198_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_INT64U Max Value"]; @@ -23259,7 +23746,7 @@ - (void)testSendClusterTestCluster_000192_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000193_ReadAttribute +- (void)testSendClusterTestCluster_000199_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_INT64U Max Value"]; @@ -23284,7 +23771,7 @@ - (void)testSendClusterTestCluster_000193_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000194_WriteAttribute +- (void)testSendClusterTestCluster_000200_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_INT64U Invalid Value"]; @@ -23305,7 +23792,7 @@ - (void)testSendClusterTestCluster_000194_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000195_ReadAttribute +- (void)testSendClusterTestCluster_000201_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_INT64U unchanged Value"]; @@ -23330,7 +23817,7 @@ - (void)testSendClusterTestCluster_000195_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000196_WriteAttribute +- (void)testSendClusterTestCluster_000202_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_INT64U null Value"]; @@ -23352,7 +23839,7 @@ - (void)testSendClusterTestCluster_000196_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000197_ReadAttribute +- (void)testSendClusterTestCluster_000203_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_INT64U null Value"]; @@ -23376,7 +23863,7 @@ - (void)testSendClusterTestCluster_000197_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000198_WriteAttribute +- (void)testSendClusterTestCluster_000204_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_INT8S Min Value"]; @@ -23398,7 +23885,7 @@ - (void)testSendClusterTestCluster_000198_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000199_ReadAttribute +- (void)testSendClusterTestCluster_000205_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_INT8S Min Value"]; @@ -23423,7 +23910,7 @@ - (void)testSendClusterTestCluster_000199_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000200_WriteAttribute +- (void)testSendClusterTestCluster_000206_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_INT8S Invalid Value"]; @@ -23444,7 +23931,7 @@ - (void)testSendClusterTestCluster_000200_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000201_ReadAttribute +- (void)testSendClusterTestCluster_000207_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_INT8S unchanged Value"]; @@ -23469,7 +23956,7 @@ - (void)testSendClusterTestCluster_000201_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000202_WriteAttribute +- (void)testSendClusterTestCluster_000208_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_INT8S null Value"]; @@ -23491,7 +23978,7 @@ - (void)testSendClusterTestCluster_000202_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000203_ReadAttribute +- (void)testSendClusterTestCluster_000209_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_INT8S null Value"]; @@ -23515,7 +24002,7 @@ - (void)testSendClusterTestCluster_000203_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000204_WriteAttribute +- (void)testSendClusterTestCluster_000210_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_INT16S Min Value"]; @@ -23537,7 +24024,7 @@ - (void)testSendClusterTestCluster_000204_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000205_ReadAttribute +- (void)testSendClusterTestCluster_000211_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_INT16S Min Value"]; @@ -23562,7 +24049,7 @@ - (void)testSendClusterTestCluster_000205_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000206_WriteAttribute +- (void)testSendClusterTestCluster_000212_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_INT16S Invalid Value"]; @@ -23583,7 +24070,7 @@ - (void)testSendClusterTestCluster_000206_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000207_ReadAttribute +- (void)testSendClusterTestCluster_000213_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_INT16S unchanged Value"]; @@ -23608,7 +24095,7 @@ - (void)testSendClusterTestCluster_000207_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000208_WriteAttribute +- (void)testSendClusterTestCluster_000214_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_INT16S null Value"]; @@ -23630,7 +24117,7 @@ - (void)testSendClusterTestCluster_000208_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000209_ReadAttribute +- (void)testSendClusterTestCluster_000215_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_INT16S null Value"]; @@ -23654,7 +24141,7 @@ - (void)testSendClusterTestCluster_000209_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000210_WriteAttribute +- (void)testSendClusterTestCluster_000216_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_INT32S Min Value"]; @@ -23676,7 +24163,7 @@ - (void)testSendClusterTestCluster_000210_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000211_ReadAttribute +- (void)testSendClusterTestCluster_000217_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_INT32S Min Value"]; @@ -23701,7 +24188,7 @@ - (void)testSendClusterTestCluster_000211_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000212_WriteAttribute +- (void)testSendClusterTestCluster_000218_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_INT32S Invalid Value"]; @@ -23722,7 +24209,7 @@ - (void)testSendClusterTestCluster_000212_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000213_ReadAttribute +- (void)testSendClusterTestCluster_000219_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_INT32S unchanged Value"]; @@ -23747,7 +24234,7 @@ - (void)testSendClusterTestCluster_000213_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000214_WriteAttribute +- (void)testSendClusterTestCluster_000220_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_INT32S null Value"]; @@ -23769,7 +24256,7 @@ - (void)testSendClusterTestCluster_000214_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000215_ReadAttribute +- (void)testSendClusterTestCluster_000221_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_INT32S null Value"]; @@ -23793,7 +24280,7 @@ - (void)testSendClusterTestCluster_000215_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000216_WriteAttribute +- (void)testSendClusterTestCluster_000222_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_INT64S Min Value"]; @@ -23815,7 +24302,7 @@ - (void)testSendClusterTestCluster_000216_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000217_ReadAttribute +- (void)testSendClusterTestCluster_000223_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_INT64S Min Value"]; @@ -23840,7 +24327,7 @@ - (void)testSendClusterTestCluster_000217_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000218_WriteAttribute +- (void)testSendClusterTestCluster_000224_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_INT64S Invalid Value"]; @@ -23861,7 +24348,7 @@ - (void)testSendClusterTestCluster_000218_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000219_ReadAttribute +- (void)testSendClusterTestCluster_000225_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_INT64S unchanged Value"]; @@ -23886,7 +24373,7 @@ - (void)testSendClusterTestCluster_000219_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000220_WriteAttribute +- (void)testSendClusterTestCluster_000226_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_INT64S null Value"]; @@ -23908,7 +24395,7 @@ - (void)testSendClusterTestCluster_000220_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000221_ReadAttribute +- (void)testSendClusterTestCluster_000227_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_INT64S null Value"]; @@ -23932,7 +24419,7 @@ - (void)testSendClusterTestCluster_000221_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000222_WriteAttribute +- (void)testSendClusterTestCluster_000228_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_ENUM8 Max Value"]; @@ -23954,7 +24441,7 @@ - (void)testSendClusterTestCluster_000222_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000223_ReadAttribute +- (void)testSendClusterTestCluster_000229_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_ENUM8 Max Value"]; @@ -23979,7 +24466,7 @@ - (void)testSendClusterTestCluster_000223_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000224_WriteAttribute +- (void)testSendClusterTestCluster_000230_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_ENUM8 Invalid Value"]; @@ -24000,7 +24487,7 @@ - (void)testSendClusterTestCluster_000224_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000225_ReadAttribute +- (void)testSendClusterTestCluster_000231_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_ENUM8 unchanged Value"]; @@ -24025,7 +24512,7 @@ - (void)testSendClusterTestCluster_000225_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000226_WriteAttribute +- (void)testSendClusterTestCluster_000232_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_ENUM8 null Value"]; @@ -24047,7 +24534,7 @@ - (void)testSendClusterTestCluster_000226_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000227_ReadAttribute +- (void)testSendClusterTestCluster_000233_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_ENUM8 null Value"]; @@ -24071,7 +24558,7 @@ - (void)testSendClusterTestCluster_000227_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000228_WriteAttribute +- (void)testSendClusterTestCluster_000234_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_ENUM16 Max Value"]; @@ -24093,7 +24580,7 @@ - (void)testSendClusterTestCluster_000228_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000229_ReadAttribute +- (void)testSendClusterTestCluster_000235_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_ENUM16 Max Value"]; @@ -24118,7 +24605,7 @@ - (void)testSendClusterTestCluster_000229_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000230_WriteAttribute +- (void)testSendClusterTestCluster_000236_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_ENUM16 Invalid Value"]; @@ -24139,7 +24626,7 @@ - (void)testSendClusterTestCluster_000230_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000231_ReadAttribute +- (void)testSendClusterTestCluster_000237_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_ENUM16 unchanged Value"]; @@ -24164,7 +24651,7 @@ - (void)testSendClusterTestCluster_000231_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000232_WriteAttribute +- (void)testSendClusterTestCluster_000238_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_ENUM16 null Value"]; @@ -24186,7 +24673,7 @@ - (void)testSendClusterTestCluster_000232_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000233_ReadAttribute +- (void)testSendClusterTestCluster_000239_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_ENUM16 null Value"]; @@ -24210,7 +24697,7 @@ - (void)testSendClusterTestCluster_000233_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000234_ReadAttribute +- (void)testSendClusterTestCluster_000240_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_OCTET_STRING Default Value"]; @@ -24235,7 +24722,7 @@ - (void)testSendClusterTestCluster_000234_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000235_WriteAttribute +- (void)testSendClusterTestCluster_000241_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_OCTET_STRING"]; @@ -24257,7 +24744,7 @@ - (void)testSendClusterTestCluster_000235_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000236_ReadAttribute +- (void)testSendClusterTestCluster_000242_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_OCTET_STRING"]; @@ -24282,7 +24769,7 @@ - (void)testSendClusterTestCluster_000236_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000237_WriteAttribute +- (void)testSendClusterTestCluster_000243_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_OCTET_STRING"]; @@ -24304,7 +24791,7 @@ - (void)testSendClusterTestCluster_000237_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000238_ReadAttribute +- (void)testSendClusterTestCluster_000244_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_OCTET_STRING"]; @@ -24328,7 +24815,7 @@ - (void)testSendClusterTestCluster_000238_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000239_WriteAttribute +- (void)testSendClusterTestCluster_000245_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_OCTET_STRING"]; @@ -24350,7 +24837,7 @@ - (void)testSendClusterTestCluster_000239_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000240_ReadAttribute +- (void)testSendClusterTestCluster_000246_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_OCTET_STRING"]; @@ -24375,7 +24862,7 @@ - (void)testSendClusterTestCluster_000240_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000241_ReadAttribute +- (void)testSendClusterTestCluster_000247_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_CHAR_STRING Default Value"]; @@ -24400,7 +24887,7 @@ - (void)testSendClusterTestCluster_000241_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000242_WriteAttribute +- (void)testSendClusterTestCluster_000248_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_CHAR_STRING"]; @@ -24422,7 +24909,32 @@ - (void)testSendClusterTestCluster_000242_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000243_WriteAttribute +- (void)testSendClusterTestCluster_000249_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_CHAR_STRING"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeNullableCharStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute NULLABLE_CHAR_STRING Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertFalse(actualValue == nil); + XCTAssertTrue([actualValue isEqualToString:@"☉T☉"]); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestCluster_000250_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_CHAR_STRING - Value too long"]; @@ -24444,7 +24956,7 @@ - (void)testSendClusterTestCluster_000243_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000244_ReadAttribute +- (void)testSendClusterTestCluster_000251_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_CHAR_STRING"]; @@ -24468,7 +24980,7 @@ - (void)testSendClusterTestCluster_000244_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000245_WriteAttribute +- (void)testSendClusterTestCluster_000252_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Write attribute NULLABLE_CHAR_STRING - Empty"]; @@ -24490,7 +25002,7 @@ - (void)testSendClusterTestCluster_000245_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000246_ReadAttribute +- (void)testSendClusterTestCluster_000253_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute NULLABLE_CHAR_STRING"]; @@ -24515,7 +25027,7 @@ - (void)testSendClusterTestCluster_000246_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000247_ReadAttribute +- (void)testSendClusterTestCluster_000254_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute from nonexistent endpoint."]; @@ -24533,7 +25045,7 @@ - (void)testSendClusterTestCluster_000247_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestCluster_000248_ReadAttribute +- (void)testSendClusterTestCluster_000255_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read attribute from nonexistent cluster."]; diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h index 74f46c31b4fd85..ed25803b4b13f8 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h @@ -28411,7 +28411,7 @@ struct Type CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; - using ResponseType = DataModel::NullObjectType; + using ResponseType = Clusters::TestCluster::Commands::BooleanResponse::DecodableType; }; struct DecodableType diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index ea589307db7038..a59989c300a72a 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -36302,7 +36302,10 @@ class ReportTemperatureMeasurementClusterRevision : public ModelCommand | * TestEnumsRequest | 0x0E | | * TestListInt8UArgumentRequest | 0x0A | | * TestListInt8UReverseRequest | 0x0D | +| * TestListNestedStructListArgumentRequest | 0x0C | | * TestListStructArgumentRequest | 0x09 | +| * TestNestedStructArgumentRequest | 0x08 | +| * TestNestedStructListArgumentRequest | 0x0B | | * TestNotHandled | 0x01 | | * TestNullableOptionalRequest | 0x0F | | * TestSpecific | 0x02 | @@ -36498,6 +36501,30 @@ class TestClusterTestListInt8UReverseRequest : public ModelCommand chip::app::Clusters::TestCluster::Commands::TestListInt8UReverseRequest::Type mRequest; }; +/* + * Command TestListNestedStructListArgumentRequest + */ +class TestClusterTestListNestedStructListArgumentRequest : public ModelCommand +{ +public: + TestClusterTestListNestedStructListArgumentRequest() : ModelCommand("test-list-nested-struct-list-argument-request") + { + // arg1 Array parsing is not supported yet + ModelCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0000050F) command (0x0000000C) on endpoint %" PRIu8, endpointId); + + return chip::Controller::InvokeCommand(device, this, OnTestClusterBooleanResponseSuccess, OnDefaultFailure, endpointId, + mRequest); + } + +private: + chip::app::Clusters::TestCluster::Commands::TestListNestedStructListArgumentRequest::Type mRequest; +}; + /* * Command TestListStructArgumentRequest */ @@ -36522,6 +36549,54 @@ class TestClusterTestListStructArgumentRequest : public ModelCommand chip::app::Clusters::TestCluster::Commands::TestListStructArgumentRequest::Type mRequest; }; +/* + * Command TestNestedStructArgumentRequest + */ +class TestClusterTestNestedStructArgumentRequest : public ModelCommand +{ +public: + TestClusterTestNestedStructArgumentRequest() : ModelCommand("test-nested-struct-argument-request") + { + // arg1 Struct parsing is not supported yet + ModelCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0000050F) command (0x00000008) on endpoint %" PRIu8, endpointId); + + return chip::Controller::InvokeCommand(device, this, OnTestClusterBooleanResponseSuccess, OnDefaultFailure, endpointId, + mRequest); + } + +private: + chip::app::Clusters::TestCluster::Commands::TestNestedStructArgumentRequest::Type mRequest; +}; + +/* + * Command TestNestedStructListArgumentRequest + */ +class TestClusterTestNestedStructListArgumentRequest : public ModelCommand +{ +public: + TestClusterTestNestedStructListArgumentRequest() : ModelCommand("test-nested-struct-list-argument-request") + { + // arg1 Struct parsing is not supported yet + ModelCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0000050F) command (0x0000000B) on endpoint %" PRIu8, endpointId); + + return chip::Controller::InvokeCommand(device, this, OnTestClusterBooleanResponseSuccess, OnDefaultFailure, endpointId, + mRequest); + } + +private: + chip::app::Clusters::TestCluster::Commands::TestNestedStructListArgumentRequest::Type mRequest; +}; + /* * Command TestNotHandled */ @@ -54213,144 +54288,147 @@ void registerClusterTestCluster(Commands & commands) const char * clusterName = "TestCluster"; commands_list clusterCommands = { - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // }; commands.Register(clusterName, clusterCommands); diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 50f530863c7e2d..0b49c3230f3b3c 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -31689,482 +31689,519 @@ class TestCluster : public TestCommand err = TestSendTestCommandWithStructArgumentAndArg1bIsFalse_130(); break; case 131: - ChipLogProgress(chipTool, " ***** Test Step 131 : Send Test Command With Struct Argument and see what we get back\n"); - err = TestSendTestCommandWithStructArgumentAndSeeWhatWeGetBack_131(); + ChipLogProgress(chipTool, + " ***** Test Step 131 : Send Test Command With Nested Struct Argument and arg1.c.b is true\n"); + err = TestSendTestCommandWithNestedStructArgumentAndArg1cbIsTrue_131(); break; case 132: - ChipLogProgress(chipTool, " ***** Test Step 132 : Send Test Command With List of INT8U and none of them is set to 0\n"); - err = TestSendTestCommandWithListOfInt8uAndNoneOfThemIsSetTo0_132(); + ChipLogProgress(chipTool, " ***** Test Step 132 : Send Test Command With Nested Struct Argument arg1.c.b is false\n"); + err = TestSendTestCommandWithNestedStructArgumentArg1cbIsFalse_132(); break; case 133: - ChipLogProgress(chipTool, " ***** Test Step 133 : Send Test Command With List of INT8U and one of them is set to 0\n"); - err = TestSendTestCommandWithListOfInt8uAndOneOfThemIsSetTo0_133(); + ChipLogProgress( + chipTool, + " ***** Test Step 133 : Send Test Command With Nested Struct List Argument and all fields b of arg1.d are true\n"); + err = TestSendTestCommandWithNestedStructListArgumentAndAllFieldsBOfArg1dAreTrue_133(); break; case 134: - ChipLogProgress(chipTool, " ***** Test Step 134 : Send Test Command With List of INT8U and get it reversed\n"); - err = TestSendTestCommandWithListOfInt8uAndGetItReversed_134(); + ChipLogProgress(chipTool, + " ***** Test Step 134 : Send Test Command With Nested Struct List Argument and some fields b of arg1.d " + "are false\n"); + err = TestSendTestCommandWithNestedStructListArgumentAndSomeFieldsBOfArg1dAreFalse_134(); break; case 135: - ChipLogProgress(chipTool, - " ***** Test Step 135 : Send Test Command With empty List of INT8U and get an empty list back\n"); - err = TestSendTestCommandWithEmptyListOfInt8uAndGetAnEmptyListBack_135(); + ChipLogProgress(chipTool, " ***** Test Step 135 : Send Test Command With Struct Argument and see what we get back\n"); + err = TestSendTestCommandWithStructArgumentAndSeeWhatWeGetBack_135(); break; case 136: - ChipLogProgress( - chipTool, - " ***** Test Step 136 : Send Test Command With List of Struct Argument and arg1.b of first item is true\n"); - err = TestSendTestCommandWithListOfStructArgumentAndArg1bOfFirstItemIsTrue_136(); + ChipLogProgress(chipTool, " ***** Test Step 136 : Send Test Command With List of INT8U and none of them is set to 0\n"); + err = TestSendTestCommandWithListOfInt8uAndNoneOfThemIsSetTo0_136(); break; case 137: - ChipLogProgress( - chipTool, - " ***** Test Step 137 : Send Test Command With List of Struct Argument and arg1.b of first item is false\n"); - err = TestSendTestCommandWithListOfStructArgumentAndArg1bOfFirstItemIsFalse_137(); + ChipLogProgress(chipTool, " ***** Test Step 137 : Send Test Command With List of INT8U and one of them is set to 0\n"); + err = TestSendTestCommandWithListOfInt8uAndOneOfThemIsSetTo0_137(); break; case 138: - ChipLogProgress(chipTool, - " ***** Test Step 138 : Write attribute LIST With List of INT8U and none of them is set to 0\n"); - err = TestWriteAttributeListWithListOfInt8uAndNoneOfThemIsSetTo0_138(); + ChipLogProgress(chipTool, " ***** Test Step 138 : Send Test Command With List of INT8U and get it reversed\n"); + err = TestSendTestCommandWithListOfInt8uAndGetItReversed_138(); break; case 139: - ChipLogProgress(chipTool, " ***** Test Step 139 : Read attribute LIST With List of INT8U\n"); - err = TestReadAttributeListWithListOfInt8u_139(); + ChipLogProgress(chipTool, + " ***** Test Step 139 : Send Test Command With empty List of INT8U and get an empty list back\n"); + err = TestSendTestCommandWithEmptyListOfInt8uAndGetAnEmptyListBack_139(); break; case 140: - ChipLogProgress(chipTool, " ***** Test Step 140 : Write attribute LIST With List of OCTET_STRING\n"); - err = TestWriteAttributeListWithListOfOctetString_140(); + ChipLogProgress( + chipTool, + " ***** Test Step 140 : Send Test Command With List of Struct Argument and arg1.b of first item is true\n"); + err = TestSendTestCommandWithListOfStructArgumentAndArg1bOfFirstItemIsTrue_140(); break; case 141: - ChipLogProgress(chipTool, " ***** Test Step 141 : Read attribute LIST With List of OCTET_STRING\n"); - err = TestReadAttributeListWithListOfOctetString_141(); + ChipLogProgress( + chipTool, + " ***** Test Step 141 : Send Test Command With List of Struct Argument and arg1.b of first item is false\n"); + err = TestSendTestCommandWithListOfStructArgumentAndArg1bOfFirstItemIsFalse_141(); break; case 142: - ChipLogProgress(chipTool, " ***** Test Step 142 : Write attribute LIST With List of LIST_STRUCT_OCTET_STRING\n"); - err = TestWriteAttributeListWithListOfListStructOctetString_142(); + ChipLogProgress(chipTool, + " ***** Test Step 142 : Send Test Command With List of Nested Struct List Argument and all fields b of " + "elements of arg1.d are true\n"); + err = TestSendTestCommandWithListOfNestedStructListArgumentAndAllFieldsBOfElementsOfArg1dAreTrue_142(); break; case 143: - ChipLogProgress(chipTool, " ***** Test Step 143 : Read attribute LIST With List of LIST_STRUCT_OCTET_STRING\n"); - err = TestReadAttributeListWithListOfListStructOctetString_143(); + ChipLogProgress(chipTool, + " ***** Test Step 143 : Send Test Command With Nested Struct List Argument and some fields b of " + "elements of arg1.d are false\n"); + err = TestSendTestCommandWithNestedStructListArgumentAndSomeFieldsBOfElementsOfArg1dAreFalse_143(); break; case 144: - ChipLogProgress(chipTool, " ***** Test Step 144 : Send Test Command with optional arg set.\n"); - err = TestSendTestCommandWithOptionalArgSet_144(); + ChipLogProgress(chipTool, + " ***** Test Step 144 : Write attribute LIST With List of INT8U and none of them is set to 0\n"); + err = TestWriteAttributeListWithListOfInt8uAndNoneOfThemIsSetTo0_144(); break; case 145: - ChipLogProgress(chipTool, " ***** Test Step 145 : Send Test Command without its optional arg.\n"); - err = TestSendTestCommandWithoutItsOptionalArg_145(); + ChipLogProgress(chipTool, " ***** Test Step 145 : Read attribute LIST With List of INT8U\n"); + err = TestReadAttributeListWithListOfInt8u_145(); break; case 146: - ChipLogProgress(chipTool, " ***** Test Step 146 : Write attribute NULLABLE_BOOLEAN null\n"); - err = TestWriteAttributeNullableBooleanNull_146(); + ChipLogProgress(chipTool, " ***** Test Step 146 : Write attribute LIST With List of OCTET_STRING\n"); + err = TestWriteAttributeListWithListOfOctetString_146(); break; case 147: - ChipLogProgress(chipTool, " ***** Test Step 147 : Read attribute NULLABLE_BOOLEAN null\n"); - err = TestReadAttributeNullableBooleanNull_147(); + ChipLogProgress(chipTool, " ***** Test Step 147 : Read attribute LIST With List of OCTET_STRING\n"); + err = TestReadAttributeListWithListOfOctetString_147(); break; case 148: - ChipLogProgress(chipTool, " ***** Test Step 148 : Write attribute NULLABLE_BOOLEAN True\n"); - err = TestWriteAttributeNullableBooleanTrue_148(); + ChipLogProgress(chipTool, " ***** Test Step 148 : Write attribute LIST With List of LIST_STRUCT_OCTET_STRING\n"); + err = TestWriteAttributeListWithListOfListStructOctetString_148(); break; case 149: - ChipLogProgress(chipTool, " ***** Test Step 149 : Read attribute NULLABLE_BOOLEAN True\n"); - err = TestReadAttributeNullableBooleanTrue_149(); + ChipLogProgress(chipTool, " ***** Test Step 149 : Read attribute LIST With List of LIST_STRUCT_OCTET_STRING\n"); + err = TestReadAttributeListWithListOfListStructOctetString_149(); break; case 150: - ChipLogProgress(chipTool, " ***** Test Step 150 : Write attribute NULLABLE_BITMAP8 Max Value\n"); - err = TestWriteAttributeNullableBitmap8MaxValue_150(); + ChipLogProgress(chipTool, " ***** Test Step 150 : Send Test Command with optional arg set.\n"); + err = TestSendTestCommandWithOptionalArgSet_150(); break; case 151: - ChipLogProgress(chipTool, " ***** Test Step 151 : Read attribute NULLABLE_BITMAP8 Max Value\n"); - err = TestReadAttributeNullableBitmap8MaxValue_151(); + ChipLogProgress(chipTool, " ***** Test Step 151 : Send Test Command without its optional arg.\n"); + err = TestSendTestCommandWithoutItsOptionalArg_151(); break; case 152: - ChipLogProgress(chipTool, " ***** Test Step 152 : Write attribute NULLABLE_BITMAP8 Invalid Value\n"); - err = TestWriteAttributeNullableBitmap8InvalidValue_152(); + ChipLogProgress(chipTool, " ***** Test Step 152 : Write attribute NULLABLE_BOOLEAN null\n"); + err = TestWriteAttributeNullableBooleanNull_152(); break; case 153: - ChipLogProgress(chipTool, " ***** Test Step 153 : Read attribute NULLABLE_BITMAP8 unchanged Value\n"); - err = TestReadAttributeNullableBitmap8UnchangedValue_153(); + ChipLogProgress(chipTool, " ***** Test Step 153 : Read attribute NULLABLE_BOOLEAN null\n"); + err = TestReadAttributeNullableBooleanNull_153(); break; case 154: - ChipLogProgress(chipTool, " ***** Test Step 154 : Write attribute NULLABLE_BITMAP8 null Value\n"); - err = TestWriteAttributeNullableBitmap8NullValue_154(); + ChipLogProgress(chipTool, " ***** Test Step 154 : Write attribute NULLABLE_BOOLEAN True\n"); + err = TestWriteAttributeNullableBooleanTrue_154(); break; case 155: - ChipLogProgress(chipTool, " ***** Test Step 155 : Read attribute NULLABLE_BITMAP8 null Value\n"); - err = TestReadAttributeNullableBitmap8NullValue_155(); + ChipLogProgress(chipTool, " ***** Test Step 155 : Read attribute NULLABLE_BOOLEAN True\n"); + err = TestReadAttributeNullableBooleanTrue_155(); break; case 156: - ChipLogProgress(chipTool, " ***** Test Step 156 : Write attribute NULLABLE_BITMAP16 Max Value\n"); - err = TestWriteAttributeNullableBitmap16MaxValue_156(); + ChipLogProgress(chipTool, " ***** Test Step 156 : Write attribute NULLABLE_BITMAP8 Max Value\n"); + err = TestWriteAttributeNullableBitmap8MaxValue_156(); break; case 157: - ChipLogProgress(chipTool, " ***** Test Step 157 : Read attribute NULLABLE_BITMAP16 Max Value\n"); - err = TestReadAttributeNullableBitmap16MaxValue_157(); + ChipLogProgress(chipTool, " ***** Test Step 157 : Read attribute NULLABLE_BITMAP8 Max Value\n"); + err = TestReadAttributeNullableBitmap8MaxValue_157(); break; case 158: - ChipLogProgress(chipTool, " ***** Test Step 158 : Write attribute NULLABLE_BITMAP16 Invalid Value\n"); - err = TestWriteAttributeNullableBitmap16InvalidValue_158(); + ChipLogProgress(chipTool, " ***** Test Step 158 : Write attribute NULLABLE_BITMAP8 Invalid Value\n"); + err = TestWriteAttributeNullableBitmap8InvalidValue_158(); break; case 159: - ChipLogProgress(chipTool, " ***** Test Step 159 : Read attribute NULLABLE_BITMAP16 unchanged Value\n"); - err = TestReadAttributeNullableBitmap16UnchangedValue_159(); + ChipLogProgress(chipTool, " ***** Test Step 159 : Read attribute NULLABLE_BITMAP8 unchanged Value\n"); + err = TestReadAttributeNullableBitmap8UnchangedValue_159(); break; case 160: - ChipLogProgress(chipTool, " ***** Test Step 160 : Write attribute NULLABLE_BITMAP16 null Value\n"); - err = TestWriteAttributeNullableBitmap16NullValue_160(); + ChipLogProgress(chipTool, " ***** Test Step 160 : Write attribute NULLABLE_BITMAP8 null Value\n"); + err = TestWriteAttributeNullableBitmap8NullValue_160(); break; case 161: - ChipLogProgress(chipTool, " ***** Test Step 161 : Read attribute NULLABLE_BITMAP16 null Value\n"); - err = TestReadAttributeNullableBitmap16NullValue_161(); + ChipLogProgress(chipTool, " ***** Test Step 161 : Read attribute NULLABLE_BITMAP8 null Value\n"); + err = TestReadAttributeNullableBitmap8NullValue_161(); break; case 162: - ChipLogProgress(chipTool, " ***** Test Step 162 : Write attribute NULLABLE_BITMAP32 Max Value\n"); - err = TestWriteAttributeNullableBitmap32MaxValue_162(); + ChipLogProgress(chipTool, " ***** Test Step 162 : Write attribute NULLABLE_BITMAP16 Max Value\n"); + err = TestWriteAttributeNullableBitmap16MaxValue_162(); break; case 163: - ChipLogProgress(chipTool, " ***** Test Step 163 : Read attribute NULLABLE_BITMAP32 Max Value\n"); - err = TestReadAttributeNullableBitmap32MaxValue_163(); + ChipLogProgress(chipTool, " ***** Test Step 163 : Read attribute NULLABLE_BITMAP16 Max Value\n"); + err = TestReadAttributeNullableBitmap16MaxValue_163(); break; case 164: - ChipLogProgress(chipTool, " ***** Test Step 164 : Write attribute NULLABLE_BITMAP32 Invalid Value\n"); - err = TestWriteAttributeNullableBitmap32InvalidValue_164(); + ChipLogProgress(chipTool, " ***** Test Step 164 : Write attribute NULLABLE_BITMAP16 Invalid Value\n"); + err = TestWriteAttributeNullableBitmap16InvalidValue_164(); break; case 165: - ChipLogProgress(chipTool, " ***** Test Step 165 : Read attribute NULLABLE_BITMAP32 unchanged Value\n"); - err = TestReadAttributeNullableBitmap32UnchangedValue_165(); + ChipLogProgress(chipTool, " ***** Test Step 165 : Read attribute NULLABLE_BITMAP16 unchanged Value\n"); + err = TestReadAttributeNullableBitmap16UnchangedValue_165(); break; case 166: - ChipLogProgress(chipTool, " ***** Test Step 166 : Write attribute NULLABLE_BITMAP32 null Value\n"); - err = TestWriteAttributeNullableBitmap32NullValue_166(); + ChipLogProgress(chipTool, " ***** Test Step 166 : Write attribute NULLABLE_BITMAP16 null Value\n"); + err = TestWriteAttributeNullableBitmap16NullValue_166(); break; case 167: - ChipLogProgress(chipTool, " ***** Test Step 167 : Read attribute NULLABLE_BITMAP32 null Value\n"); - err = TestReadAttributeNullableBitmap32NullValue_167(); + ChipLogProgress(chipTool, " ***** Test Step 167 : Read attribute NULLABLE_BITMAP16 null Value\n"); + err = TestReadAttributeNullableBitmap16NullValue_167(); break; case 168: - ChipLogProgress(chipTool, " ***** Test Step 168 : Write attribute NULLABLE_BITMAP64 Max Value\n"); - err = TestWriteAttributeNullableBitmap64MaxValue_168(); + ChipLogProgress(chipTool, " ***** Test Step 168 : Write attribute NULLABLE_BITMAP32 Max Value\n"); + err = TestWriteAttributeNullableBitmap32MaxValue_168(); break; case 169: - ChipLogProgress(chipTool, " ***** Test Step 169 : Read attribute NULLABLE_BITMAP64 Max Value\n"); - err = TestReadAttributeNullableBitmap64MaxValue_169(); + ChipLogProgress(chipTool, " ***** Test Step 169 : Read attribute NULLABLE_BITMAP32 Max Value\n"); + err = TestReadAttributeNullableBitmap32MaxValue_169(); break; case 170: - ChipLogProgress(chipTool, " ***** Test Step 170 : Write attribute NULLABLE_BITMAP64 Invalid Value\n"); - err = TestWriteAttributeNullableBitmap64InvalidValue_170(); + ChipLogProgress(chipTool, " ***** Test Step 170 : Write attribute NULLABLE_BITMAP32 Invalid Value\n"); + err = TestWriteAttributeNullableBitmap32InvalidValue_170(); break; case 171: - ChipLogProgress(chipTool, " ***** Test Step 171 : Read attribute NULLABLE_BITMAP64 unchanged Value\n"); - err = TestReadAttributeNullableBitmap64UnchangedValue_171(); + ChipLogProgress(chipTool, " ***** Test Step 171 : Read attribute NULLABLE_BITMAP32 unchanged Value\n"); + err = TestReadAttributeNullableBitmap32UnchangedValue_171(); break; case 172: - ChipLogProgress(chipTool, " ***** Test Step 172 : Write attribute NULLABLE_BITMAP64 null Value\n"); - err = TestWriteAttributeNullableBitmap64NullValue_172(); + ChipLogProgress(chipTool, " ***** Test Step 172 : Write attribute NULLABLE_BITMAP32 null Value\n"); + err = TestWriteAttributeNullableBitmap32NullValue_172(); break; case 173: - ChipLogProgress(chipTool, " ***** Test Step 173 : Read attribute NULLABLE_BITMAP64 null Value\n"); - err = TestReadAttributeNullableBitmap64NullValue_173(); + ChipLogProgress(chipTool, " ***** Test Step 173 : Read attribute NULLABLE_BITMAP32 null Value\n"); + err = TestReadAttributeNullableBitmap32NullValue_173(); break; case 174: - ChipLogProgress(chipTool, " ***** Test Step 174 : Write attribute NULLABLE_INT8U Max Value\n"); - err = TestWriteAttributeNullableInt8uMaxValue_174(); + ChipLogProgress(chipTool, " ***** Test Step 174 : Write attribute NULLABLE_BITMAP64 Max Value\n"); + err = TestWriteAttributeNullableBitmap64MaxValue_174(); break; case 175: - ChipLogProgress(chipTool, " ***** Test Step 175 : Read attribute NULLABLE_INT8U Max Value\n"); - err = TestReadAttributeNullableInt8uMaxValue_175(); + ChipLogProgress(chipTool, " ***** Test Step 175 : Read attribute NULLABLE_BITMAP64 Max Value\n"); + err = TestReadAttributeNullableBitmap64MaxValue_175(); break; case 176: - ChipLogProgress(chipTool, " ***** Test Step 176 : Write attribute NULLABLE_INT8U Invalid Value\n"); - err = TestWriteAttributeNullableInt8uInvalidValue_176(); + ChipLogProgress(chipTool, " ***** Test Step 176 : Write attribute NULLABLE_BITMAP64 Invalid Value\n"); + err = TestWriteAttributeNullableBitmap64InvalidValue_176(); break; case 177: - ChipLogProgress(chipTool, " ***** Test Step 177 : Read attribute NULLABLE_INT8U unchanged Value\n"); - err = TestReadAttributeNullableInt8uUnchangedValue_177(); + ChipLogProgress(chipTool, " ***** Test Step 177 : Read attribute NULLABLE_BITMAP64 unchanged Value\n"); + err = TestReadAttributeNullableBitmap64UnchangedValue_177(); break; case 178: - ChipLogProgress(chipTool, " ***** Test Step 178 : Write attribute NULLABLE_INT8U null Value\n"); - err = TestWriteAttributeNullableInt8uNullValue_178(); + ChipLogProgress(chipTool, " ***** Test Step 178 : Write attribute NULLABLE_BITMAP64 null Value\n"); + err = TestWriteAttributeNullableBitmap64NullValue_178(); break; case 179: - ChipLogProgress(chipTool, " ***** Test Step 179 : Read attribute NULLABLE_INT8U null Value\n"); - err = TestReadAttributeNullableInt8uNullValue_179(); + ChipLogProgress(chipTool, " ***** Test Step 179 : Read attribute NULLABLE_BITMAP64 null Value\n"); + err = TestReadAttributeNullableBitmap64NullValue_179(); break; case 180: - ChipLogProgress(chipTool, " ***** Test Step 180 : Write attribute NULLABLE_INT16U Max Value\n"); - err = TestWriteAttributeNullableInt16uMaxValue_180(); + ChipLogProgress(chipTool, " ***** Test Step 180 : Write attribute NULLABLE_INT8U Max Value\n"); + err = TestWriteAttributeNullableInt8uMaxValue_180(); break; case 181: - ChipLogProgress(chipTool, " ***** Test Step 181 : Read attribute NULLABLE_INT16U Max Value\n"); - err = TestReadAttributeNullableInt16uMaxValue_181(); + ChipLogProgress(chipTool, " ***** Test Step 181 : Read attribute NULLABLE_INT8U Max Value\n"); + err = TestReadAttributeNullableInt8uMaxValue_181(); break; case 182: - ChipLogProgress(chipTool, " ***** Test Step 182 : Write attribute NULLABLE_INT16U Invalid Value\n"); - err = TestWriteAttributeNullableInt16uInvalidValue_182(); + ChipLogProgress(chipTool, " ***** Test Step 182 : Write attribute NULLABLE_INT8U Invalid Value\n"); + err = TestWriteAttributeNullableInt8uInvalidValue_182(); break; case 183: - ChipLogProgress(chipTool, " ***** Test Step 183 : Read attribute NULLABLE_INT16U unchanged Value\n"); - err = TestReadAttributeNullableInt16uUnchangedValue_183(); + ChipLogProgress(chipTool, " ***** Test Step 183 : Read attribute NULLABLE_INT8U unchanged Value\n"); + err = TestReadAttributeNullableInt8uUnchangedValue_183(); break; case 184: - ChipLogProgress(chipTool, " ***** Test Step 184 : Write attribute NULLABLE_INT16U null Value\n"); - err = TestWriteAttributeNullableInt16uNullValue_184(); + ChipLogProgress(chipTool, " ***** Test Step 184 : Write attribute NULLABLE_INT8U null Value\n"); + err = TestWriteAttributeNullableInt8uNullValue_184(); break; case 185: - ChipLogProgress(chipTool, " ***** Test Step 185 : Read attribute NULLABLE_INT16U null Value\n"); - err = TestReadAttributeNullableInt16uNullValue_185(); + ChipLogProgress(chipTool, " ***** Test Step 185 : Read attribute NULLABLE_INT8U null Value\n"); + err = TestReadAttributeNullableInt8uNullValue_185(); break; case 186: - ChipLogProgress(chipTool, " ***** Test Step 186 : Write attribute NULLABLE_INT32U Max Value\n"); - err = TestWriteAttributeNullableInt32uMaxValue_186(); + ChipLogProgress(chipTool, " ***** Test Step 186 : Write attribute NULLABLE_INT16U Max Value\n"); + err = TestWriteAttributeNullableInt16uMaxValue_186(); break; case 187: - ChipLogProgress(chipTool, " ***** Test Step 187 : Read attribute NULLABLE_INT32U Max Value\n"); - err = TestReadAttributeNullableInt32uMaxValue_187(); + ChipLogProgress(chipTool, " ***** Test Step 187 : Read attribute NULLABLE_INT16U Max Value\n"); + err = TestReadAttributeNullableInt16uMaxValue_187(); break; case 188: - ChipLogProgress(chipTool, " ***** Test Step 188 : Write attribute NULLABLE_INT32U Invalid Value\n"); - err = TestWriteAttributeNullableInt32uInvalidValue_188(); + ChipLogProgress(chipTool, " ***** Test Step 188 : Write attribute NULLABLE_INT16U Invalid Value\n"); + err = TestWriteAttributeNullableInt16uInvalidValue_188(); break; case 189: - ChipLogProgress(chipTool, " ***** Test Step 189 : Read attribute NULLABLE_INT32U unchanged Value\n"); - err = TestReadAttributeNullableInt32uUnchangedValue_189(); + ChipLogProgress(chipTool, " ***** Test Step 189 : Read attribute NULLABLE_INT16U unchanged Value\n"); + err = TestReadAttributeNullableInt16uUnchangedValue_189(); break; case 190: - ChipLogProgress(chipTool, " ***** Test Step 190 : Write attribute NULLABLE_INT32U null Value\n"); - err = TestWriteAttributeNullableInt32uNullValue_190(); + ChipLogProgress(chipTool, " ***** Test Step 190 : Write attribute NULLABLE_INT16U null Value\n"); + err = TestWriteAttributeNullableInt16uNullValue_190(); break; case 191: - ChipLogProgress(chipTool, " ***** Test Step 191 : Read attribute NULLABLE_INT32U null Value\n"); - err = TestReadAttributeNullableInt32uNullValue_191(); + ChipLogProgress(chipTool, " ***** Test Step 191 : Read attribute NULLABLE_INT16U null Value\n"); + err = TestReadAttributeNullableInt16uNullValue_191(); break; case 192: - ChipLogProgress(chipTool, " ***** Test Step 192 : Write attribute NULLABLE_INT64U Max Value\n"); - err = TestWriteAttributeNullableInt64uMaxValue_192(); + ChipLogProgress(chipTool, " ***** Test Step 192 : Write attribute NULLABLE_INT32U Max Value\n"); + err = TestWriteAttributeNullableInt32uMaxValue_192(); break; case 193: - ChipLogProgress(chipTool, " ***** Test Step 193 : Read attribute NULLABLE_INT64U Max Value\n"); - err = TestReadAttributeNullableInt64uMaxValue_193(); + ChipLogProgress(chipTool, " ***** Test Step 193 : Read attribute NULLABLE_INT32U Max Value\n"); + err = TestReadAttributeNullableInt32uMaxValue_193(); break; case 194: - ChipLogProgress(chipTool, " ***** Test Step 194 : Write attribute NULLABLE_INT64U Invalid Value\n"); - err = TestWriteAttributeNullableInt64uInvalidValue_194(); + ChipLogProgress(chipTool, " ***** Test Step 194 : Write attribute NULLABLE_INT32U Invalid Value\n"); + err = TestWriteAttributeNullableInt32uInvalidValue_194(); break; case 195: - ChipLogProgress(chipTool, " ***** Test Step 195 : Read attribute NULLABLE_INT64U unchanged Value\n"); - err = TestReadAttributeNullableInt64uUnchangedValue_195(); + ChipLogProgress(chipTool, " ***** Test Step 195 : Read attribute NULLABLE_INT32U unchanged Value\n"); + err = TestReadAttributeNullableInt32uUnchangedValue_195(); break; case 196: - ChipLogProgress(chipTool, " ***** Test Step 196 : Write attribute NULLABLE_INT64U null Value\n"); - err = TestWriteAttributeNullableInt64uNullValue_196(); + ChipLogProgress(chipTool, " ***** Test Step 196 : Write attribute NULLABLE_INT32U null Value\n"); + err = TestWriteAttributeNullableInt32uNullValue_196(); break; case 197: - ChipLogProgress(chipTool, " ***** Test Step 197 : Read attribute NULLABLE_INT64U null Value\n"); - err = TestReadAttributeNullableInt64uNullValue_197(); + ChipLogProgress(chipTool, " ***** Test Step 197 : Read attribute NULLABLE_INT32U null Value\n"); + err = TestReadAttributeNullableInt32uNullValue_197(); break; case 198: - ChipLogProgress(chipTool, " ***** Test Step 198 : Write attribute NULLABLE_INT8S Min Value\n"); - err = TestWriteAttributeNullableInt8sMinValue_198(); + ChipLogProgress(chipTool, " ***** Test Step 198 : Write attribute NULLABLE_INT64U Max Value\n"); + err = TestWriteAttributeNullableInt64uMaxValue_198(); break; case 199: - ChipLogProgress(chipTool, " ***** Test Step 199 : Read attribute NULLABLE_INT8S Min Value\n"); - err = TestReadAttributeNullableInt8sMinValue_199(); + ChipLogProgress(chipTool, " ***** Test Step 199 : Read attribute NULLABLE_INT64U Max Value\n"); + err = TestReadAttributeNullableInt64uMaxValue_199(); break; case 200: - ChipLogProgress(chipTool, " ***** Test Step 200 : Write attribute NULLABLE_INT8S Invalid Value\n"); - err = TestWriteAttributeNullableInt8sInvalidValue_200(); + ChipLogProgress(chipTool, " ***** Test Step 200 : Write attribute NULLABLE_INT64U Invalid Value\n"); + err = TestWriteAttributeNullableInt64uInvalidValue_200(); break; case 201: - ChipLogProgress(chipTool, " ***** Test Step 201 : Read attribute NULLABLE_INT8S unchanged Value\n"); - err = TestReadAttributeNullableInt8sUnchangedValue_201(); + ChipLogProgress(chipTool, " ***** Test Step 201 : Read attribute NULLABLE_INT64U unchanged Value\n"); + err = TestReadAttributeNullableInt64uUnchangedValue_201(); break; case 202: - ChipLogProgress(chipTool, " ***** Test Step 202 : Write attribute NULLABLE_INT8S null Value\n"); - err = TestWriteAttributeNullableInt8sNullValue_202(); + ChipLogProgress(chipTool, " ***** Test Step 202 : Write attribute NULLABLE_INT64U null Value\n"); + err = TestWriteAttributeNullableInt64uNullValue_202(); break; case 203: - ChipLogProgress(chipTool, " ***** Test Step 203 : Read attribute NULLABLE_INT8S null Value\n"); - err = TestReadAttributeNullableInt8sNullValue_203(); + ChipLogProgress(chipTool, " ***** Test Step 203 : Read attribute NULLABLE_INT64U null Value\n"); + err = TestReadAttributeNullableInt64uNullValue_203(); break; case 204: - ChipLogProgress(chipTool, " ***** Test Step 204 : Write attribute NULLABLE_INT16S Min Value\n"); - err = TestWriteAttributeNullableInt16sMinValue_204(); + ChipLogProgress(chipTool, " ***** Test Step 204 : Write attribute NULLABLE_INT8S Min Value\n"); + err = TestWriteAttributeNullableInt8sMinValue_204(); break; case 205: - ChipLogProgress(chipTool, " ***** Test Step 205 : Read attribute NULLABLE_INT16S Min Value\n"); - err = TestReadAttributeNullableInt16sMinValue_205(); + ChipLogProgress(chipTool, " ***** Test Step 205 : Read attribute NULLABLE_INT8S Min Value\n"); + err = TestReadAttributeNullableInt8sMinValue_205(); break; case 206: - ChipLogProgress(chipTool, " ***** Test Step 206 : Write attribute NULLABLE_INT16S Invalid Value\n"); - err = TestWriteAttributeNullableInt16sInvalidValue_206(); + ChipLogProgress(chipTool, " ***** Test Step 206 : Write attribute NULLABLE_INT8S Invalid Value\n"); + err = TestWriteAttributeNullableInt8sInvalidValue_206(); break; case 207: - ChipLogProgress(chipTool, " ***** Test Step 207 : Read attribute NULLABLE_INT16S unchanged Value\n"); - err = TestReadAttributeNullableInt16sUnchangedValue_207(); + ChipLogProgress(chipTool, " ***** Test Step 207 : Read attribute NULLABLE_INT8S unchanged Value\n"); + err = TestReadAttributeNullableInt8sUnchangedValue_207(); break; case 208: - ChipLogProgress(chipTool, " ***** Test Step 208 : Write attribute NULLABLE_INT16S null Value\n"); - err = TestWriteAttributeNullableInt16sNullValue_208(); + ChipLogProgress(chipTool, " ***** Test Step 208 : Write attribute NULLABLE_INT8S null Value\n"); + err = TestWriteAttributeNullableInt8sNullValue_208(); break; case 209: - ChipLogProgress(chipTool, " ***** Test Step 209 : Read attribute NULLABLE_INT16S null Value\n"); - err = TestReadAttributeNullableInt16sNullValue_209(); + ChipLogProgress(chipTool, " ***** Test Step 209 : Read attribute NULLABLE_INT8S null Value\n"); + err = TestReadAttributeNullableInt8sNullValue_209(); break; case 210: - ChipLogProgress(chipTool, " ***** Test Step 210 : Write attribute NULLABLE_INT32S Min Value\n"); - err = TestWriteAttributeNullableInt32sMinValue_210(); + ChipLogProgress(chipTool, " ***** Test Step 210 : Write attribute NULLABLE_INT16S Min Value\n"); + err = TestWriteAttributeNullableInt16sMinValue_210(); break; case 211: - ChipLogProgress(chipTool, " ***** Test Step 211 : Read attribute NULLABLE_INT32S Min Value\n"); - err = TestReadAttributeNullableInt32sMinValue_211(); + ChipLogProgress(chipTool, " ***** Test Step 211 : Read attribute NULLABLE_INT16S Min Value\n"); + err = TestReadAttributeNullableInt16sMinValue_211(); break; case 212: - ChipLogProgress(chipTool, " ***** Test Step 212 : Write attribute NULLABLE_INT32S Invalid Value\n"); - err = TestWriteAttributeNullableInt32sInvalidValue_212(); + ChipLogProgress(chipTool, " ***** Test Step 212 : Write attribute NULLABLE_INT16S Invalid Value\n"); + err = TestWriteAttributeNullableInt16sInvalidValue_212(); break; case 213: - ChipLogProgress(chipTool, " ***** Test Step 213 : Read attribute NULLABLE_INT32S unchanged Value\n"); - err = TestReadAttributeNullableInt32sUnchangedValue_213(); + ChipLogProgress(chipTool, " ***** Test Step 213 : Read attribute NULLABLE_INT16S unchanged Value\n"); + err = TestReadAttributeNullableInt16sUnchangedValue_213(); break; case 214: - ChipLogProgress(chipTool, " ***** Test Step 214 : Write attribute NULLABLE_INT32S null Value\n"); - err = TestWriteAttributeNullableInt32sNullValue_214(); + ChipLogProgress(chipTool, " ***** Test Step 214 : Write attribute NULLABLE_INT16S null Value\n"); + err = TestWriteAttributeNullableInt16sNullValue_214(); break; case 215: - ChipLogProgress(chipTool, " ***** Test Step 215 : Read attribute NULLABLE_INT32S null Value\n"); - err = TestReadAttributeNullableInt32sNullValue_215(); + ChipLogProgress(chipTool, " ***** Test Step 215 : Read attribute NULLABLE_INT16S null Value\n"); + err = TestReadAttributeNullableInt16sNullValue_215(); break; case 216: - ChipLogProgress(chipTool, " ***** Test Step 216 : Write attribute NULLABLE_INT64S Min Value\n"); - err = TestWriteAttributeNullableInt64sMinValue_216(); + ChipLogProgress(chipTool, " ***** Test Step 216 : Write attribute NULLABLE_INT32S Min Value\n"); + err = TestWriteAttributeNullableInt32sMinValue_216(); break; case 217: - ChipLogProgress(chipTool, " ***** Test Step 217 : Read attribute NULLABLE_INT64S Min Value\n"); - err = TestReadAttributeNullableInt64sMinValue_217(); + ChipLogProgress(chipTool, " ***** Test Step 217 : Read attribute NULLABLE_INT32S Min Value\n"); + err = TestReadAttributeNullableInt32sMinValue_217(); break; case 218: - ChipLogProgress(chipTool, " ***** Test Step 218 : Write attribute NULLABLE_INT64S Invalid Value\n"); - err = TestWriteAttributeNullableInt64sInvalidValue_218(); + ChipLogProgress(chipTool, " ***** Test Step 218 : Write attribute NULLABLE_INT32S Invalid Value\n"); + err = TestWriteAttributeNullableInt32sInvalidValue_218(); break; case 219: - ChipLogProgress(chipTool, " ***** Test Step 219 : Read attribute NULLABLE_INT64S unchanged Value\n"); - err = TestReadAttributeNullableInt64sUnchangedValue_219(); + ChipLogProgress(chipTool, " ***** Test Step 219 : Read attribute NULLABLE_INT32S unchanged Value\n"); + err = TestReadAttributeNullableInt32sUnchangedValue_219(); break; case 220: - ChipLogProgress(chipTool, " ***** Test Step 220 : Write attribute NULLABLE_INT64S null Value\n"); - err = TestWriteAttributeNullableInt64sNullValue_220(); + ChipLogProgress(chipTool, " ***** Test Step 220 : Write attribute NULLABLE_INT32S null Value\n"); + err = TestWriteAttributeNullableInt32sNullValue_220(); break; case 221: - ChipLogProgress(chipTool, " ***** Test Step 221 : Read attribute NULLABLE_INT64S null Value\n"); - err = TestReadAttributeNullableInt64sNullValue_221(); + ChipLogProgress(chipTool, " ***** Test Step 221 : Read attribute NULLABLE_INT32S null Value\n"); + err = TestReadAttributeNullableInt32sNullValue_221(); break; case 222: - ChipLogProgress(chipTool, " ***** Test Step 222 : Write attribute NULLABLE_ENUM8 Max Value\n"); - err = TestWriteAttributeNullableEnum8MaxValue_222(); + ChipLogProgress(chipTool, " ***** Test Step 222 : Write attribute NULLABLE_INT64S Min Value\n"); + err = TestWriteAttributeNullableInt64sMinValue_222(); break; case 223: - ChipLogProgress(chipTool, " ***** Test Step 223 : Read attribute NULLABLE_ENUM8 Max Value\n"); - err = TestReadAttributeNullableEnum8MaxValue_223(); + ChipLogProgress(chipTool, " ***** Test Step 223 : Read attribute NULLABLE_INT64S Min Value\n"); + err = TestReadAttributeNullableInt64sMinValue_223(); break; case 224: - ChipLogProgress(chipTool, " ***** Test Step 224 : Write attribute NULLABLE_ENUM8 Invalid Value\n"); - err = TestWriteAttributeNullableEnum8InvalidValue_224(); + ChipLogProgress(chipTool, " ***** Test Step 224 : Write attribute NULLABLE_INT64S Invalid Value\n"); + err = TestWriteAttributeNullableInt64sInvalidValue_224(); break; case 225: - ChipLogProgress(chipTool, " ***** Test Step 225 : Read attribute NULLABLE_ENUM8 unchanged Value\n"); - err = TestReadAttributeNullableEnum8UnchangedValue_225(); + ChipLogProgress(chipTool, " ***** Test Step 225 : Read attribute NULLABLE_INT64S unchanged Value\n"); + err = TestReadAttributeNullableInt64sUnchangedValue_225(); break; case 226: - ChipLogProgress(chipTool, " ***** Test Step 226 : Write attribute NULLABLE_ENUM8 null Value\n"); - err = TestWriteAttributeNullableEnum8NullValue_226(); + ChipLogProgress(chipTool, " ***** Test Step 226 : Write attribute NULLABLE_INT64S null Value\n"); + err = TestWriteAttributeNullableInt64sNullValue_226(); break; case 227: - ChipLogProgress(chipTool, " ***** Test Step 227 : Read attribute NULLABLE_ENUM8 null Value\n"); - err = TestReadAttributeNullableEnum8NullValue_227(); + ChipLogProgress(chipTool, " ***** Test Step 227 : Read attribute NULLABLE_INT64S null Value\n"); + err = TestReadAttributeNullableInt64sNullValue_227(); break; case 228: - ChipLogProgress(chipTool, " ***** Test Step 228 : Write attribute NULLABLE_ENUM16 Max Value\n"); - err = TestWriteAttributeNullableEnum16MaxValue_228(); + ChipLogProgress(chipTool, " ***** Test Step 228 : Write attribute NULLABLE_ENUM8 Max Value\n"); + err = TestWriteAttributeNullableEnum8MaxValue_228(); break; case 229: - ChipLogProgress(chipTool, " ***** Test Step 229 : Read attribute NULLABLE_ENUM16 Max Value\n"); - err = TestReadAttributeNullableEnum16MaxValue_229(); + ChipLogProgress(chipTool, " ***** Test Step 229 : Read attribute NULLABLE_ENUM8 Max Value\n"); + err = TestReadAttributeNullableEnum8MaxValue_229(); break; case 230: - ChipLogProgress(chipTool, " ***** Test Step 230 : Write attribute NULLABLE_ENUM16 Invalid Value\n"); - err = TestWriteAttributeNullableEnum16InvalidValue_230(); + ChipLogProgress(chipTool, " ***** Test Step 230 : Write attribute NULLABLE_ENUM8 Invalid Value\n"); + err = TestWriteAttributeNullableEnum8InvalidValue_230(); break; case 231: - ChipLogProgress(chipTool, " ***** Test Step 231 : Read attribute NULLABLE_ENUM16 unchanged Value\n"); - err = TestReadAttributeNullableEnum16UnchangedValue_231(); + ChipLogProgress(chipTool, " ***** Test Step 231 : Read attribute NULLABLE_ENUM8 unchanged Value\n"); + err = TestReadAttributeNullableEnum8UnchangedValue_231(); break; case 232: - ChipLogProgress(chipTool, " ***** Test Step 232 : Write attribute NULLABLE_ENUM16 null Value\n"); - err = TestWriteAttributeNullableEnum16NullValue_232(); + ChipLogProgress(chipTool, " ***** Test Step 232 : Write attribute NULLABLE_ENUM8 null Value\n"); + err = TestWriteAttributeNullableEnum8NullValue_232(); break; case 233: - ChipLogProgress(chipTool, " ***** Test Step 233 : Read attribute NULLABLE_ENUM16 null Value\n"); - err = TestReadAttributeNullableEnum16NullValue_233(); + ChipLogProgress(chipTool, " ***** Test Step 233 : Read attribute NULLABLE_ENUM8 null Value\n"); + err = TestReadAttributeNullableEnum8NullValue_233(); break; case 234: - ChipLogProgress(chipTool, " ***** Test Step 234 : Read attribute NULLABLE_OCTET_STRING Default Value\n"); - err = TestReadAttributeNullableOctetStringDefaultValue_234(); + ChipLogProgress(chipTool, " ***** Test Step 234 : Write attribute NULLABLE_ENUM16 Max Value\n"); + err = TestWriteAttributeNullableEnum16MaxValue_234(); break; case 235: - ChipLogProgress(chipTool, " ***** Test Step 235 : Write attribute NULLABLE_OCTET_STRING\n"); - err = TestWriteAttributeNullableOctetString_235(); + ChipLogProgress(chipTool, " ***** Test Step 235 : Read attribute NULLABLE_ENUM16 Max Value\n"); + err = TestReadAttributeNullableEnum16MaxValue_235(); break; case 236: - ChipLogProgress(chipTool, " ***** Test Step 236 : Read attribute NULLABLE_OCTET_STRING\n"); - err = TestReadAttributeNullableOctetString_236(); + ChipLogProgress(chipTool, " ***** Test Step 236 : Write attribute NULLABLE_ENUM16 Invalid Value\n"); + err = TestWriteAttributeNullableEnum16InvalidValue_236(); break; case 237: - ChipLogProgress(chipTool, " ***** Test Step 237 : Write attribute NULLABLE_OCTET_STRING\n"); - err = TestWriteAttributeNullableOctetString_237(); + ChipLogProgress(chipTool, " ***** Test Step 237 : Read attribute NULLABLE_ENUM16 unchanged Value\n"); + err = TestReadAttributeNullableEnum16UnchangedValue_237(); break; case 238: - ChipLogProgress(chipTool, " ***** Test Step 238 : Read attribute NULLABLE_OCTET_STRING\n"); - err = TestReadAttributeNullableOctetString_238(); + ChipLogProgress(chipTool, " ***** Test Step 238 : Write attribute NULLABLE_ENUM16 null Value\n"); + err = TestWriteAttributeNullableEnum16NullValue_238(); break; case 239: - ChipLogProgress(chipTool, " ***** Test Step 239 : Write attribute NULLABLE_OCTET_STRING\n"); - err = TestWriteAttributeNullableOctetString_239(); + ChipLogProgress(chipTool, " ***** Test Step 239 : Read attribute NULLABLE_ENUM16 null Value\n"); + err = TestReadAttributeNullableEnum16NullValue_239(); break; case 240: - ChipLogProgress(chipTool, " ***** Test Step 240 : Read attribute NULLABLE_OCTET_STRING\n"); - err = TestReadAttributeNullableOctetString_240(); + ChipLogProgress(chipTool, " ***** Test Step 240 : Read attribute NULLABLE_OCTET_STRING Default Value\n"); + err = TestReadAttributeNullableOctetStringDefaultValue_240(); break; case 241: - ChipLogProgress(chipTool, " ***** Test Step 241 : Read attribute NULLABLE_CHAR_STRING Default Value\n"); - err = TestReadAttributeNullableCharStringDefaultValue_241(); + ChipLogProgress(chipTool, " ***** Test Step 241 : Write attribute NULLABLE_OCTET_STRING\n"); + err = TestWriteAttributeNullableOctetString_241(); break; case 242: - ChipLogProgress(chipTool, " ***** Test Step 242 : Write attribute NULLABLE_CHAR_STRING\n"); - err = TestWriteAttributeNullableCharString_242(); + ChipLogProgress(chipTool, " ***** Test Step 242 : Read attribute NULLABLE_OCTET_STRING\n"); + err = TestReadAttributeNullableOctetString_242(); break; case 243: - ChipLogProgress(chipTool, " ***** Test Step 243 : Write attribute NULLABLE_CHAR_STRING - Value too long\n"); - err = TestWriteAttributeNullableCharStringValueTooLong_243(); + ChipLogProgress(chipTool, " ***** Test Step 243 : Write attribute NULLABLE_OCTET_STRING\n"); + err = TestWriteAttributeNullableOctetString_243(); break; case 244: - ChipLogProgress(chipTool, " ***** Test Step 244 : Read attribute NULLABLE_CHAR_STRING\n"); - err = TestReadAttributeNullableCharString_244(); + ChipLogProgress(chipTool, " ***** Test Step 244 : Read attribute NULLABLE_OCTET_STRING\n"); + err = TestReadAttributeNullableOctetString_244(); break; case 245: - ChipLogProgress(chipTool, " ***** Test Step 245 : Write attribute NULLABLE_CHAR_STRING - Empty\n"); - err = TestWriteAttributeNullableCharStringEmpty_245(); + ChipLogProgress(chipTool, " ***** Test Step 245 : Write attribute NULLABLE_OCTET_STRING\n"); + err = TestWriteAttributeNullableOctetString_245(); break; case 246: - ChipLogProgress(chipTool, " ***** Test Step 246 : Read attribute NULLABLE_CHAR_STRING\n"); - err = TestReadAttributeNullableCharString_246(); + ChipLogProgress(chipTool, " ***** Test Step 246 : Read attribute NULLABLE_OCTET_STRING\n"); + err = TestReadAttributeNullableOctetString_246(); break; case 247: - ChipLogProgress(chipTool, " ***** Test Step 247 : Read attribute from nonexistent endpoint.\n"); - err = TestReadAttributeFromNonexistentEndpoint_247(); + ChipLogProgress(chipTool, " ***** Test Step 247 : Read attribute NULLABLE_CHAR_STRING Default Value\n"); + err = TestReadAttributeNullableCharStringDefaultValue_247(); break; case 248: - ChipLogProgress(chipTool, " ***** Test Step 248 : Read attribute from nonexistent cluster.\n"); - err = TestReadAttributeFromNonexistentCluster_248(); + ChipLogProgress(chipTool, " ***** Test Step 248 : Write attribute NULLABLE_CHAR_STRING\n"); + err = TestWriteAttributeNullableCharString_248(); + break; + case 249: + ChipLogProgress(chipTool, " ***** Test Step 249 : Read attribute NULLABLE_CHAR_STRING\n"); + err = TestReadAttributeNullableCharString_249(); + break; + case 250: + ChipLogProgress(chipTool, " ***** Test Step 250 : Write attribute NULLABLE_CHAR_STRING - Value too long\n"); + err = TestWriteAttributeNullableCharStringValueTooLong_250(); + break; + case 251: + ChipLogProgress(chipTool, " ***** Test Step 251 : Read attribute NULLABLE_CHAR_STRING\n"); + err = TestReadAttributeNullableCharString_251(); + break; + case 252: + ChipLogProgress(chipTool, " ***** Test Step 252 : Write attribute NULLABLE_CHAR_STRING - Empty\n"); + err = TestWriteAttributeNullableCharStringEmpty_252(); + break; + case 253: + ChipLogProgress(chipTool, " ***** Test Step 253 : Read attribute NULLABLE_CHAR_STRING\n"); + err = TestReadAttributeNullableCharString_253(); + break; + case 254: + ChipLogProgress(chipTool, " ***** Test Step 254 : Read attribute from nonexistent endpoint.\n"); + err = TestReadAttributeFromNonexistentEndpoint_254(); + break; + case 255: + ChipLogProgress(chipTool, " ***** Test Step 255 : Read attribute from nonexistent cluster.\n"); + err = TestReadAttributeFromNonexistentCluster_255(); break; } @@ -32177,7 +32214,7 @@ class TestCluster : public TestCommand private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 249; + const uint16_t mTestCount = 256; static void OnFailureCallback_5(void * context, EmberAfStatus status) { @@ -33233,58 +33270,21 @@ class TestCluster : public TestCommand static void OnSuccessCallback_127(void * context) { (static_cast(context))->OnSuccessResponse_127(); } - static void OnFailureCallback_138(void * context, EmberAfStatus status) - { - (static_cast(context))->OnFailureResponse_138(chip::to_underlying(status)); - } - - static void OnSuccessCallback_138(void * context) { (static_cast(context))->OnSuccessResponse_138(); } - - static void OnFailureCallback_139(void * context, EmberAfStatus status) - { - (static_cast(context))->OnFailureResponse_139(chip::to_underlying(status)); - } - - static void OnSuccessCallback_139(void * context, const chip::app::DataModel::DecodableList & listInt8u) - { - (static_cast(context))->OnSuccessResponse_139(listInt8u); - } - - static void OnFailureCallback_140(void * context, EmberAfStatus status) - { - (static_cast(context))->OnFailureResponse_140(chip::to_underlying(status)); - } - - static void OnSuccessCallback_140(void * context) { (static_cast(context))->OnSuccessResponse_140(); } - - static void OnFailureCallback_141(void * context, EmberAfStatus status) - { - (static_cast(context))->OnFailureResponse_141(chip::to_underlying(status)); - } - - static void OnSuccessCallback_141(void * context, const chip::app::DataModel::DecodableList & listOctetString) - { - (static_cast(context))->OnSuccessResponse_141(listOctetString); - } - - static void OnFailureCallback_142(void * context, EmberAfStatus status) + static void OnFailureCallback_144(void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_142(chip::to_underlying(status)); + (static_cast(context))->OnFailureResponse_144(chip::to_underlying(status)); } - static void OnSuccessCallback_142(void * context) { (static_cast(context))->OnSuccessResponse_142(); } + static void OnSuccessCallback_144(void * context) { (static_cast(context))->OnSuccessResponse_144(); } - static void OnFailureCallback_143(void * context, EmberAfStatus status) + static void OnFailureCallback_145(void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_143(chip::to_underlying(status)); + (static_cast(context))->OnFailureResponse_145(chip::to_underlying(status)); } - static void OnSuccessCallback_143( - void * context, - const chip::app::DataModel::DecodableList & - listStructOctetString) + static void OnSuccessCallback_145(void * context, const chip::app::DataModel::DecodableList & listInt8u) { - (static_cast(context))->OnSuccessResponse_143(listStructOctetString); + (static_cast(context))->OnSuccessResponse_145(listInt8u); } static void OnFailureCallback_146(void * context, EmberAfStatus status) @@ -33299,9 +33299,9 @@ class TestCluster : public TestCommand (static_cast(context))->OnFailureResponse_147(chip::to_underlying(status)); } - static void OnSuccessCallback_147(void * context, const chip::app::DataModel::Nullable & nullableBoolean) + static void OnSuccessCallback_147(void * context, const chip::app::DataModel::DecodableList & listOctetString) { - (static_cast(context))->OnSuccessResponse_147(nullableBoolean); + (static_cast(context))->OnSuccessResponse_147(listOctetString); } static void OnFailureCallback_148(void * context, EmberAfStatus status) @@ -33316,26 +33316,12 @@ class TestCluster : public TestCommand (static_cast(context))->OnFailureResponse_149(chip::to_underlying(status)); } - static void OnSuccessCallback_149(void * context, const chip::app::DataModel::Nullable & nullableBoolean) - { - (static_cast(context))->OnSuccessResponse_149(nullableBoolean); - } - - static void OnFailureCallback_150(void * context, EmberAfStatus status) - { - (static_cast(context))->OnFailureResponse_150(chip::to_underlying(status)); - } - - static void OnSuccessCallback_150(void * context) { (static_cast(context))->OnSuccessResponse_150(); } - - static void OnFailureCallback_151(void * context, EmberAfStatus status) - { - (static_cast(context))->OnFailureResponse_151(chip::to_underlying(status)); - } - - static void OnSuccessCallback_151(void * context, const chip::app::DataModel::Nullable & nullableBitmap8) + static void OnSuccessCallback_149( + void * context, + const chip::app::DataModel::DecodableList & + listStructOctetString) { - (static_cast(context))->OnSuccessResponse_151(nullableBitmap8); + (static_cast(context))->OnSuccessResponse_149(listStructOctetString); } static void OnFailureCallback_152(void * context, EmberAfStatus status) @@ -33350,9 +33336,9 @@ class TestCluster : public TestCommand (static_cast(context))->OnFailureResponse_153(chip::to_underlying(status)); } - static void OnSuccessCallback_153(void * context, const chip::app::DataModel::Nullable & nullableBitmap8) + static void OnSuccessCallback_153(void * context, const chip::app::DataModel::Nullable & nullableBoolean) { - (static_cast(context))->OnSuccessResponse_153(nullableBitmap8); + (static_cast(context))->OnSuccessResponse_153(nullableBoolean); } static void OnFailureCallback_154(void * context, EmberAfStatus status) @@ -33367,9 +33353,9 @@ class TestCluster : public TestCommand (static_cast(context))->OnFailureResponse_155(chip::to_underlying(status)); } - static void OnSuccessCallback_155(void * context, const chip::app::DataModel::Nullable & nullableBitmap8) + static void OnSuccessCallback_155(void * context, const chip::app::DataModel::Nullable & nullableBoolean) { - (static_cast(context))->OnSuccessResponse_155(nullableBitmap8); + (static_cast(context))->OnSuccessResponse_155(nullableBoolean); } static void OnFailureCallback_156(void * context, EmberAfStatus status) @@ -33384,9 +33370,9 @@ class TestCluster : public TestCommand (static_cast(context))->OnFailureResponse_157(chip::to_underlying(status)); } - static void OnSuccessCallback_157(void * context, const chip::app::DataModel::Nullable & nullableBitmap16) + static void OnSuccessCallback_157(void * context, const chip::app::DataModel::Nullable & nullableBitmap8) { - (static_cast(context))->OnSuccessResponse_157(nullableBitmap16); + (static_cast(context))->OnSuccessResponse_157(nullableBitmap8); } static void OnFailureCallback_158(void * context, EmberAfStatus status) @@ -33401,9 +33387,9 @@ class TestCluster : public TestCommand (static_cast(context))->OnFailureResponse_159(chip::to_underlying(status)); } - static void OnSuccessCallback_159(void * context, const chip::app::DataModel::Nullable & nullableBitmap16) + static void OnSuccessCallback_159(void * context, const chip::app::DataModel::Nullable & nullableBitmap8) { - (static_cast(context))->OnSuccessResponse_159(nullableBitmap16); + (static_cast(context))->OnSuccessResponse_159(nullableBitmap8); } static void OnFailureCallback_160(void * context, EmberAfStatus status) @@ -33418,9 +33404,9 @@ class TestCluster : public TestCommand (static_cast(context))->OnFailureResponse_161(chip::to_underlying(status)); } - static void OnSuccessCallback_161(void * context, const chip::app::DataModel::Nullable & nullableBitmap16) + static void OnSuccessCallback_161(void * context, const chip::app::DataModel::Nullable & nullableBitmap8) { - (static_cast(context))->OnSuccessResponse_161(nullableBitmap16); + (static_cast(context))->OnSuccessResponse_161(nullableBitmap8); } static void OnFailureCallback_162(void * context, EmberAfStatus status) @@ -33435,9 +33421,9 @@ class TestCluster : public TestCommand (static_cast(context))->OnFailureResponse_163(chip::to_underlying(status)); } - static void OnSuccessCallback_163(void * context, const chip::app::DataModel::Nullable & nullableBitmap32) + static void OnSuccessCallback_163(void * context, const chip::app::DataModel::Nullable & nullableBitmap16) { - (static_cast(context))->OnSuccessResponse_163(nullableBitmap32); + (static_cast(context))->OnSuccessResponse_163(nullableBitmap16); } static void OnFailureCallback_164(void * context, EmberAfStatus status) @@ -33452,9 +33438,9 @@ class TestCluster : public TestCommand (static_cast(context))->OnFailureResponse_165(chip::to_underlying(status)); } - static void OnSuccessCallback_165(void * context, const chip::app::DataModel::Nullable & nullableBitmap32) + static void OnSuccessCallback_165(void * context, const chip::app::DataModel::Nullable & nullableBitmap16) { - (static_cast(context))->OnSuccessResponse_165(nullableBitmap32); + (static_cast(context))->OnSuccessResponse_165(nullableBitmap16); } static void OnFailureCallback_166(void * context, EmberAfStatus status) @@ -33469,9 +33455,9 @@ class TestCluster : public TestCommand (static_cast(context))->OnFailureResponse_167(chip::to_underlying(status)); } - static void OnSuccessCallback_167(void * context, const chip::app::DataModel::Nullable & nullableBitmap32) + static void OnSuccessCallback_167(void * context, const chip::app::DataModel::Nullable & nullableBitmap16) { - (static_cast(context))->OnSuccessResponse_167(nullableBitmap32); + (static_cast(context))->OnSuccessResponse_167(nullableBitmap16); } static void OnFailureCallback_168(void * context, EmberAfStatus status) @@ -33486,9 +33472,9 @@ class TestCluster : public TestCommand (static_cast(context))->OnFailureResponse_169(chip::to_underlying(status)); } - static void OnSuccessCallback_169(void * context, const chip::app::DataModel::Nullable & nullableBitmap64) + static void OnSuccessCallback_169(void * context, const chip::app::DataModel::Nullable & nullableBitmap32) { - (static_cast(context))->OnSuccessResponse_169(nullableBitmap64); + (static_cast(context))->OnSuccessResponse_169(nullableBitmap32); } static void OnFailureCallback_170(void * context, EmberAfStatus status) @@ -33503,9 +33489,9 @@ class TestCluster : public TestCommand (static_cast(context))->OnFailureResponse_171(chip::to_underlying(status)); } - static void OnSuccessCallback_171(void * context, const chip::app::DataModel::Nullable & nullableBitmap64) + static void OnSuccessCallback_171(void * context, const chip::app::DataModel::Nullable & nullableBitmap32) { - (static_cast(context))->OnSuccessResponse_171(nullableBitmap64); + (static_cast(context))->OnSuccessResponse_171(nullableBitmap32); } static void OnFailureCallback_172(void * context, EmberAfStatus status) @@ -33520,9 +33506,9 @@ class TestCluster : public TestCommand (static_cast(context))->OnFailureResponse_173(chip::to_underlying(status)); } - static void OnSuccessCallback_173(void * context, const chip::app::DataModel::Nullable & nullableBitmap64) + static void OnSuccessCallback_173(void * context, const chip::app::DataModel::Nullable & nullableBitmap32) { - (static_cast(context))->OnSuccessResponse_173(nullableBitmap64); + (static_cast(context))->OnSuccessResponse_173(nullableBitmap32); } static void OnFailureCallback_174(void * context, EmberAfStatus status) @@ -33537,9 +33523,9 @@ class TestCluster : public TestCommand (static_cast(context))->OnFailureResponse_175(chip::to_underlying(status)); } - static void OnSuccessCallback_175(void * context, const chip::app::DataModel::Nullable & nullableInt8u) + static void OnSuccessCallback_175(void * context, const chip::app::DataModel::Nullable & nullableBitmap64) { - (static_cast(context))->OnSuccessResponse_175(nullableInt8u); + (static_cast(context))->OnSuccessResponse_175(nullableBitmap64); } static void OnFailureCallback_176(void * context, EmberAfStatus status) @@ -33554,9 +33540,9 @@ class TestCluster : public TestCommand (static_cast(context))->OnFailureResponse_177(chip::to_underlying(status)); } - static void OnSuccessCallback_177(void * context, const chip::app::DataModel::Nullable & nullableInt8u) + static void OnSuccessCallback_177(void * context, const chip::app::DataModel::Nullable & nullableBitmap64) { - (static_cast(context))->OnSuccessResponse_177(nullableInt8u); + (static_cast(context))->OnSuccessResponse_177(nullableBitmap64); } static void OnFailureCallback_178(void * context, EmberAfStatus status) @@ -33571,9 +33557,9 @@ class TestCluster : public TestCommand (static_cast(context))->OnFailureResponse_179(chip::to_underlying(status)); } - static void OnSuccessCallback_179(void * context, const chip::app::DataModel::Nullable & nullableInt8u) + static void OnSuccessCallback_179(void * context, const chip::app::DataModel::Nullable & nullableBitmap64) { - (static_cast(context))->OnSuccessResponse_179(nullableInt8u); + (static_cast(context))->OnSuccessResponse_179(nullableBitmap64); } static void OnFailureCallback_180(void * context, EmberAfStatus status) @@ -33588,9 +33574,9 @@ class TestCluster : public TestCommand (static_cast(context))->OnFailureResponse_181(chip::to_underlying(status)); } - static void OnSuccessCallback_181(void * context, const chip::app::DataModel::Nullable & nullableInt16u) + static void OnSuccessCallback_181(void * context, const chip::app::DataModel::Nullable & nullableInt8u) { - (static_cast(context))->OnSuccessResponse_181(nullableInt16u); + (static_cast(context))->OnSuccessResponse_181(nullableInt8u); } static void OnFailureCallback_182(void * context, EmberAfStatus status) @@ -33605,9 +33591,9 @@ class TestCluster : public TestCommand (static_cast(context))->OnFailureResponse_183(chip::to_underlying(status)); } - static void OnSuccessCallback_183(void * context, const chip::app::DataModel::Nullable & nullableInt16u) + static void OnSuccessCallback_183(void * context, const chip::app::DataModel::Nullable & nullableInt8u) { - (static_cast(context))->OnSuccessResponse_183(nullableInt16u); + (static_cast(context))->OnSuccessResponse_183(nullableInt8u); } static void OnFailureCallback_184(void * context, EmberAfStatus status) @@ -33622,9 +33608,9 @@ class TestCluster : public TestCommand (static_cast(context))->OnFailureResponse_185(chip::to_underlying(status)); } - static void OnSuccessCallback_185(void * context, const chip::app::DataModel::Nullable & nullableInt16u) + static void OnSuccessCallback_185(void * context, const chip::app::DataModel::Nullable & nullableInt8u) { - (static_cast(context))->OnSuccessResponse_185(nullableInt16u); + (static_cast(context))->OnSuccessResponse_185(nullableInt8u); } static void OnFailureCallback_186(void * context, EmberAfStatus status) @@ -33639,9 +33625,9 @@ class TestCluster : public TestCommand (static_cast(context))->OnFailureResponse_187(chip::to_underlying(status)); } - static void OnSuccessCallback_187(void * context, const chip::app::DataModel::Nullable & nullableInt32u) + static void OnSuccessCallback_187(void * context, const chip::app::DataModel::Nullable & nullableInt16u) { - (static_cast(context))->OnSuccessResponse_187(nullableInt32u); + (static_cast(context))->OnSuccessResponse_187(nullableInt16u); } static void OnFailureCallback_188(void * context, EmberAfStatus status) @@ -33656,9 +33642,9 @@ class TestCluster : public TestCommand (static_cast(context))->OnFailureResponse_189(chip::to_underlying(status)); } - static void OnSuccessCallback_189(void * context, const chip::app::DataModel::Nullable & nullableInt32u) + static void OnSuccessCallback_189(void * context, const chip::app::DataModel::Nullable & nullableInt16u) { - (static_cast(context))->OnSuccessResponse_189(nullableInt32u); + (static_cast(context))->OnSuccessResponse_189(nullableInt16u); } static void OnFailureCallback_190(void * context, EmberAfStatus status) @@ -33673,9 +33659,9 @@ class TestCluster : public TestCommand (static_cast(context))->OnFailureResponse_191(chip::to_underlying(status)); } - static void OnSuccessCallback_191(void * context, const chip::app::DataModel::Nullable & nullableInt32u) + static void OnSuccessCallback_191(void * context, const chip::app::DataModel::Nullable & nullableInt16u) { - (static_cast(context))->OnSuccessResponse_191(nullableInt32u); + (static_cast(context))->OnSuccessResponse_191(nullableInt16u); } static void OnFailureCallback_192(void * context, EmberAfStatus status) @@ -33690,9 +33676,9 @@ class TestCluster : public TestCommand (static_cast(context))->OnFailureResponse_193(chip::to_underlying(status)); } - static void OnSuccessCallback_193(void * context, const chip::app::DataModel::Nullable & nullableInt64u) + static void OnSuccessCallback_193(void * context, const chip::app::DataModel::Nullable & nullableInt32u) { - (static_cast(context))->OnSuccessResponse_193(nullableInt64u); + (static_cast(context))->OnSuccessResponse_193(nullableInt32u); } static void OnFailureCallback_194(void * context, EmberAfStatus status) @@ -33707,9 +33693,9 @@ class TestCluster : public TestCommand (static_cast(context))->OnFailureResponse_195(chip::to_underlying(status)); } - static void OnSuccessCallback_195(void * context, const chip::app::DataModel::Nullable & nullableInt64u) + static void OnSuccessCallback_195(void * context, const chip::app::DataModel::Nullable & nullableInt32u) { - (static_cast(context))->OnSuccessResponse_195(nullableInt64u); + (static_cast(context))->OnSuccessResponse_195(nullableInt32u); } static void OnFailureCallback_196(void * context, EmberAfStatus status) @@ -33724,9 +33710,9 @@ class TestCluster : public TestCommand (static_cast(context))->OnFailureResponse_197(chip::to_underlying(status)); } - static void OnSuccessCallback_197(void * context, const chip::app::DataModel::Nullable & nullableInt64u) + static void OnSuccessCallback_197(void * context, const chip::app::DataModel::Nullable & nullableInt32u) { - (static_cast(context))->OnSuccessResponse_197(nullableInt64u); + (static_cast(context))->OnSuccessResponse_197(nullableInt32u); } static void OnFailureCallback_198(void * context, EmberAfStatus status) @@ -33741,9 +33727,9 @@ class TestCluster : public TestCommand (static_cast(context))->OnFailureResponse_199(chip::to_underlying(status)); } - static void OnSuccessCallback_199(void * context, const chip::app::DataModel::Nullable & nullableInt8s) + static void OnSuccessCallback_199(void * context, const chip::app::DataModel::Nullable & nullableInt64u) { - (static_cast(context))->OnSuccessResponse_199(nullableInt8s); + (static_cast(context))->OnSuccessResponse_199(nullableInt64u); } static void OnFailureCallback_200(void * context, EmberAfStatus status) @@ -33758,9 +33744,9 @@ class TestCluster : public TestCommand (static_cast(context))->OnFailureResponse_201(chip::to_underlying(status)); } - static void OnSuccessCallback_201(void * context, const chip::app::DataModel::Nullable & nullableInt8s) + static void OnSuccessCallback_201(void * context, const chip::app::DataModel::Nullable & nullableInt64u) { - (static_cast(context))->OnSuccessResponse_201(nullableInt8s); + (static_cast(context))->OnSuccessResponse_201(nullableInt64u); } static void OnFailureCallback_202(void * context, EmberAfStatus status) @@ -33775,9 +33761,9 @@ class TestCluster : public TestCommand (static_cast(context))->OnFailureResponse_203(chip::to_underlying(status)); } - static void OnSuccessCallback_203(void * context, const chip::app::DataModel::Nullable & nullableInt8s) + static void OnSuccessCallback_203(void * context, const chip::app::DataModel::Nullable & nullableInt64u) { - (static_cast(context))->OnSuccessResponse_203(nullableInt8s); + (static_cast(context))->OnSuccessResponse_203(nullableInt64u); } static void OnFailureCallback_204(void * context, EmberAfStatus status) @@ -33792,9 +33778,9 @@ class TestCluster : public TestCommand (static_cast(context))->OnFailureResponse_205(chip::to_underlying(status)); } - static void OnSuccessCallback_205(void * context, const chip::app::DataModel::Nullable & nullableInt16s) + static void OnSuccessCallback_205(void * context, const chip::app::DataModel::Nullable & nullableInt8s) { - (static_cast(context))->OnSuccessResponse_205(nullableInt16s); + (static_cast(context))->OnSuccessResponse_205(nullableInt8s); } static void OnFailureCallback_206(void * context, EmberAfStatus status) @@ -33809,9 +33795,9 @@ class TestCluster : public TestCommand (static_cast(context))->OnFailureResponse_207(chip::to_underlying(status)); } - static void OnSuccessCallback_207(void * context, const chip::app::DataModel::Nullable & nullableInt16s) + static void OnSuccessCallback_207(void * context, const chip::app::DataModel::Nullable & nullableInt8s) { - (static_cast(context))->OnSuccessResponse_207(nullableInt16s); + (static_cast(context))->OnSuccessResponse_207(nullableInt8s); } static void OnFailureCallback_208(void * context, EmberAfStatus status) @@ -33826,9 +33812,9 @@ class TestCluster : public TestCommand (static_cast(context))->OnFailureResponse_209(chip::to_underlying(status)); } - static void OnSuccessCallback_209(void * context, const chip::app::DataModel::Nullable & nullableInt16s) + static void OnSuccessCallback_209(void * context, const chip::app::DataModel::Nullable & nullableInt8s) { - (static_cast(context))->OnSuccessResponse_209(nullableInt16s); + (static_cast(context))->OnSuccessResponse_209(nullableInt8s); } static void OnFailureCallback_210(void * context, EmberAfStatus status) @@ -33843,9 +33829,9 @@ class TestCluster : public TestCommand (static_cast(context))->OnFailureResponse_211(chip::to_underlying(status)); } - static void OnSuccessCallback_211(void * context, const chip::app::DataModel::Nullable & nullableInt32s) + static void OnSuccessCallback_211(void * context, const chip::app::DataModel::Nullable & nullableInt16s) { - (static_cast(context))->OnSuccessResponse_211(nullableInt32s); + (static_cast(context))->OnSuccessResponse_211(nullableInt16s); } static void OnFailureCallback_212(void * context, EmberAfStatus status) @@ -33860,9 +33846,9 @@ class TestCluster : public TestCommand (static_cast(context))->OnFailureResponse_213(chip::to_underlying(status)); } - static void OnSuccessCallback_213(void * context, const chip::app::DataModel::Nullable & nullableInt32s) + static void OnSuccessCallback_213(void * context, const chip::app::DataModel::Nullable & nullableInt16s) { - (static_cast(context))->OnSuccessResponse_213(nullableInt32s); + (static_cast(context))->OnSuccessResponse_213(nullableInt16s); } static void OnFailureCallback_214(void * context, EmberAfStatus status) @@ -33877,9 +33863,9 @@ class TestCluster : public TestCommand (static_cast(context))->OnFailureResponse_215(chip::to_underlying(status)); } - static void OnSuccessCallback_215(void * context, const chip::app::DataModel::Nullable & nullableInt32s) + static void OnSuccessCallback_215(void * context, const chip::app::DataModel::Nullable & nullableInt16s) { - (static_cast(context))->OnSuccessResponse_215(nullableInt32s); + (static_cast(context))->OnSuccessResponse_215(nullableInt16s); } static void OnFailureCallback_216(void * context, EmberAfStatus status) @@ -33894,9 +33880,9 @@ class TestCluster : public TestCommand (static_cast(context))->OnFailureResponse_217(chip::to_underlying(status)); } - static void OnSuccessCallback_217(void * context, const chip::app::DataModel::Nullable & nullableInt64s) + static void OnSuccessCallback_217(void * context, const chip::app::DataModel::Nullable & nullableInt32s) { - (static_cast(context))->OnSuccessResponse_217(nullableInt64s); + (static_cast(context))->OnSuccessResponse_217(nullableInt32s); } static void OnFailureCallback_218(void * context, EmberAfStatus status) @@ -33911,9 +33897,9 @@ class TestCluster : public TestCommand (static_cast(context))->OnFailureResponse_219(chip::to_underlying(status)); } - static void OnSuccessCallback_219(void * context, const chip::app::DataModel::Nullable & nullableInt64s) + static void OnSuccessCallback_219(void * context, const chip::app::DataModel::Nullable & nullableInt32s) { - (static_cast(context))->OnSuccessResponse_219(nullableInt64s); + (static_cast(context))->OnSuccessResponse_219(nullableInt32s); } static void OnFailureCallback_220(void * context, EmberAfStatus status) @@ -33928,9 +33914,9 @@ class TestCluster : public TestCommand (static_cast(context))->OnFailureResponse_221(chip::to_underlying(status)); } - static void OnSuccessCallback_221(void * context, const chip::app::DataModel::Nullable & nullableInt64s) + static void OnSuccessCallback_221(void * context, const chip::app::DataModel::Nullable & nullableInt32s) { - (static_cast(context))->OnSuccessResponse_221(nullableInt64s); + (static_cast(context))->OnSuccessResponse_221(nullableInt32s); } static void OnFailureCallback_222(void * context, EmberAfStatus status) @@ -33945,9 +33931,9 @@ class TestCluster : public TestCommand (static_cast(context))->OnFailureResponse_223(chip::to_underlying(status)); } - static void OnSuccessCallback_223(void * context, const chip::app::DataModel::Nullable & nullableEnum8) + static void OnSuccessCallback_223(void * context, const chip::app::DataModel::Nullable & nullableInt64s) { - (static_cast(context))->OnSuccessResponse_223(nullableEnum8); + (static_cast(context))->OnSuccessResponse_223(nullableInt64s); } static void OnFailureCallback_224(void * context, EmberAfStatus status) @@ -33962,9 +33948,9 @@ class TestCluster : public TestCommand (static_cast(context))->OnFailureResponse_225(chip::to_underlying(status)); } - static void OnSuccessCallback_225(void * context, const chip::app::DataModel::Nullable & nullableEnum8) + static void OnSuccessCallback_225(void * context, const chip::app::DataModel::Nullable & nullableInt64s) { - (static_cast(context))->OnSuccessResponse_225(nullableEnum8); + (static_cast(context))->OnSuccessResponse_225(nullableInt64s); } static void OnFailureCallback_226(void * context, EmberAfStatus status) @@ -33979,9 +33965,9 @@ class TestCluster : public TestCommand (static_cast(context))->OnFailureResponse_227(chip::to_underlying(status)); } - static void OnSuccessCallback_227(void * context, const chip::app::DataModel::Nullable & nullableEnum8) + static void OnSuccessCallback_227(void * context, const chip::app::DataModel::Nullable & nullableInt64s) { - (static_cast(context))->OnSuccessResponse_227(nullableEnum8); + (static_cast(context))->OnSuccessResponse_227(nullableInt64s); } static void OnFailureCallback_228(void * context, EmberAfStatus status) @@ -33996,9 +33982,9 @@ class TestCluster : public TestCommand (static_cast(context))->OnFailureResponse_229(chip::to_underlying(status)); } - static void OnSuccessCallback_229(void * context, const chip::app::DataModel::Nullable & nullableEnum16) + static void OnSuccessCallback_229(void * context, const chip::app::DataModel::Nullable & nullableEnum8) { - (static_cast(context))->OnSuccessResponse_229(nullableEnum16); + (static_cast(context))->OnSuccessResponse_229(nullableEnum8); } static void OnFailureCallback_230(void * context, EmberAfStatus status) @@ -34013,9 +33999,9 @@ class TestCluster : public TestCommand (static_cast(context))->OnFailureResponse_231(chip::to_underlying(status)); } - static void OnSuccessCallback_231(void * context, const chip::app::DataModel::Nullable & nullableEnum16) + static void OnSuccessCallback_231(void * context, const chip::app::DataModel::Nullable & nullableEnum8) { - (static_cast(context))->OnSuccessResponse_231(nullableEnum16); + (static_cast(context))->OnSuccessResponse_231(nullableEnum8); } static void OnFailureCallback_232(void * context, EmberAfStatus status) @@ -34030,9 +34016,9 @@ class TestCluster : public TestCommand (static_cast(context))->OnFailureResponse_233(chip::to_underlying(status)); } - static void OnSuccessCallback_233(void * context, const chip::app::DataModel::Nullable & nullableEnum16) + static void OnSuccessCallback_233(void * context, const chip::app::DataModel::Nullable & nullableEnum8) { - (static_cast(context))->OnSuccessResponse_233(nullableEnum16); + (static_cast(context))->OnSuccessResponse_233(nullableEnum8); } static void OnFailureCallback_234(void * context, EmberAfStatus status) @@ -34040,51 +34026,51 @@ class TestCluster : public TestCommand (static_cast(context))->OnFailureResponse_234(chip::to_underlying(status)); } - static void OnSuccessCallback_234(void * context, const chip::app::DataModel::Nullable & nullableOctetString) - { - (static_cast(context))->OnSuccessResponse_234(nullableOctetString); - } + static void OnSuccessCallback_234(void * context) { (static_cast(context))->OnSuccessResponse_234(); } static void OnFailureCallback_235(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_235(chip::to_underlying(status)); } - static void OnSuccessCallback_235(void * context) { (static_cast(context))->OnSuccessResponse_235(); } + static void OnSuccessCallback_235(void * context, const chip::app::DataModel::Nullable & nullableEnum16) + { + (static_cast(context))->OnSuccessResponse_235(nullableEnum16); + } static void OnFailureCallback_236(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_236(chip::to_underlying(status)); } - static void OnSuccessCallback_236(void * context, const chip::app::DataModel::Nullable & nullableOctetString) - { - (static_cast(context))->OnSuccessResponse_236(nullableOctetString); - } + static void OnSuccessCallback_236(void * context) { (static_cast(context))->OnSuccessResponse_236(); } static void OnFailureCallback_237(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_237(chip::to_underlying(status)); } - static void OnSuccessCallback_237(void * context) { (static_cast(context))->OnSuccessResponse_237(); } + static void OnSuccessCallback_237(void * context, const chip::app::DataModel::Nullable & nullableEnum16) + { + (static_cast(context))->OnSuccessResponse_237(nullableEnum16); + } static void OnFailureCallback_238(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_238(chip::to_underlying(status)); } - static void OnSuccessCallback_238(void * context, const chip::app::DataModel::Nullable & nullableOctetString) - { - (static_cast(context))->OnSuccessResponse_238(nullableOctetString); - } + static void OnSuccessCallback_238(void * context) { (static_cast(context))->OnSuccessResponse_238(); } static void OnFailureCallback_239(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_239(chip::to_underlying(status)); } - static void OnSuccessCallback_239(void * context) { (static_cast(context))->OnSuccessResponse_239(); } + static void OnSuccessCallback_239(void * context, const chip::app::DataModel::Nullable & nullableEnum16) + { + (static_cast(context))->OnSuccessResponse_239(nullableEnum16); + } static void OnFailureCallback_240(void * context, EmberAfStatus status) { @@ -34101,17 +34087,17 @@ class TestCluster : public TestCommand (static_cast(context))->OnFailureResponse_241(chip::to_underlying(status)); } - static void OnSuccessCallback_241(void * context, const chip::app::DataModel::Nullable & nullableCharString) - { - (static_cast(context))->OnSuccessResponse_241(nullableCharString); - } + static void OnSuccessCallback_241(void * context) { (static_cast(context))->OnSuccessResponse_241(); } static void OnFailureCallback_242(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_242(chip::to_underlying(status)); } - static void OnSuccessCallback_242(void * context) { (static_cast(context))->OnSuccessResponse_242(); } + static void OnSuccessCallback_242(void * context, const chip::app::DataModel::Nullable & nullableOctetString) + { + (static_cast(context))->OnSuccessResponse_242(nullableOctetString); + } static void OnFailureCallback_243(void * context, EmberAfStatus status) { @@ -34125,9 +34111,9 @@ class TestCluster : public TestCommand (static_cast(context))->OnFailureResponse_244(chip::to_underlying(status)); } - static void OnSuccessCallback_244(void * context, const chip::app::DataModel::Nullable & nullableCharString) + static void OnSuccessCallback_244(void * context, const chip::app::DataModel::Nullable & nullableOctetString) { - (static_cast(context))->OnSuccessResponse_244(nullableCharString); + (static_cast(context))->OnSuccessResponse_244(nullableOctetString); } static void OnFailureCallback_245(void * context, EmberAfStatus status) @@ -34142,9 +34128,9 @@ class TestCluster : public TestCommand (static_cast(context))->OnFailureResponse_246(chip::to_underlying(status)); } - static void OnSuccessCallback_246(void * context, const chip::app::DataModel::Nullable & nullableCharString) + static void OnSuccessCallback_246(void * context, const chip::app::DataModel::Nullable & nullableOctetString) { - (static_cast(context))->OnSuccessResponse_246(nullableCharString); + (static_cast(context))->OnSuccessResponse_246(nullableOctetString); } static void OnFailureCallback_247(void * context, EmberAfStatus status) @@ -34152,9 +34138,9 @@ class TestCluster : public TestCommand (static_cast(context))->OnFailureResponse_247(chip::to_underlying(status)); } - static void OnSuccessCallback_247(void * context, const chip::app::DataModel::DecodableList & listInt8u) + static void OnSuccessCallback_247(void * context, const chip::app::DataModel::Nullable & nullableCharString) { - (static_cast(context))->OnSuccessResponse_247(listInt8u); + (static_cast(context))->OnSuccessResponse_247(nullableCharString); } static void OnFailureCallback_248(void * context, EmberAfStatus status) @@ -34162,9 +34148,70 @@ class TestCluster : public TestCommand (static_cast(context))->OnFailureResponse_248(chip::to_underlying(status)); } - static void OnSuccessCallback_248(void * context, const chip::app::DataModel::DecodableList & listInt8u) + static void OnSuccessCallback_248(void * context) { (static_cast(context))->OnSuccessResponse_248(); } + + static void OnFailureCallback_249(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_249(chip::to_underlying(status)); + } + + static void OnSuccessCallback_249(void * context, const chip::app::DataModel::Nullable & nullableCharString) + { + (static_cast(context))->OnSuccessResponse_249(nullableCharString); + } + + static void OnFailureCallback_250(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_250(chip::to_underlying(status)); + } + + static void OnSuccessCallback_250(void * context) { (static_cast(context))->OnSuccessResponse_250(); } + + static void OnFailureCallback_251(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_251(chip::to_underlying(status)); + } + + static void OnSuccessCallback_251(void * context, const chip::app::DataModel::Nullable & nullableCharString) + { + (static_cast(context))->OnSuccessResponse_251(nullableCharString); + } + + static void OnFailureCallback_252(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_252(chip::to_underlying(status)); + } + + static void OnSuccessCallback_252(void * context) { (static_cast(context))->OnSuccessResponse_252(); } + + static void OnFailureCallback_253(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_253(chip::to_underlying(status)); + } + + static void OnSuccessCallback_253(void * context, const chip::app::DataModel::Nullable & nullableCharString) + { + (static_cast(context))->OnSuccessResponse_253(nullableCharString); + } + + static void OnFailureCallback_254(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_254(chip::to_underlying(status)); + } + + static void OnSuccessCallback_254(void * context, const chip::app::DataModel::DecodableList & listInt8u) + { + (static_cast(context))->OnSuccessResponse_254(listInt8u); + } + + static void OnFailureCallback_255(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_255(chip::to_underlying(status)); + } + + static void OnSuccessCallback_255(void * context, const chip::app::DataModel::DecodableList & listInt8u) { - (static_cast(context))->OnSuccessResponse_248(listInt8u); + (static_cast(context))->OnSuccessResponse_255(listInt8u); } // @@ -36702,24 +36749,27 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestSendTestCommandWithStructArgumentAndSeeWhatWeGetBack_131() + CHIP_ERROR TestSendTestCommandWithNestedStructArgumentAndArg1cbIsTrue_131() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - using RequestType = chip::app::Clusters::TestCluster::Commands::SimpleStructEchoRequest::Type; + using RequestType = chip::app::Clusters::TestCluster::Commands::TestNestedStructArgumentRequest::Type; RequestType request; - request.arg1.a = 17; - request.arg1.b = false; - request.arg1.c = static_cast(2); - request.arg1.d = chip::ByteSpan(chip::Uint8::from_const_char("octet_stringgarbage: not in length on purpose"), 12); - request.arg1.e = chip::Span("char_stringgarbage: not in length on purpose", 11); - request.arg1.f = static_cast>(1); - request.arg1.g = 0.1f; - request.arg1.h = 0.1; + request.arg1.a = 0; + request.arg1.b = true; + + request.arg1.c.a = 0; + request.arg1.c.b = true; + request.arg1.c.c = static_cast(2); + request.arg1.c.d = chip::ByteSpan(chip::Uint8::from_const_char("octet_stringgarbage: not in length on purpose"), 12); + request.arg1.c.e = chip::Span("char_stringgarbage: not in length on purpose", 11); + request.arg1.c.f = static_cast>(1); + request.arg1.c.g = 0; + request.arg1.c.h = 0; auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context))->OnSuccessResponse_131(data.arg1); + (static_cast(context))->OnSuccessResponse_131(data.value); }; auto failure = [](void * context, EmberAfStatus status) { @@ -36732,38 +36782,31 @@ class TestCluster : public TestCommand void OnFailureResponse_131(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_131(const chip::app::Clusters::TestCluster::Structs::SimpleStruct::DecodableType & arg1) + void OnSuccessResponse_131(bool value) { - VerifyOrReturn(CheckValue("arg1.a", arg1.a, 17)); - VerifyOrReturn(CheckValue("arg1.b", arg1.b, false)); - VerifyOrReturn(CheckValue("arg1.c", arg1.c, 2)); - VerifyOrReturn(CheckValueAsString("arg1.d", arg1.d, chip::ByteSpan(chip::Uint8::from_const_char("octet_string"), 12))); - VerifyOrReturn(CheckValueAsString("arg1.e", arg1.e, chip::CharSpan("char_string", 11))); - VerifyOrReturn(CheckValue("arg1.f", arg1.f, 1)); - VerifyOrReturn(CheckValue("arg1.g", arg1.g, 0.1f)); - VerifyOrReturn(CheckValue("arg1.h", arg1.h, 0.1)); + VerifyOrReturn(CheckValue("value", value, true)); NextTest(); } - CHIP_ERROR TestSendTestCommandWithListOfInt8uAndNoneOfThemIsSetTo0_132() + CHIP_ERROR TestSendTestCommandWithNestedStructArgumentArg1cbIsFalse_132() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - using RequestType = chip::app::Clusters::TestCluster::Commands::TestListInt8UArgumentRequest::Type; + using RequestType = chip::app::Clusters::TestCluster::Commands::TestNestedStructArgumentRequest::Type; RequestType request; - uint8_t arg1List[9]; - arg1List[0] = 1; - arg1List[1] = 2; - arg1List[2] = 3; - arg1List[3] = 4; - arg1List[4] = 5; - arg1List[5] = 6; - arg1List[6] = 7; - arg1List[7] = 8; - arg1List[8] = 9; - request.arg1 = arg1List; + request.arg1.a = 0; + request.arg1.b = true; + + request.arg1.c.a = 0; + request.arg1.c.b = false; + request.arg1.c.c = static_cast(2); + request.arg1.c.d = chip::ByteSpan(chip::Uint8::from_const_char("octet_stringgarbage: not in length on purpose"), 12); + request.arg1.c.e = chip::Span("char_stringgarbage: not in length on purpose", 11); + request.arg1.c.f = static_cast>(1); + request.arg1.c.g = 0; + request.arg1.c.h = 0; auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_132(data.value); @@ -36781,30 +36824,68 @@ class TestCluster : public TestCommand void OnSuccessResponse_132(bool value) { - VerifyOrReturn(CheckValue("value", value, true)); + VerifyOrReturn(CheckValue("value", value, false)); NextTest(); } - CHIP_ERROR TestSendTestCommandWithListOfInt8uAndOneOfThemIsSetTo0_133() + CHIP_ERROR TestSendTestCommandWithNestedStructListArgumentAndAllFieldsBOfArg1dAreTrue_133() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - using RequestType = chip::app::Clusters::TestCluster::Commands::TestListInt8UArgumentRequest::Type; + using RequestType = chip::app::Clusters::TestCluster::Commands::TestNestedStructListArgumentRequest::Type; RequestType request; - uint8_t arg1List[10]; - arg1List[0] = 1; - arg1List[1] = 2; - arg1List[2] = 3; - arg1List[3] = 4; - arg1List[4] = 5; - arg1List[5] = 6; - arg1List[6] = 7; - arg1List[7] = 8; - arg1List[8] = 9; - arg1List[9] = 0; - request.arg1 = arg1List; + request.arg1.a = 0; + request.arg1.b = true; + + request.arg1.c.a = 0; + request.arg1.c.b = true; + request.arg1.c.c = static_cast(2); + request.arg1.c.d = chip::ByteSpan(chip::Uint8::from_const_char("octet_stringgarbage: not in length on purpose"), 12); + request.arg1.c.e = chip::Span("char_stringgarbage: not in length on purpose", 11); + request.arg1.c.f = static_cast>(1); + request.arg1.c.g = 0; + request.arg1.c.h = 0; + + chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type dList[2]; + + dList[0].a = 1; + dList[0].b = true; + dList[0].c = static_cast(3); + dList[0].d = chip::ByteSpan(chip::Uint8::from_const_char("nested_octet_stringgarbage: not in length on purpose"), 19); + dList[0].e = chip::Span("nested_char_stringgarbage: not in length on purpose", 18); + dList[0].f = static_cast>(1); + dList[0].g = 0; + dList[0].h = 0; + + dList[1].a = 2; + dList[1].b = true; + dList[1].c = static_cast(3); + dList[1].d = chip::ByteSpan(chip::Uint8::from_const_char("nested_octet_stringgarbage: not in length on purpose"), 19); + dList[1].e = chip::Span("nested_char_stringgarbage: not in length on purpose", 18); + dList[1].f = static_cast>(1); + dList[1].g = 0; + dList[1].h = 0; + + request.arg1.d = dList; + + uint32_t eList[3]; + eList[0] = 1UL; + eList[1] = 2UL; + eList[2] = 3UL; + request.arg1.e = eList; + + chip::ByteSpan fList[3]; + fList[0] = chip::ByteSpan(chip::Uint8::from_const_char("octet_string_1garbage: not in length on purpose"), 14); + fList[1] = chip::ByteSpan(chip::Uint8::from_const_char("octect_string_2garbage: not in length on purpose"), 15); + fList[2] = chip::ByteSpan(chip::Uint8::from_const_char("octet_string_3garbage: not in length on purpose"), 14); + request.arg1.f = fList; + + uint8_t gList[2]; + gList[0] = 0; + gList[1] = 255; + request.arg1.g = gList; auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_133(data.value); @@ -36822,32 +36903,71 @@ class TestCluster : public TestCommand void OnSuccessResponse_133(bool value) { - VerifyOrReturn(CheckValue("value", value, false)); + VerifyOrReturn(CheckValue("value", value, true)); NextTest(); } - CHIP_ERROR TestSendTestCommandWithListOfInt8uAndGetItReversed_134() + CHIP_ERROR TestSendTestCommandWithNestedStructListArgumentAndSomeFieldsBOfArg1dAreFalse_134() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - using RequestType = chip::app::Clusters::TestCluster::Commands::TestListInt8UReverseRequest::Type; + using RequestType = chip::app::Clusters::TestCluster::Commands::TestNestedStructListArgumentRequest::Type; RequestType request; - uint8_t arg1List[9]; - arg1List[0] = 1; - arg1List[1] = 2; - arg1List[2] = 3; - arg1List[3] = 4; - arg1List[4] = 5; - arg1List[5] = 6; - arg1List[6] = 7; - arg1List[7] = 8; - arg1List[8] = 9; - request.arg1 = arg1List; + request.arg1.a = 0; + request.arg1.b = true; + + request.arg1.c.a = 0; + request.arg1.c.b = true; + request.arg1.c.c = static_cast(2); + request.arg1.c.d = chip::ByteSpan(chip::Uint8::from_const_char("octet_stringgarbage: not in length on purpose"), 12); + request.arg1.c.e = chip::Span("char_stringgarbage: not in length on purpose", 11); + request.arg1.c.f = static_cast>(1); + request.arg1.c.g = 0; + request.arg1.c.h = 0; + + chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type dList[2]; + + dList[0].a = 1; + dList[0].b = true; + dList[0].c = static_cast(3); + dList[0].d = chip::ByteSpan(chip::Uint8::from_const_char("nested_octet_stringgarbage: not in length on purpose"), 19); + dList[0].e = chip::Span("nested_char_stringgarbage: not in length on purpose", 18); + dList[0].f = static_cast>(1); + dList[0].g = 0; + dList[0].h = 0; + + dList[1].a = 2; + dList[1].b = false; + dList[1].c = static_cast(3); + dList[1].d = chip::ByteSpan(chip::Uint8::from_const_char("nested_octet_stringgarbage: not in length on purpose"), 19); + dList[1].e = chip::Span("nested_char_stringgarbage: not in length on purpose", 18); + dList[1].f = static_cast>(1); + dList[1].g = 0; + dList[1].h = 0; + + request.arg1.d = dList; + + uint32_t eList[3]; + eList[0] = 1UL; + eList[1] = 2UL; + eList[2] = 3UL; + request.arg1.e = eList; + + chip::ByteSpan fList[3]; + fList[0] = chip::ByteSpan(chip::Uint8::from_const_char("octet_string_1garbage: not in length on purpose"), 14); + fList[1] = chip::ByteSpan(chip::Uint8::from_const_char("octect_string_2garbage: not in length on purpose"), 15); + fList[2] = chip::ByteSpan(chip::Uint8::from_const_char("octet_string_3garbage: not in length on purpose"), 14); + request.arg1.f = fList; + + uint8_t gList[2]; + gList[0] = 0; + gList[1] = 255; + request.arg1.g = gList; auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context))->OnSuccessResponse_134(data.arg1); + (static_cast(context))->OnSuccessResponse_134(data.value); }; auto failure = [](void * context, EmberAfStatus status) { @@ -36860,40 +36980,28 @@ class TestCluster : public TestCommand void OnFailureResponse_134(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_134(const chip::app::DataModel::DecodableList & arg1) + void OnSuccessResponse_134(bool value) { - auto iter = arg1.begin(); - VerifyOrReturn(CheckNextListItemDecodes("arg1", iter, 0)); - VerifyOrReturn(CheckValue("arg1[0]", iter.GetValue(), 9)); - VerifyOrReturn(CheckNextListItemDecodes("arg1", iter, 1)); - VerifyOrReturn(CheckValue("arg1[1]", iter.GetValue(), 8)); - VerifyOrReturn(CheckNextListItemDecodes("arg1", iter, 2)); - VerifyOrReturn(CheckValue("arg1[2]", iter.GetValue(), 7)); - VerifyOrReturn(CheckNextListItemDecodes("arg1", iter, 3)); - VerifyOrReturn(CheckValue("arg1[3]", iter.GetValue(), 6)); - VerifyOrReturn(CheckNextListItemDecodes("arg1", iter, 4)); - VerifyOrReturn(CheckValue("arg1[4]", iter.GetValue(), 5)); - VerifyOrReturn(CheckNextListItemDecodes("arg1", iter, 5)); - VerifyOrReturn(CheckValue("arg1[5]", iter.GetValue(), 4)); - VerifyOrReturn(CheckNextListItemDecodes("arg1", iter, 6)); - VerifyOrReturn(CheckValue("arg1[6]", iter.GetValue(), 3)); - VerifyOrReturn(CheckNextListItemDecodes("arg1", iter, 7)); - VerifyOrReturn(CheckValue("arg1[7]", iter.GetValue(), 2)); - VerifyOrReturn(CheckNextListItemDecodes("arg1", iter, 8)); - VerifyOrReturn(CheckValue("arg1[8]", iter.GetValue(), 1)); - VerifyOrReturn(CheckNoMoreListItems("arg1", iter, 9)); + VerifyOrReturn(CheckValue("value", value, false)); NextTest(); } - CHIP_ERROR TestSendTestCommandWithEmptyListOfInt8uAndGetAnEmptyListBack_135() + CHIP_ERROR TestSendTestCommandWithStructArgumentAndSeeWhatWeGetBack_135() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - using RequestType = chip::app::Clusters::TestCluster::Commands::TestListInt8UReverseRequest::Type; + using RequestType = chip::app::Clusters::TestCluster::Commands::SimpleStructEchoRequest::Type; RequestType request; - request.arg1 = chip::app::DataModel::List(); + request.arg1.a = 17; + request.arg1.b = false; + request.arg1.c = static_cast(2); + request.arg1.d = chip::ByteSpan(chip::Uint8::from_const_char("octet_stringgarbage: not in length on purpose"), 12); + request.arg1.e = chip::Span("char_stringgarbage: not in length on purpose", 11); + request.arg1.f = static_cast>(1); + request.arg1.g = 0.1f; + request.arg1.h = 0.1; auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context))->OnSuccessResponse_135(data.arg1); @@ -36909,31 +37017,208 @@ class TestCluster : public TestCommand void OnFailureResponse_135(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_135(const chip::app::DataModel::DecodableList & arg1) + void OnSuccessResponse_135(const chip::app::Clusters::TestCluster::Structs::SimpleStruct::DecodableType & arg1) { - auto iter = arg1.begin(); - VerifyOrReturn(CheckNoMoreListItems("arg1", iter, 0)); + VerifyOrReturn(CheckValue("arg1.a", arg1.a, 17)); + VerifyOrReturn(CheckValue("arg1.b", arg1.b, false)); + VerifyOrReturn(CheckValue("arg1.c", arg1.c, 2)); + VerifyOrReturn(CheckValueAsString("arg1.d", arg1.d, chip::ByteSpan(chip::Uint8::from_const_char("octet_string"), 12))); + VerifyOrReturn(CheckValueAsString("arg1.e", arg1.e, chip::CharSpan("char_string", 11))); + VerifyOrReturn(CheckValue("arg1.f", arg1.f, 1)); + VerifyOrReturn(CheckValue("arg1.g", arg1.g, 0.1f)); + VerifyOrReturn(CheckValue("arg1.h", arg1.h, 0.1)); NextTest(); } - CHIP_ERROR TestSendTestCommandWithListOfStructArgumentAndArg1bOfFirstItemIsTrue_136() + CHIP_ERROR TestSendTestCommandWithListOfInt8uAndNoneOfThemIsSetTo0_136() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; - using RequestType = chip::app::Clusters::TestCluster::Commands::TestListStructArgumentRequest::Type; + using RequestType = chip::app::Clusters::TestCluster::Commands::TestListInt8UArgumentRequest::Type; RequestType request; - chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type arg1List[2]; - - arg1List[0].a = 0; - arg1List[0].b = true; - arg1List[0].c = static_cast(2); - arg1List[0].d = chip::ByteSpan(chip::Uint8::from_const_char("first_octet_stringgarbage: not in length on purpose"), 18); - arg1List[0].e = chip::Span("first_char_stringgarbage: not in length on purpose", 17); - arg1List[0].f = static_cast>(1); - arg1List[0].g = 0; - arg1List[0].h = 0; + uint8_t arg1List[9]; + arg1List[0] = 1; + arg1List[1] = 2; + arg1List[2] = 3; + arg1List[3] = 4; + arg1List[4] = 5; + arg1List[5] = 6; + arg1List[6] = 7; + arg1List[7] = 8; + arg1List[8] = 9; + request.arg1 = arg1List; + + auto success = [](void * context, const typename RequestType::ResponseType & data) { + (static_cast(context))->OnSuccessResponse_136(data.value); + }; + + auto failure = [](void * context, EmberAfStatus status) { + (static_cast(context))->OnFailureResponse_136(status); + }; + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_136(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_136(bool value) + { + VerifyOrReturn(CheckValue("value", value, true)); + + NextTest(); + } + + CHIP_ERROR TestSendTestCommandWithListOfInt8uAndOneOfThemIsSetTo0_137() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + using RequestType = chip::app::Clusters::TestCluster::Commands::TestListInt8UArgumentRequest::Type; + + RequestType request; + + uint8_t arg1List[10]; + arg1List[0] = 1; + arg1List[1] = 2; + arg1List[2] = 3; + arg1List[3] = 4; + arg1List[4] = 5; + arg1List[5] = 6; + arg1List[6] = 7; + arg1List[7] = 8; + arg1List[8] = 9; + arg1List[9] = 0; + request.arg1 = arg1List; + + auto success = [](void * context, const typename RequestType::ResponseType & data) { + (static_cast(context))->OnSuccessResponse_137(data.value); + }; + + auto failure = [](void * context, EmberAfStatus status) { + (static_cast(context))->OnFailureResponse_137(status); + }; + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_137(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_137(bool value) + { + VerifyOrReturn(CheckValue("value", value, false)); + + NextTest(); + } + + CHIP_ERROR TestSendTestCommandWithListOfInt8uAndGetItReversed_138() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + using RequestType = chip::app::Clusters::TestCluster::Commands::TestListInt8UReverseRequest::Type; + + RequestType request; + + uint8_t arg1List[9]; + arg1List[0] = 1; + arg1List[1] = 2; + arg1List[2] = 3; + arg1List[3] = 4; + arg1List[4] = 5; + arg1List[5] = 6; + arg1List[6] = 7; + arg1List[7] = 8; + arg1List[8] = 9; + request.arg1 = arg1List; + + auto success = [](void * context, const typename RequestType::ResponseType & data) { + (static_cast(context))->OnSuccessResponse_138(data.arg1); + }; + + auto failure = [](void * context, EmberAfStatus status) { + (static_cast(context))->OnFailureResponse_138(status); + }; + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_138(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_138(const chip::app::DataModel::DecodableList & arg1) + { + auto iter = arg1.begin(); + VerifyOrReturn(CheckNextListItemDecodes("arg1", iter, 0)); + VerifyOrReturn(CheckValue("arg1[0]", iter.GetValue(), 9)); + VerifyOrReturn(CheckNextListItemDecodes("arg1", iter, 1)); + VerifyOrReturn(CheckValue("arg1[1]", iter.GetValue(), 8)); + VerifyOrReturn(CheckNextListItemDecodes("arg1", iter, 2)); + VerifyOrReturn(CheckValue("arg1[2]", iter.GetValue(), 7)); + VerifyOrReturn(CheckNextListItemDecodes("arg1", iter, 3)); + VerifyOrReturn(CheckValue("arg1[3]", iter.GetValue(), 6)); + VerifyOrReturn(CheckNextListItemDecodes("arg1", iter, 4)); + VerifyOrReturn(CheckValue("arg1[4]", iter.GetValue(), 5)); + VerifyOrReturn(CheckNextListItemDecodes("arg1", iter, 5)); + VerifyOrReturn(CheckValue("arg1[5]", iter.GetValue(), 4)); + VerifyOrReturn(CheckNextListItemDecodes("arg1", iter, 6)); + VerifyOrReturn(CheckValue("arg1[6]", iter.GetValue(), 3)); + VerifyOrReturn(CheckNextListItemDecodes("arg1", iter, 7)); + VerifyOrReturn(CheckValue("arg1[7]", iter.GetValue(), 2)); + VerifyOrReturn(CheckNextListItemDecodes("arg1", iter, 8)); + VerifyOrReturn(CheckValue("arg1[8]", iter.GetValue(), 1)); + VerifyOrReturn(CheckNoMoreListItems("arg1", iter, 9)); + + NextTest(); + } + + CHIP_ERROR TestSendTestCommandWithEmptyListOfInt8uAndGetAnEmptyListBack_139() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + using RequestType = chip::app::Clusters::TestCluster::Commands::TestListInt8UReverseRequest::Type; + + RequestType request; + + request.arg1 = chip::app::DataModel::List(); + + auto success = [](void * context, const typename RequestType::ResponseType & data) { + (static_cast(context))->OnSuccessResponse_139(data.arg1); + }; + + auto failure = [](void * context, EmberAfStatus status) { + (static_cast(context))->OnFailureResponse_139(status); + }; + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_139(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_139(const chip::app::DataModel::DecodableList & arg1) + { + auto iter = arg1.begin(); + VerifyOrReturn(CheckNoMoreListItems("arg1", iter, 0)); + + NextTest(); + } + + CHIP_ERROR TestSendTestCommandWithListOfStructArgumentAndArg1bOfFirstItemIsTrue_140() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + using RequestType = chip::app::Clusters::TestCluster::Commands::TestListStructArgumentRequest::Type; + + RequestType request; + + chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type arg1List[2]; + + arg1List[0].a = 0; + arg1List[0].b = true; + arg1List[0].c = static_cast(2); + arg1List[0].d = chip::ByteSpan(chip::Uint8::from_const_char("first_octet_stringgarbage: not in length on purpose"), 18); + arg1List[0].e = chip::Span("first_char_stringgarbage: not in length on purpose", 17); + arg1List[0].f = static_cast>(1); + arg1List[0].g = 0; + arg1List[0].h = 0; arg1List[1].a = 1; arg1List[1].b = true; @@ -36947,27 +37232,27 @@ class TestCluster : public TestCommand request.arg1 = arg1List; auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context))->OnSuccessResponse_136(data.value); + (static_cast(context))->OnSuccessResponse_140(data.value); }; auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_136(status); + (static_cast(context))->OnFailureResponse_140(status); }; ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, endpoint, request)); return CHIP_NO_ERROR; } - void OnFailureResponse_136(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_140(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_136(bool value) + void OnSuccessResponse_140(bool value) { VerifyOrReturn(CheckValue("value", value, true)); NextTest(); } - CHIP_ERROR TestSendTestCommandWithListOfStructArgumentAndArg1bOfFirstItemIsFalse_137() + CHIP_ERROR TestSendTestCommandWithListOfStructArgumentAndArg1bOfFirstItemIsFalse_141() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; using RequestType = chip::app::Clusters::TestCluster::Commands::TestListStructArgumentRequest::Type; @@ -36997,27 +37282,193 @@ class TestCluster : public TestCommand request.arg1 = arg1List; auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context))->OnSuccessResponse_137(data.value); + (static_cast(context))->OnSuccessResponse_141(data.value); }; auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_137(status); + (static_cast(context))->OnFailureResponse_141(status); }; ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, endpoint, request)); return CHIP_NO_ERROR; } - void OnFailureResponse_137(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_141(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_137(bool value) + void OnSuccessResponse_141(bool value) + { + VerifyOrReturn(CheckValue("value", value, false)); + + NextTest(); + } + + CHIP_ERROR TestSendTestCommandWithListOfNestedStructListArgumentAndAllFieldsBOfElementsOfArg1dAreTrue_142() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + using RequestType = chip::app::Clusters::TestCluster::Commands::TestListNestedStructListArgumentRequest::Type; + + RequestType request; + + chip::app::Clusters::TestCluster::Structs::NestedStructList::Type arg1List[1]; + + arg1List[0].a = 0; + arg1List[0].b = true; + + arg1List[0].c.a = 0; + arg1List[0].c.b = true; + arg1List[0].c.c = static_cast(2); + arg1List[0].c.d = chip::ByteSpan(chip::Uint8::from_const_char("octet_stringgarbage: not in length on purpose"), 12); + arg1List[0].c.e = chip::Span("char_stringgarbage: not in length on purpose", 11); + arg1List[0].c.f = static_cast>(1); + arg1List[0].c.g = 0; + arg1List[0].c.h = 0; + + chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type dList[2]; + + dList[0].a = 1; + dList[0].b = true; + dList[0].c = static_cast(3); + dList[0].d = chip::ByteSpan(chip::Uint8::from_const_char("nested_octet_stringgarbage: not in length on purpose"), 19); + dList[0].e = chip::Span("nested_char_stringgarbage: not in length on purpose", 18); + dList[0].f = static_cast>(1); + dList[0].g = 0; + dList[0].h = 0; + + dList[1].a = 2; + dList[1].b = true; + dList[1].c = static_cast(3); + dList[1].d = chip::ByteSpan(chip::Uint8::from_const_char("nested_octet_stringgarbage: not in length on purpose"), 19); + dList[1].e = chip::Span("nested_char_stringgarbage: not in length on purpose", 18); + dList[1].f = static_cast>(1); + dList[1].g = 0; + dList[1].h = 0; + + arg1List[0].d = dList; + + uint32_t eList[3]; + eList[0] = 1UL; + eList[1] = 2UL; + eList[2] = 3UL; + arg1List[0].e = eList; + + chip::ByteSpan fList[3]; + fList[0] = chip::ByteSpan(chip::Uint8::from_const_char("octet_string_1garbage: not in length on purpose"), 14); + fList[1] = chip::ByteSpan(chip::Uint8::from_const_char("octect_string_2garbage: not in length on purpose"), 15); + fList[2] = chip::ByteSpan(chip::Uint8::from_const_char("octet_string_3garbage: not in length on purpose"), 14); + arg1List[0].f = fList; + + uint8_t gList[2]; + gList[0] = 0; + gList[1] = 255; + arg1List[0].g = gList; + + request.arg1 = arg1List; + + auto success = [](void * context, const typename RequestType::ResponseType & data) { + (static_cast(context))->OnSuccessResponse_142(data.value); + }; + + auto failure = [](void * context, EmberAfStatus status) { + (static_cast(context))->OnFailureResponse_142(status); + }; + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_142(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_142(bool value) + { + VerifyOrReturn(CheckValue("value", value, true)); + + NextTest(); + } + + CHIP_ERROR TestSendTestCommandWithNestedStructListArgumentAndSomeFieldsBOfElementsOfArg1dAreFalse_143() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + using RequestType = chip::app::Clusters::TestCluster::Commands::TestListNestedStructListArgumentRequest::Type; + + RequestType request; + + chip::app::Clusters::TestCluster::Structs::NestedStructList::Type arg1List[1]; + + arg1List[0].a = 0; + arg1List[0].b = true; + + arg1List[0].c.a = 0; + arg1List[0].c.b = true; + arg1List[0].c.c = static_cast(2); + arg1List[0].c.d = chip::ByteSpan(chip::Uint8::from_const_char("octet_stringgarbage: not in length on purpose"), 12); + arg1List[0].c.e = chip::Span("char_stringgarbage: not in length on purpose", 11); + arg1List[0].c.f = static_cast>(1); + arg1List[0].c.g = 0; + arg1List[0].c.h = 0; + + chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type dList[2]; + + dList[0].a = 1; + dList[0].b = true; + dList[0].c = static_cast(3); + dList[0].d = chip::ByteSpan(chip::Uint8::from_const_char("nested_octet_stringgarbage: not in length on purpose"), 19); + dList[0].e = chip::Span("nested_char_stringgarbage: not in length on purpose", 18); + dList[0].f = static_cast>(1); + dList[0].g = 0; + dList[0].h = 0; + + dList[1].a = 2; + dList[1].b = false; + dList[1].c = static_cast(3); + dList[1].d = chip::ByteSpan(chip::Uint8::from_const_char("nested_octet_stringgarbage: not in length on purpose"), 19); + dList[1].e = chip::Span("nested_char_stringgarbage: not in length on purpose", 18); + dList[1].f = static_cast>(1); + dList[1].g = 0; + dList[1].h = 0; + + arg1List[0].d = dList; + + uint32_t eList[3]; + eList[0] = 1UL; + eList[1] = 2UL; + eList[2] = 3UL; + arg1List[0].e = eList; + + chip::ByteSpan fList[3]; + fList[0] = chip::ByteSpan(chip::Uint8::from_const_char("octet_string_1garbage: not in length on purpose"), 14); + fList[1] = chip::ByteSpan(chip::Uint8::from_const_char("octect_string_2garbage: not in length on purpose"), 15); + fList[2] = chip::ByteSpan(chip::Uint8::from_const_char("octet_string_3garbage: not in length on purpose"), 14); + arg1List[0].f = fList; + + uint8_t gList[2]; + gList[0] = 0; + gList[1] = 255; + arg1List[0].g = gList; + + request.arg1 = arg1List; + + auto success = [](void * context, const typename RequestType::ResponseType & data) { + (static_cast(context))->OnSuccessResponse_143(data.value); + }; + + auto failure = [](void * context, EmberAfStatus status) { + (static_cast(context))->OnFailureResponse_143(status); + }; + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, endpoint, request)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_143(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_143(bool value) { VerifyOrReturn(CheckValue("value", value, false)); NextTest(); } - CHIP_ERROR TestWriteAttributeListWithListOfInt8uAndNoneOfThemIsSetTo0_138() + CHIP_ERROR TestWriteAttributeListWithListOfInt8uAndNoneOfThemIsSetTo0_144() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -37033,26 +37484,26 @@ class TestCluster : public TestCommand listInt8uArgument = listInt8uList; return cluster.WriteAttribute( - listInt8uArgument, this, OnSuccessCallback_138, OnFailureCallback_138); + listInt8uArgument, this, OnSuccessCallback_144, OnFailureCallback_144); } - void OnFailureResponse_138(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_144(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_138() { NextTest(); } + void OnSuccessResponse_144() { NextTest(); } - CHIP_ERROR TestReadAttributeListWithListOfInt8u_139() + CHIP_ERROR TestReadAttributeListWithListOfInt8u_145() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); - return cluster.ReadAttribute(this, OnSuccessCallback_139, - OnFailureCallback_139); + return cluster.ReadAttribute(this, OnSuccessCallback_145, + OnFailureCallback_145); } - void OnFailureResponse_139(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_145(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_139(const chip::app::DataModel::DecodableList & listInt8u) + void OnSuccessResponse_145(const chip::app::DataModel::DecodableList & listInt8u) { auto iter = listInt8u.begin(); VerifyOrReturn(CheckNextListItemDecodes("listInt8u", iter, 0)); @@ -37068,7 +37519,7 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestWriteAttributeListWithListOfOctetString_140() + CHIP_ERROR TestWriteAttributeListWithListOfOctetString_146() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -37084,26 +37535,26 @@ class TestCluster : public TestCommand listOctetStringArgument = listOctetStringList; return cluster.WriteAttribute( - listOctetStringArgument, this, OnSuccessCallback_140, OnFailureCallback_140); + listOctetStringArgument, this, OnSuccessCallback_146, OnFailureCallback_146); } - void OnFailureResponse_140(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_146(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_140() { NextTest(); } + void OnSuccessResponse_146() { NextTest(); } - CHIP_ERROR TestReadAttributeListWithListOfOctetString_141() + CHIP_ERROR TestReadAttributeListWithListOfOctetString_147() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_141, OnFailureCallback_141); + this, OnSuccessCallback_147, OnFailureCallback_147); } - void OnFailureResponse_141(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_147(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_141(const chip::app::DataModel::DecodableList & listOctetString) + void OnSuccessResponse_147(const chip::app::DataModel::DecodableList & listOctetString) { auto iter = listOctetString.begin(); VerifyOrReturn(CheckNextListItemDecodes("listOctetString", iter, 0)); @@ -37123,7 +37574,7 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestWriteAttributeListWithListOfListStructOctetString_142() + CHIP_ERROR TestWriteAttributeListWithListOfListStructOctetString_148() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -37153,26 +37604,26 @@ class TestCluster : public TestCommand listStructOctetStringArgument = listStructOctetStringList; return cluster.WriteAttribute( - listStructOctetStringArgument, this, OnSuccessCallback_142, OnFailureCallback_142); + listStructOctetStringArgument, this, OnSuccessCallback_148, OnFailureCallback_148); } - void OnFailureResponse_142(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_148(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_142() { NextTest(); } + void OnSuccessResponse_148() { NextTest(); } - CHIP_ERROR TestReadAttributeListWithListOfListStructOctetString_143() + CHIP_ERROR TestReadAttributeListWithListOfListStructOctetString_149() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_143, OnFailureCallback_143); + this, OnSuccessCallback_149, OnFailureCallback_149); } - void OnFailureResponse_143(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_149(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_143( + void OnSuccessResponse_149( const chip::app::DataModel::DecodableList & listStructOctetString) { @@ -37198,7 +37649,7 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestSendTestCommandWithOptionalArgSet_144() + CHIP_ERROR TestSendTestCommandWithOptionalArgSet_150() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; using RequestType = chip::app::Clusters::TestCluster::Commands::TestNullableOptionalRequest::Type; @@ -37208,20 +37659,20 @@ class TestCluster : public TestCommand auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context)) - ->OnSuccessResponse_144(data.wasPresent, data.wasNull, data.value, data.originalValue); + ->OnSuccessResponse_150(data.wasPresent, data.wasNull, data.value, data.originalValue); }; auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_144(status); + (static_cast(context))->OnFailureResponse_150(status); }; ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, endpoint, request)); return CHIP_NO_ERROR; } - void OnFailureResponse_144(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_150(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_144(bool wasPresent, const chip::Optional & wasNull, const chip::Optional & value, + void OnSuccessResponse_150(bool wasPresent, const chip::Optional & wasNull, const chip::Optional & value, const chip::Optional> & originalValue) { VerifyOrReturn(CheckValue("wasPresent", wasPresent, true)); @@ -37239,7 +37690,7 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestSendTestCommandWithoutItsOptionalArg_145() + CHIP_ERROR TestSendTestCommandWithoutItsOptionalArg_151() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; using RequestType = chip::app::Clusters::TestCluster::Commands::TestNullableOptionalRequest::Type; @@ -37248,20 +37699,20 @@ class TestCluster : public TestCommand auto success = [](void * context, const typename RequestType::ResponseType & data) { (static_cast(context)) - ->OnSuccessResponse_145(data.wasPresent, data.wasNull, data.value, data.originalValue); + ->OnSuccessResponse_151(data.wasPresent, data.wasNull, data.value, data.originalValue); }; auto failure = [](void * context, EmberAfStatus status) { - (static_cast(context))->OnFailureResponse_145(status); + (static_cast(context))->OnFailureResponse_151(status); }; ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, endpoint, request)); return CHIP_NO_ERROR; } - void OnFailureResponse_145(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_151(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_145(bool wasPresent, const chip::Optional & wasNull, const chip::Optional & value, + void OnSuccessResponse_151(bool wasPresent, const chip::Optional & wasNull, const chip::Optional & value, const chip::Optional> & originalValue) { VerifyOrReturn(CheckValue("wasPresent", wasPresent, false)); @@ -37269,7 +37720,7 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestWriteAttributeNullableBooleanNull_146() + CHIP_ERROR TestWriteAttributeNullableBooleanNull_152() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -37279,33 +37730,33 @@ class TestCluster : public TestCommand nullableBooleanArgument.SetNull(); return cluster.WriteAttribute( - nullableBooleanArgument, this, OnSuccessCallback_146, OnFailureCallback_146); + nullableBooleanArgument, this, OnSuccessCallback_152, OnFailureCallback_152); } - void OnFailureResponse_146(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_152(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_146() { NextTest(); } + void OnSuccessResponse_152() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableBooleanNull_147() + CHIP_ERROR TestReadAttributeNullableBooleanNull_153() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_147, OnFailureCallback_147); + this, OnSuccessCallback_153, OnFailureCallback_153); } - void OnFailureResponse_147(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_153(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_147(const chip::app::DataModel::Nullable & nullableBoolean) + void OnSuccessResponse_153(const chip::app::DataModel::Nullable & nullableBoolean) { VerifyOrReturn(CheckValueNull("nullableBoolean", nullableBoolean)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableBooleanTrue_148() + CHIP_ERROR TestWriteAttributeNullableBooleanTrue_154() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -37315,26 +37766,26 @@ class TestCluster : public TestCommand nullableBooleanArgument.SetNonNull() = true; return cluster.WriteAttribute( - nullableBooleanArgument, this, OnSuccessCallback_148, OnFailureCallback_148); + nullableBooleanArgument, this, OnSuccessCallback_154, OnFailureCallback_154); } - void OnFailureResponse_148(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_154(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_148() { NextTest(); } + void OnSuccessResponse_154() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableBooleanTrue_149() + CHIP_ERROR TestReadAttributeNullableBooleanTrue_155() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_149, OnFailureCallback_149); + this, OnSuccessCallback_155, OnFailureCallback_155); } - void OnFailureResponse_149(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_155(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_149(const chip::app::DataModel::Nullable & nullableBoolean) + void OnSuccessResponse_155(const chip::app::DataModel::Nullable & nullableBoolean) { VerifyOrReturn(CheckValueNonNull("nullableBoolean", nullableBoolean)); VerifyOrReturn(CheckValue("nullableBoolean.Value()", nullableBoolean.Value(), true)); @@ -37342,7 +37793,7 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestWriteAttributeNullableBitmap8MaxValue_150() + CHIP_ERROR TestWriteAttributeNullableBitmap8MaxValue_156() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -37352,26 +37803,26 @@ class TestCluster : public TestCommand nullableBitmap8Argument.SetNonNull() = 254; return cluster.WriteAttribute( - nullableBitmap8Argument, this, OnSuccessCallback_150, OnFailureCallback_150); + nullableBitmap8Argument, this, OnSuccessCallback_156, OnFailureCallback_156); } - void OnFailureResponse_150(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_156(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_150() { NextTest(); } + void OnSuccessResponse_156() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableBitmap8MaxValue_151() + CHIP_ERROR TestReadAttributeNullableBitmap8MaxValue_157() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_151, OnFailureCallback_151); + this, OnSuccessCallback_157, OnFailureCallback_157); } - void OnFailureResponse_151(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_157(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_151(const chip::app::DataModel::Nullable & nullableBitmap8) + void OnSuccessResponse_157(const chip::app::DataModel::Nullable & nullableBitmap8) { VerifyOrReturn(CheckValueNonNull("nullableBitmap8", nullableBitmap8)); VerifyOrReturn(CheckValue("nullableBitmap8.Value()", nullableBitmap8.Value(), 254)); @@ -37379,7 +37830,7 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestWriteAttributeNullableBitmap8InvalidValue_152() + CHIP_ERROR TestWriteAttributeNullableBitmap8InvalidValue_158() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -37389,30 +37840,30 @@ class TestCluster : public TestCommand nullableBitmap8Argument.SetNonNull() = 255; return cluster.WriteAttribute( - nullableBitmap8Argument, this, OnSuccessCallback_152, OnFailureCallback_152); + nullableBitmap8Argument, this, OnSuccessCallback_158, OnFailureCallback_158); } - void OnFailureResponse_152(uint8_t status) + void OnFailureResponse_158(uint8_t status) { VerifyOrReturn(CheckValue("status", status, 135)); NextTest(); } - void OnSuccessResponse_152() { ThrowSuccessResponse(); } + void OnSuccessResponse_158() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadAttributeNullableBitmap8UnchangedValue_153() + CHIP_ERROR TestReadAttributeNullableBitmap8UnchangedValue_159() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_153, OnFailureCallback_153); + this, OnSuccessCallback_159, OnFailureCallback_159); } - void OnFailureResponse_153(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_159(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_153(const chip::app::DataModel::Nullable & nullableBitmap8) + void OnSuccessResponse_159(const chip::app::DataModel::Nullable & nullableBitmap8) { VerifyOrReturn(CheckValueNonNull("nullableBitmap8", nullableBitmap8)); VerifyOrReturn(CheckValue("nullableBitmap8.Value()", nullableBitmap8.Value(), 254)); @@ -37420,7 +37871,7 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestWriteAttributeNullableBitmap8NullValue_154() + CHIP_ERROR TestWriteAttributeNullableBitmap8NullValue_160() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -37430,33 +37881,33 @@ class TestCluster : public TestCommand nullableBitmap8Argument.SetNull(); return cluster.WriteAttribute( - nullableBitmap8Argument, this, OnSuccessCallback_154, OnFailureCallback_154); + nullableBitmap8Argument, this, OnSuccessCallback_160, OnFailureCallback_160); } - void OnFailureResponse_154(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_160(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_154() { NextTest(); } + void OnSuccessResponse_160() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableBitmap8NullValue_155() + CHIP_ERROR TestReadAttributeNullableBitmap8NullValue_161() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_155, OnFailureCallback_155); + this, OnSuccessCallback_161, OnFailureCallback_161); } - void OnFailureResponse_155(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_161(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_155(const chip::app::DataModel::Nullable & nullableBitmap8) + void OnSuccessResponse_161(const chip::app::DataModel::Nullable & nullableBitmap8) { VerifyOrReturn(CheckValueNull("nullableBitmap8", nullableBitmap8)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableBitmap16MaxValue_156() + CHIP_ERROR TestWriteAttributeNullableBitmap16MaxValue_162() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -37466,26 +37917,26 @@ class TestCluster : public TestCommand nullableBitmap16Argument.SetNonNull() = 65534U; return cluster.WriteAttribute( - nullableBitmap16Argument, this, OnSuccessCallback_156, OnFailureCallback_156); + nullableBitmap16Argument, this, OnSuccessCallback_162, OnFailureCallback_162); } - void OnFailureResponse_156(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_162(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_156() { NextTest(); } + void OnSuccessResponse_162() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableBitmap16MaxValue_157() + CHIP_ERROR TestReadAttributeNullableBitmap16MaxValue_163() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_157, OnFailureCallback_157); + this, OnSuccessCallback_163, OnFailureCallback_163); } - void OnFailureResponse_157(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_163(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_157(const chip::app::DataModel::Nullable & nullableBitmap16) + void OnSuccessResponse_163(const chip::app::DataModel::Nullable & nullableBitmap16) { VerifyOrReturn(CheckValueNonNull("nullableBitmap16", nullableBitmap16)); VerifyOrReturn(CheckValue("nullableBitmap16.Value()", nullableBitmap16.Value(), 65534U)); @@ -37493,7 +37944,7 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestWriteAttributeNullableBitmap16InvalidValue_158() + CHIP_ERROR TestWriteAttributeNullableBitmap16InvalidValue_164() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -37503,30 +37954,30 @@ class TestCluster : public TestCommand nullableBitmap16Argument.SetNonNull() = 65535U; return cluster.WriteAttribute( - nullableBitmap16Argument, this, OnSuccessCallback_158, OnFailureCallback_158); + nullableBitmap16Argument, this, OnSuccessCallback_164, OnFailureCallback_164); } - void OnFailureResponse_158(uint8_t status) + void OnFailureResponse_164(uint8_t status) { VerifyOrReturn(CheckValue("status", status, 135)); NextTest(); } - void OnSuccessResponse_158() { ThrowSuccessResponse(); } + void OnSuccessResponse_164() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadAttributeNullableBitmap16UnchangedValue_159() + CHIP_ERROR TestReadAttributeNullableBitmap16UnchangedValue_165() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_159, OnFailureCallback_159); + this, OnSuccessCallback_165, OnFailureCallback_165); } - void OnFailureResponse_159(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_165(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_159(const chip::app::DataModel::Nullable & nullableBitmap16) + void OnSuccessResponse_165(const chip::app::DataModel::Nullable & nullableBitmap16) { VerifyOrReturn(CheckValueNonNull("nullableBitmap16", nullableBitmap16)); VerifyOrReturn(CheckValue("nullableBitmap16.Value()", nullableBitmap16.Value(), 65534U)); @@ -37534,7 +37985,7 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestWriteAttributeNullableBitmap16NullValue_160() + CHIP_ERROR TestWriteAttributeNullableBitmap16NullValue_166() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -37544,33 +37995,33 @@ class TestCluster : public TestCommand nullableBitmap16Argument.SetNull(); return cluster.WriteAttribute( - nullableBitmap16Argument, this, OnSuccessCallback_160, OnFailureCallback_160); + nullableBitmap16Argument, this, OnSuccessCallback_166, OnFailureCallback_166); } - void OnFailureResponse_160(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_166(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_160() { NextTest(); } + void OnSuccessResponse_166() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableBitmap16NullValue_161() + CHIP_ERROR TestReadAttributeNullableBitmap16NullValue_167() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_161, OnFailureCallback_161); + this, OnSuccessCallback_167, OnFailureCallback_167); } - void OnFailureResponse_161(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_167(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_161(const chip::app::DataModel::Nullable & nullableBitmap16) + void OnSuccessResponse_167(const chip::app::DataModel::Nullable & nullableBitmap16) { VerifyOrReturn(CheckValueNull("nullableBitmap16", nullableBitmap16)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableBitmap32MaxValue_162() + CHIP_ERROR TestWriteAttributeNullableBitmap32MaxValue_168() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -37580,26 +38031,26 @@ class TestCluster : public TestCommand nullableBitmap32Argument.SetNonNull() = 4294967294UL; return cluster.WriteAttribute( - nullableBitmap32Argument, this, OnSuccessCallback_162, OnFailureCallback_162); + nullableBitmap32Argument, this, OnSuccessCallback_168, OnFailureCallback_168); } - void OnFailureResponse_162(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_168(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_162() { NextTest(); } + void OnSuccessResponse_168() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableBitmap32MaxValue_163() + CHIP_ERROR TestReadAttributeNullableBitmap32MaxValue_169() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_163, OnFailureCallback_163); + this, OnSuccessCallback_169, OnFailureCallback_169); } - void OnFailureResponse_163(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_169(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_163(const chip::app::DataModel::Nullable & nullableBitmap32) + void OnSuccessResponse_169(const chip::app::DataModel::Nullable & nullableBitmap32) { VerifyOrReturn(CheckValueNonNull("nullableBitmap32", nullableBitmap32)); VerifyOrReturn(CheckValue("nullableBitmap32.Value()", nullableBitmap32.Value(), 4294967294UL)); @@ -37607,7 +38058,7 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestWriteAttributeNullableBitmap32InvalidValue_164() + CHIP_ERROR TestWriteAttributeNullableBitmap32InvalidValue_170() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -37617,30 +38068,30 @@ class TestCluster : public TestCommand nullableBitmap32Argument.SetNonNull() = 4294967295UL; return cluster.WriteAttribute( - nullableBitmap32Argument, this, OnSuccessCallback_164, OnFailureCallback_164); + nullableBitmap32Argument, this, OnSuccessCallback_170, OnFailureCallback_170); } - void OnFailureResponse_164(uint8_t status) + void OnFailureResponse_170(uint8_t status) { VerifyOrReturn(CheckValue("status", status, 135)); NextTest(); } - void OnSuccessResponse_164() { ThrowSuccessResponse(); } + void OnSuccessResponse_170() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadAttributeNullableBitmap32UnchangedValue_165() + CHIP_ERROR TestReadAttributeNullableBitmap32UnchangedValue_171() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_165, OnFailureCallback_165); + this, OnSuccessCallback_171, OnFailureCallback_171); } - void OnFailureResponse_165(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_171(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_165(const chip::app::DataModel::Nullable & nullableBitmap32) + void OnSuccessResponse_171(const chip::app::DataModel::Nullable & nullableBitmap32) { VerifyOrReturn(CheckValueNonNull("nullableBitmap32", nullableBitmap32)); VerifyOrReturn(CheckValue("nullableBitmap32.Value()", nullableBitmap32.Value(), 4294967294UL)); @@ -37648,7 +38099,7 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestWriteAttributeNullableBitmap32NullValue_166() + CHIP_ERROR TestWriteAttributeNullableBitmap32NullValue_172() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -37658,33 +38109,33 @@ class TestCluster : public TestCommand nullableBitmap32Argument.SetNull(); return cluster.WriteAttribute( - nullableBitmap32Argument, this, OnSuccessCallback_166, OnFailureCallback_166); + nullableBitmap32Argument, this, OnSuccessCallback_172, OnFailureCallback_172); } - void OnFailureResponse_166(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_172(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_166() { NextTest(); } + void OnSuccessResponse_172() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableBitmap32NullValue_167() + CHIP_ERROR TestReadAttributeNullableBitmap32NullValue_173() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_167, OnFailureCallback_167); + this, OnSuccessCallback_173, OnFailureCallback_173); } - void OnFailureResponse_167(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_173(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_167(const chip::app::DataModel::Nullable & nullableBitmap32) + void OnSuccessResponse_173(const chip::app::DataModel::Nullable & nullableBitmap32) { VerifyOrReturn(CheckValueNull("nullableBitmap32", nullableBitmap32)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableBitmap64MaxValue_168() + CHIP_ERROR TestWriteAttributeNullableBitmap64MaxValue_174() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -37694,26 +38145,26 @@ class TestCluster : public TestCommand nullableBitmap64Argument.SetNonNull() = 18446744073709551614ULL; return cluster.WriteAttribute( - nullableBitmap64Argument, this, OnSuccessCallback_168, OnFailureCallback_168); + nullableBitmap64Argument, this, OnSuccessCallback_174, OnFailureCallback_174); } - void OnFailureResponse_168(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_174(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_168() { NextTest(); } + void OnSuccessResponse_174() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableBitmap64MaxValue_169() + CHIP_ERROR TestReadAttributeNullableBitmap64MaxValue_175() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_169, OnFailureCallback_169); + this, OnSuccessCallback_175, OnFailureCallback_175); } - void OnFailureResponse_169(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_175(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_169(const chip::app::DataModel::Nullable & nullableBitmap64) + void OnSuccessResponse_175(const chip::app::DataModel::Nullable & nullableBitmap64) { VerifyOrReturn(CheckValueNonNull("nullableBitmap64", nullableBitmap64)); VerifyOrReturn(CheckValue("nullableBitmap64.Value()", nullableBitmap64.Value(), 18446744073709551614ULL)); @@ -37721,7 +38172,7 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestWriteAttributeNullableBitmap64InvalidValue_170() + CHIP_ERROR TestWriteAttributeNullableBitmap64InvalidValue_176() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -37731,30 +38182,30 @@ class TestCluster : public TestCommand nullableBitmap64Argument.SetNonNull() = 18446744073709551615ULL; return cluster.WriteAttribute( - nullableBitmap64Argument, this, OnSuccessCallback_170, OnFailureCallback_170); + nullableBitmap64Argument, this, OnSuccessCallback_176, OnFailureCallback_176); } - void OnFailureResponse_170(uint8_t status) + void OnFailureResponse_176(uint8_t status) { VerifyOrReturn(CheckValue("status", status, 135)); NextTest(); } - void OnSuccessResponse_170() { ThrowSuccessResponse(); } + void OnSuccessResponse_176() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadAttributeNullableBitmap64UnchangedValue_171() + CHIP_ERROR TestReadAttributeNullableBitmap64UnchangedValue_177() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_171, OnFailureCallback_171); + this, OnSuccessCallback_177, OnFailureCallback_177); } - void OnFailureResponse_171(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_177(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_171(const chip::app::DataModel::Nullable & nullableBitmap64) + void OnSuccessResponse_177(const chip::app::DataModel::Nullable & nullableBitmap64) { VerifyOrReturn(CheckValueNonNull("nullableBitmap64", nullableBitmap64)); VerifyOrReturn(CheckValue("nullableBitmap64.Value()", nullableBitmap64.Value(), 18446744073709551614ULL)); @@ -37762,7 +38213,7 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestWriteAttributeNullableBitmap64NullValue_172() + CHIP_ERROR TestWriteAttributeNullableBitmap64NullValue_178() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -37772,33 +38223,33 @@ class TestCluster : public TestCommand nullableBitmap64Argument.SetNull(); return cluster.WriteAttribute( - nullableBitmap64Argument, this, OnSuccessCallback_172, OnFailureCallback_172); + nullableBitmap64Argument, this, OnSuccessCallback_178, OnFailureCallback_178); } - void OnFailureResponse_172(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_178(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_172() { NextTest(); } + void OnSuccessResponse_178() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableBitmap64NullValue_173() + CHIP_ERROR TestReadAttributeNullableBitmap64NullValue_179() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_173, OnFailureCallback_173); + this, OnSuccessCallback_179, OnFailureCallback_179); } - void OnFailureResponse_173(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_179(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_173(const chip::app::DataModel::Nullable & nullableBitmap64) + void OnSuccessResponse_179(const chip::app::DataModel::Nullable & nullableBitmap64) { VerifyOrReturn(CheckValueNull("nullableBitmap64", nullableBitmap64)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt8uMaxValue_174() + CHIP_ERROR TestWriteAttributeNullableInt8uMaxValue_180() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -37808,26 +38259,26 @@ class TestCluster : public TestCommand nullableInt8uArgument.SetNonNull() = 254; return cluster.WriteAttribute( - nullableInt8uArgument, this, OnSuccessCallback_174, OnFailureCallback_174); + nullableInt8uArgument, this, OnSuccessCallback_180, OnFailureCallback_180); } - void OnFailureResponse_174(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_180(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_174() { NextTest(); } + void OnSuccessResponse_180() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt8uMaxValue_175() + CHIP_ERROR TestReadAttributeNullableInt8uMaxValue_181() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_175, OnFailureCallback_175); + this, OnSuccessCallback_181, OnFailureCallback_181); } - void OnFailureResponse_175(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_181(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_175(const chip::app::DataModel::Nullable & nullableInt8u) + void OnSuccessResponse_181(const chip::app::DataModel::Nullable & nullableInt8u) { VerifyOrReturn(CheckValueNonNull("nullableInt8u", nullableInt8u)); VerifyOrReturn(CheckValue("nullableInt8u.Value()", nullableInt8u.Value(), 254)); @@ -37835,7 +38286,7 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt8uInvalidValue_176() + CHIP_ERROR TestWriteAttributeNullableInt8uInvalidValue_182() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -37845,30 +38296,30 @@ class TestCluster : public TestCommand nullableInt8uArgument.SetNonNull() = 255; return cluster.WriteAttribute( - nullableInt8uArgument, this, OnSuccessCallback_176, OnFailureCallback_176); + nullableInt8uArgument, this, OnSuccessCallback_182, OnFailureCallback_182); } - void OnFailureResponse_176(uint8_t status) + void OnFailureResponse_182(uint8_t status) { VerifyOrReturn(CheckValue("status", status, 135)); NextTest(); } - void OnSuccessResponse_176() { ThrowSuccessResponse(); } + void OnSuccessResponse_182() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadAttributeNullableInt8uUnchangedValue_177() + CHIP_ERROR TestReadAttributeNullableInt8uUnchangedValue_183() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_177, OnFailureCallback_177); + this, OnSuccessCallback_183, OnFailureCallback_183); } - void OnFailureResponse_177(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_183(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_177(const chip::app::DataModel::Nullable & nullableInt8u) + void OnSuccessResponse_183(const chip::app::DataModel::Nullable & nullableInt8u) { VerifyOrReturn(CheckValueNonNull("nullableInt8u", nullableInt8u)); VerifyOrReturn(CheckValue("nullableInt8u.Value()", nullableInt8u.Value(), 254)); @@ -37876,7 +38327,7 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt8uNullValue_178() + CHIP_ERROR TestWriteAttributeNullableInt8uNullValue_184() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -37886,33 +38337,33 @@ class TestCluster : public TestCommand nullableInt8uArgument.SetNull(); return cluster.WriteAttribute( - nullableInt8uArgument, this, OnSuccessCallback_178, OnFailureCallback_178); + nullableInt8uArgument, this, OnSuccessCallback_184, OnFailureCallback_184); } - void OnFailureResponse_178(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_184(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_178() { NextTest(); } + void OnSuccessResponse_184() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt8uNullValue_179() + CHIP_ERROR TestReadAttributeNullableInt8uNullValue_185() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_179, OnFailureCallback_179); + this, OnSuccessCallback_185, OnFailureCallback_185); } - void OnFailureResponse_179(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_185(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_179(const chip::app::DataModel::Nullable & nullableInt8u) + void OnSuccessResponse_185(const chip::app::DataModel::Nullable & nullableInt8u) { VerifyOrReturn(CheckValueNull("nullableInt8u", nullableInt8u)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt16uMaxValue_180() + CHIP_ERROR TestWriteAttributeNullableInt16uMaxValue_186() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -37922,26 +38373,26 @@ class TestCluster : public TestCommand nullableInt16uArgument.SetNonNull() = 65534U; return cluster.WriteAttribute( - nullableInt16uArgument, this, OnSuccessCallback_180, OnFailureCallback_180); + nullableInt16uArgument, this, OnSuccessCallback_186, OnFailureCallback_186); } - void OnFailureResponse_180(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_186(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_180() { NextTest(); } + void OnSuccessResponse_186() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt16uMaxValue_181() + CHIP_ERROR TestReadAttributeNullableInt16uMaxValue_187() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_181, OnFailureCallback_181); + this, OnSuccessCallback_187, OnFailureCallback_187); } - void OnFailureResponse_181(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_187(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_181(const chip::app::DataModel::Nullable & nullableInt16u) + void OnSuccessResponse_187(const chip::app::DataModel::Nullable & nullableInt16u) { VerifyOrReturn(CheckValueNonNull("nullableInt16u", nullableInt16u)); VerifyOrReturn(CheckValue("nullableInt16u.Value()", nullableInt16u.Value(), 65534U)); @@ -37949,7 +38400,7 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt16uInvalidValue_182() + CHIP_ERROR TestWriteAttributeNullableInt16uInvalidValue_188() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -37959,30 +38410,30 @@ class TestCluster : public TestCommand nullableInt16uArgument.SetNonNull() = 65535U; return cluster.WriteAttribute( - nullableInt16uArgument, this, OnSuccessCallback_182, OnFailureCallback_182); + nullableInt16uArgument, this, OnSuccessCallback_188, OnFailureCallback_188); } - void OnFailureResponse_182(uint8_t status) + void OnFailureResponse_188(uint8_t status) { VerifyOrReturn(CheckValue("status", status, 135)); NextTest(); } - void OnSuccessResponse_182() { ThrowSuccessResponse(); } + void OnSuccessResponse_188() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadAttributeNullableInt16uUnchangedValue_183() + CHIP_ERROR TestReadAttributeNullableInt16uUnchangedValue_189() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_183, OnFailureCallback_183); + this, OnSuccessCallback_189, OnFailureCallback_189); } - void OnFailureResponse_183(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_189(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_183(const chip::app::DataModel::Nullable & nullableInt16u) + void OnSuccessResponse_189(const chip::app::DataModel::Nullable & nullableInt16u) { VerifyOrReturn(CheckValueNonNull("nullableInt16u", nullableInt16u)); VerifyOrReturn(CheckValue("nullableInt16u.Value()", nullableInt16u.Value(), 65534U)); @@ -37990,7 +38441,7 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt16uNullValue_184() + CHIP_ERROR TestWriteAttributeNullableInt16uNullValue_190() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -38000,33 +38451,33 @@ class TestCluster : public TestCommand nullableInt16uArgument.SetNull(); return cluster.WriteAttribute( - nullableInt16uArgument, this, OnSuccessCallback_184, OnFailureCallback_184); + nullableInt16uArgument, this, OnSuccessCallback_190, OnFailureCallback_190); } - void OnFailureResponse_184(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_190(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_184() { NextTest(); } + void OnSuccessResponse_190() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt16uNullValue_185() + CHIP_ERROR TestReadAttributeNullableInt16uNullValue_191() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_185, OnFailureCallback_185); + this, OnSuccessCallback_191, OnFailureCallback_191); } - void OnFailureResponse_185(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_191(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_185(const chip::app::DataModel::Nullable & nullableInt16u) + void OnSuccessResponse_191(const chip::app::DataModel::Nullable & nullableInt16u) { VerifyOrReturn(CheckValueNull("nullableInt16u", nullableInt16u)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt32uMaxValue_186() + CHIP_ERROR TestWriteAttributeNullableInt32uMaxValue_192() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -38036,26 +38487,26 @@ class TestCluster : public TestCommand nullableInt32uArgument.SetNonNull() = 4294967294UL; return cluster.WriteAttribute( - nullableInt32uArgument, this, OnSuccessCallback_186, OnFailureCallback_186); + nullableInt32uArgument, this, OnSuccessCallback_192, OnFailureCallback_192); } - void OnFailureResponse_186(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_192(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_186() { NextTest(); } + void OnSuccessResponse_192() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt32uMaxValue_187() + CHIP_ERROR TestReadAttributeNullableInt32uMaxValue_193() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_187, OnFailureCallback_187); + this, OnSuccessCallback_193, OnFailureCallback_193); } - void OnFailureResponse_187(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_193(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_187(const chip::app::DataModel::Nullable & nullableInt32u) + void OnSuccessResponse_193(const chip::app::DataModel::Nullable & nullableInt32u) { VerifyOrReturn(CheckValueNonNull("nullableInt32u", nullableInt32u)); VerifyOrReturn(CheckValue("nullableInt32u.Value()", nullableInt32u.Value(), 4294967294UL)); @@ -38063,7 +38514,7 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt32uInvalidValue_188() + CHIP_ERROR TestWriteAttributeNullableInt32uInvalidValue_194() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -38073,30 +38524,30 @@ class TestCluster : public TestCommand nullableInt32uArgument.SetNonNull() = 4294967295UL; return cluster.WriteAttribute( - nullableInt32uArgument, this, OnSuccessCallback_188, OnFailureCallback_188); + nullableInt32uArgument, this, OnSuccessCallback_194, OnFailureCallback_194); } - void OnFailureResponse_188(uint8_t status) + void OnFailureResponse_194(uint8_t status) { VerifyOrReturn(CheckValue("status", status, 135)); NextTest(); } - void OnSuccessResponse_188() { ThrowSuccessResponse(); } + void OnSuccessResponse_194() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadAttributeNullableInt32uUnchangedValue_189() + CHIP_ERROR TestReadAttributeNullableInt32uUnchangedValue_195() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_189, OnFailureCallback_189); + this, OnSuccessCallback_195, OnFailureCallback_195); } - void OnFailureResponse_189(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_195(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_189(const chip::app::DataModel::Nullable & nullableInt32u) + void OnSuccessResponse_195(const chip::app::DataModel::Nullable & nullableInt32u) { VerifyOrReturn(CheckValueNonNull("nullableInt32u", nullableInt32u)); VerifyOrReturn(CheckValue("nullableInt32u.Value()", nullableInt32u.Value(), 4294967294UL)); @@ -38104,7 +38555,7 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt32uNullValue_190() + CHIP_ERROR TestWriteAttributeNullableInt32uNullValue_196() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -38114,33 +38565,33 @@ class TestCluster : public TestCommand nullableInt32uArgument.SetNull(); return cluster.WriteAttribute( - nullableInt32uArgument, this, OnSuccessCallback_190, OnFailureCallback_190); + nullableInt32uArgument, this, OnSuccessCallback_196, OnFailureCallback_196); } - void OnFailureResponse_190(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_196(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_190() { NextTest(); } + void OnSuccessResponse_196() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt32uNullValue_191() + CHIP_ERROR TestReadAttributeNullableInt32uNullValue_197() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_191, OnFailureCallback_191); + this, OnSuccessCallback_197, OnFailureCallback_197); } - void OnFailureResponse_191(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_197(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_191(const chip::app::DataModel::Nullable & nullableInt32u) + void OnSuccessResponse_197(const chip::app::DataModel::Nullable & nullableInt32u) { VerifyOrReturn(CheckValueNull("nullableInt32u", nullableInt32u)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt64uMaxValue_192() + CHIP_ERROR TestWriteAttributeNullableInt64uMaxValue_198() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -38150,26 +38601,26 @@ class TestCluster : public TestCommand nullableInt64uArgument.SetNonNull() = 18446744073709551614ULL; return cluster.WriteAttribute( - nullableInt64uArgument, this, OnSuccessCallback_192, OnFailureCallback_192); + nullableInt64uArgument, this, OnSuccessCallback_198, OnFailureCallback_198); } - void OnFailureResponse_192(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_198(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_192() { NextTest(); } + void OnSuccessResponse_198() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt64uMaxValue_193() + CHIP_ERROR TestReadAttributeNullableInt64uMaxValue_199() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_193, OnFailureCallback_193); + this, OnSuccessCallback_199, OnFailureCallback_199); } - void OnFailureResponse_193(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_199(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_193(const chip::app::DataModel::Nullable & nullableInt64u) + void OnSuccessResponse_199(const chip::app::DataModel::Nullable & nullableInt64u) { VerifyOrReturn(CheckValueNonNull("nullableInt64u", nullableInt64u)); VerifyOrReturn(CheckValue("nullableInt64u.Value()", nullableInt64u.Value(), 18446744073709551614ULL)); @@ -38177,7 +38628,7 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt64uInvalidValue_194() + CHIP_ERROR TestWriteAttributeNullableInt64uInvalidValue_200() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -38187,30 +38638,30 @@ class TestCluster : public TestCommand nullableInt64uArgument.SetNonNull() = 18446744073709551615ULL; return cluster.WriteAttribute( - nullableInt64uArgument, this, OnSuccessCallback_194, OnFailureCallback_194); + nullableInt64uArgument, this, OnSuccessCallback_200, OnFailureCallback_200); } - void OnFailureResponse_194(uint8_t status) + void OnFailureResponse_200(uint8_t status) { VerifyOrReturn(CheckValue("status", status, 135)); NextTest(); } - void OnSuccessResponse_194() { ThrowSuccessResponse(); } + void OnSuccessResponse_200() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadAttributeNullableInt64uUnchangedValue_195() + CHIP_ERROR TestReadAttributeNullableInt64uUnchangedValue_201() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_195, OnFailureCallback_195); + this, OnSuccessCallback_201, OnFailureCallback_201); } - void OnFailureResponse_195(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_201(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_195(const chip::app::DataModel::Nullable & nullableInt64u) + void OnSuccessResponse_201(const chip::app::DataModel::Nullable & nullableInt64u) { VerifyOrReturn(CheckValueNonNull("nullableInt64u", nullableInt64u)); VerifyOrReturn(CheckValue("nullableInt64u.Value()", nullableInt64u.Value(), 18446744073709551614ULL)); @@ -38218,7 +38669,7 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt64uNullValue_196() + CHIP_ERROR TestWriteAttributeNullableInt64uNullValue_202() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -38228,33 +38679,33 @@ class TestCluster : public TestCommand nullableInt64uArgument.SetNull(); return cluster.WriteAttribute( - nullableInt64uArgument, this, OnSuccessCallback_196, OnFailureCallback_196); + nullableInt64uArgument, this, OnSuccessCallback_202, OnFailureCallback_202); } - void OnFailureResponse_196(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_202(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_196() { NextTest(); } + void OnSuccessResponse_202() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt64uNullValue_197() + CHIP_ERROR TestReadAttributeNullableInt64uNullValue_203() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_197, OnFailureCallback_197); + this, OnSuccessCallback_203, OnFailureCallback_203); } - void OnFailureResponse_197(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_203(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_197(const chip::app::DataModel::Nullable & nullableInt64u) + void OnSuccessResponse_203(const chip::app::DataModel::Nullable & nullableInt64u) { VerifyOrReturn(CheckValueNull("nullableInt64u", nullableInt64u)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt8sMinValue_198() + CHIP_ERROR TestWriteAttributeNullableInt8sMinValue_204() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -38264,26 +38715,26 @@ class TestCluster : public TestCommand nullableInt8sArgument.SetNonNull() = -127; return cluster.WriteAttribute( - nullableInt8sArgument, this, OnSuccessCallback_198, OnFailureCallback_198); + nullableInt8sArgument, this, OnSuccessCallback_204, OnFailureCallback_204); } - void OnFailureResponse_198(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_204(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_198() { NextTest(); } + void OnSuccessResponse_204() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt8sMinValue_199() + CHIP_ERROR TestReadAttributeNullableInt8sMinValue_205() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_199, OnFailureCallback_199); + this, OnSuccessCallback_205, OnFailureCallback_205); } - void OnFailureResponse_199(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_205(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_199(const chip::app::DataModel::Nullable & nullableInt8s) + void OnSuccessResponse_205(const chip::app::DataModel::Nullable & nullableInt8s) { VerifyOrReturn(CheckValueNonNull("nullableInt8s", nullableInt8s)); VerifyOrReturn(CheckValue("nullableInt8s.Value()", nullableInt8s.Value(), -127)); @@ -38291,7 +38742,7 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt8sInvalidValue_200() + CHIP_ERROR TestWriteAttributeNullableInt8sInvalidValue_206() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -38301,30 +38752,30 @@ class TestCluster : public TestCommand nullableInt8sArgument.SetNonNull() = -128; return cluster.WriteAttribute( - nullableInt8sArgument, this, OnSuccessCallback_200, OnFailureCallback_200); + nullableInt8sArgument, this, OnSuccessCallback_206, OnFailureCallback_206); } - void OnFailureResponse_200(uint8_t status) + void OnFailureResponse_206(uint8_t status) { VerifyOrReturn(CheckValue("status", status, 135)); NextTest(); } - void OnSuccessResponse_200() { ThrowSuccessResponse(); } + void OnSuccessResponse_206() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadAttributeNullableInt8sUnchangedValue_201() + CHIP_ERROR TestReadAttributeNullableInt8sUnchangedValue_207() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_201, OnFailureCallback_201); + this, OnSuccessCallback_207, OnFailureCallback_207); } - void OnFailureResponse_201(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_207(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_201(const chip::app::DataModel::Nullable & nullableInt8s) + void OnSuccessResponse_207(const chip::app::DataModel::Nullable & nullableInt8s) { VerifyOrReturn(CheckValueNonNull("nullableInt8s", nullableInt8s)); VerifyOrReturn(CheckValue("nullableInt8s.Value()", nullableInt8s.Value(), -127)); @@ -38332,7 +38783,7 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt8sNullValue_202() + CHIP_ERROR TestWriteAttributeNullableInt8sNullValue_208() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -38342,33 +38793,33 @@ class TestCluster : public TestCommand nullableInt8sArgument.SetNull(); return cluster.WriteAttribute( - nullableInt8sArgument, this, OnSuccessCallback_202, OnFailureCallback_202); + nullableInt8sArgument, this, OnSuccessCallback_208, OnFailureCallback_208); } - void OnFailureResponse_202(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_208(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_202() { NextTest(); } + void OnSuccessResponse_208() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt8sNullValue_203() + CHIP_ERROR TestReadAttributeNullableInt8sNullValue_209() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_203, OnFailureCallback_203); + this, OnSuccessCallback_209, OnFailureCallback_209); } - void OnFailureResponse_203(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_209(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_203(const chip::app::DataModel::Nullable & nullableInt8s) + void OnSuccessResponse_209(const chip::app::DataModel::Nullable & nullableInt8s) { VerifyOrReturn(CheckValueNull("nullableInt8s", nullableInt8s)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt16sMinValue_204() + CHIP_ERROR TestWriteAttributeNullableInt16sMinValue_210() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -38378,26 +38829,26 @@ class TestCluster : public TestCommand nullableInt16sArgument.SetNonNull() = -32767; return cluster.WriteAttribute( - nullableInt16sArgument, this, OnSuccessCallback_204, OnFailureCallback_204); + nullableInt16sArgument, this, OnSuccessCallback_210, OnFailureCallback_210); } - void OnFailureResponse_204(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_210(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_204() { NextTest(); } + void OnSuccessResponse_210() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt16sMinValue_205() + CHIP_ERROR TestReadAttributeNullableInt16sMinValue_211() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_205, OnFailureCallback_205); + this, OnSuccessCallback_211, OnFailureCallback_211); } - void OnFailureResponse_205(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_211(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_205(const chip::app::DataModel::Nullable & nullableInt16s) + void OnSuccessResponse_211(const chip::app::DataModel::Nullable & nullableInt16s) { VerifyOrReturn(CheckValueNonNull("nullableInt16s", nullableInt16s)); VerifyOrReturn(CheckValue("nullableInt16s.Value()", nullableInt16s.Value(), -32767)); @@ -38405,7 +38856,7 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt16sInvalidValue_206() + CHIP_ERROR TestWriteAttributeNullableInt16sInvalidValue_212() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -38415,30 +38866,30 @@ class TestCluster : public TestCommand nullableInt16sArgument.SetNonNull() = -32768; return cluster.WriteAttribute( - nullableInt16sArgument, this, OnSuccessCallback_206, OnFailureCallback_206); + nullableInt16sArgument, this, OnSuccessCallback_212, OnFailureCallback_212); } - void OnFailureResponse_206(uint8_t status) + void OnFailureResponse_212(uint8_t status) { VerifyOrReturn(CheckValue("status", status, 135)); NextTest(); } - void OnSuccessResponse_206() { ThrowSuccessResponse(); } + void OnSuccessResponse_212() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadAttributeNullableInt16sUnchangedValue_207() + CHIP_ERROR TestReadAttributeNullableInt16sUnchangedValue_213() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_207, OnFailureCallback_207); + this, OnSuccessCallback_213, OnFailureCallback_213); } - void OnFailureResponse_207(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_213(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_207(const chip::app::DataModel::Nullable & nullableInt16s) + void OnSuccessResponse_213(const chip::app::DataModel::Nullable & nullableInt16s) { VerifyOrReturn(CheckValueNonNull("nullableInt16s", nullableInt16s)); VerifyOrReturn(CheckValue("nullableInt16s.Value()", nullableInt16s.Value(), -32767)); @@ -38446,7 +38897,7 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt16sNullValue_208() + CHIP_ERROR TestWriteAttributeNullableInt16sNullValue_214() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -38456,33 +38907,33 @@ class TestCluster : public TestCommand nullableInt16sArgument.SetNull(); return cluster.WriteAttribute( - nullableInt16sArgument, this, OnSuccessCallback_208, OnFailureCallback_208); + nullableInt16sArgument, this, OnSuccessCallback_214, OnFailureCallback_214); } - void OnFailureResponse_208(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_214(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_208() { NextTest(); } + void OnSuccessResponse_214() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt16sNullValue_209() + CHIP_ERROR TestReadAttributeNullableInt16sNullValue_215() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_209, OnFailureCallback_209); + this, OnSuccessCallback_215, OnFailureCallback_215); } - void OnFailureResponse_209(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_215(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_209(const chip::app::DataModel::Nullable & nullableInt16s) + void OnSuccessResponse_215(const chip::app::DataModel::Nullable & nullableInt16s) { VerifyOrReturn(CheckValueNull("nullableInt16s", nullableInt16s)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt32sMinValue_210() + CHIP_ERROR TestWriteAttributeNullableInt32sMinValue_216() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -38492,26 +38943,26 @@ class TestCluster : public TestCommand nullableInt32sArgument.SetNonNull() = -2147483647L; return cluster.WriteAttribute( - nullableInt32sArgument, this, OnSuccessCallback_210, OnFailureCallback_210); + nullableInt32sArgument, this, OnSuccessCallback_216, OnFailureCallback_216); } - void OnFailureResponse_210(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_216(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_210() { NextTest(); } + void OnSuccessResponse_216() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt32sMinValue_211() + CHIP_ERROR TestReadAttributeNullableInt32sMinValue_217() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_211, OnFailureCallback_211); + this, OnSuccessCallback_217, OnFailureCallback_217); } - void OnFailureResponse_211(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_217(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_211(const chip::app::DataModel::Nullable & nullableInt32s) + void OnSuccessResponse_217(const chip::app::DataModel::Nullable & nullableInt32s) { VerifyOrReturn(CheckValueNonNull("nullableInt32s", nullableInt32s)); VerifyOrReturn(CheckValue("nullableInt32s.Value()", nullableInt32s.Value(), -2147483647L)); @@ -38519,7 +38970,7 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt32sInvalidValue_212() + CHIP_ERROR TestWriteAttributeNullableInt32sInvalidValue_218() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -38529,30 +38980,30 @@ class TestCluster : public TestCommand nullableInt32sArgument.SetNonNull() = -2147483648L; return cluster.WriteAttribute( - nullableInt32sArgument, this, OnSuccessCallback_212, OnFailureCallback_212); + nullableInt32sArgument, this, OnSuccessCallback_218, OnFailureCallback_218); } - void OnFailureResponse_212(uint8_t status) + void OnFailureResponse_218(uint8_t status) { VerifyOrReturn(CheckValue("status", status, 135)); NextTest(); } - void OnSuccessResponse_212() { ThrowSuccessResponse(); } + void OnSuccessResponse_218() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadAttributeNullableInt32sUnchangedValue_213() + CHIP_ERROR TestReadAttributeNullableInt32sUnchangedValue_219() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_213, OnFailureCallback_213); + this, OnSuccessCallback_219, OnFailureCallback_219); } - void OnFailureResponse_213(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_219(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_213(const chip::app::DataModel::Nullable & nullableInt32s) + void OnSuccessResponse_219(const chip::app::DataModel::Nullable & nullableInt32s) { VerifyOrReturn(CheckValueNonNull("nullableInt32s", nullableInt32s)); VerifyOrReturn(CheckValue("nullableInt32s.Value()", nullableInt32s.Value(), -2147483647L)); @@ -38560,7 +39011,7 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt32sNullValue_214() + CHIP_ERROR TestWriteAttributeNullableInt32sNullValue_220() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -38570,33 +39021,33 @@ class TestCluster : public TestCommand nullableInt32sArgument.SetNull(); return cluster.WriteAttribute( - nullableInt32sArgument, this, OnSuccessCallback_214, OnFailureCallback_214); + nullableInt32sArgument, this, OnSuccessCallback_220, OnFailureCallback_220); } - void OnFailureResponse_214(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_220(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_214() { NextTest(); } + void OnSuccessResponse_220() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt32sNullValue_215() + CHIP_ERROR TestReadAttributeNullableInt32sNullValue_221() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_215, OnFailureCallback_215); + this, OnSuccessCallback_221, OnFailureCallback_221); } - void OnFailureResponse_215(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_221(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_215(const chip::app::DataModel::Nullable & nullableInt32s) + void OnSuccessResponse_221(const chip::app::DataModel::Nullable & nullableInt32s) { VerifyOrReturn(CheckValueNull("nullableInt32s", nullableInt32s)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt64sMinValue_216() + CHIP_ERROR TestWriteAttributeNullableInt64sMinValue_222() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -38606,26 +39057,26 @@ class TestCluster : public TestCommand nullableInt64sArgument.SetNonNull() = -9223372036854775807LL; return cluster.WriteAttribute( - nullableInt64sArgument, this, OnSuccessCallback_216, OnFailureCallback_216); + nullableInt64sArgument, this, OnSuccessCallback_222, OnFailureCallback_222); } - void OnFailureResponse_216(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_222(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_216() { NextTest(); } + void OnSuccessResponse_222() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt64sMinValue_217() + CHIP_ERROR TestReadAttributeNullableInt64sMinValue_223() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_217, OnFailureCallback_217); + this, OnSuccessCallback_223, OnFailureCallback_223); } - void OnFailureResponse_217(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_223(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_217(const chip::app::DataModel::Nullable & nullableInt64s) + void OnSuccessResponse_223(const chip::app::DataModel::Nullable & nullableInt64s) { VerifyOrReturn(CheckValueNonNull("nullableInt64s", nullableInt64s)); VerifyOrReturn(CheckValue("nullableInt64s.Value()", nullableInt64s.Value(), -9223372036854775807LL)); @@ -38633,7 +39084,7 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt64sInvalidValue_218() + CHIP_ERROR TestWriteAttributeNullableInt64sInvalidValue_224() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -38643,30 +39094,30 @@ class TestCluster : public TestCommand nullableInt64sArgument.SetNonNull() = -9223372036854775807LL - 1; return cluster.WriteAttribute( - nullableInt64sArgument, this, OnSuccessCallback_218, OnFailureCallback_218); + nullableInt64sArgument, this, OnSuccessCallback_224, OnFailureCallback_224); } - void OnFailureResponse_218(uint8_t status) + void OnFailureResponse_224(uint8_t status) { VerifyOrReturn(CheckValue("status", status, 135)); NextTest(); } - void OnSuccessResponse_218() { ThrowSuccessResponse(); } + void OnSuccessResponse_224() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadAttributeNullableInt64sUnchangedValue_219() + CHIP_ERROR TestReadAttributeNullableInt64sUnchangedValue_225() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_219, OnFailureCallback_219); + this, OnSuccessCallback_225, OnFailureCallback_225); } - void OnFailureResponse_219(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_225(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_219(const chip::app::DataModel::Nullable & nullableInt64s) + void OnSuccessResponse_225(const chip::app::DataModel::Nullable & nullableInt64s) { VerifyOrReturn(CheckValueNonNull("nullableInt64s", nullableInt64s)); VerifyOrReturn(CheckValue("nullableInt64s.Value()", nullableInt64s.Value(), -9223372036854775807LL)); @@ -38674,7 +39125,7 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestWriteAttributeNullableInt64sNullValue_220() + CHIP_ERROR TestWriteAttributeNullableInt64sNullValue_226() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -38684,33 +39135,33 @@ class TestCluster : public TestCommand nullableInt64sArgument.SetNull(); return cluster.WriteAttribute( - nullableInt64sArgument, this, OnSuccessCallback_220, OnFailureCallback_220); + nullableInt64sArgument, this, OnSuccessCallback_226, OnFailureCallback_226); } - void OnFailureResponse_220(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_226(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_220() { NextTest(); } + void OnSuccessResponse_226() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableInt64sNullValue_221() + CHIP_ERROR TestReadAttributeNullableInt64sNullValue_227() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_221, OnFailureCallback_221); + this, OnSuccessCallback_227, OnFailureCallback_227); } - void OnFailureResponse_221(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_227(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_221(const chip::app::DataModel::Nullable & nullableInt64s) + void OnSuccessResponse_227(const chip::app::DataModel::Nullable & nullableInt64s) { VerifyOrReturn(CheckValueNull("nullableInt64s", nullableInt64s)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableEnum8MaxValue_222() + CHIP_ERROR TestWriteAttributeNullableEnum8MaxValue_228() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -38720,26 +39171,26 @@ class TestCluster : public TestCommand nullableEnum8Argument.SetNonNull() = static_cast(254); return cluster.WriteAttribute( - nullableEnum8Argument, this, OnSuccessCallback_222, OnFailureCallback_222); + nullableEnum8Argument, this, OnSuccessCallback_228, OnFailureCallback_228); } - void OnFailureResponse_222(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_228(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_222() { NextTest(); } + void OnSuccessResponse_228() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableEnum8MaxValue_223() + CHIP_ERROR TestReadAttributeNullableEnum8MaxValue_229() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_223, OnFailureCallback_223); + this, OnSuccessCallback_229, OnFailureCallback_229); } - void OnFailureResponse_223(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_229(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_223(const chip::app::DataModel::Nullable & nullableEnum8) + void OnSuccessResponse_229(const chip::app::DataModel::Nullable & nullableEnum8) { VerifyOrReturn(CheckValueNonNull("nullableEnum8", nullableEnum8)); VerifyOrReturn(CheckValue("nullableEnum8.Value()", nullableEnum8.Value(), 254)); @@ -38747,7 +39198,7 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestWriteAttributeNullableEnum8InvalidValue_224() + CHIP_ERROR TestWriteAttributeNullableEnum8InvalidValue_230() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -38757,30 +39208,30 @@ class TestCluster : public TestCommand nullableEnum8Argument.SetNonNull() = static_cast(255); return cluster.WriteAttribute( - nullableEnum8Argument, this, OnSuccessCallback_224, OnFailureCallback_224); + nullableEnum8Argument, this, OnSuccessCallback_230, OnFailureCallback_230); } - void OnFailureResponse_224(uint8_t status) + void OnFailureResponse_230(uint8_t status) { VerifyOrReturn(CheckValue("status", status, 135)); NextTest(); } - void OnSuccessResponse_224() { ThrowSuccessResponse(); } + void OnSuccessResponse_230() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadAttributeNullableEnum8UnchangedValue_225() + CHIP_ERROR TestReadAttributeNullableEnum8UnchangedValue_231() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_225, OnFailureCallback_225); + this, OnSuccessCallback_231, OnFailureCallback_231); } - void OnFailureResponse_225(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_231(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_225(const chip::app::DataModel::Nullable & nullableEnum8) + void OnSuccessResponse_231(const chip::app::DataModel::Nullable & nullableEnum8) { VerifyOrReturn(CheckValueNonNull("nullableEnum8", nullableEnum8)); VerifyOrReturn(CheckValue("nullableEnum8.Value()", nullableEnum8.Value(), 254)); @@ -38788,7 +39239,7 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestWriteAttributeNullableEnum8NullValue_226() + CHIP_ERROR TestWriteAttributeNullableEnum8NullValue_232() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -38798,33 +39249,33 @@ class TestCluster : public TestCommand nullableEnum8Argument.SetNull(); return cluster.WriteAttribute( - nullableEnum8Argument, this, OnSuccessCallback_226, OnFailureCallback_226); + nullableEnum8Argument, this, OnSuccessCallback_232, OnFailureCallback_232); } - void OnFailureResponse_226(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_232(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_226() { NextTest(); } + void OnSuccessResponse_232() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableEnum8NullValue_227() + CHIP_ERROR TestReadAttributeNullableEnum8NullValue_233() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_227, OnFailureCallback_227); + this, OnSuccessCallback_233, OnFailureCallback_233); } - void OnFailureResponse_227(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_233(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_227(const chip::app::DataModel::Nullable & nullableEnum8) + void OnSuccessResponse_233(const chip::app::DataModel::Nullable & nullableEnum8) { VerifyOrReturn(CheckValueNull("nullableEnum8", nullableEnum8)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableEnum16MaxValue_228() + CHIP_ERROR TestWriteAttributeNullableEnum16MaxValue_234() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -38834,26 +39285,26 @@ class TestCluster : public TestCommand nullableEnum16Argument.SetNonNull() = static_cast(65534); return cluster.WriteAttribute( - nullableEnum16Argument, this, OnSuccessCallback_228, OnFailureCallback_228); + nullableEnum16Argument, this, OnSuccessCallback_234, OnFailureCallback_234); } - void OnFailureResponse_228(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_234(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_228() { NextTest(); } + void OnSuccessResponse_234() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableEnum16MaxValue_229() + CHIP_ERROR TestReadAttributeNullableEnum16MaxValue_235() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_229, OnFailureCallback_229); + this, OnSuccessCallback_235, OnFailureCallback_235); } - void OnFailureResponse_229(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_235(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_229(const chip::app::DataModel::Nullable & nullableEnum16) + void OnSuccessResponse_235(const chip::app::DataModel::Nullable & nullableEnum16) { VerifyOrReturn(CheckValueNonNull("nullableEnum16", nullableEnum16)); VerifyOrReturn(CheckValue("nullableEnum16.Value()", nullableEnum16.Value(), 65534U)); @@ -38861,7 +39312,7 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestWriteAttributeNullableEnum16InvalidValue_230() + CHIP_ERROR TestWriteAttributeNullableEnum16InvalidValue_236() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -38871,30 +39322,30 @@ class TestCluster : public TestCommand nullableEnum16Argument.SetNonNull() = static_cast(65535); return cluster.WriteAttribute( - nullableEnum16Argument, this, OnSuccessCallback_230, OnFailureCallback_230); + nullableEnum16Argument, this, OnSuccessCallback_236, OnFailureCallback_236); } - void OnFailureResponse_230(uint8_t status) + void OnFailureResponse_236(uint8_t status) { VerifyOrReturn(CheckValue("status", status, 135)); NextTest(); } - void OnSuccessResponse_230() { ThrowSuccessResponse(); } + void OnSuccessResponse_236() { ThrowSuccessResponse(); } - CHIP_ERROR TestReadAttributeNullableEnum16UnchangedValue_231() + CHIP_ERROR TestReadAttributeNullableEnum16UnchangedValue_237() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_231, OnFailureCallback_231); + this, OnSuccessCallback_237, OnFailureCallback_237); } - void OnFailureResponse_231(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_237(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_231(const chip::app::DataModel::Nullable & nullableEnum16) + void OnSuccessResponse_237(const chip::app::DataModel::Nullable & nullableEnum16) { VerifyOrReturn(CheckValueNonNull("nullableEnum16", nullableEnum16)); VerifyOrReturn(CheckValue("nullableEnum16.Value()", nullableEnum16.Value(), 65534U)); @@ -38902,7 +39353,7 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestWriteAttributeNullableEnum16NullValue_232() + CHIP_ERROR TestWriteAttributeNullableEnum16NullValue_238() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -38912,45 +39363,45 @@ class TestCluster : public TestCommand nullableEnum16Argument.SetNull(); return cluster.WriteAttribute( - nullableEnum16Argument, this, OnSuccessCallback_232, OnFailureCallback_232); + nullableEnum16Argument, this, OnSuccessCallback_238, OnFailureCallback_238); } - void OnFailureResponse_232(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_238(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_232() { NextTest(); } + void OnSuccessResponse_238() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableEnum16NullValue_233() + CHIP_ERROR TestReadAttributeNullableEnum16NullValue_239() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_233, OnFailureCallback_233); + this, OnSuccessCallback_239, OnFailureCallback_239); } - void OnFailureResponse_233(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_239(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_233(const chip::app::DataModel::Nullable & nullableEnum16) + void OnSuccessResponse_239(const chip::app::DataModel::Nullable & nullableEnum16) { VerifyOrReturn(CheckValueNull("nullableEnum16", nullableEnum16)); NextTest(); } - CHIP_ERROR TestReadAttributeNullableOctetStringDefaultValue_234() + CHIP_ERROR TestReadAttributeNullableOctetStringDefaultValue_240() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_234, OnFailureCallback_234); + this, OnSuccessCallback_240, OnFailureCallback_240); } - void OnFailureResponse_234(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_240(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_234(const chip::app::DataModel::Nullable & nullableOctetString) + void OnSuccessResponse_240(const chip::app::DataModel::Nullable & nullableOctetString) { VerifyOrReturn(CheckValueNonNull("nullableOctetString", nullableOctetString)); VerifyOrReturn(CheckValueAsString("nullableOctetString.Value()", nullableOctetString.Value(), @@ -38959,7 +39410,7 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestWriteAttributeNullableOctetString_235() + CHIP_ERROR TestWriteAttributeNullableOctetString_241() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -38970,26 +39421,26 @@ class TestCluster : public TestCommand chip::ByteSpan(chip::Uint8::from_const_char("TestValuegarbage: not in length on purpose"), 9); return cluster.WriteAttribute( - nullableOctetStringArgument, this, OnSuccessCallback_235, OnFailureCallback_235); + nullableOctetStringArgument, this, OnSuccessCallback_241, OnFailureCallback_241); } - void OnFailureResponse_235(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_241(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_235() { NextTest(); } + void OnSuccessResponse_241() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableOctetString_236() + CHIP_ERROR TestReadAttributeNullableOctetString_242() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_236, OnFailureCallback_236); + this, OnSuccessCallback_242, OnFailureCallback_242); } - void OnFailureResponse_236(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_242(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_236(const chip::app::DataModel::Nullable & nullableOctetString) + void OnSuccessResponse_242(const chip::app::DataModel::Nullable & nullableOctetString) { VerifyOrReturn(CheckValueNonNull("nullableOctetString", nullableOctetString)); VerifyOrReturn(CheckValueAsString("nullableOctetString.Value()", nullableOctetString.Value(), @@ -38998,7 +39449,7 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestWriteAttributeNullableOctetString_237() + CHIP_ERROR TestWriteAttributeNullableOctetString_243() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -39008,33 +39459,33 @@ class TestCluster : public TestCommand nullableOctetStringArgument.SetNull(); return cluster.WriteAttribute( - nullableOctetStringArgument, this, OnSuccessCallback_237, OnFailureCallback_237); + nullableOctetStringArgument, this, OnSuccessCallback_243, OnFailureCallback_243); } - void OnFailureResponse_237(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_243(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_237() { NextTest(); } + void OnSuccessResponse_243() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableOctetString_238() + CHIP_ERROR TestReadAttributeNullableOctetString_244() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_238, OnFailureCallback_238); + this, OnSuccessCallback_244, OnFailureCallback_244); } - void OnFailureResponse_238(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_244(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_238(const chip::app::DataModel::Nullable & nullableOctetString) + void OnSuccessResponse_244(const chip::app::DataModel::Nullable & nullableOctetString) { VerifyOrReturn(CheckValueNull("nullableOctetString", nullableOctetString)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableOctetString_239() + CHIP_ERROR TestWriteAttributeNullableOctetString_245() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -39045,26 +39496,26 @@ class TestCluster : public TestCommand chip::ByteSpan(chip::Uint8::from_const_char("garbage: not in length on purpose"), 0); return cluster.WriteAttribute( - nullableOctetStringArgument, this, OnSuccessCallback_239, OnFailureCallback_239); + nullableOctetStringArgument, this, OnSuccessCallback_245, OnFailureCallback_245); } - void OnFailureResponse_239(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_245(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_239() { NextTest(); } + void OnSuccessResponse_245() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableOctetString_240() + CHIP_ERROR TestReadAttributeNullableOctetString_246() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_240, OnFailureCallback_240); + this, OnSuccessCallback_246, OnFailureCallback_246); } - void OnFailureResponse_240(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_246(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_240(const chip::app::DataModel::Nullable & nullableOctetString) + void OnSuccessResponse_246(const chip::app::DataModel::Nullable & nullableOctetString) { VerifyOrReturn(CheckValueNonNull("nullableOctetString", nullableOctetString)); VerifyOrReturn(CheckValueAsString("nullableOctetString.Value()", nullableOctetString.Value(), @@ -39073,19 +39524,19 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestReadAttributeNullableCharStringDefaultValue_241() + CHIP_ERROR TestReadAttributeNullableCharStringDefaultValue_247() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_241, OnFailureCallback_241); + this, OnSuccessCallback_247, OnFailureCallback_247); } - void OnFailureResponse_241(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_247(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_241(const chip::app::DataModel::Nullable & nullableCharString) + void OnSuccessResponse_247(const chip::app::DataModel::Nullable & nullableCharString) { VerifyOrReturn(CheckValueNonNull("nullableCharString", nullableCharString)); VerifyOrReturn(CheckValueAsString("nullableCharString.Value()", nullableCharString.Value(), chip::CharSpan("", 0))); @@ -39093,7 +39544,7 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestWriteAttributeNullableCharString_242() + CHIP_ERROR TestWriteAttributeNullableCharString_248() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -39103,14 +39554,34 @@ class TestCluster : public TestCommand nullableCharStringArgument.SetNonNull() = chip::Span("☉T☉garbage: not in length on purpose", 7); return cluster.WriteAttribute( - nullableCharStringArgument, this, OnSuccessCallback_242, OnFailureCallback_242); + nullableCharStringArgument, this, OnSuccessCallback_248, OnFailureCallback_248); } - void OnFailureResponse_242(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_248(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_248() { NextTest(); } + + CHIP_ERROR TestReadAttributeNullableCharString_249() + { + const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; + chip::Controller::TestClusterClusterTest cluster; + cluster.Associate(mDevice, endpoint); + + return cluster.ReadAttribute( + this, OnSuccessCallback_249, OnFailureCallback_249); + } + + void OnFailureResponse_249(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_249(const chip::app::DataModel::Nullable & nullableCharString) + { + VerifyOrReturn(CheckValueNonNull("nullableCharString", nullableCharString)); + VerifyOrReturn(CheckValueAsString("nullableCharString.Value()", nullableCharString.Value(), chip::CharSpan("☉T☉", 7))); - void OnSuccessResponse_242() { NextTest(); } + NextTest(); + } - CHIP_ERROR TestWriteAttributeNullableCharStringValueTooLong_243() + CHIP_ERROR TestWriteAttributeNullableCharStringValueTooLong_250() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -39120,33 +39591,33 @@ class TestCluster : public TestCommand nullableCharStringArgument.SetNull(); return cluster.WriteAttribute( - nullableCharStringArgument, this, OnSuccessCallback_243, OnFailureCallback_243); + nullableCharStringArgument, this, OnSuccessCallback_250, OnFailureCallback_250); } - void OnFailureResponse_243(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_250(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_243() { NextTest(); } + void OnSuccessResponse_250() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableCharString_244() + CHIP_ERROR TestReadAttributeNullableCharString_251() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_244, OnFailureCallback_244); + this, OnSuccessCallback_251, OnFailureCallback_251); } - void OnFailureResponse_244(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_251(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_244(const chip::app::DataModel::Nullable & nullableCharString) + void OnSuccessResponse_251(const chip::app::DataModel::Nullable & nullableCharString) { VerifyOrReturn(CheckValueNull("nullableCharString", nullableCharString)); NextTest(); } - CHIP_ERROR TestWriteAttributeNullableCharStringEmpty_245() + CHIP_ERROR TestWriteAttributeNullableCharStringEmpty_252() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; @@ -39156,26 +39627,26 @@ class TestCluster : public TestCommand nullableCharStringArgument.SetNonNull() = chip::Span("garbage: not in length on purpose", 0); return cluster.WriteAttribute( - nullableCharStringArgument, this, OnSuccessCallback_245, OnFailureCallback_245); + nullableCharStringArgument, this, OnSuccessCallback_252, OnFailureCallback_252); } - void OnFailureResponse_245(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_252(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_245() { NextTest(); } + void OnSuccessResponse_252() { NextTest(); } - CHIP_ERROR TestReadAttributeNullableCharString_246() + CHIP_ERROR TestReadAttributeNullableCharString_253() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 1; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); return cluster.ReadAttribute( - this, OnSuccessCallback_246, OnFailureCallback_246); + this, OnSuccessCallback_253, OnFailureCallback_253); } - void OnFailureResponse_246(uint8_t status) { ThrowFailureResponse(); } + void OnFailureResponse_253(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_246(const chip::app::DataModel::Nullable & nullableCharString) + void OnSuccessResponse_253(const chip::app::DataModel::Nullable & nullableCharString) { VerifyOrReturn(CheckValueNonNull("nullableCharString", nullableCharString)); VerifyOrReturn(CheckValueAsString("nullableCharString.Value()", nullableCharString.Value(), chip::CharSpan("", 0))); @@ -39183,41 +39654,41 @@ class TestCluster : public TestCommand NextTest(); } - CHIP_ERROR TestReadAttributeFromNonexistentEndpoint_247() + CHIP_ERROR TestReadAttributeFromNonexistentEndpoint_254() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 200; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); - return cluster.ReadAttribute(this, OnSuccessCallback_247, - OnFailureCallback_247); + return cluster.ReadAttribute(this, OnSuccessCallback_254, + OnFailureCallback_254); } - void OnFailureResponse_247(uint8_t status) + void OnFailureResponse_254(uint8_t status) { VerifyOrReturn(CheckConstraintNotValue("status", status, 0)); NextTest(); } - void OnSuccessResponse_247(const chip::app::DataModel::DecodableList & listInt8u) { ThrowSuccessResponse(); } + void OnSuccessResponse_254(const chip::app::DataModel::DecodableList & listInt8u) { ThrowSuccessResponse(); } - CHIP_ERROR TestReadAttributeFromNonexistentCluster_248() + CHIP_ERROR TestReadAttributeFromNonexistentCluster_255() { const chip::EndpointId endpoint = mEndpointId.HasValue() ? mEndpointId.Value() : 0; chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevice, endpoint); - return cluster.ReadAttribute(this, OnSuccessCallback_248, - OnFailureCallback_248); + return cluster.ReadAttribute(this, OnSuccessCallback_255, + OnFailureCallback_255); } - void OnFailureResponse_248(uint8_t status) + void OnFailureResponse_255(uint8_t status) { VerifyOrReturn(CheckConstraintNotValue("status", status, 0)); NextTest(); } - void OnSuccessResponse_248(const chip::app::DataModel::DecodableList & listInt8u) { ThrowSuccessResponse(); } + void OnSuccessResponse_255(const chip::app::DataModel::DecodableList & listInt8u) { ThrowSuccessResponse(); } }; class TestClusterComplexTypes : public TestCommand diff --git a/zzz_generated/controller-clusters/zap-generated/CHIPClusters.cpp b/zzz_generated/controller-clusters/zap-generated/CHIPClusters.cpp index ef07e2f272e671..2267654cf7012e 100644 --- a/zzz_generated/controller-clusters/zap-generated/CHIPClusters.cpp +++ b/zzz_generated/controller-clusters/zap-generated/CHIPClusters.cpp @@ -15930,6 +15930,57 @@ CHIP_ERROR TestClusterCluster::TestListInt8UReverseRequest(Callback::Cancelable return err; } +CHIP_ERROR TestClusterCluster::TestListNestedStructListArgumentRequest(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t a, bool b, + uint32_t e, chip::ByteSpan f, uint8_t g) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVWriter * writer = nullptr; + uint8_t argSeqNumber = 0; + + // Used when encoding non-empty command. Suppress error message when encoding empty commands. + (void) writer; + (void) argSeqNumber; + + VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); + + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, + TestCluster::Commands::TestListNestedStructListArgumentRequest::Id, + (app::CommandPathFlags::kEndpointIdValid) }; + + CommandSenderHandle sender( + Platform::New(mDevice->GetInteractionModelDelegate(), mDevice->GetExchangeManager())); + + VerifyOrReturnError(sender != nullptr, CHIP_ERROR_NO_MEMORY); + + SuccessOrExit(err = sender->PrepareCommand(cmdParams)); + + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + // a: int8u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), a)); + // b: boolean + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), b)); + // e: int32u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), e)); + // f: octetString + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), f)); + // g: int8u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), g)); + + SuccessOrExit(err = sender->FinishCommand()); + + // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. + mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); + + SuccessOrExit(err = mDevice->SendCommands(sender.get())); + + // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object + // now. + sender.release(); +exit: + return err; +} + CHIP_ERROR TestClusterCluster::TestListStructArgumentRequest(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint8_t a, bool b, uint8_t c, chip::ByteSpan d, chip::CharSpan e, uint8_t f, float g, double h) @@ -15987,6 +16038,101 @@ CHIP_ERROR TestClusterCluster::TestListStructArgumentRequest(Callback::Cancelabl return err; } +CHIP_ERROR TestClusterCluster::TestNestedStructArgumentRequest(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t a, bool b) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVWriter * writer = nullptr; + uint8_t argSeqNumber = 0; + + // Used when encoding non-empty command. Suppress error message when encoding empty commands. + (void) writer; + (void) argSeqNumber; + + VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); + + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, + TestCluster::Commands::TestNestedStructArgumentRequest::Id, + (app::CommandPathFlags::kEndpointIdValid) }; + + CommandSenderHandle sender( + Platform::New(mDevice->GetInteractionModelDelegate(), mDevice->GetExchangeManager())); + + VerifyOrReturnError(sender != nullptr, CHIP_ERROR_NO_MEMORY); + + SuccessOrExit(err = sender->PrepareCommand(cmdParams)); + + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + // a: int8u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), a)); + // b: boolean + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), b)); + + SuccessOrExit(err = sender->FinishCommand()); + + // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. + mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); + + SuccessOrExit(err = mDevice->SendCommands(sender.get())); + + // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object + // now. + sender.release(); +exit: + return err; +} + +CHIP_ERROR TestClusterCluster::TestNestedStructListArgumentRequest(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t a, bool b, + uint32_t e, chip::ByteSpan f, uint8_t g) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVWriter * writer = nullptr; + uint8_t argSeqNumber = 0; + + // Used when encoding non-empty command. Suppress error message when encoding empty commands. + (void) writer; + (void) argSeqNumber; + + VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); + + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, + TestCluster::Commands::TestNestedStructListArgumentRequest::Id, + (app::CommandPathFlags::kEndpointIdValid) }; + + CommandSenderHandle sender( + Platform::New(mDevice->GetInteractionModelDelegate(), mDevice->GetExchangeManager())); + + VerifyOrReturnError(sender != nullptr, CHIP_ERROR_NO_MEMORY); + + SuccessOrExit(err = sender->PrepareCommand(cmdParams)); + + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + // a: int8u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), a)); + // b: boolean + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), b)); + // e: int32u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), e)); + // f: octetString + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), f)); + // g: int8u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), g)); + + SuccessOrExit(err = sender->FinishCommand()); + + // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. + mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); + + SuccessOrExit(err = mDevice->SendCommands(sender.get())); + + // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object + // now. + sender.release(); +exit: + return err; +} + CHIP_ERROR TestClusterCluster::TestNotHandled(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { CHIP_ERROR err = CHIP_NO_ERROR; diff --git a/zzz_generated/controller-clusters/zap-generated/CHIPClusters.h b/zzz_generated/controller-clusters/zap-generated/CHIPClusters.h index 061dbdb492f56c..3f0f292d4c6295 100644 --- a/zzz_generated/controller-clusters/zap-generated/CHIPClusters.h +++ b/zzz_generated/controller-clusters/zap-generated/CHIPClusters.h @@ -2285,9 +2285,17 @@ class DLL_EXPORT TestClusterCluster : public ClusterBase uint8_t arg1); CHIP_ERROR TestListInt8UReverseRequest(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint8_t arg1); + CHIP_ERROR TestListNestedStructListArgumentRequest(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t a, bool b, uint32_t e, + chip::ByteSpan f, uint8_t g); CHIP_ERROR TestListStructArgumentRequest(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint8_t a, bool b, uint8_t c, chip::ByteSpan d, chip::CharSpan e, uint8_t f, float g, double h); + CHIP_ERROR TestNestedStructArgumentRequest(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t a, bool b); + CHIP_ERROR TestNestedStructListArgumentRequest(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t a, bool b, uint32_t e, + chip::ByteSpan f, uint8_t g); CHIP_ERROR TestNotHandled(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); CHIP_ERROR TestNullableOptionalRequest(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint8_t arg1); From f50307abdb3d8e16df66efd6ddddd92c41418c11 Mon Sep 17 00:00:00 2001 From: pankore <86098180+pankore@users.noreply.github.com> Date: Tue, 30 Nov 2021 10:29:47 +0800 Subject: [PATCH 13/42] [Ameba] Update ConnectivityManagerImpl and ConfigurationManagerImpl (#12076) * Add Wifi and General diagnostics * Do not show QRcode url if wifi connected * Correct usage of ConfigValueExists --- .../ameba/main/chipinterface.cpp | 13 +- src/platform/Ameba/AmebaConfig.cpp | 12 +- .../Ameba/ConfigurationManagerImpl.cpp | 10 +- .../Ameba/DiagnosticDataProviderImpl.cpp | 170 +++++++++++++++++- .../Ameba/DiagnosticDataProviderImpl.h | 5 + 5 files changed, 189 insertions(+), 21 deletions(-) diff --git a/examples/all-clusters-app/ameba/main/chipinterface.cpp b/examples/all-clusters-app/ameba/main/chipinterface.cpp index d3059b23ca9764..e49d28aaca6c24 100644 --- a/examples/all-clusters-app/ameba/main/chipinterface.cpp +++ b/examples/all-clusters-app/ameba/main/chipinterface.cpp @@ -98,7 +98,7 @@ std::string createSetupPayload() ChipLogError(DeviceLayer, "Couldn't get discriminator: %s\r\n", ErrorStr(err)); return result; } - ChipLogProgress(DeviceLayer, "Setup discriminator: %u (0x%x)\r\n", discriminator, discriminator); + ChipLogProgress(DeviceLayer, "Setup discriminator: %d (0x%x)\r\n", discriminator, discriminator); uint32_t setupPINCode; err = ConfigurationMgr().GetSetupPinCode(setupPINCode); @@ -107,7 +107,7 @@ std::string createSetupPayload() ChipLogError(DeviceLayer, "Couldn't get setupPINCode: %s\r\n", ErrorStr(err)); return result; } - ChipLogProgress(DeviceLayer, "Setup PIN code: %u (0x%x)\r\n", setupPINCode, setupPINCode); + ChipLogProgress(DeviceLayer, "Setup PIN code: %lu (0x%lx)\r\n", setupPINCode, setupPINCode); uint16_t vendorId; err = ConfigurationMgr().GetVendorId(vendorId); @@ -180,7 +180,7 @@ std::string createSetupPayload() if (err != CHIP_NO_ERROR) { - ChipLogError(DeviceLayer, "Couldn't get payload string %\r\n" CHIP_ERROR_FORMAT, err.Format()); + ChipLogError(DeviceLayer, "Couldn't get payload string %lu\r\n" CHIP_ERROR_FORMAT, err.Format()); } return result; }; @@ -209,10 +209,11 @@ extern "C" void ChipTest(void) // Initialize device attestation config SetDeviceAttestationCredentialsProvider(Examples::GetExampleDACProvider()); - std::string qrCodeText = createSetupPayload(); - ChipLogProgress(DeviceLayer, "QR CODE Text: '%s'\r\n", qrCodeText.c_str()); - + if (RTW_SUCCESS != wifi_is_connected_to_ap()) { + std::string qrCodeText = createSetupPayload(); + ChipLogProgress(DeviceLayer, "QR CODE Text: '%s'\r\n", qrCodeText.c_str()); + std::vector qrCode(3 * qrCodeText.size() + 1); err = EncodeQRCodeToUrl(qrCodeText.c_str(), qrCodeText.size(), qrCode.data(), qrCode.max_size()); if (err == CHIP_NO_ERROR) diff --git a/src/platform/Ameba/AmebaConfig.cpp b/src/platform/Ameba/AmebaConfig.cpp index f40809dd1249e2..02d0580ca82c4c 100644 --- a/src/platform/Ameba/AmebaConfig.cpp +++ b/src/platform/Ameba/AmebaConfig.cpp @@ -251,17 +251,7 @@ CHIP_ERROR AmebaConfig::ClearConfigValue(Key key) bool AmebaConfig::ConfigValueExists(Key key) { - int32_t exist; - CHIP_ERROR err; - - exist = checkExist(key.Namespace, key.Name); - - if (exist == 1) - err = CHIP_NO_ERROR; - else - err = CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND; - - return (err == CHIP_NO_ERROR); + return checkExist(key.Namespace, key.Name); } CHIP_ERROR AmebaConfig::EnsureNamespace(const char * ns) diff --git a/src/platform/Ameba/ConfigurationManagerImpl.cpp b/src/platform/Ameba/ConfigurationManagerImpl.cpp index a99924bbe56040..ad0c2f4fde70ed 100644 --- a/src/platform/Ameba/ConfigurationManagerImpl.cpp +++ b/src/platform/Ameba/ConfigurationManagerImpl.cpp @@ -136,7 +136,15 @@ CHIP_ERROR ConfigurationManagerImpl::GetPrimaryWiFiMACAddress(uint8_t * buf) int i = 0; wifi_get_mac_address(temp); - sscanf(temp, "%02x:%02x:%02x:%02x:%02x:%02x", &mac[0], &mac[1], &mac[2], &mac[3], &mac[4], &mac[5]); + + char * token = strtok(temp, ":"); + while (token != NULL) + { + mac[i] = (uint32_t) strtol(token, NULL, 16); + token = strtok(NULL, ":"); + i++; + } + for (i = 0; i < ETH_ALEN; i++) buf[i] = mac[i] & 0xFF; diff --git a/src/platform/Ameba/DiagnosticDataProviderImpl.cpp b/src/platform/Ameba/DiagnosticDataProviderImpl.cpp index e447b56d7ca175..9aa1fc058b06db 100644 --- a/src/platform/Ameba/DiagnosticDataProviderImpl.cpp +++ b/src/platform/Ameba/DiagnosticDataProviderImpl.cpp @@ -27,6 +27,8 @@ #include #include +#include + namespace chip { namespace DeviceLayer { @@ -116,22 +118,184 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetBootReason(uint8_t & bootReason) return err; } +CHIP_ERROR DiagnosticDataProviderImpl::GetNetworkInterfaces(NetworkInterface ** netifpp) +{ + CHIP_ERROR err = CHIP_ERROR_READ_FAILED; + NetworkInterface * head = NULL; + struct ifaddrs * ifaddr = nullptr; + + if (xnetif == NULL) + { + ChipLogError(DeviceLayer, "Failed to get network interfaces"); + } + else + { + for (struct netif * ifa = xnetif; ifa != NULL; ifa = ifa->next) + { + NetworkInterface * ifp = new NetworkInterface(); + + strncpy(ifp->Name, ifa->name, Inet::InterfaceId::kMaxIfNameLength); + ifp->Name[Inet::InterfaceId::kMaxIfNameLength - 1] = '\0'; + + ifp->name = CharSpan(ifp->Name, strlen(ifp->Name)); + ifp->fabricConnected = true; + if ((ifa->flags) & NETIF_FLAG_ETHERNET) + ifp->type = EMBER_ZCL_INTERFACE_TYPE_ETHERNET; + else + ifp->type = EMBER_ZCL_INTERFACE_TYPE_WI_FI; + ifp->offPremiseServicesReachableIPv4 = false; + ifp->offPremiseServicesReachableIPv6 = false; + + memcpy(ifp->MacAddress, ifa->hwaddr, sizeof(ifa->hwaddr)); + + if (0) + { + ChipLogError(DeviceLayer, "Failed to get network hardware address"); + } + else + { + // Set 48-bit IEEE MAC Address + ifp->hardwareAddress = ByteSpan(ifp->MacAddress, 6); + } + + ifp->Next = head; + head = ifp; + } + } + + *netifpp = head; + return CHIP_NO_ERROR; +} + +void DiagnosticDataProviderImpl::ReleaseNetworkInterfaces(NetworkInterface * netifp) +{ + while (netifp) + { + NetworkInterface * del = netifp; + netifp = netifp->Next; + delete del; + } +} + #if CHIP_DEVICE_CONFIG_ENABLE_WIFI +CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiBssId(ByteSpan & BssId) +{ + CHIP_ERROR err = CHIP_ERROR_READ_FAILED; + static uint8_t ameba_bssid[6]; + + if (wifi_get_ap_bssid(ameba_bssid) == 0) + { + err = CHIP_NO_ERROR; + ChipLogProgress(DeviceLayer, "%02x,%02x,%02x,%02x,%02x,%02x\n", ameba_bssid[0], ameba_bssid[1], ameba_bssid[2], + ameba_bssid[3], ameba_bssid[4], ameba_bssid[5]); + } + + BssId = ameba_bssid; + + return CHIP_NO_ERROR; +} + +CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiVersion(uint8_t & wifiVersion) +{ + // Support 802.11a/n Wi-Fi in AmebaD chipset + wifiVersion = EMBER_ZCL_WI_FI_VERSION_TYPE_802__11N; + return CHIP_NO_ERROR; +} + CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiSecurityType(uint8_t & securityType) { - securityType = 0; + unsigned int _auth_type; + unsigned short _security = 0; + rtw_wifi_setting_t setting; + +#ifdef CONFIG_PLATFORM_8721D + if (wext_get_enc_ext("wlan0", &_security, &setting.key_idx, setting.password) < 0) + { + securityType = 0; + } + else + { + switch (_security) + { + case IW_ENCODE_ALG_NONE: + setting.security_type = EMBER_ZCL_SECURITY_TYPE_NONE; + break; + case IW_ENCODE_ALG_WEP: + setting.security_type = EMBER_ZCL_SECURITY_TYPE_WEP; + break; + case IW_ENCODE_ALG_TKIP: + setting.security_type = EMBER_ZCL_SECURITY_TYPE_WPA; + break; + case IW_ENCODE_ALG_CCMP: + setting.security_type = EMBER_ZCL_SECURITY_TYPE_WPA2; + break; + default: + setting.security_type = EMBER_ZCL_SECURITY_TYPE_UNSPECIFIED; + break; + } + securityType = setting.security_type; + } +#else + wext_get_enc_ext("wlan0", &_security, &setting.key_idx, setting.password); + if (wext_get_auth_type("wlan0", &_auth_type) < 0) + { + securityType = 0; + } + else + { + switch (_security) + { + case IW_ENCODE_ALG_NONE: + setting.security_type = EMBER_ZCL_SECURITY_TYPE_NONE; + break; + case IW_ENCODE_ALG_WEP: + setting.security_type = EMBER_ZCL_SECURITY_TYPE_WEP; + break; + case IW_ENCODE_ALG_TKIP: + if (_auth_type == WPA_SECURITY) + setting.security_type = EMBER_ZCL_SECURITY_TYPE_WPA; + else if (_auth_type == WPA2_SECURITY) + setting.security_type = EMBER_ZCL_SECURITY_TYPE_WPA2; + break; + case IW_ENCODE_ALG_CCMP: + if (_auth_type == WPA_SECURITY) + setting.security_type = EMBER_ZCL_SECURITY_TYPE_WPA; + else if (_auth_type == WPA2_SECURITY) + setting.security_type = EMBER_ZCL_SECURITY_TYPE_WPA2; + else if (_auth_type == WPA3_SECURITY) + setting.security_type = EMBER_ZCL_SECURITY_TYPE_WPA3; + break; + default: + setting.security_type = EMBER_ZCL_SECURITY_TYPE_UNSPECIFIED; + break; + } + securityType = setting.security_type; + } +#endif + return CHIP_NO_ERROR; } CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiChannelNumber(uint16_t & channelNumber) { - channelNumber = 0; + unsigned char channel; + + if (wext_get_channel("wlan0", &channel) < 0) + channelNumber = 0; + else + channelNumber = (uint16_t) channel; + return CHIP_NO_ERROR; } CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiRssi(int8_t & rssi) { - rssi = 0; + int _rssi = 0; + if (wifi_get_rssi(&_rssi) < 0) + rssi = 0; + else + rssi = _rssi; + return CHIP_NO_ERROR; } diff --git a/src/platform/Ameba/DiagnosticDataProviderImpl.h b/src/platform/Ameba/DiagnosticDataProviderImpl.h index 047d55bdac9b3f..9190c1a3bdc9e8 100644 --- a/src/platform/Ameba/DiagnosticDataProviderImpl.h +++ b/src/platform/Ameba/DiagnosticDataProviderImpl.h @@ -46,8 +46,13 @@ class DiagnosticDataProviderImpl : public DiagnosticDataProvider CHIP_ERROR GetTotalOperationalHours(uint32_t & totalOperationalHours) override; CHIP_ERROR GetBootReason(uint8_t & bootReason) override; + CHIP_ERROR GetNetworkInterfaces(NetworkInterface ** netifpp) override; + void ReleaseNetworkInterfaces(NetworkInterface * netifp) override; + #if CHIP_DEVICE_CONFIG_ENABLE_WIFI + CHIP_ERROR GetWiFiBssId(ByteSpan & BssId) override; CHIP_ERROR GetWiFiSecurityType(uint8_t & securityType) override; + CHIP_ERROR GetWiFiVersion(uint8_t & wifiVersion) override; CHIP_ERROR GetWiFiChannelNumber(uint16_t & channelNumber) override; CHIP_ERROR GetWiFiRssi(int8_t & rssi) override; CHIP_ERROR GetWiFiBeaconLostCount(uint32_t & beaconLostCount) override; From 91cc989ad2dbb4db5c6ef79ed6ef344c2ece429f Mon Sep 17 00:00:00 2001 From: Vivien Nicolas Date: Tue, 30 Nov 2021 04:25:16 +0100 Subject: [PATCH 14/42] [YAML] Add a mechanism to specify the test timeout for a given YAML file (#11861) --- examples/chip-tool/commands/tests/TestCommand.h | 11 ++++++++++- .../chip-tool/templates/partials/test_cluster.zapt | 3 +++ src/app/zap-templates/common/ClusterTestGeneration.js | 1 + 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/examples/chip-tool/commands/tests/TestCommand.h b/examples/chip-tool/commands/tests/TestCommand.h index 7e4d32923e6e01..e19d19ed389f3d 100644 --- a/examples/chip-tool/commands/tests/TestCommand.h +++ b/examples/chip-tool/commands/tests/TestCommand.h @@ -30,6 +30,8 @@ #include #include +constexpr uint16_t kTimeoutInSeconds = 30; + class TestCommand : public CHIPCommand { public: @@ -39,20 +41,26 @@ class TestCommand : public CHIPCommand { AddArgument("node-id", 0, UINT64_MAX, &mNodeId); AddArgument("delayInMs", 0, UINT64_MAX, &mDelayInMs); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); AddArgument("endpoint-id", CHIP_ZCL_ENDPOINT_MIN, CHIP_ZCL_ENDPOINT_MAX, &mEndpointId); AddArgument("PICS", &mPICSFilePath); } /////////// CHIPCommand Interface ///////// CHIP_ERROR RunCommand() override; - chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(30); } + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.HasValue() ? mTimeout.Value() : kTimeoutInSeconds); + } virtual void NextTest() = 0; /////////// GlobalCommands Interface ///////// CHIP_ERROR Wait(chip::System::Clock::Timeout ms); CHIP_ERROR WaitForMs(uint16_t ms) { return Wait(chip::System::Clock::Milliseconds32(ms)); } + CHIP_ERROR WaitForCommissionee(); CHIP_ERROR Log(const char * message); + CHIP_ERROR Prompt(const char * message); protected: ChipDevice * mDevice; @@ -261,5 +269,6 @@ class TestCommand : public CHIPCommand chip::Optional mDelayInMs; chip::Optional mPICSFilePath; chip::Optional mEndpointId; + chip::Optional mTimeout; chip::Optional> PICS; }; diff --git a/examples/chip-tool/templates/partials/test_cluster.zapt b/examples/chip-tool/templates/partials/test_cluster.zapt index 7729459b86e4a0..713cc0effd4442 100644 --- a/examples/chip-tool/templates/partials/test_cluster.zapt +++ b/examples/chip-tool/templates/partials/test_cluster.zapt @@ -44,6 +44,9 @@ class {{filename}}: public TestCommand } } + {{#if timeout}} + chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.HasValue() : mTimeout.Value() : {{timeout}}); } + {{/if}} private: std::atomic_uint16_t mTestIndex; diff --git a/src/app/zap-templates/common/ClusterTestGeneration.js b/src/app/zap-templates/common/ClusterTestGeneration.js index 1694a291d31a8a..519f6976a02712 100644 --- a/src/app/zap-templates/common/ClusterTestGeneration.js +++ b/src/app/zap-templates/common/ClusterTestGeneration.js @@ -327,6 +327,7 @@ function parse(filename) }); yaml.filename = filename; + yaml.timeout = yaml.config.timeout; yaml.totalTests = yaml.tests.length; return yaml; From 5042921707185c3662aca1241ad4402ca3ab2343 Mon Sep 17 00:00:00 2001 From: "Hui.Li-TCL" Date: Tue, 30 Nov 2021 11:26:02 +0800 Subject: [PATCH 15/42] Added Content launcher low power media playback and tvchannel cluster to java (#12250) * added ContentLauncherManager cluster * added LowPowerManager cluster * added MediaPlaybackManager cluster * added TvChannelManager cluster * Restyled by whitespace * Restyled by google-java-format * Restyled by clang-format * Restyled by gn * fix content launcher response error * Restyled by clang-format * move most response code to content-launch-server as other clusters * Restyled by clang-format * fix linux build error Co-authored-by: Restyled.io --- .../tcl/chip/chiptvserver/MainActivity.java | 8 + examples/tv-app/android/BUILD.gn | 29 +- .../tv-app/android/include/cluster-init.cpp | 76 --- .../ContentLauncherManager.cpp | 138 ------ .../content-launcher/ContentLauncherManager.h | 44 -- .../include/low-power/LowPowerManager.cpp | 25 - .../media-playback/MediaPlaybackManager.cpp | 79 ---- .../include/tv-channel/TvChannelManager.cpp | 84 ---- .../android/java/ContentLauncherManager.cpp | 352 ++++++++++++++ .../android/java/ContentLauncherManager.h | 54 +++ .../tv-app/android/java/LowPowerManager.cpp | 76 +++ .../LowPowerManager.h} | 26 +- .../android/java/MediaPlaybackManager.cpp | 217 +++++++++ .../MediaPlaybackManager.h | 22 +- examples/tv-app/android/java/TVApp-JNI.cpp | 24 + .../tv-app/android/java/TvChannelManager.cpp | 444 ++++++++++++++++++ .../tv-app/android/java/TvChannelManager.h | 57 +++ .../ContentLaunchBrandingInformation.java | 62 +++ .../tcl/chip/tvapp/ContentLaunchManager.java | 59 +++ .../chip/tvapp/ContentLaunchManagerStub.java | 42 ++ .../tcl/chip/tvapp/ContentLaunchResponse.java | 19 + .../tvapp/ContentLaunchSearchParameter.java | 71 +++ .../com/tcl/chip/tvapp/LowPowerManager.java | 22 + .../tcl/chip/tvapp/LowPowerManagerStub.java | 14 + .../tcl/chip/tvapp/MediaPlaybackManager.java | 125 +++++ .../chip/tvapp/MediaPlaybackManagerStub.java | 118 +++++ .../java/src/com/tcl/chip/tvapp/TvApp.java | 8 + .../src/com/tcl/chip/tvapp/TvChannelInfo.java | 56 +++ .../tcl/chip/tvapp/TvChannelLineupInfo.java | 56 +++ .../com/tcl/chip/tvapp/TvChannelManager.java | 33 ++ .../tcl/chip/tvapp/TvChannelManagerStub.java | 67 +++ .../ContentLauncherManager.cpp | 41 +- .../content-launcher/ContentLauncherManager.h | 6 +- .../content-launch-server.cpp | 68 ++- .../content-launch-server.h | 12 +- 35 files changed, 2117 insertions(+), 517 deletions(-) delete mode 100644 examples/tv-app/android/include/content-launcher/ContentLauncherManager.cpp delete mode 100644 examples/tv-app/android/include/content-launcher/ContentLauncherManager.h delete mode 100644 examples/tv-app/android/include/low-power/LowPowerManager.cpp delete mode 100644 examples/tv-app/android/include/media-playback/MediaPlaybackManager.cpp delete mode 100644 examples/tv-app/android/include/tv-channel/TvChannelManager.cpp create mode 100644 examples/tv-app/android/java/ContentLauncherManager.cpp create mode 100644 examples/tv-app/android/java/ContentLauncherManager.h create mode 100644 examples/tv-app/android/java/LowPowerManager.cpp rename examples/tv-app/android/{include/tv-channel/TvChannelManager.h => java/LowPowerManager.h} (63%) create mode 100644 examples/tv-app/android/java/MediaPlaybackManager.cpp rename examples/tv-app/android/{include/media-playback => java}/MediaPlaybackManager.h (57%) create mode 100644 examples/tv-app/android/java/TvChannelManager.cpp create mode 100644 examples/tv-app/android/java/TvChannelManager.h create mode 100644 examples/tv-app/android/java/src/com/tcl/chip/tvapp/ContentLaunchBrandingInformation.java create mode 100755 examples/tv-app/android/java/src/com/tcl/chip/tvapp/ContentLaunchManager.java create mode 100644 examples/tv-app/android/java/src/com/tcl/chip/tvapp/ContentLaunchManagerStub.java create mode 100644 examples/tv-app/android/java/src/com/tcl/chip/tvapp/ContentLaunchResponse.java create mode 100644 examples/tv-app/android/java/src/com/tcl/chip/tvapp/ContentLaunchSearchParameter.java create mode 100644 examples/tv-app/android/java/src/com/tcl/chip/tvapp/LowPowerManager.java create mode 100644 examples/tv-app/android/java/src/com/tcl/chip/tvapp/LowPowerManagerStub.java create mode 100755 examples/tv-app/android/java/src/com/tcl/chip/tvapp/MediaPlaybackManager.java create mode 100755 examples/tv-app/android/java/src/com/tcl/chip/tvapp/MediaPlaybackManagerStub.java create mode 100644 examples/tv-app/android/java/src/com/tcl/chip/tvapp/TvChannelInfo.java create mode 100644 examples/tv-app/android/java/src/com/tcl/chip/tvapp/TvChannelLineupInfo.java create mode 100644 examples/tv-app/android/java/src/com/tcl/chip/tvapp/TvChannelManager.java create mode 100644 examples/tv-app/android/java/src/com/tcl/chip/tvapp/TvChannelManagerStub.java rename examples/tv-app/android/include/low-power/LowPowerManager.h => src/app/clusters/content-launch-server/content-launch-server.h (73%) diff --git a/examples/tv-app/android/App/app/src/main/java/com/tcl/chip/chiptvserver/MainActivity.java b/examples/tv-app/android/App/app/src/main/java/com/tcl/chip/chiptvserver/MainActivity.java index 9d51e2ff71492e..41014fe7f100ea 100644 --- a/examples/tv-app/android/App/app/src/main/java/com/tcl/chip/chiptvserver/MainActivity.java +++ b/examples/tv-app/android/App/app/src/main/java/com/tcl/chip/chiptvserver/MainActivity.java @@ -15,9 +15,13 @@ import chip.setuppayload.DiscoveryCapability; import chip.setuppayload.SetupPayload; import chip.setuppayload.SetupPayloadParser; +import com.tcl.chip.tvapp.ContentLaunchManagerStub; import com.tcl.chip.tvapp.KeypadInputManagerStub; +import com.tcl.chip.tvapp.LowPowerManagerStub; import com.tcl.chip.tvapp.MediaInputManagerStub; +import com.tcl.chip.tvapp.MediaPlaybackManagerStub; import com.tcl.chip.tvapp.TvApp; +import com.tcl.chip.tvapp.TvChannelManagerStub; import com.tcl.chip.tvapp.WakeOnLanManagerStub; import java.util.HashSet; @@ -38,6 +42,10 @@ protected void onCreate(Bundle savedInstanceState) { tvApp.setKeypadInputManager(new KeypadInputManagerStub()); tvApp.setWakeOnLanManager(new WakeOnLanManagerStub()); tvApp.setMediaInputManager(new MediaInputManagerStub()); + tvApp.setContentLaunchManager(new ContentLaunchManagerStub()); + tvApp.setLowPowerManager(new LowPowerManagerStub()); + tvApp.setMediaPlaybackManager(new MediaPlaybackManagerStub()); + tvApp.setTvChannelManager(new TvChannelManagerStub()); AndroidChipPlatform chipPlatform = new AndroidChipPlatform( diff --git a/examples/tv-app/android/BUILD.gn b/examples/tv-app/android/BUILD.gn index c7da6f1190a258..5be448221c55dc 100644 --- a/examples/tv-app/android/BUILD.gn +++ b/examples/tv-app/android/BUILD.gn @@ -34,23 +34,23 @@ shared_library("jni") { "include/audio-output/AudioOutputManager.h", "include/cluster-change-attribute.cpp", "include/cluster-init.cpp", - "include/content-launcher/ContentLauncherManager.cpp", - "include/content-launcher/ContentLauncherManager.h", "include/endpoint-configuration/EndpointConfigurationStorage.cpp", "include/endpoint-configuration/EndpointConfigurationStorage.h", - "include/low-power/LowPowerManager.cpp", - "include/low-power/LowPowerManager.h", - "include/media-playback/MediaPlaybackManager.cpp", - "include/media-playback/MediaPlaybackManager.h", "include/target-navigator/TargetNavigatorManager.cpp", "include/target-navigator/TargetNavigatorManager.h", - "include/tv-channel/TvChannelManager.cpp", - "include/tv-channel/TvChannelManager.h", + "java/ContentLauncherManager.cpp", + "java/ContentLauncherManager.h", "java/KeypadInputManager.cpp", "java/KeypadInputManager.h", + "java/LowPowerManager.cpp", + "java/LowPowerManager.h", "java/MediaInputManager.cpp", "java/MediaInputManager.h", + "java/MediaPlaybackManager.cpp", + "java/MediaPlaybackManager.h", "java/TVApp-JNI.cpp", + "java/TvChannelManager.cpp", + "java/TvChannelManager.h", "java/WakeOnLanManager.cpp", "java/WakeOnLanManager.h", ] @@ -83,12 +83,25 @@ android_library("java") { ] sources = [ + "java/src/com/tcl/chip/tvapp/ContentLaunchBrandingInformation.java", + "java/src/com/tcl/chip/tvapp/ContentLaunchManager.java", + "java/src/com/tcl/chip/tvapp/ContentLaunchManagerStub.java", + "java/src/com/tcl/chip/tvapp/ContentLaunchResponse.java", + "java/src/com/tcl/chip/tvapp/ContentLaunchSearchParameter.java", "java/src/com/tcl/chip/tvapp/KeypadInputManager.java", "java/src/com/tcl/chip/tvapp/KeypadInputManagerStub.java", + "java/src/com/tcl/chip/tvapp/LowPowerManager.java", + "java/src/com/tcl/chip/tvapp/LowPowerManagerStub.java", "java/src/com/tcl/chip/tvapp/MediaInputInfo.java", "java/src/com/tcl/chip/tvapp/MediaInputManager.java", "java/src/com/tcl/chip/tvapp/MediaInputManagerStub.java", + "java/src/com/tcl/chip/tvapp/MediaPlaybackManager.java", + "java/src/com/tcl/chip/tvapp/MediaPlaybackManagerStub.java", "java/src/com/tcl/chip/tvapp/TvApp.java", + "java/src/com/tcl/chip/tvapp/TvChannelInfo.java", + "java/src/com/tcl/chip/tvapp/TvChannelLineupInfo.java", + "java/src/com/tcl/chip/tvapp/TvChannelManager.java", + "java/src/com/tcl/chip/tvapp/TvChannelManagerStub.java", "java/src/com/tcl/chip/tvapp/WakeOnLanManager.java", "java/src/com/tcl/chip/tvapp/WakeOnLanManagerStub.java", ] diff --git a/examples/tv-app/android/include/cluster-init.cpp b/examples/tv-app/android/include/cluster-init.cpp index 2ef9a280110e15..287c7c23cb020c 100644 --- a/examples/tv-app/android/include/cluster-init.cpp +++ b/examples/tv-app/android/include/cluster-init.cpp @@ -19,9 +19,7 @@ #include "application-basic/ApplicationBasicManager.h" #include "application-launcher/ApplicationLauncherManager.h" #include "audio-output/AudioOutputManager.h" -#include "content-launcher/ContentLauncherManager.h" #include "target-navigator/TargetNavigatorManager.h" -#include "tv-channel/TvChannelManager.h" #include #include @@ -80,33 +78,6 @@ void emberAfApplicationBasicClusterInitCallback(chip::EndpointId endpoint) namespace { -TvAttrAccess - gTvChannelAttrAccess; - -} // anonymous namespace - -/** @brief Tv Channel Cluster Init - * - * This function is called when a specific cluster is initialized. It gives the - * application an opportunity to take care of cluster initialization procedures. - * It is called exactly once for each endpoint where cluster is present. - * - * @param endpoint Ver.: always - * - */ -void emberAfTvChannelClusterInitCallback(EndpointId endpoint) -{ - static bool attrAccessRegistered = false; - if (!attrAccessRegistered) - { - registerAttributeAccessOverride(&gTvChannelAttrAccess); - attrAccessRegistered = true; - } -} - -namespace { - TvAttrAccess gApplicationLauncherAttrAccess; @@ -161,53 +132,6 @@ void emberAfAudioOutputClusterInitCallback(EndpointId endpoint) namespace { -class ContentLauncherAttrAccess : public app::AttributeAccessInterface -{ -public: - ContentLauncherAttrAccess() : app::AttributeAccessInterface(Optional::Missing(), app::Clusters::ContentLauncher::Id) - {} - - CHIP_ERROR Read(const app::ConcreteReadAttributePath & aPath, app::AttributeValueEncoder & aEncoder) override - { - if (aPath.mAttributeId == app::Clusters::ContentLauncher::Attributes::AcceptsHeaderList::Id) - { - return ContentLauncherManager().proxyGetAcceptsHeader(aEncoder); - } - - if (aPath.mAttributeId == app::Clusters::ContentLauncher::Attributes::SupportedStreamingTypes::Id) - { - return ContentLauncherManager().proxyGetSupportedStreamingTypes(aEncoder); - } - - return CHIP_NO_ERROR; - } -}; - -ContentLauncherAttrAccess gContentLauncherAttrAccess; - -} // anonymous namespace - -/** @brief Content Launch Cluster Init - * - * This function is called when a specific cluster is initialized. It gives the - * application an opportunity to take care of cluster initialization procedures. - * It is called exactly once for each endpoint where cluster is present. - * - * @param endpoint Ver.: always - * - */ -void emberAfContentLauncherClusterInitCallback(EndpointId endpoint) -{ - static bool attrAccessRegistered = false; - if (!attrAccessRegistered) - { - registerAttributeAccessOverride(&gContentLauncherAttrAccess); - attrAccessRegistered = true; - } -} - -namespace { - TvAttrAccess gTargetNavigatorAttrAccess; diff --git a/examples/tv-app/android/include/content-launcher/ContentLauncherManager.cpp b/examples/tv-app/android/include/content-launcher/ContentLauncherManager.cpp deleted file mode 100644 index 001fe840623d32..00000000000000 --- a/examples/tv-app/android/include/content-launcher/ContentLauncherManager.cpp +++ /dev/null @@ -1,138 +0,0 @@ -/* - * - * Copyright (c) 2021 Project CHIP Authors - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "ContentLauncherManager.h" - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include - -using namespace std; - -CHIP_ERROR ContentLauncherManager::Init() -{ - CHIP_ERROR err = CHIP_NO_ERROR; - - // TODO: Store feature map once it is supported - map featureMap; - featureMap["CS"] = true; - featureMap["UP"] = true; - featureMap["WA"] = true; - - SuccessOrExit(err); -exit: - return err; -} - -CHIP_ERROR ContentLauncherManager::proxyGetAcceptsHeader(chip::app::AttributeValueEncoder & aEncoder) -{ - return aEncoder.EncodeList([](const chip::app::TagBoundEncoder & encoder) -> CHIP_ERROR { - // TODO: Insert code here - char headerExample[] = "exampleHeader"; - int maximumVectorSize = 1; - - for (uint16_t i = 0; i < maximumVectorSize; ++i) - { - ReturnErrorOnFailure(encoder.Encode(chip::ByteSpan(chip::Uint8::from_char(headerExample), sizeof(headerExample) - 1))); - } - return CHIP_NO_ERROR; - }); -} - -CHIP_ERROR ContentLauncherManager::proxyGetSupportedStreamingTypes(chip::app::AttributeValueEncoder & aEncoder) -{ - return aEncoder.EncodeList([](const chip::app::TagBoundEncoder & encoder) -> CHIP_ERROR { - // TODO: Insert code here - ReturnErrorOnFailure(encoder.Encode(EMBER_ZCL_CONTENT_LAUNCH_STREAMING_TYPE_DASH)); - ReturnErrorOnFailure(encoder.Encode(EMBER_ZCL_CONTENT_LAUNCH_STREAMING_TYPE_HLS)); - return CHIP_NO_ERROR; - }); -} - -ContentLaunchResponse ContentLauncherManager::proxyLaunchContentRequest(list parameterList, bool autoplay, - string data) -{ - // TODO: Insert code here - ContentLaunchResponse response; - response.data = "Example data"; - response.status = EMBER_ZCL_CONTENT_LAUNCH_STATUS_SUCCESS; - return response; -} -ContentLaunchResponse ContentLauncherManager::proxyLaunchUrlRequest(string contentUrl, string displayString, - ContentLaunchBrandingInformation brandingInformation) -{ - // TODO: Insert code here - ContentLaunchResponse response; - response.data = "Example data"; - response.status = EMBER_ZCL_CONTENT_LAUNCH_STATUS_SUCCESS; - return response; -} - -static void sendResponse(const char * responseName, ContentLaunchResponse launchResponse, chip::CommandId commandId) -{ - emberAfFillExternalBuffer((ZCL_CLUSTER_SPECIFIC_COMMAND | ZCL_FRAME_CONTROL_SERVER_TO_CLIENT), ZCL_CONTENT_LAUNCH_CLUSTER_ID, - commandId, "us", launchResponse.status, &launchResponse.data); - - EmberStatus status = emberAfSendResponse(); - if (status != EMBER_SUCCESS) - { - ChipLogError(Zcl, "Failed to send %s. Error:%d", responseName, static_cast(status)); - } -} - -bool emberAfContentLauncherClusterLaunchContentCallback( - chip::app::CommandHandler * command, const chip::app::ConcreteCommandPath & commandPath, - const chip::app::Clusters::ContentLauncher::Commands::LaunchContent::DecodableType & commandData) -{ - auto & autoplay = commandData.autoPlay; - auto & data = commandData.data; - - string dataString(data.data(), data.size()); - list parameterList; - ContentLaunchResponse response = ContentLauncherManager().proxyLaunchContentRequest(parameterList, autoplay, dataString); - sendResponse("LaunchContent", response, ZCL_LAUNCH_CONTENT_RESPONSE_COMMAND_ID); - return true; -} - -bool emberAfContentLauncherClusterLaunchURLCallback( - chip::app::CommandHandler * command, const chip::app::ConcreteCommandPath & commandPath, - const chip::app::Clusters::ContentLauncher::Commands::LaunchURL::DecodableType & commandData) -{ - auto & contentUrl = commandData.contentURL; - auto & displayString = commandData.displayString; - - string contentUrlString(contentUrl.data(), contentUrl.size()); - string displayStringString(displayString.data(), displayString.size()); - ContentLaunchBrandingInformation brandingInformation; - ContentLaunchResponse response = - ContentLauncherManager().proxyLaunchUrlRequest(contentUrlString, displayStringString, brandingInformation); - sendResponse("LaunchURL", response, ZCL_LAUNCH_URL_RESPONSE_COMMAND_ID); - return true; -} diff --git a/examples/tv-app/android/include/content-launcher/ContentLauncherManager.h b/examples/tv-app/android/include/content-launcher/ContentLauncherManager.h deleted file mode 100644 index 285e521e889934..00000000000000 --- a/examples/tv-app/android/include/content-launcher/ContentLauncherManager.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * - * Copyright (c) 2021 Project CHIP Authors - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#pragma once - -#include -#include - -#include -#include -#include -#include -struct ContentLaunchResponse -{ - EmberAfContentLaunchStatus status; - std::string data; -}; - -class ContentLauncherManager -{ -public: - CHIP_ERROR Init(); - CHIP_ERROR proxyGetAcceptsHeader(chip::app::AttributeValueEncoder & aEncoder); - CHIP_ERROR proxyGetSupportedStreamingTypes(chip::app::AttributeValueEncoder & aEncoder); - ContentLaunchResponse proxyLaunchContentRequest(std::list parameterList, bool autoplay, - std::string data); - ContentLaunchResponse proxyLaunchUrlRequest(std::string contentUrl, std::string displayString, - ContentLaunchBrandingInformation brandingInformation); -}; diff --git a/examples/tv-app/android/include/low-power/LowPowerManager.cpp b/examples/tv-app/android/include/low-power/LowPowerManager.cpp deleted file mode 100644 index 97016d4b01a74f..00000000000000 --- a/examples/tv-app/android/include/low-power/LowPowerManager.cpp +++ /dev/null @@ -1,25 +0,0 @@ -/* - * - * Copyright (c) 2021 Project CHIP Authors - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "LowPowerManager.h" - -bool lowPowerClusterSleep() -{ - // TODO: Insert code here - return true; -} diff --git a/examples/tv-app/android/include/media-playback/MediaPlaybackManager.cpp b/examples/tv-app/android/include/media-playback/MediaPlaybackManager.cpp deleted file mode 100644 index 3146f0c3d79036..00000000000000 --- a/examples/tv-app/android/include/media-playback/MediaPlaybackManager.cpp +++ /dev/null @@ -1,79 +0,0 @@ -/** - * - * 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 "MediaPlaybackManager.h" -#include -#include -#include - -#include -#include - -using namespace std; - -CHIP_ERROR MediaPlaybackManager::Init() -{ - CHIP_ERROR err = CHIP_NO_ERROR; - - // TODO: Store feature map once it is supported - map featureMap; - featureMap["AS"] = true; - - SuccessOrExit(err); -exit: - return err; -} - -EmberAfMediaPlaybackStatus MediaPlaybackManager::proxyMediaPlaybackRequest(MediaPlaybackRequest mediaPlaybackRequest, - uint64_t deltaPositionMilliseconds) -{ - switch (mediaPlaybackRequest) - { - case MEDIA_PLAYBACK_REQUEST_PLAY: - // TODO: Insert code here - case MEDIA_PLAYBACK_REQUEST_PAUSE: - // TODO: Insert code here - case MEDIA_PLAYBACK_REQUEST_STOP: - // TODO: Insert code here - case MEDIA_PLAYBACK_REQUEST_START_OVER: - // TODO: Insert code here - case MEDIA_PLAYBACK_REQUEST_PREVIOUS: - // TODO: Insert code here - case MEDIA_PLAYBACK_REQUEST_NEXT: - // TODO: Insert code here - case MEDIA_PLAYBACK_REQUEST_REWIND: - // TODO: Insert code here - case MEDIA_PLAYBACK_REQUEST_FAST_FORWARD: - // TODO: Insert code here - case MEDIA_PLAYBACK_REQUEST_SKIP_FORWARD: - // TODO: Insert code here - case MEDIA_PLAYBACK_REQUEST_SKIP_BACKWARD: - // TODO: Insert code here - case MEDIA_PLAYBACK_REQUEST_SEEK: - return EMBER_ZCL_MEDIA_PLAYBACK_STATUS_SUCCESS; - break; - default: { - return EMBER_ZCL_MEDIA_PLAYBACK_STATUS_SUCCESS; - } - } -} - -EmberAfMediaPlaybackStatus mediaPlaybackClusterSendMediaPlaybackRequest(MediaPlaybackRequest mediaPlaybackRequest, - uint64_t deltaPositionMilliseconds) -{ - return MediaPlaybackManager().proxyMediaPlaybackRequest(mediaPlaybackRequest, deltaPositionMilliseconds); -} diff --git a/examples/tv-app/android/include/tv-channel/TvChannelManager.cpp b/examples/tv-app/android/include/tv-channel/TvChannelManager.cpp deleted file mode 100644 index 5d5a1ead456e6d..00000000000000 --- a/examples/tv-app/android/include/tv-channel/TvChannelManager.cpp +++ /dev/null @@ -1,84 +0,0 @@ -/** - * - * 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 "TvChannelManager.h" -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -using namespace chip; - -CHIP_ERROR TvChannelManager::Init() -{ - CHIP_ERROR err = CHIP_NO_ERROR; - // TODO: Store feature map once it is supported - std::map featureMap; - featureMap["CL"] = true; - featureMap["LI"] = true; - - SuccessOrExit(err); -exit: - return err; -} - -CHIP_ERROR TvChannelManager::proxyGetTvChannelList(chip::app::AttributeValueEncoder & aEncoder) -{ - return aEncoder.EncodeList([](const chip::app::TagBoundEncoder & encoder) -> CHIP_ERROR { - // TODO: Insert code here - int maximumVectorSize = 2; - char affiliateCallSign[] = "exampleASign"; - char callSign[] = "exampleCSign"; - char name[] = "exampleName"; - - for (int i = 0; i < maximumVectorSize; ++i) - { - chip::app::Clusters::TvChannel::Structs::TvChannelInfo::Type channelInfo; - channelInfo.affiliateCallSign = CharSpan(affiliateCallSign, sizeof(affiliateCallSign) - 1); - channelInfo.callSign = CharSpan(callSign, sizeof(callSign) - 1); - channelInfo.name = CharSpan(name, sizeof(name) - 1); - channelInfo.majorNumber = static_cast(1 + i); - channelInfo.minorNumber = static_cast(2 + i); - ReturnErrorOnFailure(encoder.Encode(channelInfo)); - } - return CHIP_NO_ERROR; - }); -} - -TvChannelInfo tvChannelClusterChangeChannel(std::string match) -{ - // TODO: Insert code here - TvChannelInfo channel = {}; - return channel; -} -bool tvChannelClusterChangeChannelByNumber(uint16_t majorNumber, uint16_t minorNumber) -{ - // TODO: Insert code here - return true; -} -bool tvChannelClusterSkipChannel(uint16_t count) -{ - // TODO: Insert code here - return true; -} diff --git a/examples/tv-app/android/java/ContentLauncherManager.cpp b/examples/tv-app/android/java/ContentLauncherManager.cpp new file mode 100644 index 00000000000000..5adbddebc03679 --- /dev/null +++ b/examples/tv-app/android/java/ContentLauncherManager.cpp @@ -0,0 +1,352 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "ContentLauncherManager.h" + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace std; +using namespace chip; + +ContentLauncherManager ContentLauncherManager::sInstance; + +namespace { + +class ContentLauncherAttrAccess : public app::AttributeAccessInterface +{ +public: + ContentLauncherAttrAccess() : app::AttributeAccessInterface(Optional::Missing(), app::Clusters::ContentLauncher::Id) + {} + + CHIP_ERROR Read(const app::ConcreteReadAttributePath & aPath, app::AttributeValueEncoder & aEncoder) override + { + if (aPath.mAttributeId == app::Clusters::ContentLauncher::Attributes::AcceptsHeaderList::Id) + { + return ContentLauncherMgr().GetAcceptsHeader(aEncoder); + } + else if (aPath.mAttributeId == app::Clusters::ContentLauncher::Attributes::SupportedStreamingTypes::Id) + { + return ContentLauncherMgr().GetSupportedStreamingTypes(aEncoder); + } + + return CHIP_NO_ERROR; + } +}; + +ContentLauncherAttrAccess gContentLauncherAttrAccess; + +} // anonymous namespace + +/** @brief Content Launch Cluster Init + * + * This function is called when a specific cluster is initialized. It gives the + * application an opportunity to take care of cluster initialization procedures. + * It is called exactly once for each endpoint where cluster is present. + * + * @param endpoint Ver.: always + * + */ +void emberAfContentLauncherClusterInitCallback(EndpointId endpoint) +{ + static bool attrAccessRegistered = false; + if (!attrAccessRegistered) + { + registerAttributeAccessOverride(&gContentLauncherAttrAccess); + attrAccessRegistered = true; + } +} + +ContentLaunchResponse contentLauncherClusterLaunchContent(std::list parameterList, bool autoplay, + const chip::CharSpan & data) +{ + return ContentLauncherMgr().LaunchContent(parameterList, autoplay, data); +} + +ContentLaunchResponse contentLauncherClusterLaunchUrl(const chip::CharSpan & contentUrl, const chip::CharSpan & displayString, + ContentLaunchBrandingInformation & brandingInformation) +{ + return ContentLauncherMgr().LaunchUrl(contentUrl, displayString, brandingInformation); +} + +void ContentLauncherManager::InitializeWithObjects(jobject managerObject) +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Failed to GetEnvForCurrentThread for ContentLauncherManager")); + + mContentLauncherManagerObject = env->NewGlobalRef(managerObject); + VerifyOrReturn(mContentLauncherManagerObject != nullptr, ChipLogError(Zcl, "Failed to NewGlobalRef ContentLauncherManager")); + + jclass ContentLauncherClass = env->GetObjectClass(managerObject); + VerifyOrReturn(ContentLauncherClass != nullptr, ChipLogError(Zcl, "Failed to get ContentLauncherManager Java class")); + + mGetAcceptsHeaderMethod = env->GetMethodID(ContentLauncherClass, "getAcceptsHeader", "()[Ljava/lang/String;"); + if (mGetAcceptsHeaderMethod == nullptr) + { + ChipLogError(Zcl, "Failed to access MediaInputManager 'getInputList' method"); + env->ExceptionClear(); + } + + mGetSupportedStreamingTypesMethod = env->GetMethodID(ContentLauncherClass, "getSupportedStreamingTypes", "()[I"); + if (mGetSupportedStreamingTypesMethod == nullptr) + { + ChipLogError(Zcl, "Failed to access MediaInputManager 'getSupportedStreamingTypes' method"); + env->ExceptionClear(); + } + + mLaunchContentMethod = env->GetMethodID( + ContentLauncherClass, "launchContent", + "([Lcom/tcl/chip/tvapp/ContentLaunchSearchParameter;ZLjava/lang/String;)Lcom/tcl/chip/tvapp/ContentLaunchResponse;"); + if (mLaunchContentMethod == nullptr) + { + ChipLogError(Zcl, "Failed to access MediaInputManager 'launchContent' method"); + env->ExceptionClear(); + } + + mLaunchUrlMethod = env->GetMethodID(ContentLauncherClass, "launchUrl", + "(Ljava/lang/String;Ljava/lang/String;Lcom/tcl/chip/tvapp/" + "ContentLaunchBrandingInformation;)Lcom/tcl/chip/tvapp/ContentLaunchResponse;"); + if (mLaunchUrlMethod == nullptr) + { + ChipLogError(AppServer, "Failed to access 'launchUrl' method"); + env->ExceptionClear(); + } +} + +CHIP_ERROR ContentLauncherManager::GetAcceptsHeader(chip::app::AttributeValueEncoder & aEncoder) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + + ChipLogProgress(Zcl, "Received ContentLauncherManager::GetAcceptsHeader"); + VerifyOrExit(mContentLauncherManagerObject != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit(mGetAcceptsHeaderMethod != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit(env != NULL, err = CHIP_JNI_ERROR_NO_ENV); + + return aEncoder.EncodeList([this, env](const chip::app::TagBoundEncoder & encoder) -> CHIP_ERROR { + jobjectArray headersArray = (jobjectArray) env->CallObjectMethod(mContentLauncherManagerObject, mGetAcceptsHeaderMethod); + if (env->ExceptionCheck()) + { + ChipLogError(Zcl, "Java exception in ContentLauncherManager::GetAcceptsHeader"); + env->ExceptionDescribe(); + env->ExceptionClear(); + return CHIP_ERROR_INCORRECT_STATE; + } + + jint size = env->GetArrayLength(headersArray); + for (int i = 0; i < size; i++) + { + jstring acceptsheader = (jstring) env->GetObjectArrayElement(headersArray, i); + if (acceptsheader != nullptr) + { + JniUtfString header(env, acceptsheader); + + chip::ByteSpan bHeader((const uint8_t *) (header.c_str()), (size_t)(header.size())); + ReturnErrorOnFailure(encoder.Encode(bHeader)); + + // Todo: should be chanSpan? + // ReturnErrorOnFailure(encoder.Encode(header.charSpan())); + } + } + + return CHIP_NO_ERROR; + }); + +exit: + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "ContentLauncherManager::GetAcceptsHeader status error: %s", err.AsString()); + } + + return err; +} + +CHIP_ERROR ContentLauncherManager::GetSupportedStreamingTypes(chip::app::AttributeValueEncoder & aEncoder) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + + ChipLogProgress(Zcl, "Received ContentLauncherManager::GetSupportedStreamingTypes"); + VerifyOrExit(mContentLauncherManagerObject != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit(mGetSupportedStreamingTypesMethod != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit(env != NULL, err = CHIP_JNI_ERROR_NO_ENV); + + return aEncoder.EncodeList([this, env](const chip::app::TagBoundEncoder & encoder) -> CHIP_ERROR { + jintArray typesArray = (jintArray) env->CallObjectMethod(mContentLauncherManagerObject, mGetSupportedStreamingTypesMethod); + if (env->ExceptionCheck()) + { + ChipLogError(Zcl, "Java exception in ContentLauncherManager::GetSupportedStreamingTypes"); + env->ExceptionDescribe(); + env->ExceptionClear(); + return CHIP_ERROR_INCORRECT_STATE; + } + + jboolean isCopy = JNI_FALSE; + jint * ptypes = env->GetIntArrayElements(typesArray, &isCopy); + jint size = env->GetArrayLength(typesArray); + + CHIP_ERROR err = CHIP_NO_ERROR; + for (int i = 0; i < size; i++) + { + err = encoder.Encode(static_cast(ptypes[i])); + if (err != CHIP_NO_ERROR) + { + break; + } + } + env->ReleaseIntArrayElements(typesArray, ptypes, 0); + return err; + }); + +exit: + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "ContentLauncherManager::GetAcceptsHeader status error: %s", err.AsString()); + } + + return err; +} + +ContentLaunchResponse ContentLauncherManager::LaunchContent(std::list parameterList, bool autoplay, + const chip::CharSpan & data) +{ + ContentLaunchResponse response; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + + ChipLogProgress(Zcl, "Received ContentLauncherManager::LaunchContent"); + VerifyOrExit(mContentLauncherManagerObject != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit(mLaunchContentMethod != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit(env != NULL, err = CHIP_JNI_ERROR_NO_ENV); + + { + UtfString jData(env, data); + + // Todo: make parameterList java + jobjectArray parameterArray = nullptr; + + jobject resp = + env->CallObjectMethod(mContentLauncherManagerObject, mLaunchContentMethod, parameterArray, autoplay, jData.jniValue()); + if (env->ExceptionCheck()) + { + ChipLogError(Zcl, "Java exception in ContentLauncherManager::LaunchContent"); + env->ExceptionDescribe(); + env->ExceptionClear(); + err = CHIP_ERROR_INCORRECT_STATE; + goto exit; + } + + VerifyOrExit(resp != nullptr, err = CHIP_JNI_ERROR_NULL_OBJECT); + jclass respCls = env->GetObjectClass(resp); + jfieldID statusFid = env->GetFieldID(respCls, "status", "I"); + VerifyOrExit(statusFid != nullptr, err = CHIP_JNI_ERROR_FIELD_NOT_FOUND); + jint status = env->GetIntField(resp, statusFid); + + jfieldID dataFid = env->GetFieldID(respCls, "data", "Ljava/lang/String;"); + VerifyOrExit(dataFid != nullptr, err = CHIP_JNI_ERROR_FIELD_NOT_FOUND); + jstring jdataStr = (jstring) env->GetObjectField(resp, dataFid); + JniUtfString dataStr(env, jdataStr); + + response.status = static_cast(status); + response.data = dataStr.charSpan(); + } + +exit: + response.err = err; + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "ContentLauncherManager::LaunchContent status error: %s", err.AsString()); + } + + return response; +} + +ContentLaunchResponse ContentLauncherManager::LaunchUrl(const chip::CharSpan & contentUrl, const chip::CharSpan & displayString, + ContentLaunchBrandingInformation & brandingInformation) +{ + ContentLaunchResponse response; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + + ChipLogProgress(Zcl, "Received ContentLauncherManager::LaunchContent"); + VerifyOrExit(mContentLauncherManagerObject != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit(mLaunchUrlMethod != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit(env != NULL, err = CHIP_JNI_ERROR_NO_ENV); + + { + UtfString jContentUrl(env, contentUrl); + UtfString jDisplayString(env, displayString); + + // Todo: make brandingInformation java + jobjectArray branding = nullptr; + + jobject resp = env->CallObjectMethod(mContentLauncherManagerObject, mLaunchUrlMethod, jContentUrl.jniValue(), + jDisplayString.jniValue(), branding); + if (env->ExceptionCheck()) + { + ChipLogError(Zcl, "Java exception in ContentLauncherManager::LaunchUrl"); + env->ExceptionDescribe(); + env->ExceptionClear(); + err = CHIP_ERROR_INCORRECT_STATE; + goto exit; + } + + VerifyOrExit(resp != nullptr, err = CHIP_JNI_ERROR_NULL_OBJECT); + jclass respCls = env->GetObjectClass(resp); + jfieldID statusFid = env->GetFieldID(respCls, "status", "I"); + VerifyOrExit(statusFid != nullptr, err = CHIP_JNI_ERROR_FIELD_NOT_FOUND); + jint status = env->GetIntField(resp, statusFid); + + jfieldID dataFid = env->GetFieldID(respCls, "data", "Ljava/lang/String;"); + VerifyOrExit(dataFid != nullptr, err = CHIP_JNI_ERROR_FIELD_NOT_FOUND); + jstring jdataStr = (jstring) env->GetObjectField(resp, dataFid); + JniUtfString dataStr(env, jdataStr); + + response.status = static_cast(status); + response.data = dataStr.charSpan(); + } + +exit: + response.err = err; + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "ContentLauncherManager::LaunchUrl status error: %s", err.AsString()); + } + + return response; +} diff --git a/examples/tv-app/android/java/ContentLauncherManager.h b/examples/tv-app/android/java/ContentLauncherManager.h new file mode 100644 index 00000000000000..22378e41955df7 --- /dev/null +++ b/examples/tv-app/android/java/ContentLauncherManager.h @@ -0,0 +1,54 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include + +#include +#include +#include +#include +#include + +class ContentLauncherManager +{ +public: + void InitializeWithObjects(jobject managerObject); + CHIP_ERROR GetAcceptsHeader(chip::app::AttributeValueEncoder & aEncoder); + CHIP_ERROR GetSupportedStreamingTypes(chip::app::AttributeValueEncoder & aEncoder); + ContentLaunchResponse LaunchContent(std::list parameterList, bool autoplay, + const chip::CharSpan & data); + ContentLaunchResponse LaunchUrl(const chip::CharSpan & contentUrl, const chip::CharSpan & displayString, + ContentLaunchBrandingInformation & brandingInformation); + +private: + friend ContentLauncherManager & ContentLauncherMgr(); + + static ContentLauncherManager sInstance; + jobject mContentLauncherManagerObject = nullptr; + jmethodID mGetAcceptsHeaderMethod = nullptr; + jmethodID mGetSupportedStreamingTypesMethod = nullptr; + jmethodID mLaunchContentMethod = nullptr; + jmethodID mLaunchUrlMethod = nullptr; +}; + +inline ContentLauncherManager & ContentLauncherMgr() +{ + return ContentLauncherManager::sInstance; +} diff --git a/examples/tv-app/android/java/LowPowerManager.cpp b/examples/tv-app/android/java/LowPowerManager.cpp new file mode 100644 index 00000000000000..52dd0b7586d5a8 --- /dev/null +++ b/examples/tv-app/android/java/LowPowerManager.cpp @@ -0,0 +1,76 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "LowPowerManager.h" +#include +#include +#include +#include +#include + +using namespace chip; + +LowPowerManager LowPowerManager::sInstance; + +bool lowPowerClusterSleep() +{ + return LowPowerMgr().Sleep(); +} + +void LowPowerManager::InitializeWithObjects(jobject managerObject) +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Failed to GetEnvForCurrentThread for LowPowerManager")); + + mLowPowerManagerObject = env->NewGlobalRef(managerObject); + VerifyOrReturn(mLowPowerManagerObject != nullptr, ChipLogError(Zcl, "Failed to NewGlobalRef LowPowerManager")); + + jclass LowPowerManagerClass = env->GetObjectClass(managerObject); + VerifyOrReturn(LowPowerManagerClass != nullptr, ChipLogError(Zcl, "Failed to get LowPowerManager Java class")); + + mSleepMethod = env->GetMethodID(LowPowerManagerClass, "sleep", "()Z"); + if (mSleepMethod == nullptr) + { + ChipLogError(Zcl, "Failed to access LowPowerManager 'sleep' method"); + env->ExceptionClear(); + } +} + +bool LowPowerManager::Sleep() +{ + jboolean ret = JNI_FALSE; + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + + ChipLogProgress(Zcl, "Received LowPowerManager::Sleep"); + VerifyOrExit(mLowPowerManagerObject != nullptr, ChipLogError(Zcl, "mLowPowerManagerObject null")); + VerifyOrExit(mSleepMethod != nullptr, ChipLogError(Zcl, "mSleepMethod null")); + VerifyOrExit(env != NULL, ChipLogError(Zcl, "env null")); + + env->ExceptionClear(); + ret = env->CallBooleanMethod(mLowPowerManagerObject, mSleepMethod); + if (env->ExceptionCheck()) + { + ChipLogError(DeviceLayer, "Java exception in LowPowerManager::Sleep"); + env->ExceptionDescribe(); + env->ExceptionClear(); + return false; + } + +exit: + return static_cast(ret); +} diff --git a/examples/tv-app/android/include/tv-channel/TvChannelManager.h b/examples/tv-app/android/java/LowPowerManager.h similarity index 63% rename from examples/tv-app/android/include/tv-channel/TvChannelManager.h rename to examples/tv-app/android/java/LowPowerManager.h index aaf78b8deec744..6602136b914428 100644 --- a/examples/tv-app/android/include/tv-channel/TvChannelManager.h +++ b/examples/tv-app/android/java/LowPowerManager.h @@ -1,6 +1,7 @@ -/** +/* * * Copyright (c) 2021 Project CHIP Authors + * All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,15 +18,24 @@ #pragma once -#include - +#include #include -#include -#include -class TvChannelManager +class LowPowerManager { public: - CHIP_ERROR Init(); - CHIP_ERROR proxyGetTvChannelList(chip::app::AttributeValueEncoder & aEncoder); + void InitializeWithObjects(jobject managerObject); + bool Sleep(); + +private: + friend LowPowerManager & LowPowerMgr(); + + static LowPowerManager sInstance; + jobject mLowPowerManagerObject = nullptr; + jmethodID mSleepMethod = nullptr; }; + +inline LowPowerManager & LowPowerMgr() +{ + return LowPowerManager::sInstance; +} diff --git a/examples/tv-app/android/java/MediaPlaybackManager.cpp b/examples/tv-app/android/java/MediaPlaybackManager.cpp new file mode 100644 index 00000000000000..0b760157f68167 --- /dev/null +++ b/examples/tv-app/android/java/MediaPlaybackManager.cpp @@ -0,0 +1,217 @@ +/** + * + * 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 "MediaPlaybackManager.h" +#include +#include +#include +#include +#include +#include + +using namespace chip; + +MediaPlaybackManager MediaPlaybackManager::sInstance; + +class MediaPlayBackAttrAccess : public app::AttributeAccessInterface +{ +public: + MediaPlayBackAttrAccess() : app::AttributeAccessInterface(Optional::Missing(), app::Clusters::MediaPlayback::Id) {} + + CHIP_ERROR Read(const app::ConcreteReadAttributePath & aPath, app::AttributeValueEncoder & aEncoder) override + { + int attrId = -1; + + switch (aPath.mAttributeId) + { + case app::Clusters::MediaPlayback::Attributes::PlaybackState::Id: { + attrId = ZCL_MEDIA_PLAYBACK_STATE_ATTRIBUTE_ID; + break; + } + case app::Clusters::MediaPlayback::Attributes::StartTime::Id: { + attrId = ZCL_MEDIA_PLAYBACK_START_TIME_ATTRIBUTE_ID; + break; + } + case app::Clusters::MediaPlayback::Attributes::Duration::Id: { + attrId = ZCL_MEDIA_PLAYBACK_DURATION_ATTRIBUTE_ID; + break; + } + case app::Clusters::MediaPlayback::Attributes::PositionUpdatedAt::Id: { + attrId = ZCL_MEDIA_PLAYBACK_PLAYBACK_POSITION_UPDATED_AT_ATTRIBUTE_ID; + break; + } + case app::Clusters::MediaPlayback::Attributes::Position::Id: { + attrId = ZCL_MEDIA_PLAYBACK_PLAYBACK_POSITION_ATTRIBUTE_ID; + break; + } + case app::Clusters::MediaPlayback::Attributes::PlaybackSpeed::Id: { + attrId = ZCL_MEDIA_PLAYBACK_PLAYBACK_SPEED_ATTRIBUTE_ID; + break; + } + case app::Clusters::MediaPlayback::Attributes::SeekRangeEnd::Id: { + attrId = ZCL_MEDIA_PLAYBACK_PLAYBACK_SEEK_RANGE_END_ATTRIBUTE_ID; + break; + } + case app::Clusters::MediaPlayback::Attributes::SeekRangeStart::Id: { + attrId = ZCL_MEDIA_PLAYBACK_PLAYBACK_SEEK_RANGE_START_ATTRIBUTE_ID; + break; + } + } + + if (attrId >= 0) + { + return MediaPlaybackMgr().GetAttribute(aEncoder, attrId); + } + + return CHIP_NO_ERROR; + } +}; + +MediaPlayBackAttrAccess gMediaPlayBackAttrAccess; + +/** @brief Media PlayBack Cluster Init + * + * This function is called when a specific cluster is initialized. It gives the + * application an opportunity to take care of cluster initialization procedures. + * It is called exactly once for each endpoint where cluster is present. + * + * @param endpoint Ver.: always + * + */ +void emberAfMediaPlaybackClusterInitCallback(EndpointId endpoint) +{ + static bool attrAccessRegistered = false; + if (!attrAccessRegistered) + { + registerAttributeAccessOverride(&gMediaPlayBackAttrAccess); + attrAccessRegistered = true; + } +} + +EmberAfMediaPlaybackStatus mediaPlaybackClusterSendMediaPlaybackRequest(MediaPlaybackRequest mediaPlaybackRequest, + uint64_t deltaPositionMilliseconds) +{ + return MediaPlaybackMgr().Request(mediaPlaybackRequest, deltaPositionMilliseconds); +} + +void MediaPlaybackManager::InitializeWithObjects(jobject managerObject) +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Failed to GetEnvForCurrentThread for MediaPlaybackManager")); + + mMediaPlaybackManagerObject = env->NewGlobalRef(managerObject); + VerifyOrReturn(mMediaPlaybackManagerObject != nullptr, ChipLogError(Zcl, "Failed to NewGlobalRef MediaPlaybackManager")); + + jclass mMediaPlaybackManagerClass = env->GetObjectClass(managerObject); + VerifyOrReturn(mMediaPlaybackManagerClass != nullptr, ChipLogError(Zcl, "Failed to get MediaPlaybackManager Java class")); + + mGetAttributeMethod = env->GetMethodID(mMediaPlaybackManagerClass, "getAttributes", "(I)J"); + if (mGetAttributeMethod == nullptr) + { + ChipLogError(Zcl, "Failed to access MediaPlaybackManager 'getMediaPlaybackAttribute' method"); + env->ExceptionClear(); + } + + mRequestMethod = env->GetMethodID(mMediaPlaybackManagerClass, "request", "(IJ)I"); + if (mRequestMethod == nullptr) + { + ChipLogError(Zcl, "Failed to access MediaPlaybackManager 'proxyMediaPlaybackRequest' method"); + env->ExceptionClear(); + } +} + +CHIP_ERROR MediaPlaybackManager::GetAttribute(chip::app::AttributeValueEncoder & aEncoder, int attributeId) +{ + jlong jAttributeValue = -1; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + + ChipLogProgress(Zcl, "Received MediaPlaybackManager::GetAttribute:%d", attributeId); + VerifyOrExit(mMediaPlaybackManagerObject != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit(mGetAttributeMethod != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit(env != NULL, err = CHIP_JNI_ERROR_NO_ENV); + + jAttributeValue = env->CallLongMethod(mMediaPlaybackManagerObject, mGetAttributeMethod, static_cast(attributeId)); + if (env->ExceptionCheck()) + { + ChipLogError(AppServer, "Java exception in MediaPlaybackManager::GetAttribute"); + env->ExceptionDescribe(); + env->ExceptionClear(); + return CHIP_ERROR_INCORRECT_STATE; + } + + if (jAttributeValue >= 0) + { + switch (attributeId) + { + case ZCL_MEDIA_PLAYBACK_PLAYBACK_SPEED_ATTRIBUTE_ID: { + // TODO: Convert to single once it is supported + // float speed = static_cast(jAttributeValue) / 10000.0f; + err = aEncoder.Encode(static_cast(jAttributeValue)); + break; + } + + default: { + err = aEncoder.Encode(static_cast(jAttributeValue)); + } + } + } + else + { + err = CHIP_ERROR_INCORRECT_STATE; + } + +exit: + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "MediaPlaybackManager::GetAttribute status error: %s", err.AsString()); + } + + return err; +} + +EmberAfMediaPlaybackStatus MediaPlaybackManager::Request(MediaPlaybackRequest mediaPlaybackRequest, + uint64_t deltaPositionMilliseconds) +{ + jint ret = -1; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + + ChipLogProgress(Zcl, "MediaPlaybackManager::Request %d-%ld", mediaPlaybackRequest, deltaPositionMilliseconds); + VerifyOrExit(mMediaPlaybackManagerObject != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit(mRequestMethod != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit(env != NULL, err = CHIP_JNI_ERROR_NO_ENV); + + env->ExceptionClear(); + ret = env->CallIntMethod(mMediaPlaybackManagerObject, mRequestMethod, static_cast(mediaPlaybackRequest), + static_cast(deltaPositionMilliseconds)); + if (env->ExceptionCheck()) + { + ChipLogError(AppServer, "Java exception in MediaPlaybackManager::GetAttribute"); + env->ExceptionDescribe(); + env->ExceptionClear(); + return EMBER_ZCL_MEDIA_PLAYBACK_STATUS_INVALID_STATE_FOR_COMMAND; + } + +exit: + if (err != CHIP_NO_ERROR) + { + return EMBER_ZCL_MEDIA_PLAYBACK_STATUS_INVALID_STATE_FOR_COMMAND; + } + + return static_cast(ret); +} diff --git a/examples/tv-app/android/include/media-playback/MediaPlaybackManager.h b/examples/tv-app/android/java/MediaPlaybackManager.h similarity index 57% rename from examples/tv-app/android/include/media-playback/MediaPlaybackManager.h rename to examples/tv-app/android/java/MediaPlaybackManager.h index e90601e6d6a99c..018c9cba8c8041 100644 --- a/examples/tv-app/android/include/media-playback/MediaPlaybackManager.h +++ b/examples/tv-app/android/java/MediaPlaybackManager.h @@ -21,17 +21,27 @@ #include #include #include - +#include +#include #include class MediaPlaybackManager { public: - CHIP_ERROR Init(); - void storeNewPlaybackState(chip::EndpointId endpoint, uint8_t newPlaybackState); - EmberAfMediaPlaybackStatus proxyMediaPlaybackRequest(MediaPlaybackRequest mediaPlaybackRequest, - uint64_t deltaPositionMilliseconds); + void InitializeWithObjects(jobject managerObject); + CHIP_ERROR GetAttribute(chip::app::AttributeValueEncoder & aEncoder, int attributeId); + EmberAfMediaPlaybackStatus Request(MediaPlaybackRequest mediaPlaybackRequest, uint64_t deltaPositionMilliseconds); private: - uint8_t oldPlaybackState; + friend MediaPlaybackManager & MediaPlaybackMgr(); + + static MediaPlaybackManager sInstance; + jobject mMediaPlaybackManagerObject = nullptr; + jmethodID mRequestMethod = nullptr; + jmethodID mGetAttributeMethod = nullptr; }; + +inline MediaPlaybackManager & MediaPlaybackMgr() +{ + return MediaPlaybackManager::sInstance; +} diff --git a/examples/tv-app/android/java/TVApp-JNI.cpp b/examples/tv-app/android/java/TVApp-JNI.cpp index 6b7b5310645d3d..accd4a0ccc5cb0 100644 --- a/examples/tv-app/android/java/TVApp-JNI.cpp +++ b/examples/tv-app/android/java/TVApp-JNI.cpp @@ -16,8 +16,12 @@ * */ +#include "ContentLauncherManager.h" #include "KeypadInputManager.h" +#include "LowPowerManager.h" #include "MediaInputManager.h" +#include "MediaPlaybackManager.h" +#include "TvChannelManager.h" #include "WakeOnLanManager.h" #include #include @@ -50,3 +54,23 @@ JNI_METHOD(void, setMediaInputManager)(JNIEnv *, jobject, jobject manager) { MediaInputMgr().InitializeWithObjects(manager); } + +JNI_METHOD(void, setContentLaunchManager)(JNIEnv *, jobject, jobject manager) +{ + ContentLauncherMgr().InitializeWithObjects(manager); +} + +JNI_METHOD(void, setLowPowerManager)(JNIEnv *, jobject, jobject manager) +{ + LowPowerMgr().InitializeWithObjects(manager); +} + +JNI_METHOD(void, setMediaPlaybackManager)(JNIEnv *, jobject, jobject manager) +{ + MediaPlaybackMgr().InitializeWithObjects(manager); +} + +JNI_METHOD(void, setTvChannelManager)(JNIEnv *, jobject, jobject manager) +{ + TvChannelMgr().InitializeWithObjects(manager); +} diff --git a/examples/tv-app/android/java/TvChannelManager.cpp b/examples/tv-app/android/java/TvChannelManager.cpp new file mode 100644 index 00000000000000..ead4b7e7ae673e --- /dev/null +++ b/examples/tv-app/android/java/TvChannelManager.cpp @@ -0,0 +1,444 @@ +/** + * + * 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 "TvChannelManager.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +using namespace chip; + +TvChannelManager TvChannelManager::sInstance; + +class ChannelInfoAttrAccess : public app::AttributeAccessInterface +{ +public: + ChannelInfoAttrAccess() : app::AttributeAccessInterface(Optional::Missing(), app::Clusters::TvChannel::Id) {} + CHIP_ERROR Read(const app::ConcreteReadAttributePath & aPath, app::AttributeValueEncoder & aEncoder) override + { + if (aPath.mAttributeId == app::Clusters::TvChannel::Attributes::TvChannelList::Id) + { + return TvChannelMgr().getTvChannelList(aEncoder); + } + else if (aPath.mAttributeId == app::Clusters::TvChannel::Attributes::TvChannelLineup::Id) + { + return TvChannelMgr().getTvChannelLineup(aEncoder); + } + else if (aPath.mAttributeId == app::Clusters::TvChannel::Attributes::CurrentTvChannel::Id) + { + return TvChannelMgr().getCurrentTvChannel(aEncoder); + } + + return CHIP_NO_ERROR; + } +}; + +ChannelInfoAttrAccess gTvChannelAttrAccess; + +/** @brief Tv Channel Cluster Init + * + * This function is called when a specific cluster is initialized. It gives the + * application an opportunity to take care of cluster initialization procedures. + * It is called exactly once for each endpoint where cluster is present. + * + * @param endpoint Ver.: always + * + */ +void emberAfTvChannelClusterInitCallback(EndpointId endpoint) +{ + static bool attrAccessRegistered = false; + if (!attrAccessRegistered) + { + registerAttributeAccessOverride(&gTvChannelAttrAccess); + attrAccessRegistered = true; + } +} + +TvChannelInfo tvChannelClusterChangeChannel(std::string match) +{ + return TvChannelMgr().ChangeChannelByMatch(match); +} + +bool tvChannelClusterChangeChannelByNumber(uint16_t majorNumber, uint16_t minorNumber) +{ + return TvChannelMgr().changeChannelByNumber(majorNumber, minorNumber); +} + +bool tvChannelClusterSkipChannel(uint16_t count) +{ + return TvChannelMgr().skipChannnel(count); +} + +void TvChannelManager::InitializeWithObjects(jobject managerObject) +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Failed to GetEnvForCurrentThread for TvChannelManager")); + + mTvChannelManagerObject = env->NewGlobalRef(managerObject); + VerifyOrReturn(mTvChannelManagerObject != nullptr, ChipLogError(Zcl, "Failed to NewGlobalRef TvChannelManager")); + + jclass managerClass = env->GetObjectClass(mTvChannelManagerObject); + VerifyOrReturn(managerClass != nullptr, ChipLogError(Zcl, "Failed to get TvChannelManager Java class")); + + mGetChannelListMethod = env->GetMethodID(managerClass, "getChannelList", "()[Lcom/tcl/chip/tvapp/TvChannelInfo;"); + if (mGetChannelListMethod == nullptr) + { + ChipLogError(Zcl, "Failed to access TvChannelManager 'getChannelList' method"); + env->ExceptionClear(); + } + + mGetLineupMethod = env->GetMethodID(managerClass, "getLineup", "()Lcom/tcl/chip/tvapp/TvChannelLineupInfo;"); + if (mGetLineupMethod == nullptr) + { + ChipLogError(Zcl, "Failed to access TvChannelManager 'getLineup' method"); + env->ExceptionClear(); + } + + mGetCurrentChannelMethod = env->GetMethodID(managerClass, "getCurrentChannel", "()Lcom/tcl/chip/tvapp/TvChannelInfo;"); + if (mGetCurrentChannelMethod == nullptr) + { + ChipLogError(Zcl, "Failed to access TvChannelManager 'getCurrentChannel' method"); + env->ExceptionClear(); + } + + mChangeChannelMethod = + env->GetMethodID(managerClass, "changeChannel", "(Ljava/lang/String;)Lcom/tcl/chip/tvapp/TvChannelInfo;"); + if (mChangeChannelMethod == nullptr) + { + ChipLogError(Zcl, "Failed to access TvChannelManager 'changeChannel' method"); + env->ExceptionClear(); + } + + mchangeChannelByNumberMethod = env->GetMethodID(managerClass, "changeChannelByNumber", "(II)Z"); + if (mchangeChannelByNumberMethod == nullptr) + { + ChipLogError(Zcl, "Failed to access TvChannelManager 'changeChannelByNumber' method"); + env->ExceptionClear(); + } + + mskipChannelMethod = env->GetMethodID(managerClass, "skipChannel", "(I)Z"); + if (mskipChannelMethod == nullptr) + { + ChipLogError(Zcl, "Failed to access TvChannelManager 'skipChannel' method"); + env->ExceptionClear(); + } +} + +CHIP_ERROR TvChannelManager::getTvChannelList(chip::app::AttributeValueEncoder & aEncoder) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + + ChipLogProgress(Zcl, "Received TvChannelManager::getTvChannelList"); + VerifyOrExit(mTvChannelManagerObject != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit(mGetChannelListMethod != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit(env != NULL, err = CHIP_JNI_ERROR_NO_ENV); + + return aEncoder.EncodeList([env, this](const chip::app::TagBoundEncoder & encoder) -> CHIP_ERROR { + jobjectArray channelInfoList = (jobjectArray) env->CallObjectMethod(mTvChannelManagerObject, mGetChannelListMethod); + jint length = env->GetArrayLength(channelInfoList); + for (jint i = 0; i < length; i++) + { + chip::app::Clusters::TvChannel::Structs::TvChannelInfo::Type channelInfo; + jobject channelObject = env->GetObjectArrayElement(channelInfoList, i); + jclass channelClass = env->GetObjectClass(channelObject); + + jfieldID getCallSignField = env->GetFieldID(channelClass, "callSign", "Ljava/lang/String;"); + jstring jcallSign = static_cast(env->GetObjectField(channelObject, getCallSignField)); + if (jcallSign != NULL) + { + JniUtfString callsign(env, jcallSign); + channelInfo.callSign = callsign.charSpan(); + } + + jfieldID getNameField = env->GetFieldID(channelClass, "name", "Ljava/lang/String;"); + jstring jname = static_cast(env->GetObjectField(channelObject, getNameField)); + if (jname != NULL) + { + JniUtfString name(env, jname); + channelInfo.callSign = name.charSpan(); + } + + jfieldID getJaffiliateCallSignField = env->GetFieldID(channelClass, "affiliateCallSign", "Ljava/lang/String;"); + jstring jaffiliateCallSign = static_cast(env->GetObjectField(channelObject, getJaffiliateCallSignField)); + if (jaffiliateCallSign != NULL) + { + JniUtfString affiliateCallSign(env, jaffiliateCallSign); + channelInfo.callSign = affiliateCallSign.charSpan(); + } + + jfieldID majorNumField = env->GetFieldID(channelClass, "majorNumber", "I"); + jint jmajorNum = env->GetIntField(channelObject, majorNumField); + channelInfo.majorNumber = static_cast(jmajorNum); + + jfieldID minorNumField = env->GetFieldID(channelClass, "minorNumber", "I"); + jint jminorNum = env->GetIntField(channelObject, minorNumField); + channelInfo.majorNumber = static_cast(jminorNum); + ReturnErrorOnFailure(encoder.Encode(channelInfo)); + } + return CHIP_NO_ERROR; + }); +exit: + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "TvChannelManager::getTVChannelList status error: %s", err.AsString()); + } + + return err; +} + +CHIP_ERROR TvChannelManager::getTvChannelLineup(chip::app::AttributeValueEncoder & aEncoder) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + + ChipLogProgress(Zcl, "Received TvChannelManager::getTvChannelLineup"); + VerifyOrExit(mTvChannelManagerObject != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit(mGetLineupMethod != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit(env != NULL, err = CHIP_JNI_ERROR_NO_ENV); + + { + chip::app::Clusters::TvChannel::Structs::TvChannelLineupInfo::Type channelLineupInfo; + + jobject channelLineupObject = env->CallObjectMethod(mTvChannelManagerObject, mGetLineupMethod); + jclass channelLineupClazz = env->GetObjectClass(channelLineupObject); + + jfieldID operatorNameFild = env->GetFieldID(channelLineupClazz, "operatorName", "Ljava/lang/String;"); + jstring joperatorName = static_cast(env->GetObjectField(channelLineupObject, operatorNameFild)); + if (joperatorName != NULL) + { + JniUtfString operatorName(env, joperatorName); + channelLineupInfo.operatorName = operatorName.charSpan(); + } + + jfieldID lineupNameFild = env->GetFieldID(channelLineupClazz, "lineupName", "Ljava/lang/String;"); + jstring jlineupName = static_cast(env->GetObjectField(channelLineupObject, lineupNameFild)); + if (jlineupName != NULL) + { + JniUtfString lineupName(env, jlineupName); + channelLineupInfo.lineupName = lineupName.charSpan(); + } + + jfieldID postalCodeFild = env->GetFieldID(channelLineupClazz, "postalCode", "Ljava/lang/String;"); + jstring jpostalCode = static_cast(env->GetObjectField(channelLineupObject, postalCodeFild)); + if (jpostalCode != NULL) + { + JniUtfString postalCode(env, jpostalCode); + channelLineupInfo.postalCode = postalCode.charSpan(); + } + + jfieldID lineupInfoTypeFild = env->GetFieldID(channelLineupClazz, "lineupInfoType", "I"); + jint jlineupInfoType = (env->GetIntField(channelLineupObject, lineupInfoTypeFild)); + channelLineupInfo.lineupInfoType = static_cast(jlineupInfoType); + + ReturnErrorOnFailure(aEncoder.Encode(channelLineupInfo)); + + return CHIP_NO_ERROR; + } + +exit: + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "TvChannelManager::getTvChannelLineup status error: %s", err.AsString()); + } + + return err; +} + +CHIP_ERROR TvChannelManager::getCurrentTvChannel(chip::app::AttributeValueEncoder & aEncoder) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + ChipLogProgress(Zcl, "Received TvChannelManager::getCurrentTvChannel"); + VerifyOrExit(mTvChannelManagerObject != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit(mGetCurrentChannelMethod != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit(env != NULL, err = CHIP_JNI_ERROR_NO_ENV); + + { + chip::app::Clusters::TvChannel::Structs::TvChannelInfo::Type channelInfo; + + jobject channelInfoObject = env->CallObjectMethod(mTvChannelManagerObject, mGetCurrentChannelMethod); + jclass channelClass = env->GetObjectClass(channelInfoObject); + + jfieldID getCallSignField = env->GetFieldID(channelClass, "callSign", "Ljava/lang/String;"); + jstring jcallSign = static_cast(env->GetObjectField(channelInfoObject, getCallSignField)); + if (jcallSign != NULL) + { + JniUtfString callsign(env, jcallSign); + channelInfo.callSign = callsign.charSpan(); + } + + jfieldID getNameField = env->GetFieldID(channelClass, "name", "Ljava/lang/String;"); + jstring jname = static_cast(env->GetObjectField(channelInfoObject, getNameField)); + if (jname != NULL) + { + JniUtfString name(env, jname); + channelInfo.callSign = name.charSpan(); + } + + jfieldID getJaffiliateCallSignField = env->GetFieldID(channelClass, "affiliateCallSign", "Ljava/lang/String;"); + jstring jaffiliateCallSign = static_cast(env->GetObjectField(channelInfoObject, getJaffiliateCallSignField)); + if (jaffiliateCallSign != NULL) + { + JniUtfString affiliateCallSign(env, jaffiliateCallSign); + channelInfo.callSign = affiliateCallSign.charSpan(); + } + + jfieldID majorNumField = env->GetFieldID(channelClass, "majorNumber", "I"); + jint jmajorNum = env->GetIntField(channelInfoObject, majorNumField); + channelInfo.majorNumber = static_cast(jmajorNum); + + jfieldID minorNumField = env->GetFieldID(channelClass, "minorNumber", "I"); + jint jminorNum = env->GetIntField(channelInfoObject, minorNumField); + channelInfo.majorNumber = static_cast(jminorNum); + + ReturnErrorOnFailure(aEncoder.Encode(channelInfo)); + return CHIP_NO_ERROR; + } + +exit: + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "TvChannelManager::getTVChannel status error: %s", err.AsString()); + } + + return err; +} + +TvChannelInfo TvChannelManager::ChangeChannelByMatch(std::string name) +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + TvChannelInfo channelInfo{ 0, 0 }; + + ChipLogProgress(Zcl, "Received TvChannelManager::ChangeChannelByMatch name %s", name.c_str()); + VerifyOrExit(mTvChannelManagerObject != nullptr, ChipLogError(Zcl, "mTvChannelManagerObject null")); + VerifyOrExit(mChangeChannelMethod != nullptr, ChipLogError(Zcl, "mChangeChannelMethod null")); + VerifyOrExit(env != NULL, ChipLogError(Zcl, "env null")); + + { + UtfString jniname(env, name.c_str()); + env->ExceptionClear(); + jobject channelObject = env->CallObjectMethod(mTvChannelManagerObject, mChangeChannelMethod, jniname.jniValue()); + if (env->ExceptionCheck()) + { + ChipLogError(DeviceLayer, "Java exception in TvChannelManager::ChangeChannelByMatch"); + env->ExceptionDescribe(); + env->ExceptionClear(); + return channelInfo; + } + + jclass channelClass = env->GetObjectClass(channelObject); + + jfieldID getCallSignField = env->GetFieldID(channelClass, "callSign", "Ljava/lang/String;"); + jstring jcallSign = static_cast(env->GetObjectField(channelObject, getCallSignField)); + if (jcallSign != NULL) + { + JniUtfString callsign(env, jcallSign); + channelInfo.callSign = callsign.charSpan(); + } + + jfieldID getNameField = env->GetFieldID(channelClass, "name", "Ljava/lang/String;"); + jstring jname = static_cast(env->GetObjectField(channelObject, getNameField)); + if (jname != NULL) + { + JniUtfString junitname(env, jname); + channelInfo.callSign = junitname.charSpan(); + } + jfieldID getJaffiliateCallSignField = env->GetFieldID(channelClass, "affiliateCallSign", "Ljava/lang/String;"); + jstring jaffiliateCallSign = static_cast(env->GetObjectField(channelObject, getJaffiliateCallSignField)); + if (jaffiliateCallSign != NULL) + { + JniUtfString affiliateCallSign(env, jaffiliateCallSign); + channelInfo.callSign = affiliateCallSign.charSpan(); + } + + jfieldID majorNumField = env->GetFieldID(channelClass, "majorNumber", "I"); + jint jmajorNum = env->GetIntField(channelObject, majorNumField); + channelInfo.majorNumber = static_cast(jmajorNum); + + jfieldID minorNumField = env->GetFieldID(channelClass, "minorNumber", "I"); + jint jminorNum = env->GetIntField(channelObject, minorNumField); + channelInfo.majorNumber = static_cast(jminorNum); + } + +exit: + return channelInfo; +} + +bool TvChannelManager::changeChannelByNumber(uint16_t majorNumber, uint16_t minorNumber) +{ + jboolean ret = JNI_FALSE; + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + + ChipLogProgress(Zcl, "Received TvChannelManager::tvChannelClusterChangeChannelByNumber majorNumber %d, minorNumber %d", + majorNumber, minorNumber); + VerifyOrExit(mTvChannelManagerObject != nullptr, ChipLogError(Zcl, "mTvChannelManagerObject null")); + VerifyOrExit(mchangeChannelByNumberMethod != nullptr, ChipLogError(Zcl, "mchangeChannelByNumberMethod null")); + VerifyOrExit(env != NULL, ChipLogError(Zcl, "env null")); + + env->ExceptionClear(); + + ret = env->CallBooleanMethod(mTvChannelManagerObject, mchangeChannelByNumberMethod, static_cast(majorNumber), + static_cast(minorNumber)); + if (env->ExceptionCheck()) + { + ChipLogError(DeviceLayer, "Java exception in TvChannelManager::changeChannelByNumber"); + env->ExceptionDescribe(); + env->ExceptionClear(); + return false; + } + +exit: + return static_cast(ret); +} + +bool TvChannelManager::skipChannnel(uint16_t count) +{ + jboolean ret = JNI_FALSE; + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + + ChipLogProgress(Zcl, "Received TvChannelManager::skipChannnel count %d", count); + VerifyOrExit(mTvChannelManagerObject != nullptr, ChipLogError(Zcl, "mTvChannelManagerObject null")); + VerifyOrExit(mskipChannelMethod != nullptr, ChipLogError(Zcl, "mskipChannelMethod null")); + VerifyOrExit(env != NULL, ChipLogError(Zcl, "env null")); + + env->ExceptionClear(); + + ret = env->CallBooleanMethod(mTvChannelManagerObject, mskipChannelMethod, static_cast(count)); + if (env->ExceptionCheck()) + { + ChipLogError(DeviceLayer, "Java exception in TvChannelManager::SkipChannel"); + env->ExceptionDescribe(); + env->ExceptionClear(); + return false; + } + +exit: + return static_cast(ret); +} diff --git a/examples/tv-app/android/java/TvChannelManager.h b/examples/tv-app/android/java/TvChannelManager.h new file mode 100644 index 00000000000000..7d9ad650066626 --- /dev/null +++ b/examples/tv-app/android/java/TvChannelManager.h @@ -0,0 +1,57 @@ +/** + * + * 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. + */ + +#pragma once + +#include +#include + +#include +#include +#include +#include + +class TvChannelManager +{ +public: + void InitializeWithObjects(jobject managerObject); + CHIP_ERROR getTvChannelList(chip::app::AttributeValueEncoder & aEncoder); + CHIP_ERROR getTvChannelLineup(chip::app::AttributeValueEncoder & aEncoder); + CHIP_ERROR getCurrentTvChannel(chip::app::AttributeValueEncoder & aEncoder); + + TvChannelInfo ChangeChannelByMatch(std::string name); + bool changeChannelByNumber(uint16_t majorNumber, uint16_t minorNumber); + bool skipChannnel(uint16_t count); + +private: + friend TvChannelManager & TvChannelMgr(); + + static TvChannelManager sInstance; + jobject mTvChannelManagerObject = nullptr; + jmethodID mGetChannelListMethod = nullptr; + jmethodID mGetLineupMethod = nullptr; + jmethodID mGetCurrentChannelMethod = nullptr; + + jmethodID mChangeChannelMethod = nullptr; + jmethodID mchangeChannelByNumberMethod = nullptr; + jmethodID mskipChannelMethod = nullptr; +}; + +inline class TvChannelManager & TvChannelMgr() +{ + return TvChannelManager::sInstance; +} diff --git a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/ContentLaunchBrandingInformation.java b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/ContentLaunchBrandingInformation.java new file mode 100644 index 00000000000000..57bf9478984f76 --- /dev/null +++ b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/ContentLaunchBrandingInformation.java @@ -0,0 +1,62 @@ +package com.tcl.chip.tvapp; + +public class ContentLaunchBrandingInformation { + + public class StyleInformation { + /** Used for dimensions defined in a number of Pixels. */ + public static final int METRIC_PIXELS = 0; + + /** + * Used for dimensions defined as a percentage of the overall display dimensions. For example, + * if using a Percentage Metric type for a Width measurement of 50.0, against a display width of + * 1920 pixels, then the resulting value used would be 960 pixels (50.0% of 1920) for that + * dimension. Whenever a measurement uses this Metric type, the resulting values SHALL be + * rounded ("floored") towards 0 if the measurement requires an integer final value. + */ + public static final int METRIC_PERCENTAGE = 1; + + /** + * The URL of image used for Styling different Video Player sections like Logo, Watermark etc. + */ + public String imageUrl; + + /** + * The color, in RGB or RGBA, used for styling different Video Player sections like Logo, + * Watermark, etc. The value SHALL conform to the 6-digit or 8-digit format defined for CSS sRGB + * hexadecimal color notation. Examples: + * + *

#76DE19 for R=0x76, G=0xDE, B=0x19, A absent #76DE1980 for R=0x76, G=0xDE, B=0x19, A=0x80 + */ + public String color; + + /** The width using the metric defined in Metric */ + public double width; + + /** The height using the metric defined in Metric */ + public double height; + + /** Tmetric used for defining Height/Width in METRIC_XXX */ + public int metric; + } + + /** The name of of the provider for the given content. */ + public String providerName; + + /** + * The background of the Video Player while content launch request is being processed by it. This + * background information MAY also be used by the Video Player when it is in idle state. + */ + public StyleInformation background; + + /** The style of progress bar for media playback. */ + public StyleInformation progressBar; + + /** + * The screen shown when the Video Player is in an idle state. If this property is not populated, + * the Video Player SHALL default to logo or the provider name. + */ + public StyleInformation splash; + + /** The watermark shown when the media is playing. */ + public StyleInformation waterMark; +} diff --git a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/ContentLaunchManager.java b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/ContentLaunchManager.java new file mode 100755 index 00000000000000..ba8b209ad1e709 --- /dev/null +++ b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/ContentLaunchManager.java @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2021 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package com.tcl.chip.tvapp; + +public interface ContentLaunchManager { + + int STREAMING_TYPE_DASH = 0; + int STREAMING_TYPE_HLS = 1; + + /** + * @return The list of content types supported by the Video Player or Content App in the form of + * entries in the HTTP "Accept" request header. + */ + String[] getAcceptsHeader(); + + /** @return The list information about supported streaming protocols in STREAMING_TYPE_XXX. */ + int[] getSupportedStreamingTypes(); + + /** + * Launch the specified content with optional search criteria. + * + * @param search search list for content for display or playback. + * @param autoplay whether to automatically start playing content. + * @param data Optional app-specific data. + */ + ContentLaunchResponse launchContent( + ContentLaunchSearchParameter[] search, boolean autoplay, String data); + + /** + * Launch content from the specified URL. + * + *

The content types supported include those identified in the AcceptHeader and + * SupportedStreamingProtocols attributes. + * + * @param url The URL of content to launch. + * @param display If present, SHALL provide a string that MAY be used to describe the content + * being accessed at the given URL. + * @param branding If present, SHALL indicate the BrandingInformation that MAY be displayed when + * playing back the given content. + */ + ContentLaunchResponse launchUrl( + String url, String display, ContentLaunchBrandingInformation branding); +} diff --git a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/ContentLaunchManagerStub.java b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/ContentLaunchManagerStub.java new file mode 100644 index 00000000000000..cf95fa807b31a3 --- /dev/null +++ b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/ContentLaunchManagerStub.java @@ -0,0 +1,42 @@ +package com.tcl.chip.tvapp; + +import android.util.Log; + +public class ContentLaunchManagerStub implements ContentLaunchManager { + + private final String TAG = ContentLaunchManagerStub.class.getSimpleName(); + + @Override + public String[] getAcceptsHeader() { + String[] headers = + new String[] { + "application/dash+xml", "application/vnd.apple.mpegurl", "text/html", + }; + + return headers; + } + + @Override + public int[] getSupportedStreamingTypes() { + int[] types = new int[] {STREAMING_TYPE_DASH, STREAMING_TYPE_HLS}; + return types; + } + + @Override + public ContentLaunchResponse launchContent( + ContentLaunchSearchParameter[] search, boolean autoplay, String data) { + Log.d(TAG, "launchContent:" + data + " autoplay=" + autoplay); + ContentLaunchResponse resp = + new ContentLaunchResponse(ContentLaunchResponse.STATUS_SUCCESS, "Example data in Java"); + return resp; + } + + @Override + public ContentLaunchResponse launchUrl( + String url, String display, ContentLaunchBrandingInformation branding) { + Log.d(TAG, "launchUrl:" + url + " display=" + display); + ContentLaunchResponse resp = + new ContentLaunchResponse(ContentLaunchResponse.STATUS_SUCCESS, "Example data in Java"); + return resp; + } +} diff --git a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/ContentLaunchResponse.java b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/ContentLaunchResponse.java new file mode 100644 index 00000000000000..96da369e2f4c6b --- /dev/null +++ b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/ContentLaunchResponse.java @@ -0,0 +1,19 @@ +package com.tcl.chip.tvapp; + +public class ContentLaunchResponse { + + public static final int STATUS_SUCCESS = 0; + public static final int STATUS_URL_NOT_AVAILABLE = 1; + public static final int STATUS_AUTH_FAILED = 2; + + public ContentLaunchResponse(int status, String data) { + this.status = status; + this.data = data; + } + + /** The status in STATUS_XXX */ + public int status; + + /** Optional app-specific data. */ + public String data; +} diff --git a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/ContentLaunchSearchParameter.java b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/ContentLaunchSearchParameter.java new file mode 100644 index 00000000000000..6a9050b0baf82e --- /dev/null +++ b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/ContentLaunchSearchParameter.java @@ -0,0 +1,71 @@ +package com.tcl.chip.tvapp; + +import java.util.Map; + +public class ContentLaunchSearchParameter { + + /** Actor represents an actor credited in video media content; for example, "Gaby sHoffman" */ + public static final int TYPE_ACTOR = 0; + + /** Channel represents the identifying data for a television channel; for example, "PBS" */ + public static final int TYPE_CHANNEL = 1; + + /** A character represented in video media content; for example, "Snow White" */ + public static final int TYPE_CHARACTER = 2; + + /** A director of the video media content; for example, "Spike Lee" */ + public static final int TYPE_DIRECTOR = 3; + + /** + * An event is a reference to a type of event; examples would include sports, music, or other + * types of events. For example, searching for "Football games" would search for a 'game' event + * entity and a 'football' sport entity. + */ + public static final int TYPE_EVENT = 4; + + /** + * A franchise is a video entity which can represent a number of video entities, like movies or TV + * shows. For example, take the fictional franchise "Intergalactic Wars" which represents a + * collection of movie trilogies, as well as animated and live action TV shows. This entity type + * was introduced to account for requests by customers such as "Find Intergalactic Wars movies", + * which would search for all 'Intergalactic Wars' programs of the MOVIE MediaType, rather than + * attempting to match to a single title. + */ + public static final int TYPE_FRANCHISE = 5; + + /** Genre represents the genre of video media content such as action, drama or comedy. */ + public static final int TYPE_GENRE = 6; + + /** League represents the categorical information for a sporting league; for example, "NCAA" */ + public static final int TYPE_LEAGUE = 7; + + /** Popularity indicates whether the user asks for popular content. */ + public static final int TYPE_POPULARITY = 8; + + /** The provider (MSP) the user wants this media to be played on; for example, "Netflix". */ + public static final int TYPE_PROVIDER = 9; + + /** Sport represents the categorical information of a sport; for example, football */ + public static final int TYPE_SPORT = 10; + + /** + * SportsTeam represents the categorical information of a professional sports team; for example, + * "University of Washington Huskies" + */ + public static final int TYPE_SPORTS_TEAM = 11; + + /** + * The type of content requested. Supported types are "Movie", "MovieSeries", "TVSeries", + * "TVSeason", "TVEpisode", "SportsEvent", and "Video" + */ + public static final int TYPE_TYPE = 12; + + /** content data type in TYPE_XXX */ + public int type; + + /** The entity value, which is a search string, ex. "Manchester by the Sea". */ + public String data; + + /** This object defines additional name=value pairs that can be used for identifying content. */ + public Map.Entry[] externalIDList; +} diff --git a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/LowPowerManager.java b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/LowPowerManager.java new file mode 100644 index 00000000000000..acee84a0dbe0c7 --- /dev/null +++ b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/LowPowerManager.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2021 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package com.tcl.chip.tvapp; + +public interface LowPowerManager { + boolean sleep(); +} diff --git a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/LowPowerManagerStub.java b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/LowPowerManagerStub.java new file mode 100644 index 00000000000000..8dd9e2f8caab87 --- /dev/null +++ b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/LowPowerManagerStub.java @@ -0,0 +1,14 @@ +package com.tcl.chip.tvapp; + +import android.util.Log; + +public class LowPowerManagerStub implements LowPowerManager { + + private final String TAG = LowPowerManagerStub.class.getSimpleName(); + + @Override + public boolean sleep() { + Log.d(TAG, "sleep"); + return true; + } +} diff --git a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/MediaPlaybackManager.java b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/MediaPlaybackManager.java new file mode 100755 index 00000000000000..abfb8032708781 --- /dev/null +++ b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/MediaPlaybackManager.java @@ -0,0 +1,125 @@ +/* + * Copyright (c) 2021 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package com.tcl.chip.tvapp; + +public interface MediaPlaybackManager { + + /** The current playback state of media in PLAYBACK_STATE_XXXX */ + int ATTRIBUTE_PLAYBACK_STATE = 0x0000; + + /** The start time of the media in milliseconds (UTC time) */ + int ATTRIBUTE_PLAYBACK_START_TIME = 0x0001; + + /** The duration, in milliseconds or 0 if the duration is not applicable */ + int ATTRIBUTE_PLAYBACK_DURATION = 0x0002; + + /** The position of playback (Position field) at the time (UpdateAt field) in milliseconds. */ + int ATTRIBUTE_PLAYBACK_POSITION_UPDATED_AT = 0x0003; + + /** The position of playback (Position field) at the time (UpdateAt field) in milliseconds. */ + int ATTRIBUTE_PLAYBACK_POSITION = 0x0004; + + /** + * The speed at which the current media is being played. 10000 means 1X, 5000 means 0.5X and 20000 + * means 2X + */ + int ATTRIBUTE_PLAYBACK_SPEED = 0x0005; + + /** The earliest valid position to which a client MAY seek back, in milliseconds */ + int ATTRIBUTE_PLAYBACK_SEEK_RANGE_END = 0x0006; + + /** The furthest forward valid position to which a client MAY seek forward, in milliseconds */ + int ATTRIBUTE_PLAYBACK_SEEK_RANGE_START = 0x0007; + + int PLAYBACK_STATE_PLAYING = 0; + int PLAYBACK_STATE_PAUSED = 1; + int PLAYBACK_STATE_NOT_PLAYING = 2; + int PLAYBACK_STATE_BUFFERING = 3; + + /** + * Play media. If content is currently in a FastForward or Rewind state. Play SHALL return media + * to normal playback speed. + */ + int REQUEST_PLAY = 0; + + /** Pause playback of the media. */ + int REQUEST_PAUSE = 1; + + /** Stop playback of the media */ + int REQUEST_STOP = 2; + + /** Start Over with the current media playback item. */ + int REQUEST_START_OVER = 3; + + /** Go back to the previous media playback item. */ + int REQUEST_PREVIOUS = 4; + + /** Go forward to the next media playback item. */ + int REQUEST_NEXT = 5; + + /** + * Start playback of the media backward in case the media is currently playing in the forward + * direction or is not playing. + */ + int REQUEST_REWIND = 6; + + /** + * Start playback of the media in the forward direction in case the media is currently playing in + * the backward direction or is not playing. If the playback is already happening in the forward + * direction receipt of this command SHALL increase the speed of the media playback. Different + * "fast-forward" speeds MAY be be reflected on the media playback device based upon the number of + * sequential calls to this function and the capability of the device. + */ + int REQUEST_FAST_FORWARD = 7; + + /** Skip forward in the media by the given number of milliseconds */ + int REQUEST_SKIP_FORWARD = 8; + + /** Skip backward in the media by the given number of milliseconds */ + int REQUEST_SKIP_BACKWARD = 9; + + /** + * Change the playback position in the media to the given position by the given number of + * milliseconds + */ + int REQUEST_SEEK = 10; + + int RESPONSE_STATUS_SUCCESS = 0; + int RESPONSE_STATUS_INVALID_STATE_FOR_COMMAND = 1; + int RESPONSE_STATUS_NOT_ALLOWED = 2; + int RESPONSE_STATUS_NOT_ACTIVE = 3; + int RESPONSE_STATUS_SPEED_OUT_OF_RANGE = 4; + int RESPONSE_STATUS_SEEK_OUT_OF_RANGE = 5; + + /** + * Get the attribute by id in ATTRIBUTE_PLAYBACK_XXX + * + * @return The value of return defines in ATTRIBUTE_PLAYBACK_XXX, or -1 on error + */ + long getAttributes(int attributesId); + + /** + * Request for cmd in REQUEST_XXX, the paramters for request is defined in REQUEST_XXX + * + * @param parameter The means of parameter is defined in RESPONSE_STATUS_XXX or meaningless if not + * defined. + * @return the response status defined in RESPONSE_STATUS_XXX + */ + int request(int cmd, long parameter); +} diff --git a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/MediaPlaybackManagerStub.java b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/MediaPlaybackManagerStub.java new file mode 100755 index 00000000000000..d4fb7552935e10 --- /dev/null +++ b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/MediaPlaybackManagerStub.java @@ -0,0 +1,118 @@ +/* + * Copyright (c) 2021 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package com.tcl.chip.tvapp; + +import android.util.Log; +import java.util.Date; + +/** Stub implement of MediaPlaybackManager, TV manufacture should have there own implements */ +public class MediaPlaybackManagerStub implements MediaPlaybackManager { + + private final String TAG = MediaPlaybackManagerStub.class.getSimpleName(); + + @Override + public long getAttributes(int attributesId) { + switch (attributesId) { + case ATTRIBUTE_PLAYBACK_STATE: + Log.d(TAG, "getAttributes CurrentState"); + return PLAYBACK_STATE_PLAYING; + + case ATTRIBUTE_PLAYBACK_START_TIME: + Log.d(TAG, "getAttributes StartTime"); + return 100; + + case ATTRIBUTE_PLAYBACK_DURATION: + Log.d(TAG, "getAttributes Duration"); + return 5 * 60 * 1000; + + case ATTRIBUTE_PLAYBACK_POSITION_UPDATED_AT: + Log.d(TAG, "getAttributes SampledPosition UpdatedAt"); + return new Date().getTime() * 1000; + + case ATTRIBUTE_PLAYBACK_POSITION: + Log.d(TAG, "getAttributes SampledPosition Position"); + return 3 * 60 * 1000; + + case ATTRIBUTE_PLAYBACK_SPEED: + Log.d(TAG, "getAttributes SampledPosition PlaybackSpeed"); + return 10000; + + case ATTRIBUTE_PLAYBACK_SEEK_RANGE_END: + Log.d(TAG, "getAttributes SampledPosition SeekRangeEnd"); + return 5 * 60 * 1000; + + case ATTRIBUTE_PLAYBACK_SEEK_RANGE_START: + Log.d(TAG, "getAttributes SampledPosition SeekRangeStart"); + return 200; + } + + return -1; + } + + @Override + public int request(int cmd, long parameter) { + switch (cmd) { + case REQUEST_PLAY: + Log.d(TAG, "request Play"); + return RESPONSE_STATUS_SUCCESS; + + case REQUEST_PAUSE: + Log.d(TAG, "request pause"); + return RESPONSE_STATUS_SUCCESS; + + case REQUEST_STOP: + Log.d(TAG, "request stop"); + return RESPONSE_STATUS_SUCCESS; + + case REQUEST_START_OVER: + Log.d(TAG, "request start over"); + return RESPONSE_STATUS_SUCCESS; + + case REQUEST_PREVIOUS: + Log.d(TAG, "request previous"); + return RESPONSE_STATUS_SUCCESS; + + case REQUEST_NEXT: + Log.d(TAG, "request next"); + return RESPONSE_STATUS_SUCCESS; + + case REQUEST_REWIND: + Log.d(TAG, "request rewind"); + return RESPONSE_STATUS_SUCCESS; + + case REQUEST_FAST_FORWARD: + Log.d(TAG, "request fast forward"); + return RESPONSE_STATUS_SUCCESS; + + case REQUEST_SKIP_FORWARD: + Log.d(TAG, "request skip forward " + parameter + " milliseconds"); + return RESPONSE_STATUS_SUCCESS; + + case REQUEST_SKIP_BACKWARD: + Log.d(TAG, "request skip backward " + parameter + " milliseconds"); + return RESPONSE_STATUS_SUCCESS; + + case REQUEST_SEEK: + Log.d(TAG, "request seek to " + parameter + " milliseconds"); + return RESPONSE_STATUS_SUCCESS; + } + + return RESPONSE_STATUS_NOT_ALLOWED; + } +} diff --git a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/TvApp.java b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/TvApp.java index 9bb52cc1305014..f41b974a82d090 100644 --- a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/TvApp.java +++ b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/TvApp.java @@ -26,6 +26,14 @@ public TvApp() {} public native void setMediaInputManager(MediaInputManager manager); + public native void setContentLaunchManager(ContentLaunchManager manager); + + public native void setLowPowerManager(LowPowerManager manager); + + public native void setMediaPlaybackManager(MediaPlaybackManager manager); + + public native void setTvChannelManager(TvChannelManager manager); + static { System.loadLibrary("TvApp"); } diff --git a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/TvChannelInfo.java b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/TvChannelInfo.java new file mode 100644 index 00000000000000..da087c9fa87ead --- /dev/null +++ b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/TvChannelInfo.java @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2021 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package com.tcl.chip.tvapp; + +public class TvChannelInfo { + public int majorNumber; + public int minorNumber; + public String name; + public String callSign; + public String affiliateCallSign; + + public TvChannelInfo() {} + + public TvChannelInfo( + int majorNumber, int minorNumber, String name, String callSign, String affiliateCallSign) { + this.majorNumber = majorNumber; + this.minorNumber = minorNumber; + this.name = name; + this.callSign = callSign; + this.affiliateCallSign = affiliateCallSign; + } + + @Override + public String toString() { + return "TvChannelInfo{" + + "majorNumber=" + + majorNumber + + ", minorNumber=" + + minorNumber + + ", name='" + + name + + '\'' + + ", callSign='" + + callSign + + '\'' + + ", affiliateCallSign='" + + affiliateCallSign + + '\'' + + '}'; + } +} diff --git a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/TvChannelLineupInfo.java b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/TvChannelLineupInfo.java new file mode 100644 index 00000000000000..0a8dffe9876036 --- /dev/null +++ b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/TvChannelLineupInfo.java @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2021 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package com.tcl.chip.tvapp; + +public class TvChannelLineupInfo { + public static final int LINEUP_INFO_TYPE_MSO = 0x00; + + public String operatorName; + public String lineupName; + public String postalCode; + public int lineupInfoType; + + public TvChannelLineupInfo(String operatorName, String lineupName, String postalCode) { + this(operatorName, lineupName, postalCode, LINEUP_INFO_TYPE_MSO); + } + + public TvChannelLineupInfo( + String operatorName, String lineupName, String postalCode, int lineupInfoType) { + this.operatorName = operatorName; + this.lineupName = lineupName; + this.postalCode = postalCode; + this.lineupInfoType = lineupInfoType; + } + + @Override + public String toString() { + return "TvChannelLineupInfo{" + + "operatorName='" + + operatorName + + '\'' + + ", lineupName='" + + lineupName + + '\'' + + ", postalCode='" + + postalCode + + '\'' + + ", lineupInfoType=" + + lineupInfoType + + '}'; + } +} diff --git a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/TvChannelManager.java b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/TvChannelManager.java new file mode 100644 index 00000000000000..3eedb1afbd6b1b --- /dev/null +++ b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/TvChannelManager.java @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2021 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package com.tcl.chip.tvapp; + +public interface TvChannelManager { + + TvChannelInfo[] getChannelList(); + + TvChannelLineupInfo getLineup(); + + TvChannelInfo getCurrentChannel(); + + TvChannelInfo changeChannel(String match); + + boolean changeChannelByNumber(int majorNumber, int minorNumber); + + boolean skipChannel(int count); +} diff --git a/examples/tv-app/android/java/src/com/tcl/chip/tvapp/TvChannelManagerStub.java b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/TvChannelManagerStub.java new file mode 100644 index 00000000000000..c72ab4fe8605d2 --- /dev/null +++ b/examples/tv-app/android/java/src/com/tcl/chip/tvapp/TvChannelManagerStub.java @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2021 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package com.tcl.chip.tvapp; + +import android.util.Log; + +public class TvChannelManagerStub implements TvChannelManager { + private static final String TAG = "ChannelManagerStub"; + + @Override + public TvChannelInfo[] getChannelList() { + TvChannelInfo tvChannelInfo1 = + new TvChannelInfo(1, 1, "HDMI1", "callSign1", "affiliateCallSign1"); + TvChannelInfo tvChannelInfo2 = + new TvChannelInfo(2, 2, "HDMI2", "callSign2", "affiliateCallSign2"); + Log.d(TAG, "getTVChannelList"); + return new TvChannelInfo[] {tvChannelInfo1, tvChannelInfo2}; + } + + @Override + public TvChannelLineupInfo getLineup() { + TvChannelLineupInfo lineupInfo = new TvChannelLineupInfo("operator", "lineup", "postalCode"); + Log.d(TAG, "getTVChannelLineup: " + lineupInfo); + return lineupInfo; + } + + @Override + public TvChannelInfo getCurrentChannel() { + Log.d(TAG, "getCurrentTVChannel: "); + return new TvChannelInfo(1, 1, "HDMI", "callSign", "affiliateCallSign"); + } + + @Override + public TvChannelInfo changeChannel(String match) { + Log.d(TAG, "changeChannel: " + match); + return new TvChannelInfo(1, 1, "HDMI", "callSign", "affiliateCallSign"); + } + + @Override + public boolean changeChannelByNumber(int majorNumber, int minorNumber) { + Log.d( + TAG, + "changeChannelByNumber: majorNumber = " + majorNumber + " minorNumber = " + minorNumber); + return true; + } + + @Override + public boolean skipChannel(int count) { + Log.d(TAG, "skipChannel: count = " + count); + return true; + } +} diff --git a/examples/tv-app/linux/include/content-launcher/ContentLauncherManager.cpp b/examples/tv-app/linux/include/content-launcher/ContentLauncherManager.cpp index 001fe840623d32..0b2c74f196da3d 100644 --- a/examples/tv-app/linux/include/content-launcher/ContentLauncherManager.cpp +++ b/examples/tv-app/linux/include/content-launcher/ContentLauncherManager.cpp @@ -81,6 +81,7 @@ ContentLaunchResponse ContentLauncherManager::proxyLaunchContentRequest(list parameterList, bool autoplay, + const chip::CharSpan & data) { - emberAfFillExternalBuffer((ZCL_CLUSTER_SPECIFIC_COMMAND | ZCL_FRAME_CONTROL_SERVER_TO_CLIENT), ZCL_CONTENT_LAUNCH_CLUSTER_ID, - commandId, "us", launchResponse.status, &launchResponse.data); - - EmberStatus status = emberAfSendResponse(); - if (status != EMBER_SUCCESS) - { - ChipLogError(Zcl, "Failed to send %s. Error:%d", responseName, static_cast(status)); - } -} - -bool emberAfContentLauncherClusterLaunchContentCallback( - chip::app::CommandHandler * command, const chip::app::ConcreteCommandPath & commandPath, - const chip::app::Clusters::ContentLauncher::Commands::LaunchContent::DecodableType & commandData) -{ - auto & autoplay = commandData.autoPlay; - auto & data = commandData.data; - string dataString(data.data(), data.size()); - list parameterList; - ContentLaunchResponse response = ContentLauncherManager().proxyLaunchContentRequest(parameterList, autoplay, dataString); - sendResponse("LaunchContent", response, ZCL_LAUNCH_CONTENT_RESPONSE_COMMAND_ID); - return true; + return ContentLauncherManager().proxyLaunchContentRequest(parameterList, autoplay, dataString); } -bool emberAfContentLauncherClusterLaunchURLCallback( - chip::app::CommandHandler * command, const chip::app::ConcreteCommandPath & commandPath, - const chip::app::Clusters::ContentLauncher::Commands::LaunchURL::DecodableType & commandData) +ContentLaunchResponse contentLauncherClusterLaunchUrl(const chip::CharSpan & contentUrl, const chip::CharSpan & displayString, + ContentLaunchBrandingInformation & brandingInformation) { - auto & contentUrl = commandData.contentURL; - auto & displayString = commandData.displayString; - string contentUrlString(contentUrl.data(), contentUrl.size()); string displayStringString(displayString.data(), displayString.size()); - ContentLaunchBrandingInformation brandingInformation; - ContentLaunchResponse response = - ContentLauncherManager().proxyLaunchUrlRequest(contentUrlString, displayStringString, brandingInformation); - sendResponse("LaunchURL", response, ZCL_LAUNCH_URL_RESPONSE_COMMAND_ID); - return true; + return ContentLauncherManager().proxyLaunchUrlRequest(contentUrlString, displayStringString, brandingInformation); } diff --git a/examples/tv-app/linux/include/content-launcher/ContentLauncherManager.h b/examples/tv-app/linux/include/content-launcher/ContentLauncherManager.h index 285e521e889934..174204c47028fb 100644 --- a/examples/tv-app/linux/include/content-launcher/ContentLauncherManager.h +++ b/examples/tv-app/linux/include/content-launcher/ContentLauncherManager.h @@ -20,16 +20,12 @@ #include #include +#include #include #include #include #include -struct ContentLaunchResponse -{ - EmberAfContentLaunchStatus status; - std::string data; -}; class ContentLauncherManager { diff --git a/src/app/clusters/content-launch-server/content-launch-server.cpp b/src/app/clusters/content-launch-server/content-launch-server.cpp index 5568f0795011bb..2c9c327dfa6474 100644 --- a/src/app/clusters/content-launch-server/content-launch-server.cpp +++ b/src/app/clusters/content-launch-server/content-launch-server.cpp @@ -38,22 +38,78 @@ ******************************************************************************* ******************************************************************************/ +#include "content-launch-server.h" +#include #include #include +#include using namespace chip; -bool emberAfContentLauncherClusterLaunchContentCallback(app::CommandHandler * commandObj) +ContentLaunchResponse contentLauncherClusterLaunchContent(std::list parameterList, bool autoplay, + const chip::CharSpan & data); +ContentLaunchResponse contentLauncherClusterLaunchUrl(const chip::CharSpan & contentUrl, const chip::CharSpan & displayString, + ContentLaunchBrandingInformation & brandingInformation); + +bool emberAfContentLauncherClusterLaunchContentCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::ContentLauncher::Commands::LaunchContent::DecodableType & commandData) { - EmberAfStatus status = EMBER_ZCL_STATUS_SUCCESS; - emberAfSendImmediateDefaultResponse(status); + CHIP_ERROR err = CHIP_NO_ERROR; + chip::app::Clusters::ContentLauncher::Commands::LaunchContentResponse::Type response; + + auto & autoplay = commandData.autoPlay; + auto & data = commandData.data; + std::list parameterList; + + ContentLaunchResponse resp = contentLauncherClusterLaunchContent(parameterList, autoplay, data); + VerifyOrExit(resp.err == CHIP_NO_ERROR, err = resp.err); + + response.contentLaunchStatus = resp.status; + response.data = resp.data; + + err = commandObj->AddResponseData(commandPath, response); + SuccessOrExit(err); + +exit: + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "emberAfContentLauncherClusterLaunchContentCallback error: %s", err.AsString()); + + emberAfSendImmediateDefaultResponse(EMBER_ZCL_STATUS_FAILURE); + } + return true; } -bool emberAfContentLauncherClusterLaunchURLCallback(app::CommandHandler * commandObj) +bool emberAfContentLauncherClusterLaunchURLCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::ContentLauncher::Commands::LaunchURL::DecodableType & commandData) { - EmberAfStatus status = EMBER_ZCL_STATUS_SUCCESS; - emberAfSendImmediateDefaultResponse(status); + CHIP_ERROR err = CHIP_NO_ERROR; + chip::app::Clusters::ContentLauncher::Commands::LaunchURLResponse::Type response; + + auto & contentUrl = commandData.contentURL; + auto & displayString = commandData.displayString; + ContentLaunchBrandingInformation brandingInformation; + + ContentLaunchResponse resp = contentLauncherClusterLaunchUrl(contentUrl, displayString, brandingInformation); + VerifyOrExit(resp.err == CHIP_NO_ERROR, err = resp.err); + + response.contentLaunchStatus = resp.status; + response.data = resp.data; + + err = commandObj->AddResponseData(commandPath, response); + SuccessOrExit(err); + +exit: + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "emberAfContentLauncherClusterLaunchURLCallback error: %s", err.AsString()); + + emberAfSendImmediateDefaultResponse(EMBER_ZCL_STATUS_FAILURE); + } + return true; } diff --git a/examples/tv-app/android/include/low-power/LowPowerManager.h b/src/app/clusters/content-launch-server/content-launch-server.h similarity index 73% rename from examples/tv-app/android/include/low-power/LowPowerManager.h rename to src/app/clusters/content-launch-server/content-launch-server.h index 75d500ca12de74..2d4934e5fc0eb9 100644 --- a/examples/tv-app/android/include/low-power/LowPowerManager.h +++ b/src/app/clusters/content-launch-server/content-launch-server.h @@ -1,7 +1,6 @@ -/* +/** * * Copyright (c) 2021 Project CHIP Authors - * All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,9 +17,12 @@ #pragma once -#include +#include +#include -class LowPowerManager +struct ContentLaunchResponse { -public: + CHIP_ERROR err; + chip::CharSpan data; + chip::app::Clusters::ContentLauncher::ContentLaunchStatus status; }; From 176e40b3ba5d20499b17f6371fd3abcdb4258345 Mon Sep 17 00:00:00 2001 From: Michael Sandstedt Date: Mon, 29 Nov 2021 21:26:38 -0600 Subject: [PATCH 16/42] Add variant-type-driven state machine to libs (#12223) * Add variant-type-driven state machine to libs This commit introduces a functional approach for State Machine implementation that leverages the sdk's Variant and Optional types. By providing a clean separation between states, events, and transitions, state machines can be implemented in such a way that states and events may be provided in the core sdk, but with transitions defined in consuming applications to support individual use cases. And because states and events are associated to the state machine by inclusion in variants and not by inheritance, applications may also extend state machines with arbitrary, application-specific events and states. Co-Authored-by: Bill Schiller * fix Wshadow * plausible simplified approach * Revert "plausible simplified approach" This reverts commit 93227b149224f6e2282c21b18ec6d1a656451dd5. * Use preorder recursion to remove need for Dispatch queue * cleanup test state machine state construction * Add guardrails to disallow Dispatch from illegal contexts The following are made explicitly illegal and will abort: * Dispatch from Exit() or LogTransition() state methods * Dispatch from transitions table w/ returned transition * make StateMachine members variables private Co-authored-by: Bill Schiller --- src/lib/support/BUILD.gn | 1 + src/lib/support/StateMachine.h | 238 +++++++++++++++++++ src/lib/support/Variant.h | 8 + src/lib/support/tests/BUILD.gn | 1 + src/lib/support/tests/TestStateMachine.cpp | 251 +++++++++++++++++++++ 5 files changed, 499 insertions(+) create mode 100644 src/lib/support/StateMachine.h create mode 100644 src/lib/support/tests/TestStateMachine.cpp diff --git a/src/lib/support/BUILD.gn b/src/lib/support/BUILD.gn index 8d060acd1feff9..2c5e651db49830 100644 --- a/src/lib/support/BUILD.gn +++ b/src/lib/support/BUILD.gn @@ -92,6 +92,7 @@ static_library("support") { "SafeInt.h", "SerializableIntegerSet.cpp", "SerializableIntegerSet.h", + "StateMachine.h", "ThreadOperationalDataset.cpp", "ThreadOperationalDataset.h", "TimeUtils.cpp", diff --git a/src/lib/support/StateMachine.h b/src/lib/support/StateMachine.h new file mode 100644 index 00000000000000..329dd27eab062a --- /dev/null +++ b/src/lib/support/StateMachine.h @@ -0,0 +1,238 @@ +/* + * Copyright (c) 2021 Project CHIP Authors + * Copyright (c) 2021 SmartThings + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include +#include + +namespace chip { +namespace StateMachine { + +/** + * An extension of the Optional class that removes the explicit requirement + * for construction from a T value as a convenience to allow auto construction + * of Optional. + */ +template +class Optional : public chip::Optional +{ +public: + Optional(const T & value) : chip::Optional(value) {} + Optional() : chip::Optional() {} +}; + +/** + * An extension of the Variant class offering pattern matching of State types + * to dynamically dispatch execution of the required State interface methods: + * Enter, Exit, GetName, LogTtransition. + */ +template +struct VariantState : Variant +{ + +private: + template + void Enter() + { + if (chip::Variant::template Is()) + { + chip::Variant::template Get().Enter(); + } + } + + template + void Exit() + { + if (chip::Variant::template Is()) + { + chip::Variant::template Get().Exit(); + } + } + + template + void GetName(const char ** name) + { + if (name && chip::Variant::template Is()) + { + *name = chip::Variant::template Get().GetName(); + } + } + + template + void LogTransition(const char * previous) + { + if (chip::Variant::template Is()) + { + chip::Variant::template Get().LogTransition(previous); + } + } + +public: + template + static VariantState Create(Args &&... args) + { + VariantState instance; + instance.template Set(std::forward(args)...); + return instance; + } + + void Enter() + { + [](...) {}((this->template Enter(), 0)...); + } + + void Exit() + { + [](...) {}((this->template Exit(), 0)...); + } + + const char * GetName() + { + const char * name = nullptr; + [](...) {}((this->template GetName(&name), 0)...); + return name; + } + + void LogTransition(const char * previous) + { + [](...) {}((this->template LogTransition(previous), 0)...); + } +}; + +/** + * The interface for dispatching events into the State Machine. + * @tparam TEvent a variant holding the Events for the State Machine. + */ +template +class Context +{ +public: + virtual ~Context() = default; + + /** + * Dispatch an event to the current state. + * @param evt a variant holding an Event for the State Machine. + */ + virtual void Dispatch(const TEvent & evt) = 0; +}; + +/** + * This is a functional approach to the State Machine design pattern. The design is + * borrowed from http://www.vishalchovatiya.com/state-design-pattern-in-modern-cpp + * and extended for this application. + * + * At a high-level, the purpose of a State Machine is to switch between States. Each + * State handles Events. The handling of Events may lead to Transitions. The purpose + * of this design pattern is to decouple States, Events, and Transitions. For instance, + * it is desirable to remove knowledge of next/previous States from each individual + * State. This allows adding/removing States with minimal code change and leads to a + * simpler implementation. + * + * This State Machine design emulates C++17 features to achieve the functional approach. + * Instead of using an enum or inheritance for the Events, the Events are defined as + * structs and placed in a variant. Likewise, the States are all defined as structs and + * placed in a variant. With the Events and States in two different variants, the + * Transitions table uses the type introspction feature of the variant object to match a + * given state and event to an optional new-state return. + * + * For event dispatch, the State Machine implements the Context interface. The Context + * interface is passed to States to allow Dispatch() of events when needed. + * + * The State held in the TState must provide four methods to support calls from + * the State Machine: + * @code + * struct State { + * void Enter() { } + * void Exit() { } + * void LogTransition(const char *) { } + * const char *GetName() { return ""; } + * } + * @endcode + * + * The TTransitions table type is implemented with an overloaded callable operator method + * to match the combinations of State / Event variants that may produce a new-state return. + * This allows the Transition table to define how each State responds to Events. Below is + * an example of a Transitions table implemented as a struct: + * + * @code + * struct Transitions { + * using State = chip::StateMachine::VariantState; + * chip::StateMachine::Optional operator()(State &state, Event &event) + * { + * if (state.Is() && event.Is()) + * { + * return State::Create(); + * } + * else if (state.Is() && event.Is()) + * { + * return State::Create(); + * } + * else + * { + * return {} + * } + * } + * } + * @endcode + * + * The rules for calling Dispatch from within the state machien are as follows: + * + * (1) Only the State::Enter method should call Dispatch. Calls from Exit or + * LogTransition will cause an abort. + * (2) The transitions table may return a new state OR call Dispatch, but must + * never do both. Doing both will cause an abort. + * + * @tparam TState a variant holding the States. + * @tparam TEvent a variant holding the Events. + * @tparam TTransitions an object that implements the () operator for transitions. + */ +template +class StateMachine : public Context +{ +public: + StateMachine(TTransitions & tr) : mCurrentState(tr.GetInitState()), mTransitions(tr), mSequence(0) {} + ~StateMachine() override = default; + void Dispatch(const TEvent & evt) override + { + ++mSequence; + auto prev = mSequence; + auto newState = mTransitions(mCurrentState, evt); + if (newState.HasValue()) + { + auto oldState = mCurrentState; + oldState.Exit(); + mCurrentState = newState.Value(); + mCurrentState.LogTransition(oldState.GetName()); + // It is impermissible to dispatch events from Exit() or + // LogTransition(), or from the transitions table when a transition + // has also been returned. Verify that this hasn't occured. + VerifyOrDie(prev == mSequence); + mCurrentState.Enter(); + } + } + TState GetState() { return mCurrentState; } + +private: + TState mCurrentState; + TTransitions & mTransitions; + unsigned mSequence; +}; + +} // namespace StateMachine +} // namespace chip diff --git a/src/lib/support/Variant.h b/src/lib/support/Variant.h index 338bff6a419b25..8c6a99dae3dc41 100644 --- a/src/lib/support/Variant.h +++ b/src/lib/support/Variant.h @@ -189,6 +189,14 @@ struct Variant bool Valid() const { return (mTypeId != kInvalidType); } + template + static Variant Create(Args &&... args) + { + Variant instance; + instance.template Set(std::forward(args)...); + return instance; + } + template void Set(Args &&... args) { diff --git a/src/lib/support/tests/BUILD.gn b/src/lib/support/tests/BUILD.gn index 13c63bd3690b42..7ef9c6c8be1ad5 100644 --- a/src/lib/support/tests/BUILD.gn +++ b/src/lib/support/tests/BUILD.gn @@ -41,6 +41,7 @@ chip_test_suite("tests") { "TestScopedBuffer.cpp", "TestSerializableIntegerSet.cpp", "TestSpan.cpp", + "TestStateMachine.cpp", "TestStringBuilder.cpp", "TestThreadOperationalDataset.cpp", "TestTimeUtils.cpp", diff --git a/src/lib/support/tests/TestStateMachine.cpp b/src/lib/support/tests/TestStateMachine.cpp new file mode 100644 index 00000000000000..37433dd64a0b9d --- /dev/null +++ b/src/lib/support/tests/TestStateMachine.cpp @@ -0,0 +1,251 @@ +/* + * Copyright (c) 2021 Project CHIP Authors + * Copyright (c) 2021 SmartThings + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include +#include + +namespace { + +struct Event1 +{ +}; +struct Event2 +{ +}; +struct Event3 +{ +}; +struct Event4 +{ +}; + +using Event = chip::Variant; +using Context = chip::StateMachine::Context; + +struct MockState +{ + unsigned mEntered; + unsigned mExited; + unsigned mLogged; + const char * mPrevious; + + void Enter() { ++mEntered; } + void Exit() { ++mExited; } + void LogTransition(const char * previous) + { + ++mLogged; + mPrevious = previous; + } +}; + +struct BaseState +{ + void Enter() { mMock.Enter(); } + void Exit() { mMock.Exit(); } + void LogTransition(const char * previous) { mMock.LogTransition(previous); } + const char * GetName() { return mName; } + + chip::StateMachine::Context & mCtx; + const char * mName; + MockState & mMock; +}; + +struct State1 : public BaseState +{ + State1(Context & ctx, MockState & mock) : BaseState{ ctx, "State1", mock } {} +}; + +struct State2 : public BaseState +{ + State2(Context & ctx, MockState & mock) : BaseState{ ctx, "State2", mock } {} +}; + +using State = chip::StateMachine::VariantState; + +struct StateFactory +{ + Context & mCtx; + MockState ms1{ 0, 0, 0, nullptr }; + MockState ms2{ 0, 0, 0, nullptr }; + + StateFactory(Context & ctx) : mCtx(ctx) {} + + auto CreateState1() { return State::Create(mCtx, ms1); } + + auto CreateState2() { return State::Create(mCtx, ms2); } +}; + +struct Transitions +{ + Context & mCtx; + StateFactory mFactory; + Transitions(Context & ctx) : mCtx(ctx), mFactory(ctx) {} + + using OptState = chip::StateMachine::Optional; + State GetInitState() { return mFactory.CreateState1(); } + OptState operator()(const State & state, const Event & event) + { + if (state.Is() && event.Is()) + { + return mFactory.CreateState2(); + } + else if (state.Is() && event.Is()) + { + return mFactory.CreateState1(); + } + else if (state.Is() && event.Is()) + { + // legal - Dispatches event without transition + mCtx.Dispatch(Event::Create()); + return {}; + } + else if (state.Is() && event.Is()) + { + // mCtx.Dispatch(Event::Create()); // dsipatching an event and returning a transition would be illegal + return mFactory.CreateState1(); + } + else + { + return {}; + } + } +}; + +class SimpleStateMachine +{ +public: + Transitions mTransitions; + chip::StateMachine::StateMachine mStateMachine; + + SimpleStateMachine() : mTransitions(mStateMachine), mStateMachine(mTransitions) {} + ~SimpleStateMachine() {} +}; + +void TestInit(nlTestSuite * inSuite, void * inContext) +{ + // state machine initializes to State1 + SimpleStateMachine fsm; + NL_TEST_ASSERT(inSuite, fsm.mStateMachine.GetState().Is()); +} + +void TestIgnoredEvents(nlTestSuite * inSuite, void * inContext) +{ + // in State1 - ignore Event1 and Event3 + SimpleStateMachine fsm; + fsm.mStateMachine.Dispatch(Event::Create()); + NL_TEST_ASSERT(inSuite, fsm.mStateMachine.GetState().Is()); + fsm.mStateMachine.Dispatch(Event::Create()); + NL_TEST_ASSERT(inSuite, fsm.mStateMachine.GetState().Is()); + // transition to State2 + fsm.mStateMachine.Dispatch(Event::Create()); + NL_TEST_ASSERT(inSuite, fsm.mStateMachine.GetState().Is()); + // in State2 - ignore Event2 and Event3 + fsm.mStateMachine.Dispatch(Event::Create()); + NL_TEST_ASSERT(inSuite, fsm.mStateMachine.GetState().Is()); + fsm.mStateMachine.Dispatch(Event::Create()); + NL_TEST_ASSERT(inSuite, fsm.mStateMachine.GetState().Is()); +} + +void TestTransitions(nlTestSuite * inSuite, void * inContext) +{ + // in State1 + SimpleStateMachine fsm; + // dispatch Event2 to transition to State2 + fsm.mStateMachine.Dispatch(Event::Create()); + NL_TEST_ASSERT(inSuite, fsm.mStateMachine.GetState().Is()); + // dispatch Event1 to transition back to State1 + fsm.mStateMachine.Dispatch(Event::Create()); + NL_TEST_ASSERT(inSuite, fsm.mStateMachine.GetState().Is()); + // dispatch Event2 to transition to State2 + fsm.mStateMachine.Dispatch(Event::Create()); + NL_TEST_ASSERT(inSuite, fsm.mStateMachine.GetState().Is()); + // dispatch Event4 to transitions to State1. + fsm.mStateMachine.Dispatch(Event::Create()); + NL_TEST_ASSERT(inSuite, fsm.mStateMachine.GetState().Is()); +} + +void TestTransitionsDispatch(nlTestSuite * inSuite, void * inContext) +{ + // in State1 + SimpleStateMachine fsm; + // Dispatch Event4, which in turn dispatches Event2 from the transitions + // table and ultimately places us in State2. + fsm.mStateMachine.Dispatch(Event::Create()); + NL_TEST_ASSERT(inSuite, fsm.mStateMachine.GetState().Is()); +} + +void TestMethodExec(nlTestSuite * inSuite, void * inContext) +{ + // in State1 + SimpleStateMachine fsm; + // transition to State2 + fsm.mStateMachine.Dispatch(Event::Create()); + NL_TEST_ASSERT(inSuite, fsm.mStateMachine.GetState().Is()); + // verify expected method calls + NL_TEST_ASSERT(inSuite, fsm.mTransitions.mFactory.ms1.mEntered == 0); + NL_TEST_ASSERT(inSuite, fsm.mTransitions.mFactory.ms1.mExited == 1); + NL_TEST_ASSERT(inSuite, fsm.mTransitions.mFactory.ms1.mLogged == 0); + NL_TEST_ASSERT(inSuite, fsm.mTransitions.mFactory.ms1.mPrevious == nullptr); + NL_TEST_ASSERT(inSuite, fsm.mTransitions.mFactory.ms2.mEntered == 1); + NL_TEST_ASSERT(inSuite, fsm.mTransitions.mFactory.ms2.mExited == 0); + NL_TEST_ASSERT(inSuite, fsm.mTransitions.mFactory.ms2.mLogged == 1); + NL_TEST_ASSERT(inSuite, strcmp(fsm.mTransitions.mFactory.ms2.mPrevious, "State1") == 0); + // transition back to State1 + fsm.mStateMachine.Dispatch(Event::Create()); + NL_TEST_ASSERT(inSuite, fsm.mStateMachine.GetState().Is()); + // verify expected method calls + NL_TEST_ASSERT(inSuite, fsm.mTransitions.mFactory.ms1.mEntered == 1); + NL_TEST_ASSERT(inSuite, fsm.mTransitions.mFactory.ms1.mExited == 1); + NL_TEST_ASSERT(inSuite, fsm.mTransitions.mFactory.ms1.mLogged == 1); + NL_TEST_ASSERT(inSuite, strcmp(fsm.mTransitions.mFactory.ms1.mPrevious, "State2") == 0); + NL_TEST_ASSERT(inSuite, fsm.mTransitions.mFactory.ms2.mEntered == 1); + NL_TEST_ASSERT(inSuite, fsm.mTransitions.mFactory.ms2.mExited == 1); + NL_TEST_ASSERT(inSuite, fsm.mTransitions.mFactory.ms2.mLogged == 1); + NL_TEST_ASSERT(inSuite, strcmp(fsm.mTransitions.mFactory.ms2.mPrevious, "State1") == 0); +} + +int Setup(void * inContext) +{ + return SUCCESS; +} + +int Teardown(void * inContext) +{ + return SUCCESS; +} + +} // namespace + +static const nlTest sTests[] = { + NL_TEST_DEF("TestInit", TestInit), + NL_TEST_DEF("TestIgnoredEvents", TestIgnoredEvents), + NL_TEST_DEF("TestTransitions", TestTransitions), + NL_TEST_DEF("TestTransitionsDispatch", TestTransitionsDispatch), + NL_TEST_DEF("TestMethodExec", TestMethodExec), + NL_TEST_SENTINEL(), +}; + +int StateMachineTestSuite() +{ + nlTestSuite suite = { "CHIP State Machine tests", &sTests[0], Setup, Teardown }; + nlTestRunner(&suite, nullptr); + return nlTestRunnerStats(&suite); +} + +CHIP_REGISTER_TEST_SUITE(StateMachineTestSuite); From e4a8b1c046eb43b1239ee56c0b561ba7f9208d47 Mon Sep 17 00:00:00 2001 From: Praveen Chandran Date: Mon, 29 Nov 2021 19:26:49 -0800 Subject: [PATCH 17/42] Support lighting app, Diagnostics Clusters for Infineon P6 (#12189) --- .github/workflows/examples-infineon.yaml | 11 +- .vscode/tasks.json | 1 + examples/all-clusters-app/p6/src/main.cpp | 9 +- examples/lighting-app/p6/.gn | 28 + examples/lighting-app/p6/BUILD.gn | 109 ++++ examples/lighting-app/p6/README.md | 156 ++++++ examples/lighting-app/p6/args.gni | 20 + examples/lighting-app/p6/build_overrides | 1 + examples/lighting-app/p6/include/AppConfig.h | 64 +++ examples/lighting-app/p6/include/AppEvent.h | 56 ++ examples/lighting-app/p6/include/AppTask.h | 94 ++++ .../lighting-app/p6/include/ButtonHandler.h | 40 ++ .../p6/include/CHIPProjectConfig.h | 114 ++++ .../lighting-app/p6/include/LightingManager.h | 86 +++ examples/lighting-app/p6/src/AppTask.cpp | 505 +++++++++++++++++ .../lighting-app/p6/src/ButtonHandler.cpp | 96 ++++ .../lighting-app/p6/src/LightingManager.cpp | 225 ++++++++ examples/lighting-app/p6/src/ZclCallbacks.cpp | 95 ++++ examples/lighting-app/p6/src/main.cpp | 128 +++++ .../p6/third_party/connectedhomeip | 1 + examples/lock-app/p6/include/AppTask.h | 2 +- .../lock-app/p6/include/BoltLockManager.h | 2 +- examples/lock-app/p6/src/BoltLockManager.cpp | 2 +- examples/lock-app/p6/src/main.cpp | 10 +- scripts/build/build/targets.py | 1 + scripts/build/builders/infineon.py | 7 + .../testdata/all_targets_except_host.txt | 1 + .../build/testdata/build_all_except_host.txt | 6 + .../glob_star_targets_except_host.txt | 1 + src/platform/P6/ConfigurationManagerImpl.cpp | 43 ++ src/platform/P6/ConfigurationManagerImpl.h | 4 + .../P6/DiagnosticDataProviderImpl.cpp | 507 ++++++++++++++++++ src/platform/P6/DiagnosticDataProviderImpl.h | 77 +++ src/platform/P6/KeyValueStoreManagerImpl.cpp | 4 +- src/platform/P6/KeyValueStoreManagerImpl.h | 2 +- src/platform/P6/P6Config.cpp | 5 + src/platform/P6/P6Config.h | 3 + src/platform/P6/P6Utils.cpp | 128 +++++ src/platform/P6/P6Utils.h | 120 +++++ src/platform/P6/PlatformManagerImpl.cpp | 27 + src/platform/P6/PlatformManagerImpl.h | 4 + 41 files changed, 2785 insertions(+), 10 deletions(-) create mode 100644 examples/lighting-app/p6/.gn create mode 100644 examples/lighting-app/p6/BUILD.gn create mode 100644 examples/lighting-app/p6/README.md create mode 100644 examples/lighting-app/p6/args.gni create mode 120000 examples/lighting-app/p6/build_overrides create mode 100644 examples/lighting-app/p6/include/AppConfig.h create mode 100644 examples/lighting-app/p6/include/AppEvent.h create mode 100644 examples/lighting-app/p6/include/AppTask.h create mode 100644 examples/lighting-app/p6/include/ButtonHandler.h create mode 100644 examples/lighting-app/p6/include/CHIPProjectConfig.h create mode 100644 examples/lighting-app/p6/include/LightingManager.h create mode 100644 examples/lighting-app/p6/src/AppTask.cpp create mode 100644 examples/lighting-app/p6/src/ButtonHandler.cpp create mode 100644 examples/lighting-app/p6/src/LightingManager.cpp create mode 100644 examples/lighting-app/p6/src/ZclCallbacks.cpp create mode 100644 examples/lighting-app/p6/src/main.cpp create mode 120000 examples/lighting-app/p6/third_party/connectedhomeip diff --git a/.github/workflows/examples-infineon.yaml b/.github/workflows/examples-infineon.yaml index 7bef8b9552f252..3c709c3354aa0b 100644 --- a/.github/workflows/examples-infineon.yaml +++ b/.github/workflows/examples-infineon.yaml @@ -26,7 +26,7 @@ concurrency: jobs: infineon: name: Infineon examples building - timeout-minutes: 30 + timeout-minutes: 60 runs-on: ubuntu-latest if: github.actor != 'restyled-io[bot]' @@ -72,7 +72,14 @@ jobs: .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ p6 default all-clusters-app \ out/infineon-p6-all-clusters/chip-p6-clusters-example.out - + - name: Build lighting-app example + timeout-minutes: 10 + run: | + scripts/run_in_build_env.sh \ + "scripts/build/build_examples.py --no-log-timestamps --target 'infineon-p6-light' build" + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + p6 default light-app \ + out/infineon-p6-light/chip-p6-lighting-example.out - name: Uploading Size Reports uses: actions/upload-artifact@v2 if: ${{ !env.ACT }} diff --git a/.vscode/tasks.json b/.vscode/tasks.json index a7a102d81514e2..ce4fecb97314ee 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -246,6 +246,7 @@ "esp32-m5stack-all-clusters-rpc-ipv6only", "infineon-p6-all-clusters", "infineon-p6-lock", + "infineon-p6-light", "linux-arm64-all-clusters", "linux-arm64-all-clusters-ipv6only", "linux-arm64-chip-tool", diff --git a/examples/all-clusters-app/p6/src/main.cpp b/examples/all-clusters-app/p6/src/main.cpp index 68446f6ecf05ab..a943c132dc3620 100644 --- a/examples/all-clusters-app/p6/src/main.cpp +++ b/examples/all-clusters-app/p6/src/main.cpp @@ -89,7 +89,14 @@ int main(void) // Init Chip memory management before the stack chip::Platform::MemoryInit(); - CHIP_ERROR ret = PlatformMgr().InitChipStack(); + CHIP_ERROR ret = chip::DeviceLayer::PersistedStorage::KeyValueStoreMgrImpl().Init(); + if (ret != CHIP_NO_ERROR) + { + P6_LOG("PersistedStorage::KeyValueStoreMgrImpl().Init() failed"); + appError(ret); + } + + ret = PlatformMgr().InitChipStack(); if (ret != CHIP_NO_ERROR) { P6_LOG("PlatformMgr().InitChipStack() failed"); diff --git a/examples/lighting-app/p6/.gn b/examples/lighting-app/p6/.gn new file mode 100644 index 00000000000000..81cec9d11a421b --- /dev/null +++ b/examples/lighting-app/p6/.gn @@ -0,0 +1,28 @@ +# 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. + +import("//build_overrides/build.gni") + +# The location of the build configuration file. +buildconfig = "${build_root}/config/BUILDCONFIG.gn" + +# CHIP uses angle bracket includes. +check_system_includes = true + +default_args = { + target_cpu = "arm" + target_os = "freertos" + + import("//args.gni") +} diff --git a/examples/lighting-app/p6/BUILD.gn b/examples/lighting-app/p6/BUILD.gn new file mode 100644 index 00000000000000..6af9db2bffd8b8 --- /dev/null +++ b/examples/lighting-app/p6/BUILD.gn @@ -0,0 +1,109 @@ +# 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. + +import("//build_overrides/build.gni") +import("//build_overrides/chip.gni") +import("//build_overrides/p6.gni") + +import("${build_root}/config/defaults.gni") +import("${p6_sdk_build_root}/p6_executable.gni") +import("${p6_sdk_build_root}/p6_sdk.gni") + +assert(current_os == "freertos") + +p6_project_dir = "${chip_root}/examples/lighting-app/p6" +examples_plat_dir = "${chip_root}/examples/platform/p6" + +declare_args() { + # Dump memory usage at link time. + chip_print_memory_usage = false + + # PIN code for PASE session establishment. + setup_pin_code = 20202021 + + # Monitor & log memory usage at runtime. + enable_heap_monitoring = false +} + +p6_sdk_sources("lighting_app_sdk_sources") { + include_dirs = [ + "${chip_root}/src/platform/P6", + "${p6_project_dir}/include", + "${examples_plat_dir}", + ] + + defines = [ + "BOARD_ID=${p6_board}", + "P6_LOG_ENABLED=1", + "CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE=${setup_pin_code}", + ] + + sources = [ "${p6_project_dir}/include/CHIPProjectConfig.h" ] + + public_configs = [ "${chip_root}/third_party/p6:p6_sdk_config" ] +} + +p6_executable("lighting_app") { + include_dirs = [] + defines = [] + output_name = "chip-p6-lighting-example.out" + + sources = [ + "${examples_plat_dir}/LEDWidget.cpp", + "${examples_plat_dir}/init_p6Platform.cpp", + "src/AppTask.cpp", + "src/ButtonHandler.cpp", + "src/LightingManager.cpp", + "src/ZclCallbacks.cpp", + "src/main.cpp", + ] + + deps = [ + ":lighting_app_sdk_sources", + "${chip_root}/examples/common/QRCode", + "${chip_root}/examples/lighting-app/lighting-common", + "${chip_root}/src/lib", + "${chip_root}/src/setup_payload", + ] + + include_dirs += [ + "include", + "${examples_plat_dir}", + "${p6_project_dir}/include", + ] + + defines = [] + + if (enable_heap_monitoring) { + sources += [ "${examples_plat_dir}/MemMonitoring.cpp" ] + defines += [ "HEAP_MONITORING" ] + } + + if (chip_print_memory_usage) { + ldflags += [ + "-Wl,--print-memory-usage", + "-fstack-usage", + ] + } + + output_dir = root_out_dir +} + +group("p6") { + deps = [ ":lighting_app" ] +} + +group("default") { + deps = [ ":p6" ] +} diff --git a/examples/lighting-app/p6/README.md b/examples/lighting-app/p6/README.md new file mode 100644 index 00000000000000..3ef67d0988b81f --- /dev/null +++ b/examples/lighting-app/p6/README.md @@ -0,0 +1,156 @@ +#CHIP P6 Lighting Example + +An example showing the use of Matter on the Infineon CY8CKIT-062S2-43012 board. + +


+ +- [Matter P6 Lighting Example](#chip-p6-Lighting-example) + - [Introduction](#introduction) + - [Building](#building) + - [Flashing the Application](#flashing-the-application) + - [Commissioning and cluster control](#commissioning-and-cluster-control) + - [Setting up Python Controller](#setting-up-python-controller) + - [Commissioning over BLE](#commissioning-over-ble) + - [Notes](#notes) + - [Cluster control](#cluster-control) + +
+ + + +## Introduction + +The P6 lighting example provides a baseline demonstration of a Light control +device, built using Matter and the Infineon Modustoolbox SDK. It can be +controlled by Matter controller over Wi-Fi network. + +The P6 device can be commissioned over Bluetooth Low Energy where the device and +the Matter controller will exchange security information with the Rendezvous +procedure. Wi-Fi Network credentials are then provided to the P6 device which +will then join the network. + + + +## Building + +- [Modustoolbox Software](https://www.cypress.com/products/modustoolbox) + + Refer to `integrations/docker/images/chip-build-infineon/Dockerfile` or + `scripts/examples/gn_p6_example.sh` for downloading the Software and related + tools. + +- Install some additional tools (likely already present for Matter + developers): \$ sudo apt install gcc g++ clang ninja-build python + python3-venv libssl-dev libavahi-client-dev libglib2.0-dev git cmake + python3-pip + +- Supported hardware: + [CY8CKIT-062S2-43012](https://www.cypress.com/CY8CKIT-062S2-43012) + +* Build the example application: + + $ ./scripts/examples/gn_p6_example.sh ./examples/lighting-app/p6 out/lighting_app_p6 + +- To delete generated executable, libraries and object files use: + + $ cd ~/connectedhomeip + $ rm -rf out/ + + + +## Flashing the Application + +- Put CY8CKIT-062S2-43012 board on KitProg3 CMSIS-DAP Mode by pressing the + `MODE SELECT` button. `KITPROG3 STATUS` LED is ON confirms board is in + proper mode. + +- On the command line: + + $ cd ~/connectedhomeip + $ python3 out/lighting_app_p6/chip-p6-lock-example.flash.py + + + +## Commissioning and cluster control + +Commissioning can be carried out using BLE. + + + +### Setting up Python Controller + +Once P6 is up and running, we need to set up a device controller on Raspberry Pi +4 to perform commissioning and cluster control. + +- Set up python controller. + + $ cd {path-to-connectedhomeip} + $ ./scripts/build_python.sh -m platform + +- Execute the controller. + + $ source ./out/python_env/bin/activate + $ chip-device-ctrl + + + +### Commissioning over BLE + +- Establish the secure session over BLE. + + - chip-device-ctrl > ble-scan + - chip-device-ctrl > connect -ble 3840 20202021 1234 + + Parameters: + 1. Discriminator: 3840 + 2. Setup-pin-code: 20202021 + 3. Node ID: Optional. + If not passed in this command, then it is auto-generated by the controller and + displayed in the output of connect. + The same value should be used in the next commands. + We have chosen a random node ID which is 1234. + +- Add credentials of the Wi-Fi network you want the P6 to connect to, using + the `AddWiFiNetwork` command and then enable the P6 to connect to it using + `EnableWiFiNetwork` command. In this example, we have used `WIFI_SSID` and + `WIFI_PASSWORD` as the SSID and passphrase respectively. + + - chip-device-ctrl > zcl NetworkCommissioning AddWiFiNetwork 1234 0 0 ssid=str:WIFI_SSID credentials=str:WIFI_PASSWORD breadcrumb=0 timeoutMs=1000 + + - chip-device-ctrl > zcl NetworkCommissioning EnableNetwork 1234 0 0 networkID=str:WIFI_SSID breadcrumb=0 timeoutMs=1000 + +- Close the BLE connection to P6, as it is not required hereafter. + + - chip-device-ctrl > close-ble + +- Resolve DNS-SD name and update address of the node in the device controller. + + - chip-device-ctrl > resolve 0 1234 + + + +#### Notes + +Raspberry Pi 4 BLE connection issues can be avoided by running the following +commands. These power cycle the BlueTooth hardware and disable BR/EDR mode. + + $ sudo btmgmt -i hci0 power off + $ sudo btmgmt -i hci0 bredr off + $ sudo btmgmt -i hci0 power on + + + +### Cluster control + +- After successful commissioning, use the OnOff cluster command to toggle + device between On or Off states. + + `chip-device-ctrl > zcl OnOff Off 1234 1 0` + + `chip-device-ctrl > zcl OnOff On 1234 1 0` + +- Cluster OnOff can also be done using the `USER_BTN1` button on the board. + This button is configured with `APP_LIGHT_BUTTON` in `include/AppConfig.h`. + Press `USER_BTN1` on the board to toggle between Light ON and OFF states. + Light ON and OFF can be observed with 'LED9' on the board. This LED is + configured with `LIGHT_STATE_LED` in `include/AppConfig.h`. diff --git a/examples/lighting-app/p6/args.gni b/examples/lighting-app/p6/args.gni new file mode 100644 index 00000000000000..f239efee01e5da --- /dev/null +++ b/examples/lighting-app/p6/args.gni @@ -0,0 +1,20 @@ +# 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. + +import("//build_overrides/chip.gni") +import("//build_overrides/pigweed.gni") +import("${chip_root}/src/platform/P6/args.gni") + +p6_target_project = + get_label_info(":lighting_app_sdk_sources", "label_no_toolchain") diff --git a/examples/lighting-app/p6/build_overrides b/examples/lighting-app/p6/build_overrides new file mode 120000 index 00000000000000..e578e73312ebd1 --- /dev/null +++ b/examples/lighting-app/p6/build_overrides @@ -0,0 +1 @@ +../../build_overrides \ No newline at end of file diff --git a/examples/lighting-app/p6/include/AppConfig.h b/examples/lighting-app/p6/include/AppConfig.h new file mode 100644 index 00000000000000..5ed6edd44bd594 --- /dev/null +++ b/examples/lighting-app/p6/include/AppConfig.h @@ -0,0 +1,64 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * Copyright (c) 2019 Google LLC. + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include "cybsp.h" +#include "cyhal.h" + +// ---- Lighting Example App Config ---- + +#define APP_TASK_NAME "APP" + +#define APP_LIGHT_BUTTON_IDX 0 +#define APP_FUNCTION_BUTTON_IDX 1 + +#define APP_LIGHT_BUTTON CYBSP_USER_BTN1 +#define APP_FUNCTION_BUTTON CYBSP_USER_BTN2 +#define APP_BUTTON_DEBOUNCE_PERIOD_MS 50 + +#define APP_BUTTON_PRESSED 0 +#define APP_BUTTON_RELEASED 1 + +#define SYSTEM_STATE_LED CYBSP_USER_LED1 +#define LIGHT_LED CYBSP_USER_LED2 + +// Time it takes in ms for the simulated actuator to move from one +// state to another. +#define ACTUATOR_MOVEMENT_PERIOS_MS 2000 + +// ---- Thread Polling Config ---- +#define THREAD_ACTIVE_POLLING_INTERVAL_MS 100 +#define THREAD_INACTIVE_POLLING_INTERVAL_MS 1000 + +// P6 Logging +#ifdef __cplusplus +extern "C" { +#endif + +void appError(int err); +void P6Log(const char * aFormat, ...); +#define P6_LOG(...) P6Log(__VA_ARGS__) + +#ifdef __cplusplus +} + +#include +void appError(CHIP_ERROR error); +#endif diff --git a/examples/lighting-app/p6/include/AppEvent.h b/examples/lighting-app/p6/include/AppEvent.h new file mode 100644 index 00000000000000..1191e379982d52 --- /dev/null +++ b/examples/lighting-app/p6/include/AppEvent.h @@ -0,0 +1,56 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * Copyright (c) 2018 Nest Labs, Inc. + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +struct AppEvent; +typedef void (*EventHandler)(AppEvent *); + +struct AppEvent +{ + enum AppEventTypes + { + kEventType_Button = 0, + kEventType_Timer, + kEventType_Light, + kEventType_Install, + }; + + uint16_t Type; + + union + { + struct + { + uint8_t ButtonIdx; + uint8_t Action; + } ButtonEvent; + struct + { + void * Context; + } TimerEvent; + struct + { + uint8_t Action; + int32_t Actor; + } LightEvent; + }; + + EventHandler Handler; +}; diff --git a/examples/lighting-app/p6/include/AppTask.h b/examples/lighting-app/p6/include/AppTask.h new file mode 100644 index 00000000000000..c7f9a23f48a495 --- /dev/null +++ b/examples/lighting-app/p6/include/AppTask.h @@ -0,0 +1,94 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * Copyright (c) 2019 Google LLC. + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include +#include + +#include "AppEvent.h" +#include "LightingManager.h" + +#include "FreeRTOS.h" +#include "timers.h" // provides FreeRTOS timer support +#include +#include + +// Application-defined error codes in the CHIP_ERROR space. +#define APP_ERROR_EVENT_QUEUE_FAILED CHIP_APPLICATION_ERROR(0x01) +#define APP_ERROR_CREATE_TASK_FAILED CHIP_APPLICATION_ERROR(0x02) +#define APP_ERROR_UNHANDLED_EVENT CHIP_APPLICATION_ERROR(0x03) +#define APP_ERROR_CREATE_TIMER_FAILED CHIP_APPLICATION_ERROR(0x04) +#define APP_ERROR_START_TIMER_FAILED CHIP_APPLICATION_ERROR(0x05) +#define APP_ERROR_STOP_TIMER_FAILED CHIP_APPLICATION_ERROR(0x06) + +class AppTask +{ + +public: + CHIP_ERROR StartAppTask(); + static void AppTaskMain(void * pvParameter); + + void PostLightActionRequest(int32_t aActor, LightingManager::Action_t aAction); + void PostEvent(const AppEvent * event); + + void ButtonEventHandler(uint8_t btnIdx, uint8_t btnAction); + +private: + friend AppTask & GetAppTask(void); + + CHIP_ERROR Init(); + + static void ActionInitiated(LightingManager::Action_t aAction, int32_t aActor); + static void ActionCompleted(LightingManager::Action_t aAction); + + void CancelTimer(void); + + void DispatchEvent(AppEvent * event); + + static void FunctionTimerEventHandler(AppEvent * aEvent); + static void FunctionHandler(AppEvent * aEvent); + static void LightActionEventHandler(AppEvent * aEvent); + static void TimerEventHandler(TimerHandle_t xTimer); + + static void UpdateClusterState(void); + + void StartTimer(uint32_t aTimeoutMs); + + enum class Function + { + kNoneSelected = 0, + kSoftwareUpdate = 0, + kStartBleAdv = 1, + kFactoryReset = 2, + + kInvalid + }; + + Function mFunction = Function::kNoneSelected; + bool mFunctionTimerActive = false; + bool mSyncClusterToButtonAction = false; + + static AppTask sAppTask; +}; + +inline AppTask & GetAppTask(void) +{ + return AppTask::sAppTask; +} diff --git a/examples/lighting-app/p6/include/ButtonHandler.h b/examples/lighting-app/p6/include/ButtonHandler.h new file mode 100644 index 00000000000000..89b40e33477425 --- /dev/null +++ b/examples/lighting-app/p6/include/ButtonHandler.h @@ -0,0 +1,40 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * Copyright (c) 2019 Google LLC. + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include + +#include "FreeRTOS.h" +#include "cyhal.h" +#include "timers.h" // provides FreeRTOS timer support + +#define GPIO_INTERRUPT_PRIORITY (5) + +class ButtonHandler +{ +public: + static void Init(void); + +private: + static void GpioInit(void); + static void lockbuttonIsr(void * handler_arg, cyhal_gpio_event_t event); + static void functionbuttonIsr(void * handler_arg, cyhal_gpio_event_t event); + static void TimerCallback(TimerHandle_t xTimer); +}; diff --git a/examples/lighting-app/p6/include/CHIPProjectConfig.h b/examples/lighting-app/p6/include/CHIPProjectConfig.h new file mode 100644 index 00000000000000..21271e4a31e380 --- /dev/null +++ b/examples/lighting-app/p6/include/CHIPProjectConfig.h @@ -0,0 +1,114 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * Copyright (c) 2019 Google LLC. + * 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 + * Example project configuration file for CHIP. + * + * This is a place to put application or project-specific overrides + * to the default configuration values for general CHIP features. + * + */ + +#pragma once + +/** + * CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY + * + * Enables the use of a hard-coded default Chip device id and credentials if no device id + * is found in Chip NV storage. + * + * This option is for testing only and should be disabled in production releases. + */ +#define CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY 34 + +// Use a default pairing code if one hasn't been provisioned in flash. +#ifndef CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE +#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021 +#endif + +#ifndef CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR +#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR 0xF00 +#endif + +// For convenience, Chip Security Test Mode can be enabled and the +// requirement for authentication in various protocols can be disabled. +// +// WARNING: These options make it possible to circumvent basic Chip security functionality, +// including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS. +// +#define CHIP_CONFIG_SECURITY_TEST_MODE 0 +#define CHIP_CONFIG_REQUIRE_AUTH 1 + +/** + * CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_REVISION + * + * The product revision number assigned to device or product by the device vendor. This + * number is scoped to the device product id, and typically corresponds to a revision of the + * physical device, a change to its packaging, and/or a change to its marketing presentation. + * This value is generally *not* incremented for device software revisions. + */ +#define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_REVISION 1 + +/** + * CHIP_DEVICE_CONFIG_DEVICE_FIRMWARE_REVISION_STRING + * + * A string identifying the firmware revision running on the device. + * CHIP service currently expects the firmware version to be in the format + * {MAJOR_VERSION}.0d{MINOR_VERSION} + */ +#ifndef CHIP_DEVICE_CONFIG_DEVICE_FIRMWARE_REVISION_STRING +#define CHIP_DEVICE_CONFIG_DEVICE_FIRMWARE_REVISION_STRING "0.1ALPHA" +#endif +/** + * CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE + * + * Enable support for Chip-over-BLE (CHIPoBLE). + */ +#define CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE 1 + +/** + * CHIP_DEVICE_CONFIG_ENABLE_CHIP_TIME_SERVICE_TIME_SYNC + * + * Enables synchronizing the device's real time clock with a remote Chip Time service + * using the Chip Time Sync protocol. + */ +#define CHIP_DEVICE_CONFIG_ENABLE_CHIP_TIME_SERVICE_TIME_SYNC 0 + +/** + * CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER + * + * Enables the use of a hard-coded default serial number if none + * is found in Chip NV storage. + */ +#define CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER "TEST_SN" + +/** + * CHIP_CONFIG_EVENT_LOGGING_UTC_TIMESTAMPS + * + * Enable recording UTC timestamps. + */ +#define CHIP_CONFIG_EVENT_LOGGING_UTC_TIMESTAMPS 1 + +/** + * CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE + * + * A size, in bytes, of the individual debug event logging buffer. + */ +#define CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE (512) diff --git a/examples/lighting-app/p6/include/LightingManager.h b/examples/lighting-app/p6/include/LightingManager.h new file mode 100644 index 00000000000000..4cb6fb4647de71 --- /dev/null +++ b/examples/lighting-app/p6/include/LightingManager.h @@ -0,0 +1,86 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * Copyright (c) 2019 Google LLC. + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include +#include + +#include "AppEvent.h" + +#include "FreeRTOS.h" +#include "timers.h" // provides FreeRTOS timer support + +#include + +class LightingManager +{ +public: + enum Action_t + { + ON_ACTION = 0, + OFF_ACTION, + + INVALID_ACTION + } Action; + + enum State_t + { + kState_OffInitiated = 0, + kState_OffCompleted, + kState_OnInitiated, + kState_OnCompleted, + } State; + + CHIP_ERROR Init(); + bool IsLightOn(); + void EnableAutoTurnOff(bool aOn); + void SetAutoTurnOffDuration(uint32_t aDurationInSecs); + bool IsActionInProgress(); + bool InitiateAction(int32_t aActor, Action_t aAction); + + typedef void (*Callback_fn_initiated)(Action_t, int32_t aActor); + typedef void (*Callback_fn_completed)(Action_t); + void SetCallbacks(Callback_fn_initiated aActionInitiated_CB, Callback_fn_completed aActionCompleted_CB); + +private: + friend LightingManager & LightMgr(void); + State_t mState = kState_OnCompleted; + + Callback_fn_initiated mActionInitiated_CB; + Callback_fn_completed mActionCompleted_CB; + + bool mAutoTurnOff; + uint32_t mAutoTurnOffDuration; + bool mAutoTurnOffTimerArmed; + + void CancelTimer(void); + void StartTimer(uint32_t aTimeoutMs); + + static void TimerEventHandler(TimerHandle_t xTimer); + static void AutoTurnOffTimerEventHandler(AppEvent * aEvent); + static void ActuatorMovementTimerEventHandler(AppEvent * aEvent); + + static LightingManager sLight; +}; + +inline LightingManager & LightMgr(void) +{ + return LightingManager::sLight; +} diff --git a/examples/lighting-app/p6/src/AppTask.cpp b/examples/lighting-app/p6/src/AppTask.cpp new file mode 100644 index 00000000000000..ddfba4aba5fa9c --- /dev/null +++ b/examples/lighting-app/p6/src/AppTask.cpp @@ -0,0 +1,505 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * Copyright (c) 2019 Google LLC. + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "AppTask.h" +#include "AppConfig.h" +#include "AppEvent.h" +#include "ButtonHandler.h" +#include "LEDWidget.h" +#include "qrcodegen.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define FACTORY_RESET_TRIGGER_TIMEOUT 3000 +#define FACTORY_RESET_CANCEL_WINDOW_TIMEOUT 3000 +#define APP_TASK_STACK_SIZE (4096) +#define APP_TASK_PRIORITY 2 +#define APP_EVENT_QUEUE_SIZE 10 + +namespace { +TimerHandle_t sFunctionTimer; // FreeRTOS app sw timer. + +TaskHandle_t sAppTaskHandle; +QueueHandle_t sAppEventQueue; + +LEDWidget sStatusLED; +LEDWidget sLightLED; + +bool sIsWiFiStationProvisioned = false; +bool sIsWiFiStationEnabled = false; +bool sIsWiFiStationConnected = false; +bool sHaveBLEConnections = false; + +uint8_t sAppEventQueueBuffer[APP_EVENT_QUEUE_SIZE * sizeof(AppEvent)]; +StaticQueue_t sAppEventQueueStruct; + +StackType_t appStack[APP_TASK_STACK_SIZE / sizeof(StackType_t)]; +StaticTask_t appTaskStruct; +} // namespace + +using namespace chip::TLV; +using namespace ::chip::Credentials; +using namespace ::chip::DeviceLayer; + +AppTask AppTask::sAppTask; + +CHIP_ERROR AppTask::StartAppTask() +{ + sAppEventQueue = xQueueCreateStatic(APP_EVENT_QUEUE_SIZE, sizeof(AppEvent), sAppEventQueueBuffer, &sAppEventQueueStruct); + if (sAppEventQueue == NULL) + { + P6_LOG("Failed to allocate app event queue"); + appError(APP_ERROR_EVENT_QUEUE_FAILED); + } + + // Start App task. + sAppTaskHandle = xTaskCreateStatic(AppTaskMain, APP_TASK_NAME, ArraySize(appStack), NULL, 1, appStack, &appTaskStruct); + return (sAppTaskHandle == nullptr) ? APP_ERROR_CREATE_TASK_FAILED : CHIP_NO_ERROR; +} + +CHIP_ERROR AppTask::Init() +{ + CHIP_ERROR err = CHIP_NO_ERROR; + + // Register the callback to init the MDNS server when connectivity is available + PlatformMgr().AddEventHandler( + [](const ChipDeviceEvent * event, intptr_t arg) { + // Restart the server whenever an ip address is renewed + if (event->Type == DeviceEventType::kInternetConnectivityChange) + { + if (event->InternetConnectivityChange.IPv4 == kConnectivity_Established || + event->InternetConnectivityChange.IPv6 == kConnectivity_Established) + { + chip::app::DnssdServer::Instance().StartServer(); + } + } + }, + 0); + // Init ZCL Data Model + chip::Server::GetInstance().Init(); + + // Initialize device attestation config + SetDeviceAttestationCredentialsProvider(Examples::GetExampleDACProvider()); + + // Initialise WSTK buttons PB0 and PB1 (including debounce). + ButtonHandler::Init(); + + // Create FreeRTOS sw timer for Function Selection. + sFunctionTimer = xTimerCreate("FnTmr", // Just a text name, not used by the RTOS kernel + 1, // == default timer period (mS) + false, // no timer reload (==one-shot) + (void *) this, // init timer id = app task obj context + TimerEventHandler // timer callback handler + ); + if (sFunctionTimer == NULL) + { + P6_LOG("funct timer create failed"); + appError(APP_ERROR_CREATE_TIMER_FAILED); + } + + P6_LOG("Current Firmware Version: %s", CHIP_DEVICE_CONFIG_DEVICE_FIRMWARE_REVISION_STRING); + err = LightMgr().Init(); + if (err != CHIP_NO_ERROR) + { + P6_LOG("LightMgr().Init() failed"); + appError(err); + } + + LightMgr().SetCallbacks(ActionInitiated, ActionCompleted); + + // Initialize LEDs + sStatusLED.Init(SYSTEM_STATE_LED); + sLightLED.Init(LIGHT_LED); + sLightLED.Set(LightMgr().IsLightOn()); + UpdateClusterState(); + + ConfigurationMgr().LogDeviceConfig(); + + // Print setup info + PrintOnboardingCodes(chip::RendezvousInformationFlag(chip::RendezvousInformationFlag::kBLE)); + + return err; +} + +void AppTask::AppTaskMain(void * pvParameter) +{ + AppEvent event; + + CHIP_ERROR err = sAppTask.Init(); + if (err != CHIP_NO_ERROR) + { + P6_LOG("AppTask.Init() failed"); + appError(err); + } + + P6_LOG("App Task started"); + + while (true) + { + BaseType_t eventReceived = xQueueReceive(sAppEventQueue, &event, pdMS_TO_TICKS(10)); + while (eventReceived == pdTRUE) + { + sAppTask.DispatchEvent(&event); + eventReceived = xQueueReceive(sAppEventQueue, &event, 0); + } + + // Collect connectivity and configuration state from the CHIP stack. Because + // the CHIP event loop is being run in a separate task, the stack must be + // locked while these values are queried. However we use a non-blocking + // lock request (TryLockCHIPStack()) to avoid blocking other UI activities + // when the CHIP task is busy (e.g. with a long crypto operation). + if (PlatformMgr().TryLockChipStack()) + { + sIsWiFiStationEnabled = ConnectivityMgr().IsWiFiStationEnabled(); + sIsWiFiStationConnected = ConnectivityMgr().IsWiFiStationConnected(); + sIsWiFiStationProvisioned = ConnectivityMgr().IsWiFiStationProvisioned(); + sHaveBLEConnections = (ConnectivityMgr().NumBLEConnections() != 0); + PlatformMgr().UnlockChipStack(); + } + + // Update the status LED if factory reset has not been initiated. + // + // If system has "full connectivity", keep the LED On constantly. + // + // If thread and service provisioned, but not attached to the thread network + // yet OR no connectivity to the service OR subscriptions are not fully + // established THEN blink the LED Off for a short period of time. + // + // If the system has ble connection(s) uptill the stage above, THEN blink + // the LEDs at an even rate of 100ms. + // + // Otherwise, blink the LED ON for a very short time. + if (sAppTask.mFunction != Function::kFactoryReset) + { + if (sIsWiFiStationEnabled && sIsWiFiStationProvisioned && !sIsWiFiStationConnected) + { + sStatusLED.Blink(950, 50); + } + else if (sHaveBLEConnections) + { + sStatusLED.Blink(100, 100); + } + else + { + sStatusLED.Blink(50, 950); + } + } + + sStatusLED.Animate(); + sLightLED.Animate(); + } +} + +void AppTask::LightActionEventHandler(AppEvent * aEvent) +{ + bool initiated = false; + LightingManager::Action_t action; + int32_t actor = 0; + CHIP_ERROR err = CHIP_NO_ERROR; + + if (aEvent->Type == AppEvent::kEventType_Light) + { + action = static_cast(aEvent->LightEvent.Action); + actor = aEvent->LightEvent.Actor; + } + else if (aEvent->Type == AppEvent::kEventType_Button) + { + if (LightMgr().IsLightOn()) + { + action = LightingManager::OFF_ACTION; + } + else + { + action = LightingManager::ON_ACTION; + } + actor = AppEvent::kEventType_Button; + } + else + { + err = APP_ERROR_UNHANDLED_EVENT; + } + + if (err == CHIP_NO_ERROR) + { + initiated = LightMgr().InitiateAction(actor, action); + + if (!initiated) + { + P6_LOG("Action is already in progress or active."); + } + } +} + +void AppTask::ButtonEventHandler(uint8_t btnIdx, uint8_t btnAction) +{ + if (btnIdx != APP_LIGHT_BUTTON_IDX && btnIdx != APP_FUNCTION_BUTTON_IDX) + { + return; + } + + AppEvent button_event = {}; + button_event.Type = AppEvent::kEventType_Button; + button_event.ButtonEvent.ButtonIdx = btnIdx; + button_event.ButtonEvent.Action = btnAction; + + if (btnIdx == APP_LIGHT_BUTTON_IDX) + { + button_event.Handler = LightActionEventHandler; + sAppTask.PostEvent(&button_event); + } + else if (btnIdx == APP_FUNCTION_BUTTON_IDX) + { + button_event.Handler = FunctionHandler; + sAppTask.PostEvent(&button_event); + } +} + +void AppTask::TimerEventHandler(TimerHandle_t xTimer) +{ + AppEvent event; + event.Type = AppEvent::kEventType_Timer; + event.TimerEvent.Context = (void *) xTimer; + event.Handler = FunctionTimerEventHandler; + sAppTask.PostEvent(&event); +} + +void AppTask::FunctionTimerEventHandler(AppEvent * aEvent) +{ + if (aEvent->Type != AppEvent::kEventType_Timer) + { + return; + } + + // If we reached here, the button was held past FACTORY_RESET_TRIGGER_TIMEOUT, + // initiate factory reset + if (sAppTask.mFunctionTimerActive && sAppTask.mFunction == Function::kStartBleAdv) + { + P6_LOG("Factory Reset Triggered. Release button within %ums to cancel.", FACTORY_RESET_CANCEL_WINDOW_TIMEOUT); + + // Start timer for FACTORY_RESET_CANCEL_WINDOW_TIMEOUT to allow user to + // cancel, if required. + sAppTask.StartTimer(FACTORY_RESET_CANCEL_WINDOW_TIMEOUT); + + sAppTask.mFunction = Function::kFactoryReset; + + // Turn off all LEDs before starting blink to make sure blink is + // co-ordinated. + sStatusLED.Set(false); + sLightLED.Set(false); + + sStatusLED.Blink(500); + sLightLED.Blink(500); + } + else if (sAppTask.mFunctionTimerActive && sAppTask.mFunction == Function::kFactoryReset) + { + // Actually trigger Factory Reset + sAppTask.mFunction = Function::kNoneSelected; + ConfigurationMgr().InitiateFactoryReset(); + } +} + +void AppTask::FunctionHandler(AppEvent * aEvent) +{ + // To trigger software update: press the APP_FUNCTION_BUTTON button briefly (< + // FACTORY_RESET_TRIGGER_TIMEOUT) To initiate factory reset: press the + // APP_FUNCTION_BUTTON for FACTORY_RESET_TRIGGER_TIMEOUT + + // FACTORY_RESET_CANCEL_WINDOW_TIMEOUT All LEDs start blinking after + // FACTORY_RESET_TRIGGER_TIMEOUT to signal factory reset has been initiated. + // To cancel factory reset: release the APP_FUNCTION_BUTTON once all LEDs + // start blinking within the FACTORY_RESET_CANCEL_WINDOW_TIMEOUT + if (aEvent->ButtonEvent.Action == APP_BUTTON_PRESSED) + { + if (!sAppTask.mFunctionTimerActive && sAppTask.mFunction == Function::kNoneSelected) + { + sAppTask.StartTimer(FACTORY_RESET_TRIGGER_TIMEOUT); + sAppTask.mFunction = Function::kStartBleAdv; + } + } + else + { + // If the button was released before factory reset got initiated, start Thread Network + if (sAppTask.mFunctionTimerActive && sAppTask.mFunction == Function::kStartBleAdv) + { + sAppTask.CancelTimer(); + sAppTask.mFunction = Function::kNoneSelected; + } + else if (sAppTask.mFunctionTimerActive && sAppTask.mFunction == Function::kFactoryReset) + { + // Set Light status LED back to show state of light. + sLightLED.Set(LightMgr().IsLightOn()); + + sAppTask.CancelTimer(); + + // Change the function to none selected since factory reset has been + // canceled. + sAppTask.mFunction = Function::kNoneSelected; + + P6_LOG("Factory Reset has been Canceled"); + } + } +} + +void AppTask::CancelTimer() +{ + if (xTimerStop(sFunctionTimer, 0) == pdFAIL) + { + P6_LOG("app timer stop() failed"); + appError(APP_ERROR_STOP_TIMER_FAILED); + } + + mFunctionTimerActive = false; +} + +void AppTask::StartTimer(uint32_t aTimeoutInMs) +{ + if (xTimerIsTimerActive(sFunctionTimer)) + { + P6_LOG("app timer already started!"); + CancelTimer(); + } + + // timer is not active, change its period to required value (== restart). + // FreeRTOS- Block for a maximum of 100 ticks if the change period command + // cannot immediately be sent to the timer command queue. + if (xTimerChangePeriod(sFunctionTimer, aTimeoutInMs / portTICK_PERIOD_MS, 100) != pdPASS) + { + P6_LOG("app timer start() failed"); + appError(APP_ERROR_START_TIMER_FAILED); + } + + mFunctionTimerActive = true; +} + +void AppTask::ActionInitiated(LightingManager::Action_t aAction, int32_t aActor) +{ + // Action initiated, update the light led + if (aAction == LightingManager::ON_ACTION) + { + P6_LOG("Turning light ON"); + sLightLED.Set(true); + } + else if (aAction == LightingManager::OFF_ACTION) + { + P6_LOG("Turning light OFF"); + sLightLED.Set(false); + } + + if (aActor == AppEvent::kEventType_Button) + { + sAppTask.mSyncClusterToButtonAction = true; + } +} + +void AppTask::ActionCompleted(LightingManager::Action_t aAction) +{ + // action has been completed bon the light + if (aAction == LightingManager::ON_ACTION) + { + P6_LOG("Light ON"); + } + else if (aAction == LightingManager::OFF_ACTION) + { + P6_LOG("Light OFF"); + } + + if (sAppTask.mSyncClusterToButtonAction) + { + UpdateClusterState(); + sAppTask.mSyncClusterToButtonAction = false; + } +} + +void AppTask::PostLightActionRequest(int32_t aActor, LightingManager::Action_t aAction) +{ + AppEvent event; + event.Type = AppEvent::kEventType_Light; + event.LightEvent.Actor = aActor; + event.LightEvent.Action = aAction; + event.Handler = LightActionEventHandler; + PostEvent(&event); +} + +void AppTask::PostEvent(const AppEvent * aEvent) +{ + if (sAppEventQueue != NULL) + { + BaseType_t status; + if (xPortIsInsideInterrupt()) + { + BaseType_t higherPrioTaskWoken = pdFALSE; + status = xQueueSendFromISR(sAppEventQueue, aEvent, &higherPrioTaskWoken); + +#ifdef portYIELD_FROM_ISR + portYIELD_FROM_ISR(higherPrioTaskWoken); +#elif portEND_SWITCHING_ISR // portYIELD_FROM_ISR or portEND_SWITCHING_ISR + portEND_SWITCHING_ISR(higherPrioTaskWoken); +#else // portYIELD_FROM_ISR or portEND_SWITCHING_ISR +#error "Must have portYIELD_FROM_ISR or portEND_SWITCHING_ISR" +#endif // portYIELD_FROM_ISR or portEND_SWITCHING_ISR + } + else + { + status = xQueueSend(sAppEventQueue, aEvent, 1); + } + + if (!status) + P6_LOG("Failed to post event to app task event queue"); + } + else + { + P6_LOG("Event Queue is NULL should never happen"); + } +} + +void AppTask::DispatchEvent(AppEvent * aEvent) +{ + if (aEvent->Handler) + { + aEvent->Handler(aEvent); + } + else + { + P6_LOG("Event received with no handler. Dropping event."); + } +} + +void AppTask::UpdateClusterState(void) +{ + uint8_t newValue = LightMgr().IsLightOn(); + + // write the new on/off value + EmberAfStatus status = emberAfWriteAttribute(1, ZCL_ON_OFF_CLUSTER_ID, ZCL_ON_OFF_ATTRIBUTE_ID, CLUSTER_MASK_SERVER, + (uint8_t *) &newValue, ZCL_BOOLEAN_ATTRIBUTE_TYPE); + if (status != EMBER_ZCL_STATUS_SUCCESS) + { + P6_LOG("ERR: updating on/off %x", status); + } +} diff --git a/examples/lighting-app/p6/src/ButtonHandler.cpp b/examples/lighting-app/p6/src/ButtonHandler.cpp new file mode 100644 index 00000000000000..729939ba56f1f0 --- /dev/null +++ b/examples/lighting-app/p6/src/ButtonHandler.cpp @@ -0,0 +1,96 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * Copyright (c) 2019 Google LLC. + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "ButtonHandler.h" +#include "AppConfig.h" +#include "AppTask.h" + +namespace { +constexpr int kButtonCount = 2; + +TimerHandle_t buttonTimers[kButtonCount]; // FreeRTOS timers used for debouncing +// buttons. Array to hold handles to +// the created timers. + +} // namespace + +void ButtonHandler::Init(void) +{ + GpioInit(); + // Create FreeRTOS sw timers for debouncing buttons. + for (uint8_t i = 0; i < kButtonCount; i++) + { + buttonTimers[i] = xTimerCreate("BtnTmr", // Just a text name, not used by the RTOS kernel + APP_BUTTON_DEBOUNCE_PERIOD_MS, // timer period + false, // no timer reload (==one-shot) + (void *) (int) i, // init timer id = button index + TimerCallback // timer callback handler (all buttons use + // the same timer cn function) + ); + } +} + +void ButtonHandler::GpioInit(void) +{ + cy_rslt_t result = CY_RSLT_SUCCESS; + // Set up button GPIOs to input with pullups. + result = cyhal_gpio_init(APP_LIGHT_BUTTON, CYHAL_GPIO_DIR_INPUT, CYHAL_GPIO_DRIVE_PULLUP, CYBSP_BTN_OFF); + if (result != CY_RSLT_SUCCESS) + { + printf(" cyhal_gpio_init failed for APP_LOCK_BUTTON\r\n"); + } + result = cyhal_gpio_init(APP_FUNCTION_BUTTON, CYHAL_GPIO_DIR_INPUT, CYHAL_GPIO_DRIVE_PULLUP, CYBSP_BTN_OFF); + if (result != CY_RSLT_SUCCESS) + { + printf(" cyhal_gpio_init failed for APP_FUNCTION_BUTTON\r\n"); + } + /* Configure GPIO interrupt. */ + cyhal_gpio_register_callback(APP_LIGHT_BUTTON, lockbuttonIsr, NULL); + cyhal_gpio_register_callback(APP_FUNCTION_BUTTON, functionbuttonIsr, NULL); + cyhal_gpio_enable_event(APP_LIGHT_BUTTON, CYHAL_GPIO_IRQ_FALL, GPIO_INTERRUPT_PRIORITY, true); + cyhal_gpio_enable_event(APP_FUNCTION_BUTTON, CYHAL_GPIO_IRQ_FALL, GPIO_INTERRUPT_PRIORITY, true); +} +void ButtonHandler::lockbuttonIsr(void * handler_arg, cyhal_gpio_event_t event) +{ + portBASE_TYPE taskWoken = pdFALSE; + xTimerStartFromISR(buttonTimers[APP_LIGHT_BUTTON_IDX], &taskWoken); +} + +void ButtonHandler::functionbuttonIsr(void * handler_arg, cyhal_gpio_event_t event) +{ + portBASE_TYPE taskWoken = pdFALSE; + xTimerStartFromISR(buttonTimers[APP_FUNCTION_BUTTON_IDX], &taskWoken); +} + +void ButtonHandler::TimerCallback(TimerHandle_t xTimer) +{ + // Get the button index of the expired timer and call button event helper. + uint32_t timerId; + uint8_t buttonevent = 0; + timerId = (uint32_t) pvTimerGetTimerID(xTimer); + if (timerId) + { + buttonevent = cyhal_gpio_read(APP_FUNCTION_BUTTON); + } + else + { + buttonevent = cyhal_gpio_read(APP_LIGHT_BUTTON); + } + GetAppTask().ButtonEventHandler(timerId, (buttonevent) ? APP_BUTTON_PRESSED : APP_BUTTON_RELEASED); +} diff --git a/examples/lighting-app/p6/src/LightingManager.cpp b/examples/lighting-app/p6/src/LightingManager.cpp new file mode 100644 index 00000000000000..b2db66900c8db6 --- /dev/null +++ b/examples/lighting-app/p6/src/LightingManager.cpp @@ -0,0 +1,225 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * Copyright (c) 2019 Google LLC. + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "LightingManager.h" + +#include "AppConfig.h" +#include "AppTask.h" +#include + +LightingManager LightingManager::sLight; + +TimerHandle_t sLightTimer; + +CHIP_ERROR LightingManager::Init() +{ + // Create FreeRTOS sw timer for light timer. + sLightTimer = xTimerCreate("lightTmr", // Just a text name, not used by the RTOS kernel + 1, // == default timer period (mS) + false, // no timer reload (==one-shot) + (void *) this, // init timer id = light obj context + TimerEventHandler // timer callback handler + ); + + if (sLightTimer == NULL) + { + P6_LOG("sLockTimer timer create failed"); + return APP_ERROR_CREATE_TIMER_FAILED; + } + + mState = kState_OffCompleted; + mAutoTurnOffTimerArmed = false; + mAutoTurnOff = false; + mAutoTurnOffDuration = 0; + + return CHIP_NO_ERROR; +} + +void LightingManager::SetCallbacks(Callback_fn_initiated aActionInitiated_CB, Callback_fn_completed aActionCompleted_CB) +{ + mActionInitiated_CB = aActionInitiated_CB; + mActionCompleted_CB = aActionCompleted_CB; +} + +bool LightingManager::IsActionInProgress() +{ + return (mState == kState_OffInitiated || mState == kState_OnInitiated); +} + +bool LightingManager::IsLightOn() +{ + return (mState == kState_OnCompleted); +} + +void LightingManager::EnableAutoTurnOff(bool aOn) +{ + mAutoTurnOff = aOn; +} + +void LightingManager::SetAutoTurnOffDuration(uint32_t aDurationInSecs) +{ + mAutoTurnOffDuration = aDurationInSecs; +} + +bool LightingManager::InitiateAction(int32_t aActor, Action_t aAction) +{ + bool action_initiated = false; + State_t new_state; + + // Initiate Turn On/Off Action only when the previous one is complete. + if (mState == kState_OffCompleted && aAction == ON_ACTION) + { + action_initiated = true; + + new_state = kState_OnInitiated; + } + else if (mState == kState_OnCompleted && aAction == OFF_ACTION) + { + action_initiated = true; + + new_state = kState_OffInitiated; + } + + if (action_initiated) + { + if (mAutoTurnOffTimerArmed && new_state == kState_OffInitiated) + { + // If auto turn off timer has been armed and someone initiates turning off, + // cancel the timer and continue as normal. + mAutoTurnOffTimerArmed = false; + + CancelTimer(); + } + + StartTimer(ACTUATOR_MOVEMENT_PERIOS_MS); + + // Since the timer started successfully, update the state and trigger callback + mState = new_state; + + if (mActionInitiated_CB) + { + mActionInitiated_CB(aAction, aActor); + } + } + + return action_initiated; +} + +void LightingManager::StartTimer(uint32_t aTimeoutMs) +{ + if (xTimerIsTimerActive(sLightTimer)) + { + P6_LOG("app timer already started!"); + CancelTimer(); + } + + // timer is not active, change its period to required value (== restart). + // FreeRTOS- Block for a maximum of 100 ticks if the change period command + // cannot immediately be sent to the timer command queue. + if (xTimerChangePeriod(sLightTimer, (aTimeoutMs / portTICK_PERIOD_MS), 100) != pdPASS) + { + P6_LOG("sLockTimer timer start() failed"); + appError(APP_ERROR_START_TIMER_FAILED); + } +} + +void LightingManager::CancelTimer(void) +{ + if (xTimerStop(sLightTimer, 0) == pdFAIL) + { + P6_LOG("sLightTimer stop() failed"); + appError(APP_ERROR_STOP_TIMER_FAILED); + } +} + +void LightingManager::TimerEventHandler(TimerHandle_t xTimer) +{ + // Get light obj context from timer id. + LightingManager * light = static_cast(pvTimerGetTimerID(xTimer)); + + // The timer event handler will be called in the context of the timer task + // once sLightTimer expires. Post an event to apptask queue with the actual handler + // so that the event can be handled in the context of the apptask. + AppEvent event; + event.Type = AppEvent::kEventType_Timer; + event.TimerEvent.Context = light; + if (light->mAutoTurnOffTimerArmed) + { + event.Handler = AutoTurnOffTimerEventHandler; + } + else + { + event.Handler = ActuatorMovementTimerEventHandler; + } + GetAppTask().PostEvent(&event); +} + +void LightingManager::AutoTurnOffTimerEventHandler(AppEvent * aEvent) +{ + LightingManager * light = static_cast(aEvent->TimerEvent.Context); + int32_t actor = 0; + + // Make sure auto turn off timer is still armed. + if (!light->mAutoTurnOffTimerArmed) + { + return; + } + + light->mAutoTurnOffTimerArmed = false; + + P6_LOG("Auto Turn Off has been triggered!"); + + light->InitiateAction(actor, OFF_ACTION); +} + +void LightingManager::ActuatorMovementTimerEventHandler(AppEvent * aEvent) +{ + Action_t actionCompleted = INVALID_ACTION; + + LightingManager * light = static_cast(aEvent->TimerEvent.Context); + + if (light->mState == kState_OffInitiated) + { + light->mState = kState_OffCompleted; + actionCompleted = OFF_ACTION; + } + else if (light->mState == kState_OnInitiated) + { + light->mState = kState_OnCompleted; + actionCompleted = ON_ACTION; + } + + if (actionCompleted != INVALID_ACTION) + { + if (light->mActionCompleted_CB) + { + light->mActionCompleted_CB(actionCompleted); + } + + if (light->mAutoTurnOff && actionCompleted == ON_ACTION) + { + // Start the timer for auto turn off + light->StartTimer(light->mAutoTurnOffDuration * 1000); + + light->mAutoTurnOffTimerArmed = true; + + P6_LOG("Auto Turn off enabled. Will be triggered in %u seconds", light->mAutoTurnOffDuration); + } + } +} diff --git a/examples/lighting-app/p6/src/ZclCallbacks.cpp b/examples/lighting-app/p6/src/ZclCallbacks.cpp new file mode 100644 index 00000000000000..8cb273ce51e3fd --- /dev/null +++ b/examples/lighting-app/p6/src/ZclCallbacks.cpp @@ -0,0 +1,95 @@ +/* + * + * 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. + */ + +/** + * @file + * This file implements the handler for data model messages. + */ + +#include "AppConfig.h" +#include "LightingManager.h" + +#include +#include +#include +#include + +using namespace ::chip; +using namespace ::chip::app::Clusters; + +void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & attributePath, uint8_t mask, uint8_t type, + uint16_t size, uint8_t * value) +{ + ClusterId clusterId = attributePath.mClusterId; + AttributeId attributeId = attributePath.mAttributeId; + ChipLogProgress(Zcl, "Cluster callback: " ChipLogFormatMEI, ChipLogValueMEI(clusterId)); + + if (clusterId == OnOff::Id && attributeId == OnOff::Attributes::OnOff::Id) + { + LightMgr().InitiateAction(AppEvent::kEventType_Light, *value ? LightingManager::ON_ACTION : LightingManager::OFF_ACTION); + } + else if (clusterId == LevelControl::Id) + { + ChipLogProgress(Zcl, + "Level Control attribute ID: " ChipLogFormatMEI " Type: %" PRIu8 " Value: %" PRIu16 ", length %" PRIu16, + ChipLogValueMEI(attributeId), type, *value, size); + + // WIP Apply attribute change to Light + } + else if (clusterId == ColorControl::Id) + { + ChipLogProgress(Zcl, + "Color Control attribute ID: " ChipLogFormatMEI " Type: %" PRIu8 " Value: %" PRIu16 ", length %" PRIu16, + ChipLogValueMEI(attributeId), type, *value, size); + + // WIP Apply attribute change to Light + } + else if (clusterId == OnOffSwitchConfiguration::Id) + { + ChipLogProgress(Zcl, + "OnOff Switch Configuration attribute ID: " ChipLogFormatMEI " Type: %" PRIu8 " Value: %" PRIu16 + ", length %" PRIu16, + ChipLogValueMEI(attributeId), type, *value, size); + + // WIP Apply attribute change to Light + } + else if (clusterId == Identify::Id) + { + ChipLogProgress(Zcl, "Identify attribute ID: " ChipLogFormatMEI " Type: %" PRIu8 " Value: %" PRIu16 ", length %" PRIu16, + ChipLogValueMEI(attributeId), type, *value, size); + } +} + +/** @brief OnOff Cluster Init + * + * This function is called when a specific cluster is initialized. It gives the + * application an opportunity to take care of cluster initialization procedures. + * It is called exactly once for each endpoint where cluster is present. + * + * @param endpoint Ver.: always + * + * TODO Issue #3841 + * emberAfOnOffClusterInitCallback happens before the stack initialize the cluster + * attributes to the default value. + * The logic here expects something similar to the deprecated Plugins callback + * emberAfPluginOnOffClusterServerPostInitCallback. + * + */ +void emberAfOnOffClusterInitCallback(EndpointId endpoint) +{ + // TODO: implement any additional Cluster Server init actions +} diff --git a/examples/lighting-app/p6/src/main.cpp b/examples/lighting-app/p6/src/main.cpp new file mode 100644 index 00000000000000..7d493daff2a25e --- /dev/null +++ b/examples/lighting-app/p6/src/main.cpp @@ -0,0 +1,128 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * Copyright (c) 2019 Google LLC. + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +#include +#include +#include + +#include + +#include +#include +#include +#include + +#include + +#include "AppConfig.h" +#include "init_p6Platform.h" +#include + +#ifdef HEAP_MONITORING +#include "MemMonitoring.h" +#endif + +using namespace ::chip; +using namespace ::chip::Inet; +using namespace ::chip::DeviceLayer; + +volatile int apperror_cnt; +// ================================================================================ +// App Error +//================================================================================= +void appError(int err) +{ + P6_LOG("!!!!!!!!!!!! App Critical Error: %d !!!!!!!!!!!", err); + portDISABLE_INTERRUPTS(); + while (1) + ; +} + +void appError(CHIP_ERROR error) +{ + appError(static_cast(error.AsInteger())); +} + +// ================================================================================ +// FreeRTOS Callbacks +// ================================================================================ +extern "C" void vApplicationIdleHook(void) +{ + // FreeRTOS Idle callback +} + +// ================================================================================ +// Main Code +// ================================================================================ +int main(void) +{ + init_p6Platform(); + +#ifdef HEAP_MONITORING + MemMonitoring::startHeapMonitoring(); +#endif + + P6_LOG("==================================================\r\n"); + P6_LOG("chip-p6-lighting-example starting\r\n"); + P6_LOG("==================================================\r\n"); + + // Init Chip memory management before the stack + chip::Platform::MemoryInit(); + + CHIP_ERROR ret = chip::DeviceLayer::PersistedStorage::KeyValueStoreMgrImpl().Init(); + if (ret != CHIP_NO_ERROR) + { + P6_LOG("PersistedStorage::KeyValueStoreMgrImpl().Init() failed"); + appError(ret); + } + + ret = PlatformMgr().InitChipStack(); + if (ret != CHIP_NO_ERROR) + { + P6_LOG("PlatformMgr().InitChipStack() failed"); + appError(ret); + } + chip::DeviceLayer::ConnectivityMgr().SetBLEDeviceName("P6_LIGHT"); + P6_LOG("Starting Platform Manager Event Loop"); + ret = PlatformMgr().StartEventLoopTask(); + if (ret != CHIP_NO_ERROR) + { + P6_LOG("PlatformMgr().StartEventLoopTask() failed"); + appError(ret); + } + ret = GetAppTask().StartAppTask(); + if (ret != CHIP_NO_ERROR) + { + P6_LOG("GetAppTask().Init() failed"); + appError(ret); + } + /* Start the FreeRTOS scheduler */ + vTaskStartScheduler(); + + chip::Platform::MemoryShutdown(); + PlatformMgr().StopEventLoopTask(); + PlatformMgr().Shutdown(); + + // Should never get here. + P6_LOG("vTaskStartScheduler() failed"); + appError(ret); +} diff --git a/examples/lighting-app/p6/third_party/connectedhomeip b/examples/lighting-app/p6/third_party/connectedhomeip new file mode 120000 index 00000000000000..c866b86874994d --- /dev/null +++ b/examples/lighting-app/p6/third_party/connectedhomeip @@ -0,0 +1 @@ +../../../.. \ No newline at end of file diff --git a/examples/lock-app/p6/include/AppTask.h b/examples/lock-app/p6/include/AppTask.h index 44718ea75a424a..e4da2aba0aa403 100644 --- a/examples/lock-app/p6/include/AppTask.h +++ b/examples/lock-app/p6/include/AppTask.h @@ -80,7 +80,7 @@ class AppTask kInvalid }; - Function mFunction = Function::kInvalid; + Function mFunction = Function::kNoneSelected; bool mFunctionTimerActive = false; bool mSyncClusterToButtonAction = false; diff --git a/examples/lock-app/p6/include/BoltLockManager.h b/examples/lock-app/p6/include/BoltLockManager.h index 34aa815af65f13..4c0093b3efd592 100644 --- a/examples/lock-app/p6/include/BoltLockManager.h +++ b/examples/lock-app/p6/include/BoltLockManager.h @@ -59,7 +59,7 @@ class BoltLockManager private: friend BoltLockManager & BoltLockMgr(void); - State mState = State::kLockingCompleted; + State mState = State::kUnlockingCompleted; Callback_fn_initiated mActionInitiated_CB; Callback_fn_completed mActionCompleted_CB; diff --git a/examples/lock-app/p6/src/BoltLockManager.cpp b/examples/lock-app/p6/src/BoltLockManager.cpp index 6499a2104d139e..8f7ee9dd5f1fdf 100644 --- a/examples/lock-app/p6/src/BoltLockManager.cpp +++ b/examples/lock-app/p6/src/BoltLockManager.cpp @@ -43,7 +43,7 @@ CHIP_ERROR BoltLockManager::Init() appError(APP_ERROR_CREATE_TIMER_FAILED); } - mState = State::kLockingCompleted; + mState = State::kUnlockingCompleted; mAutoLockTimerArmed = false; mAutoRelock = false; mAutoLockDuration = 0; diff --git a/examples/lock-app/p6/src/main.cpp b/examples/lock-app/p6/src/main.cpp index 6fe0298cad4c34..aceba9a2183528 100644 --- a/examples/lock-app/p6/src/main.cpp +++ b/examples/lock-app/p6/src/main.cpp @@ -79,9 +79,15 @@ int main(void) // Init Chip memory management before the stack chip::Platform::MemoryInit(); - // chip::DeviceLayer::PersistedStorage::KeyValueStoreMgrImpl().Init(); - CHIP_ERROR ret = PlatformMgr().InitChipStack(); + CHIP_ERROR ret = chip::DeviceLayer::PersistedStorage::KeyValueStoreMgrImpl().Init(); + if (ret != CHIP_NO_ERROR) + { + P6_LOG("PersistedStorage::KeyValueStoreMgrImpl().Init() failed"); + appError(ret); + } + + ret = PlatformMgr().InitChipStack(); if (ret != CHIP_NO_ERROR) { P6_LOG("PlatformMgr().InitChipStack() failed"); diff --git a/scripts/build/build/targets.py b/scripts/build/build/targets.py index e013bd23a998a8..7d5adf9c0f593f 100644 --- a/scripts/build/build/targets.py +++ b/scripts/build/build/targets.py @@ -229,6 +229,7 @@ def InfineonTargets(): yield target.Extend('p6-lock', board=InfineonBoard.P6BOARD, app=InfineonApp.LOCK) yield target.Extend('p6-all-clusters', board=InfineonBoard.P6BOARD, app=InfineonApp.ALL_CLUSTERS) + yield target.Extend('p6-light', board=InfineonBoard.P6BOARD, app=InfineonApp.LIGHT) ALL = [] diff --git a/scripts/build/builders/infineon.py b/scripts/build/builders/infineon.py index 7a737c3dc83b67..3c5f1f828afa37 100644 --- a/scripts/build/builders/infineon.py +++ b/scripts/build/builders/infineon.py @@ -20,11 +20,14 @@ class InfineonApp(Enum): LOCK = auto() + LIGHT = auto() ALL_CLUSTERS = auto() def ExampleName(self): if self == InfineonApp.LOCK: return 'lock-app' + elif self == InfineonApp.LIGHT: + return 'lighting-app' elif self == InfineonApp.ALL_CLUSTERS: return 'all-clusters-app' else: @@ -33,6 +36,8 @@ def ExampleName(self): def AppNamePrefix(self): if self == InfineonApp.LOCK: return 'chip-p6-lock-example' + elif self == InfineonApp.LIGHT: + return 'chip-p6-lighting-example' elif self == InfineonApp.ALL_CLUSTERS: return 'chip-p6-clusters-example' else: @@ -43,6 +48,8 @@ def FlashBundleName(self): return 'lock_app.flashbundle.txt' elif self == InfineonApp.ALL_CLUSTERS: return 'clusters_app.flashbundle.txt' + elif self == InfineonApp.LIGHT: + return 'light_app.flashbundle.txt' else: raise Exception('Unknown app type: %r' % self) diff --git a/scripts/build/testdata/all_targets_except_host.txt b/scripts/build/testdata/all_targets_except_host.txt index ba1c11063b90d2..29b96163e85a39 100644 --- a/scripts/build/testdata/all_targets_except_host.txt +++ b/scripts/build/testdata/all_targets_except_host.txt @@ -27,6 +27,7 @@ esp32-m5stack-all-clusters-ipv6only esp32-m5stack-all-clusters-rpc esp32-m5stack-all-clusters-rpc-ipv6only infineon-p6-all-clusters +infineon-p6-light infineon-p6-lock mbed-CY8CPROTO_062_4343W-all-clusters-debug (NOGLOB: Compile only for debugging purpose - https://os.mbed.com/docs/mbed-os/latest/program-setup/build-profiles-and-rules.html) mbed-CY8CPROTO_062_4343W-all-clusters-develop (NOGLOB: Compile only for debugging purpose - https://os.mbed.com/docs/mbed-os/latest/program-setup/build-profiles-and-rules.html) diff --git a/scripts/build/testdata/build_all_except_host.txt b/scripts/build/testdata/build_all_except_host.txt index 734f2b84915638..fcd76ac888f211 100644 --- a/scripts/build/testdata/build_all_except_host.txt +++ b/scripts/build/testdata/build_all_except_host.txt @@ -272,6 +272,9 @@ idf.py -C examples/all-clusters-app/esp32 -B {out}/esp32-m5stack-all-clusters-rp # Generating infineon-p6-all-clusters gn gen --check --fail-on-unused-args --root={root}/examples/all-clusters-app/p6 '--args=p6_board="CY8CKIT-062S2-43012"' {out}/infineon-p6-all-clusters +# Generating infineon-p6-light +gn gen --check --fail-on-unused-args --root={root}/examples/lighting-app/p6 '--args=p6_board="CY8CKIT-062S2-43012"' {out}/infineon-p6-light + # Generating infineon-p6-lock gn gen --check --fail-on-unused-args --root={root}/examples/lock-app/p6 '--args=p6_board="CY8CKIT-062S2-43012"' {out}/infineon-p6-lock @@ -679,6 +682,9 @@ idf.py -C examples/all-clusters-app/esp32 -B {out}/esp32-m5stack-all-clusters-rp # Building infineon-p6-all-clusters ninja -C {out}/infineon-p6-all-clusters +# Building infineon-p6-light +ninja -C {out}/infineon-p6-light + # Building infineon-p6-lock ninja -C {out}/infineon-p6-lock diff --git a/scripts/build/testdata/glob_star_targets_except_host.txt b/scripts/build/testdata/glob_star_targets_except_host.txt index fce80642e1562a..c14ea7f7f87879 100644 --- a/scripts/build/testdata/glob_star_targets_except_host.txt +++ b/scripts/build/testdata/glob_star_targets_except_host.txt @@ -27,6 +27,7 @@ esp32-m5stack-all-clusters-ipv6only esp32-m5stack-all-clusters-rpc esp32-m5stack-all-clusters-rpc-ipv6only infineon-p6-all-clusters +infineon-p6-light infineon-p6-lock mbed-CY8CPROTO_062_4343W-all-clusters-release mbed-CY8CPROTO_062_4343W-light-release diff --git a/src/platform/P6/ConfigurationManagerImpl.cpp b/src/platform/P6/ConfigurationManagerImpl.cpp index 067ca9ab4f749b..ef408fec77decd 100644 --- a/src/platform/P6/ConfigurationManagerImpl.cpp +++ b/src/platform/P6/ConfigurationManagerImpl.cpp @@ -46,6 +46,28 @@ CHIP_ERROR ConfigurationManagerImpl::Init() { CHIP_ERROR err = CHIP_NO_ERROR; bool failSafeArmed; + uint32_t rebootCount; + + if (P6Config::ConfigValueExists(P6Config::kCounterKey_RebootCount)) + { + err = GetRebootCount(rebootCount); + SuccessOrExit(err); + + err = StoreRebootCount(rebootCount + 1); + SuccessOrExit(err); + } + else + { + // The first boot after factory reset of the Node. + err = StoreRebootCount(1); + SuccessOrExit(err); + } + + if (!P6Config::ConfigValueExists(P6Config::kCounterKey_TotalOperationalHours)) + { + err = StoreTotalOperationalHours(0); + SuccessOrExit(err); + } // Initialize the generic implementation base class. err = Internal::GenericConfigurationManagerImpl::Init(); @@ -58,9 +80,30 @@ CHIP_ERROR ConfigurationManagerImpl::Init() InitiateFactoryReset(); } +exit: return err; } +CHIP_ERROR ConfigurationManagerImpl::GetRebootCount(uint32_t & rebootCount) +{ + return ReadConfigValue(P6Config::kCounterKey_RebootCount, rebootCount); +} + +CHIP_ERROR ConfigurationManagerImpl::StoreRebootCount(uint32_t rebootCount) +{ + return WriteConfigValue(P6Config::kCounterKey_RebootCount, rebootCount); +} + +CHIP_ERROR ConfigurationManagerImpl::GetTotalOperationalHours(uint32_t & totalOperationalHours) +{ + return ReadConfigValue(P6Config::kCounterKey_TotalOperationalHours, totalOperationalHours); +} + +CHIP_ERROR ConfigurationManagerImpl::StoreTotalOperationalHours(uint32_t totalOperationalHours) +{ + return WriteConfigValue(P6Config::kCounterKey_TotalOperationalHours, totalOperationalHours); +} + CHIP_ERROR ConfigurationManagerImpl::GetPrimaryWiFiMACAddress(uint8_t * buf) { CHIP_ERROR err = CHIP_NO_ERROR; diff --git a/src/platform/P6/ConfigurationManagerImpl.h b/src/platform/P6/ConfigurationManagerImpl.h index 8aae8d9227f44c..8da0df2b060579 100644 --- a/src/platform/P6/ConfigurationManagerImpl.h +++ b/src/platform/P6/ConfigurationManagerImpl.h @@ -38,6 +38,10 @@ namespace DeviceLayer { class ConfigurationManagerImpl : public Internal::GenericConfigurationManagerImpl { public: + CHIP_ERROR GetRebootCount(uint32_t & rebootCount) override; + CHIP_ERROR StoreRebootCount(uint32_t rebootCount) override; + CHIP_ERROR GetTotalOperationalHours(uint32_t & totalOperationalHours) override; + CHIP_ERROR StoreTotalOperationalHours(uint32_t totalOperationalHours) override; // This returns an instance of this class. static ConfigurationManagerImpl & GetDefaultInstance(); diff --git a/src/platform/P6/DiagnosticDataProviderImpl.cpp b/src/platform/P6/DiagnosticDataProviderImpl.cpp index 02593d420e2501..3187f917a11784 100644 --- a/src/platform/P6/DiagnosticDataProviderImpl.cpp +++ b/src/platform/P6/DiagnosticDataProviderImpl.cpp @@ -23,9 +23,12 @@ #include +#include "cyhal_system.h" +#include #include #include #include +#include namespace chip { namespace DeviceLayer { @@ -36,5 +39,509 @@ DiagnosticDataProviderImpl & DiagnosticDataProviderImpl::GetDefaultInstance() return sInstance; } +CHIP_ERROR DiagnosticDataProviderImpl::GetCurrentHeapFree(uint64_t & currentHeapFree) +{ + heap_info_t heap; + Internal::P6Utils::heap_usage(&heap); + currentHeapFree = static_cast(heap.HeapFree); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DiagnosticDataProviderImpl::GetCurrentHeapUsed(uint64_t & currentHeapUsed) +{ + // Calculate the Heap used based on Total heap - Free heap + heap_info_t heap; + Internal::P6Utils::heap_usage(&heap); + currentHeapUsed = static_cast(heap.HeapUsed); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DiagnosticDataProviderImpl::GetCurrentHeapHighWatermark(uint64_t & currentHeapHighWatermark) +{ + heap_info_t heap; + Internal::P6Utils::heap_usage(&heap); + currentHeapHighWatermark = static_cast(heap.HeapMax); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DiagnosticDataProviderImpl::GetRebootCount(uint16_t & rebootCount) +{ + uint32_t count = 0; + + CHIP_ERROR err = ConfigurationMgr().GetRebootCount(count); + + if (err == CHIP_NO_ERROR) + { + VerifyOrReturnError(count <= UINT16_MAX, CHIP_ERROR_INVALID_INTEGER_VALUE); + rebootCount = static_cast(count); + } + + return err; +} + +CHIP_ERROR DiagnosticDataProviderImpl::GetUpTime(uint64_t & upTime) +{ + System::Clock::Timestamp currentTime = System::SystemClock().GetMonotonicTimestamp(); + System::Clock::Timestamp startTime = PlatformMgrImpl().GetStartTime(); + + if (currentTime >= startTime) + { + upTime = std::chrono::duration_cast(currentTime - startTime).count(); + return CHIP_NO_ERROR; + } + + return CHIP_ERROR_INVALID_TIME; +} + +CHIP_ERROR DiagnosticDataProviderImpl::GetTotalOperationalHours(uint32_t & totalOperationalHours) +{ + uint64_t upTime = 0; + + if (GetUpTime(upTime) == CHIP_NO_ERROR) + { + uint32_t totalHours = 0; + if (ConfigurationMgr().GetTotalOperationalHours(totalHours) == CHIP_NO_ERROR) + { + /* uptime is terms of seconds and dividing it by 3600 to calculate + * totalOperationalHours in hours. + */ + VerifyOrReturnError(upTime / 3600 <= UINT32_MAX, CHIP_ERROR_INVALID_INTEGER_VALUE); + totalOperationalHours = totalHours + static_cast(upTime / 3600); + return CHIP_NO_ERROR; + } + } + + return CHIP_ERROR_INVALID_TIME; +} + +CHIP_ERROR DiagnosticDataProviderImpl::GetBootReason(uint8_t & bootReason) +{ + cyhal_reset_reason_t reset_reason = cyhal_system_get_reset_reason(); + if (reset_reason == CYHAL_SYSTEM_RESET_NONE) + { + bootReason = EMBER_ZCL_BOOT_REASON_TYPE_POWER_ON_REBOOT; + } + else if (reset_reason == CYHAL_SYSTEM_RESET_WDT) + { + bootReason = EMBER_ZCL_BOOT_REASON_TYPE_SOFTWARE_WATCHDOG_RESET; + } + else if (reset_reason == CYHAL_SYSTEM_RESET_SOFT) + { + bootReason = EMBER_ZCL_BOOT_REASON_TYPE_SOFTWARE_RESET; + } + else if (reset_reason == CYHAL_SYSTEM_RESET_HIB_WAKEUP) + { + bootReason = EMBER_ZCL_BOOT_REASON_TYPE_HARDWARE_WATCHDOG_RESET; + } + else + { + bootReason = EMBER_ZCL_BOOT_REASON_TYPE_UNSPECIFIED; + } + return CHIP_NO_ERROR; +} + +void DiagnosticDataProviderImpl::UpdateoffPremiseService(bool ipv4service, bool ipv6service) +{ + /* Enable/Disable IPv4 Off Premise Services */ + mipv4_offpremise = ipv4service; + + /* Enable/Disable IPv6 Off Premise Services */ + mipv6_offpremise = ipv6service; +} + +CHIP_ERROR DiagnosticDataProviderImpl::GetNetworkInterfaces(NetworkInterface ** netifpp) +{ + struct netif * net_interface; + CHIP_ERROR err = CHIP_NO_ERROR; + NetworkInterface * ifp = new NetworkInterface(); + net_interface = cy_lwip_get_interface(CY_LWIP_STA_NW_INTERFACE); + if (net_interface) + { + /* Update Network Interface list */ + ifp->name = CharSpan(net_interface->name, strlen(net_interface->name)); + ifp->fabricConnected = net_interface->flags & NETIF_FLAG_LINK_UP; + ifp->type = EMBER_ZCL_INTERFACE_TYPE_WI_FI; + ifp->offPremiseServicesReachableIPv4 = mipv4_offpremise; + ifp->offPremiseServicesReachableIPv6 = mipv6_offpremise; + ifp->hardwareAddress = ByteSpan(net_interface->hwaddr, net_interface->hwaddr_len); + } + *netifpp = ifp; + + return err; +} + +void DiagnosticDataProviderImpl::ReleaseNetworkInterfaces(NetworkInterface * netifp) +{ + while (netifp) + { + NetworkInterface * del = netifp; + netifp = netifp->Next; + delete del; + } +} + +/* Wi-Fi Diagnostics Cluster Support */ + +CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiBssId(ByteSpan & value) +{ + cy_wcm_associated_ap_info_t ap_info; + cy_rslt_t result = CY_RSLT_SUCCESS; + CHIP_ERROR err = CHIP_NO_ERROR; + ChipLogError(DeviceLayer, "cy_wcm_get_associated_ap_info\r\n"); + result = cy_wcm_get_associated_ap_info(&ap_info); + if (result != CY_RSLT_SUCCESS) + { + ChipLogError(DeviceLayer, "cy_wcm_get_associated_ap_info failed: %d", (int) result); + SuccessOrExit(CHIP_ERROR_INTERNAL); + } + memcpy(mWiFiMacAddress, ap_info.BSSID, CY_WCM_MAC_ADDR_LEN); + value = ByteSpan(mWiFiMacAddress, CY_WCM_MAC_ADDR_LEN); + +exit: + return err; +} + +CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiSecurityType(uint8_t & securityType) +{ + cy_wcm_associated_ap_info_t ap_info; + cy_rslt_t result = CY_RSLT_SUCCESS; + CHIP_ERROR err = CHIP_NO_ERROR; + + result = cy_wcm_get_associated_ap_info(&ap_info); + if (result != CY_RSLT_SUCCESS) + { + ChipLogError(DeviceLayer, "cy_wcm_get_associated_ap_info failed: %d", (int) result); + SuccessOrExit(CHIP_ERROR_INTERNAL); + } + if (ap_info.security == CY_WCM_SECURITY_OPEN) + { + securityType = EMBER_ZCL_SECURITY_TYPE_NONE; + } + else if (ap_info.security & WPA3_SECURITY) + { + securityType = EMBER_ZCL_SECURITY_TYPE_WPA3; + } + else if (ap_info.security & WPA2_SECURITY) + { + securityType = EMBER_ZCL_SECURITY_TYPE_WPA2; + } + else if (ap_info.security & WPA_SECURITY) + { + securityType = EMBER_ZCL_SECURITY_TYPE_WPA; + } + else if (ap_info.security & WEP_ENABLED) + { + securityType = EMBER_ZCL_SECURITY_TYPE_WEP; + } + else + { + securityType = EMBER_ZCL_SECURITY_TYPE_UNSPECIFIED; + } + +exit: + return err; +} + +CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiVersion(uint8_t & wiFiVersion) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + wl_bss_info_t bss_info; + whd_security_t security; + cy_rslt_t result = CY_RSLT_SUCCESS; + + if (whd_wifi_get_ap_info(whd_ifs[CY_WCM_INTERFACE_TYPE_STA], &bss_info, &security) != CY_RSLT_SUCCESS) + { + ChipLogError(DeviceLayer, "whd_wifi_get_ap_info failed: %d", (int) result); + SuccessOrExit(CHIP_ERROR_INTERNAL); + } + /* VHT Capable bit variable is not defined in whd and has to use the reserved bit */ + if (bss_info.reserved[0]) + { + wiFiVersion = EMBER_ZCL_WI_FI_VERSION_TYPE_802__11AC; + } + /* HT Capable */ + else if (bss_info.n_cap) + { + wiFiVersion = EMBER_ZCL_WI_FI_VERSION_TYPE_802__11N; + } + /* 11g Capable */ + else + { + wiFiVersion = EMBER_ZCL_WI_FI_VERSION_TYPE_802__11G; + } + +exit: + return err; +} + +CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiChannelNumber(uint16_t & channelNumber) +{ + cy_wcm_associated_ap_info_t ap_info; + cy_rslt_t result = CY_RSLT_SUCCESS; + CHIP_ERROR err = CHIP_NO_ERROR; + + result = cy_wcm_get_associated_ap_info(&ap_info); + if (result != CY_RSLT_SUCCESS) + { + ChipLogError(DeviceLayer, "cy_wcm_get_associated_ap_info failed: %d", (int) result); + SuccessOrExit(CHIP_ERROR_INTERNAL); + } + channelNumber = ap_info.channel; + +exit: + return err; +} + +CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiRssi(int8_t & rssi) +{ + cy_wcm_associated_ap_info_t ap_info; + cy_rslt_t result = CY_RSLT_SUCCESS; + CHIP_ERROR err = CHIP_NO_ERROR; + + result = cy_wcm_get_associated_ap_info(&ap_info); + if (result != CY_RSLT_SUCCESS) + { + ChipLogError(DeviceLayer, "cy_wcm_get_associated_ap_info failed: %d", (int) result); + SuccessOrExit(CHIP_ERROR_INTERNAL); + } + rssi = ap_info.signal_strength; + +exit: + return err; +} + +CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiBeaconRxCount(uint32_t & beaconRxCount) +{ + uint64_t count; + ReturnErrorOnFailure(WiFiCounters(WiFiStatsCountType::kWiFiBeaconRxCount, count)); + + count -= mBeaconRxCount; + VerifyOrReturnError(count <= UINT32_MAX, CHIP_ERROR_INVALID_INTEGER_VALUE); + beaconRxCount = static_cast(count); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiBeaconLostCount(uint32_t & beaconLostCount) +{ + uint64_t count; + ReturnErrorOnFailure(WiFiCounters(WiFiStatsCountType::kWiFiBeaconLostCount, count)); + + count -= mBeaconLostCount; + VerifyOrReturnError(count <= UINT32_MAX, CHIP_ERROR_INVALID_INTEGER_VALUE); + beaconLostCount = static_cast(count); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiCurrentMaxRate(uint64_t & currentMaxRate) +{ + cy_rslt_t result = CY_RSLT_SUCCESS; + cy_wcm_wlan_statistics_t stats; + CHIP_ERROR err = CHIP_NO_ERROR; + uint64_t count; + + result = cy_wcm_get_wlan_statistics(CY_WCM_INTERFACE_TYPE_STA, &stats); + if (result != CY_RSLT_SUCCESS) + { + ChipLogError(DeviceLayer, "cy_wcm_get_wlan_statistics failed: %d", (int) result); + SuccessOrExit(CHIP_ERROR_INTERNAL); + } + count = stats.tx_bitrate * PHYRATE_KPBS_BYTES_PER_SEC; + currentMaxRate = static_cast(count); + +exit: + return err; +} + +CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiPacketMulticastRxCount(uint32_t & packetMulticastRxCount) +{ + uint64_t count; + ReturnErrorOnFailure(WiFiCounters(WiFiStatsCountType::kWiFiMulticastPacketRxCount, count)); + + count -= mPacketMulticastRxCount; + VerifyOrReturnError(count <= UINT32_MAX, CHIP_ERROR_INVALID_INTEGER_VALUE); + packetMulticastRxCount = static_cast(count); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiPacketMulticastTxCount(uint32_t & packetMulticastTxCount) +{ + uint64_t count; + ReturnErrorOnFailure(WiFiCounters(WiFiStatsCountType::kWiFiMulticastPacketTxCount, count)); + + count -= mPacketMulticastTxCount; + VerifyOrReturnError(count <= UINT32_MAX, CHIP_ERROR_INVALID_INTEGER_VALUE); + packetMulticastTxCount = static_cast(count); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiPacketUnicastRxCount(uint32_t & packetUnicastRxCount) +{ + cy_rslt_t result = CY_RSLT_SUCCESS; + cy_wcm_wlan_statistics_t stats; + CHIP_ERROR err = CHIP_NO_ERROR; + uint64_t count; + + result = cy_wcm_get_wlan_statistics(CY_WCM_INTERFACE_TYPE_STA, &stats); + if (result != CY_RSLT_SUCCESS) + { + ChipLogError(DeviceLayer, "cy_wcm_get_wlan_statistics failed: %d", (int) result); + SuccessOrExit(CHIP_ERROR_INTERNAL); + } + count = stats.rx_packets; + count -= mPacketUnicastRxCount; + VerifyOrReturnError(count <= UINT32_MAX, CHIP_ERROR_INVALID_INTEGER_VALUE); + + packetUnicastRxCount = static_cast(count); + +exit: + return err; +} + +CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiPacketUnicastTxCount(uint32_t & packetUnicastTxCount) +{ + cy_rslt_t result = CY_RSLT_SUCCESS; + cy_wcm_wlan_statistics_t stats; + CHIP_ERROR err = CHIP_NO_ERROR; + uint64_t count; + + result = cy_wcm_get_wlan_statistics(CY_WCM_INTERFACE_TYPE_STA, &stats); + if (result != CY_RSLT_SUCCESS) + { + ChipLogError(DeviceLayer, "cy_wcm_get_wlan_statistics failed: %d", (int) result); + SuccessOrExit(CHIP_ERROR_INTERNAL); + } + + count = stats.tx_packets; + count -= mPacketUnicastTxCount; + VerifyOrReturnError(count <= UINT32_MAX, CHIP_ERROR_INVALID_INTEGER_VALUE); + + packetUnicastTxCount = static_cast(count); + +exit: + return err; +} + +CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiOverrunCount(uint64_t & overrunCount) +{ + uint64_t count; + ReturnErrorOnFailure(WiFiCounters(WiFiStatsCountType::kWiFiOverrunCount, count)); + + count -= mOverrunCount; + VerifyOrReturnError(count <= UINT32_MAX, CHIP_ERROR_INVALID_INTEGER_VALUE); + overrunCount = static_cast(count); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR DiagnosticDataProviderImpl::ResetWiFiNetworkDiagnosticsCounts() +{ + uint64_t count; + return WiFiCounters(WiFiStatsCountType::kWiFiResetCount, count); +} + +void DiagnosticDataProviderImpl::ReadCounters(WiFiStatsCountType Counttype, uint64_t & count, wl_cnt_ver_30_t * cnt, + wl_cnt_ge40mcst_v1_t * cnt_ge40) +{ + if ((!cnt) || (!cnt_ge40)) + { + ChipLogError(DeviceLayer, "ReadCounters failed due to NULL Pointers passed"); + return; + } + /* Populate count based in the Counttype */ + switch (Counttype) + { + case WiFiStatsCountType::kWiFiUnicastPacketRxCount: + count = cnt->rxfrag; + break; + case WiFiStatsCountType::kWiFiUnicastPacketTxCount: + count = cnt->txfrag; + break; + case WiFiStatsCountType::kWiFiMulticastPacketRxCount: + count = cnt->rxmulti; + break; + case WiFiStatsCountType::kWiFiMulticastPacketTxCount: + count = cnt->txmulti; + break; + case WiFiStatsCountType::kWiFiOverrunCount: + count = cnt->txnobuf + cnt->rxnobuf; + break; + case WiFiStatsCountType::kWiFiBeaconLostCount: + count = cnt_ge40->missbcn_dbg; + break; + case WiFiStatsCountType::kWiFiBeaconRxCount: + count = cnt_ge40->rxbeaconmbss; + break; + /* Update below variables during reset counts command so that next count read will be + * starting from these values. + */ + case WiFiStatsCountType::kWiFiResetCount: + mBeaconRxCount = cnt_ge40->rxbeaconmbss; + mBeaconLostCount = cnt_ge40->missbcn_dbg; + mPacketMulticastRxCount = cnt->rxmulti; + mPacketMulticastTxCount = cnt->txmulti; + mPacketUnicastRxCount = cnt->rxfrag; + mPacketUnicastTxCount = cnt->txfrag; + mOverrunCount = cnt->txnobuf + cnt->rxnobuf; + break; + default: + ChipLogError(DeviceLayer, "ReadCounters type not handled : %d", (int) Counttype); + break; + } +} +void DiagnosticDataProviderImpl::xtlv_buffer_parsing(const uint8_t * tlv_buf, uint16_t buflen, WiFiStatsCountType Counttype, + uint64_t & count) +{ + wl_cnt_ver_30_t cnt; + wl_cnt_ge40mcst_v1_t cnt_ge40; + + /* parse the tlv buffer and populate the cnt and cnt_ge40 buffer with the counter values */ + Internal::P6Utils::unpack_xtlv_buf(tlv_buf, buflen, &cnt, &cnt_ge40); + + /* Read the counter based on the Counttype passed */ + ReadCounters(Counttype, count, &cnt, &cnt_ge40); + return; +} + +CHIP_ERROR DiagnosticDataProviderImpl::WiFiCounters(WiFiStatsCountType type, uint64_t & count) +{ + whd_buffer_t buffer; + whd_buffer_t response; + wl_cnt_info_t * wl_cnt_info = NULL; + CHIP_ERROR err = CHIP_NO_ERROR; + + /* Read wl counters iovar using WHD APIs */ + whd_cdc_get_iovar_buffer(whd_ifs[CY_WCM_INTERFACE_TYPE_STA]->whd_driver, &buffer, WLC_IOCTL_MEDLEN, IOVAR_STR_COUNTERS); + whd_cdc_send_iovar(whd_ifs[CY_WCM_INTERFACE_TYPE_STA], CDC_GET, buffer, &response); + wl_cnt_info = + (wl_cnt_info_t *) whd_buffer_get_current_piece_data_pointer(whd_ifs[CY_WCM_INTERFACE_TYPE_STA]->whd_driver, response); + + /* Parse the buffer only for Counter Version 30 */ + if (wl_cnt_info->version == WL_CNT_VER_30) + { + /* 43012 board - Process xtlv buffer data to get statistics */ + uint8_t * cntdata; + cntdata = (uint8_t *) malloc(wl_cnt_info->datalen); + + CHK_CNTBUF_DATALEN(wl_cnt_info, WLC_IOCTL_MEDLEN); + if (cntdata == NULL) + { + return CHIP_ERROR_INTERNAL; + } + /* Allocate the memory for buffer */ + memcpy(cntdata, wl_cnt_info->data, wl_cnt_info->datalen); + + /* parse the xtlv wl counters data */ + xtlv_buffer_parsing(cntdata, wl_cnt_info->datalen, type, count); + + /* Free the memory */ + free(cntdata); + } + return err; +} + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/P6/DiagnosticDataProviderImpl.h b/src/platform/P6/DiagnosticDataProviderImpl.h index 731f445fec8671..b15456ebc8351b 100644 --- a/src/platform/P6/DiagnosticDataProviderImpl.h +++ b/src/platform/P6/DiagnosticDataProviderImpl.h @@ -22,7 +22,34 @@ #pragma once +#include + +#include "whd.h" +#include "whd_buffer_api.h" +#include "whd_network_types.h" +#include "whd_wifi_api.h" +#include "whd_wlioctl.h" +#include #include +#include + +#define PHYRATE_KPBS_BYTES_PER_SEC 125 + +/* WiFi Counters */ +enum class WiFiStatsCountType +{ + kWiFiBeaconLostCount, + kWiFiBeaconRxCount, + kWiFiUnicastPacketRxCount, + kWiFiUnicastPacketTxCount, + kWiFiMulticastPacketRxCount, + kWiFiMulticastPacketTxCount, + kWiFiOverrunCount, + kWiFiResetCount +}; + +#define MAX_WHD_INTERFACE (2) +extern whd_interface_t whd_ifs[MAX_WHD_INTERFACE]; namespace chip { namespace DeviceLayer { @@ -34,6 +61,56 @@ class DiagnosticDataProviderImpl : public DiagnosticDataProvider { public: static DiagnosticDataProviderImpl & GetDefaultInstance(); + + // ===== Methods that implement the PlatformManager abstract interface. + + CHIP_ERROR GetCurrentHeapFree(uint64_t & currentHeapFree) override; + CHIP_ERROR GetCurrentHeapUsed(uint64_t & currentHeapUsed) override; + CHIP_ERROR GetCurrentHeapHighWatermark(uint64_t & currentHeapHighWatermark) override; + + CHIP_ERROR GetRebootCount(uint16_t & rebootCount) override; + CHIP_ERROR GetUpTime(uint64_t & upTime) override; + CHIP_ERROR GetTotalOperationalHours(uint32_t & totalOperationalHours) override; + CHIP_ERROR GetBootReason(uint8_t & bootReason) override; + CHIP_ERROR GetNetworkInterfaces(NetworkInterface ** netifpp) override; + void ReleaseNetworkInterfaces(NetworkInterface * netifp) override; + + CHIP_ERROR GetWiFiBssId(ByteSpan & BssId) override; + CHIP_ERROR GetWiFiSecurityType(uint8_t & securityType) override; + CHIP_ERROR GetWiFiVersion(uint8_t & wifiVersion) override; + CHIP_ERROR GetWiFiChannelNumber(uint16_t & channelNumber) override; + CHIP_ERROR GetWiFiRssi(int8_t & rssi) override; + CHIP_ERROR GetWiFiBeaconRxCount(uint32_t & beaconRxCount) override; + CHIP_ERROR GetWiFiBeaconLostCount(uint32_t & beaconLostCount) override; + CHIP_ERROR GetWiFiPacketMulticastRxCount(uint32_t & packetMulticastRxCount) override; + CHIP_ERROR GetWiFiPacketMulticastTxCount(uint32_t & packetMulticastTxCount) override; + CHIP_ERROR GetWiFiPacketUnicastRxCount(uint32_t & packetUnicastRxCount) override; + CHIP_ERROR GetWiFiPacketUnicastTxCount(uint32_t & packetUnicastTxCount) override; + CHIP_ERROR GetWiFiCurrentMaxRate(uint64_t & currentMaxRate) override; + CHIP_ERROR GetWiFiOverrunCount(uint64_t & overrunCount) override; + CHIP_ERROR ResetWiFiNetworkDiagnosticsCounts() override; + CHIP_ERROR WiFiCounters(WiFiStatsCountType type, uint64_t & count); + void xtlv_buffer_parsing(const uint8_t * tlv_buf, uint16_t buflen, WiFiStatsCountType Counttype, uint64_t & count); + void ReadCounters(WiFiStatsCountType Counttype, uint64_t & count, wl_cnt_ver_30_t * cnt, wl_cnt_ge40mcst_v1_t * cnt_ge40); + /* Function to update ipv4 and ipv6 off premise service capability bit */ + void UpdateoffPremiseService(bool ipv4service, bool ipv6service); + /* These variables will be set to 0 during start up and will be updated when reset-counts + * zcl command is received. + * These are considered as base for below attributes of WiFi Diagnostics Cluster: + * BeaconLostCount, BeaconRxCount, PacketMulticastRxCount, PacketMulticastTxCount, + * PacketUnicastRxCount, PacketUnicastTxCount, OverrunCount. + * Each attributes read will be difference of WLAN counters minus equivalent variables below. + */ + uint32_t mBeaconRxCount = 0; + uint32_t mBeaconLostCount = 0; + uint32_t mPacketMulticastRxCount = 0; + uint32_t mPacketMulticastTxCount = 0; + uint32_t mPacketUnicastRxCount = 0; + uint32_t mPacketUnicastTxCount = 0; + uint64_t mOverrunCount = 0; + uint8_t mWiFiMacAddress[CY_WCM_MAC_ADDR_LEN]; + bool mipv4_offpremise = false; + bool mipv6_offpremise = false; }; } // namespace DeviceLayer diff --git a/src/platform/P6/KeyValueStoreManagerImpl.cpp b/src/platform/P6/KeyValueStoreManagerImpl.cpp index 13b09abc32b4d3..2cbda30f38dd7f 100644 --- a/src/platform/P6/KeyValueStoreManagerImpl.cpp +++ b/src/platform/P6/KeyValueStoreManagerImpl.cpp @@ -34,10 +34,12 @@ namespace PersistedStorage { KeyValueStoreManagerImpl KeyValueStoreManagerImpl::sInstance; -KeyValueStoreManagerImpl::KeyValueStoreManagerImpl() +CHIP_ERROR KeyValueStoreManagerImpl::Init() { cy_rslt_t result = mtb_key_value_store_init(&kvstore_obj); init_success = (CY_RSLT_SUCCESS == result) ? true : false; + + return ConvertCyResultToChip(result); } CHIP_ERROR KeyValueStoreManagerImpl::_Get(const char * key, void * value, size_t value_size, size_t * read_bytes_size, diff --git a/src/platform/P6/KeyValueStoreManagerImpl.h b/src/platform/P6/KeyValueStoreManagerImpl.h index fb8b62c735fc4d..29515f28218c67 100644 --- a/src/platform/P6/KeyValueStoreManagerImpl.h +++ b/src/platform/P6/KeyValueStoreManagerImpl.h @@ -37,7 +37,7 @@ class KeyValueStoreManagerImpl final : public KeyValueStoreManager friend class KeyValueStoreManager; public: - KeyValueStoreManagerImpl(); + CHIP_ERROR Init(); CHIP_ERROR _Get(const char * key, void * value, size_t value_size, size_t * read_bytes_size = nullptr, size_t offset = 0) const; CHIP_ERROR _Delete(const char * key); CHIP_ERROR _Put(const char * key, const void * value, size_t value_size); diff --git a/src/platform/P6/P6Config.cpp b/src/platform/P6/P6Config.cpp index 51665960ee91d3..71194b6ac4011f 100644 --- a/src/platform/P6/P6Config.cpp +++ b/src/platform/P6/P6Config.cpp @@ -71,6 +71,11 @@ const P6Config::Key P6Config::kConfigKey_LastUsedEpochKeyId = { kConfigNamespace const P6Config::Key P6Config::kConfigKey_FailSafeArmed = { kConfigNamespace_ChipConfig, "fail-safe-armed" }; const P6Config::Key P6Config::kConfigKey_WiFiStationSecType = { kConfigNamespace_ChipConfig, "sta-sec-type" }; +// Keys stored in the Chip-counters namespace +const P6Config::Key P6Config::kCounterKey_RebootCount = { kConfigNamespace_ChipCounters, "reboot-count" }; +const P6Config::Key P6Config::kCounterKey_UpTime = { kConfigNamespace_ChipCounters, "up-time" }; +const P6Config::Key P6Config::kCounterKey_TotalOperationalHours = { kConfigNamespace_ChipCounters, "total-hours" }; + // Prefix used for keys that contain Chip group encryption keys. const char P6Config::kGroupKeyNamePrefix[] = "gk-"; diff --git a/src/platform/P6/P6Config.h b/src/platform/P6/P6Config.h index 280a6d7217d2f7..7acfb5e13a5f07 100644 --- a/src/platform/P6/P6Config.h +++ b/src/platform/P6/P6Config.h @@ -75,6 +75,9 @@ class P6Config static const Key kConfigKey_RegulatoryLocation; static const Key kConfigKey_CountryCode; static const Key kConfigKey_Breadcrumb; + static const Key kCounterKey_RebootCount; + static const Key kCounterKey_UpTime; + static const Key kCounterKey_TotalOperationalHours; static const char kGroupKeyNamePrefix[]; diff --git a/src/platform/P6/P6Utils.cpp b/src/platform/P6/P6Utils.cpp index 578c47b12be065..3e08a3e6becddc 100644 --- a/src/platform/P6/P6Utils.cpp +++ b/src/platform/P6/P6Utils.cpp @@ -42,6 +42,7 @@ #include "lwip/sockets.h" #include "lwip/sys.h" #include "lwip/timeouts.h" +#include using namespace ::chip::DeviceLayer::Internal; using chip::DeviceLayer::Internal::DeviceNetworkInfo; @@ -675,3 +676,130 @@ CHIP_ERROR P6Utils::ping_init(void) } return err; } + +static int xtlv_hdr_size(uint16_t opts, const uint8_t ** data) +{ + int len = (int) OFFSETOF(xtlv_t, data); /* nominal */ + if (opts & XTLV_OPTION_LENU8) + { + --len; + } + if (opts & XTLV_OPTION_IDU8) + { + --len; + } + return len; +} + +static int xtlv_size_for_data(int dlen, uint16_t opts, const uint8_t ** data) +{ + int hsz; + hsz = xtlv_hdr_size(opts, data); + return ((opts & XTLV_OPTION_ALIGN32) ? ALIGN_SIZE(dlen + hsz, 4) : (dlen + hsz)); +} + +static int xtlv_len(const xtlv_t * elt, uint16_t opts) +{ + const uint8_t * lenp; + int len; + + lenp = (const uint8_t *) &elt->len; /* nominal */ + if (opts & XTLV_OPTION_IDU8) + { + --lenp; + } + if (opts & XTLV_OPTION_LENU8) + { + len = *lenp; + } + else + { + len = _LTOH16_UA(lenp); + } + return len; +} + +static int xtlv_id(const xtlv_t * elt, uint16_t opts) +{ + int id = 0; + if (opts & XTLV_OPTION_IDU8) + { + id = *(const uint8_t *) elt; + } + else + { + id = _LTOH16_UA((const uint8_t *) elt); + } + return id; +} + +static void xtlv_unpack_xtlv(const xtlv_t * xtlv, uint16_t * type, uint16_t * len, const uint8_t ** data, uint16_t opts) +{ + if (type) + { + *type = (uint16_t) xtlv_id(xtlv, opts); + } + if (len) + { + *len = (uint16_t) xtlv_len(xtlv, opts); + } + if (data) + { + *data = (const uint8_t *) xtlv + xtlv_hdr_size(opts, data); + } +} + +void P6Utils::unpack_xtlv_buf(const uint8_t * tlv_buf, uint16_t buflen, wl_cnt_ver_30_t * cnt, wl_cnt_ge40mcst_v1_t * cnt_ge40) +{ + uint16_t len; + uint16_t type; + int size; + const xtlv_t * ptlv; + int sbuflen = buflen; + const uint8_t * data; + int hdr_size; + hdr_size = xtlv_hdr_size(XTLV_OPTION_ALIGN32, &data); + while (sbuflen >= hdr_size) + { + ptlv = (const xtlv_t *) tlv_buf; + + xtlv_unpack_xtlv(ptlv, &type, &len, &data, XTLV_OPTION_ALIGN32); + size = xtlv_size_for_data(len, XTLV_OPTION_ALIGN32, &data); + + sbuflen -= size; + if (sbuflen < 0) /* check for buffer overrun */ + { + break; + } + if (type == 0x100) + { + memcpy(cnt, (wl_cnt_ver_30_t *) data, sizeof(wl_cnt_ver_30_t)); + } + if (type == 0x400) + { + memcpy(cnt_ge40, (wl_cnt_ge40mcst_v1_t *) data, sizeof(wl_cnt_ge40mcst_v1_t)); + } + tlv_buf += size; + } +} + +/* Get the Heap total size for P6 Linker file */ +uint32_t get_heap_total() +{ + extern uint8_t __HeapBase; /* Symbol exported by the linker. */ + extern uint8_t __HeapLimit; /* Symbol exported by the linker. */ + + uint8_t * heap_base = (uint8_t *) &__HeapBase; + uint8_t * heap_limit = (uint8_t *) &__HeapLimit; + return (uint32_t)(heap_limit - heap_base); +} + +/* Populate Heap info based on heap total size and Current Heap usage */ +void P6Utils::heap_usage(heap_info_t * heap) +{ + struct mallinfo mall_info = mallinfo(); + + heap->HeapMax = mall_info.arena; + heap->HeapUsed = mall_info.uordblks; + heap->HeapFree = get_heap_total() - mall_info.uordblks; +} diff --git a/src/platform/P6/P6Utils.h b/src/platform/P6/P6Utils.h index d7850735c53372..62afdabdc411ec 100644 --- a/src/platform/P6/P6Utils.h +++ b/src/platform/P6/P6Utils.h @@ -20,6 +20,7 @@ #pragma once #include "platform/internal/DeviceNetworkInfo.h" +#include "whd_wlioctl.h" #include #include @@ -63,6 +64,123 @@ typedef enum WIFI_IF_STA_AP = CY_WCM_INTERFACE_TYPE_AP_STA, } wifi_interface_t; +/** MACSTAT counters for ucode (corerev >= 40) */ +typedef struct +{ + /* MAC counters: 32-bit version of d11.h's macstat_t */ + uint32 txallfrm; /**< total number of frames sent, incl. Data, ACK, RTS, CTS, + * Control Management (includes retransmissions) + */ + uint32 txrtsfrm; /**< number of RTS sent out by the MAC */ + uint32 txctsfrm; /**< number of CTS sent out by the MAC */ + uint32 txackfrm; /**< number of ACK frames sent out */ + uint32 txdnlfrm; /**< number of Null-Data transmission generated from template */ + uint32 txbcnfrm; /**< beacons transmitted */ + uint32 txfunfl[6]; /**< per-fifo tx underflows */ + uint32 txampdu; /**< number of AMPDUs transmitted */ + uint32 txmpdu; /**< number of MPDUs transmitted */ + uint32 txtplunfl; /**< Template underflows (mac was too slow to transmit ACK/CTS + * or BCN) + */ + uint32 txphyerror; /**< Transmit phy error, type of error is reported in tx-status for + * driver enqueued frames + */ + uint32 pktengrxducast; /**< unicast frames rxed by the pkteng code */ + uint32 pktengrxdmcast; /**< multicast frames rxed by the pkteng code */ + uint32 rxfrmtoolong; /**< Received frame longer than legal limit (2346 bytes) */ + uint32 rxfrmtooshrt; /**< Received frame did not contain enough bytes for its frame type */ + uint32 rxanyerr; /**< Any RX error that is not counted by other counters. */ + uint32 rxbadfcs; /**< number of frames for which the CRC check failed in the MAC */ + uint32 rxbadplcp; /**< parity check of the PLCP header failed */ + uint32 rxcrsglitch; /**< PHY was able to correlate the preamble but not the header */ + uint32 rxstrt; /**< Number of received frames with a good PLCP + * (i.e. passing parity check) + */ + uint32 rxdtucastmbss; /**< number of received DATA frames with good FCS and matching RA */ + uint32 rxmgucastmbss; /**< number of received mgmt frames with good FCS and matching RA */ + uint32 rxctlucast; /**< number of received CNTRL frames with good FCS and matching RA */ + uint32 rxrtsucast; /**< number of unicast RTS addressed to the MAC (good FCS) */ + uint32 rxctsucast; /**< number of unicast CTS addressed to the MAC (good FCS) */ + uint32 rxackucast; /**< number of ucast ACKS received (good FCS) */ + uint32 rxdtocast; /**< number of received DATA frames (good FCS and not matching RA) */ + uint32 rxmgocast; /**< number of received MGMT frames (good FCS and not matching RA) */ + uint32 rxctlocast; /**< number of received CNTRL frame (good FCS and not matching RA) */ + uint32 rxrtsocast; /**< number of received RTS not addressed to the MAC */ + uint32 rxctsocast; /**< number of received CTS not addressed to the MAC */ + uint32 rxdtmcast; /**< number of RX Data multicast frames received by the MAC */ + uint32 rxmgmcast; /**< number of RX Management multicast frames received by the MAC */ + uint32 rxctlmcast; /**< number of RX Control multicast frames received by the MAC + * (unlikely to see these) + */ + uint32 rxbeaconmbss; /**< beacons received from member of BSS */ + uint32 rxdtucastobss; /**< number of unicast frames addressed to the MAC from + * other BSS (WDS FRAME) + */ + uint32 rxbeaconobss; /**< beacons received from other BSS */ + uint32 rxrsptmout; /**< number of response timeouts for transmitted frames + * expecting a response + */ + uint32 bcntxcancl; /**< transmit beacons canceled due to receipt of beacon (IBSS) */ + uint32 rxnodelim; /**< number of no valid delimiter detected by ampdu parser */ + uint32 rxf0ovfl; /**< number of receive fifo 0 overflows */ + uint32 rxf1ovfl; /**< number of receive fifo 1 overflows */ + uint32 rxhlovfl; /**< number of length / header fifo overflows */ + uint32 missbcn_dbg; /**< number of beacon missed to receive */ + uint32 pmqovfl; /**< number of PMQ overflows */ + uint32 rxcgprqfrm; /**< number of received Probe requests that made it into + * the PRQ fifo + */ + uint32 rxcgprsqovfl; /**< Rx Probe Request Que overflow in the AP */ + uint32 txcgprsfail; /**< Tx Probe Response Fail. AP sent probe response but did + * not get ACK + */ + uint32 txcgprssuc; /**< Tx Probe Response Success (ACK was received) */ + uint32 prs_timeout; /**< number of probe requests that were dropped from the PRQ + * fifo because a probe response could not be sent out within + * the time limit defined in M_PRS_MAXTIME + */ + uint32 txrtsfail; /**< number of rts transmission failure that reach retry limit */ + uint32 txucast; /**< number of unicast tx expecting response other than cts/cwcts */ + uint32 txinrtstxop; /**< number of data frame transmissions during rts txop */ + uint32 rxback; /**< blockack rxcnt */ + uint32 txback; /**< blockack txcnt */ + uint32 bphy_rxcrsglitch; /**< PHY count of bphy glitches */ + uint32 rxdrop20s; /**< drop secondary cnt */ + uint32 rxtoolate; /**< receive too late */ + uint32 bphy_badplcp; /**< number of bad PLCP reception on BPHY rate */ + /* XXX: All counter variables have to be of uint32. */ +} wl_cnt_ge40mcst_v1_t; + +typedef struct xtlv +{ + uint16_t id; + uint16_t len; + uint8_t data[1]; +} xtlv_t; + +#define WL_CNT_VER_30 (30) + +/* XTLV Format parsing for wl counters support */ +#define XTLV_OPTION_ALIGN32 0x0001 /* 32bit alignment of type.len.data */ +#define XTLV_OPTION_IDU8 0x0002 /* shorter id */ +#define XTLV_OPTION_LENU8 0x0004 /* shorted length */ +#define OFFSETOF(type, member) ((uintptr_t) & ((type *) 0)->member) +#define _LTOH16_UA(cp) ((cp)[0] | ((cp)[1] << 8)) + +#define CHK_CNTBUF_DATALEN(cntbuf, ioctl_buflen) \ + do \ + { \ + if (((wl_cnt_info_t *) cntbuf)->datalen + OFFSETOF(wl_cnt_info_t, data) > ioctl_buflen) \ + printf("%s: IOVAR buffer short!\n", __FUNCTION__); \ + } while (0) + +typedef struct heap_info +{ + size_t HeapMax; + size_t HeapUsed; + size_t HeapFree; +} heap_info_t; + namespace chip { namespace DeviceLayer { namespace Internal { @@ -98,6 +216,8 @@ class P6Utils const cy_wcm_passphrase_t * password, cy_wcm_security_t security = CY_WCM_SECURITY_OPEN); static CHIP_ERROR OnIPAddressAvailable(void); static CHIP_ERROR ping_init(void); + static void unpack_xtlv_buf(const uint8_t * tlv_buf, uint16_t buflen, wl_cnt_ver_30_t * cnt, wl_cnt_ge40mcst_v1_t * cnt_ge40); + static void heap_usage(heap_info_t * heap); }; } // namespace Internal diff --git a/src/platform/P6/PlatformManagerImpl.cpp b/src/platform/P6/PlatformManagerImpl.cpp index 24272b1dae6b89..0ff0ce3a29f6c1 100644 --- a/src/platform/P6/PlatformManagerImpl.cpp +++ b/src/platform/P6/PlatformManagerImpl.cpp @@ -50,6 +50,8 @@ CHIP_ERROR PlatformManagerImpl::_InitChipStack(void) err = Internal::InitLwIPCoreLock(); SuccessOrExit(err); + mStartTime = System::SystemClock().GetMonotonicTimestamp(); + // Call _InitChipStack() on the generic implementation base class // to finish the initialization process. err = Internal::GenericPlatformManagerImpl_FreeRTOS::_InitChipStack(); @@ -64,5 +66,30 @@ CHIP_ERROR PlatformManagerImpl::InitLwIPCoreLock(void) return Internal::InitLwIPCoreLock(); } +CHIP_ERROR PlatformManagerImpl::_Shutdown() +{ + uint64_t upTime = 0; + + if (GetDiagnosticDataProvider().GetUpTime(upTime) == CHIP_NO_ERROR) + { + uint32_t totalOperationalHours = 0; + + if (ConfigurationMgr().GetTotalOperationalHours(totalOperationalHours) == CHIP_NO_ERROR) + { + ConfigurationMgr().StoreTotalOperationalHours(totalOperationalHours + static_cast(upTime / 3600)); + } + else + { + ChipLogError(DeviceLayer, "Failed to get total operational hours of the Node"); + } + } + else + { + ChipLogError(DeviceLayer, "Failed to get current uptime since the Node’s last reboot"); + } + + return Internal::GenericPlatformManagerImpl_FreeRTOS::_Shutdown(); +} + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/P6/PlatformManagerImpl.h b/src/platform/P6/PlatformManagerImpl.h index 8f3559bd80b3d4..f7c56ac435097c 100644 --- a/src/platform/P6/PlatformManagerImpl.h +++ b/src/platform/P6/PlatformManagerImpl.h @@ -49,17 +49,21 @@ class PlatformManagerImpl final : public PlatformManager, public Internal::Gener // ===== Platform-specific members that may be accessed directly by the application. CHIP_ERROR InitLwIPCoreLock(void); + System::Clock::Timestamp GetStartTime() { return mStartTime; } private: // ===== Methods that implement the PlatformManager abstract interface. CHIP_ERROR _InitChipStack(void); + CHIP_ERROR _Shutdown(); // ===== Members for internal use by the following friends. friend PlatformManager & PlatformMgr(void); friend PlatformManagerImpl & PlatformMgrImpl(void); + System::Clock::Timestamp mStartTime = System::Clock::kZero; + static PlatformManagerImpl sInstance; }; From 43cdf4f08d48a62f7a9531dfc34762a2df16c268 Mon Sep 17 00:00:00 2001 From: Artur Tynecki <77382963+ATmobica@users.noreply.github.com> Date: Tue, 30 Nov 2021 04:28:01 +0100 Subject: [PATCH 18/42] [Mbed] Add integration tests for example applications (#12039) * Move mbed unit test to test_driver/mbed/unit_test directory Add integration test dir and files Cahnge unit test path in launch.json, task.json and mbed_unit_tests.sh * Add pytest and mbed-ls to pigweed env * Fix realpath in unit_test Cmake file * Improve serial data parsing Update lock and lightings apps smoke tests * Add network fixture Add utlis file with common ble and wifi functions Add wifi provisioning test * Remove device_controller fixture is singleton al all Update wifi provisioning tests * Move unit test README file to right directory Add Pigweed-app integration test and pigweed client * Add shell app tests Improve unit tests check * Add RPC tests to lock and lighting apps * Add wlan access point class - run Wi-Fi AP Add access point as fixture Use AP in shell wifi connect test * Fix wlan AP * Improve BoardAllocator - checking connected device Improve unit-test checking * Add mount new mbed device script * Add close ble connection * Add wait for wifi connection log and close ble to wifi provisioning tests * Remove serial device warnings * Improve lock-app test and refactor to get more common functions * Improve lighting-app tests Cleanup lock-app and shell tests * Lock, ligthing and shell apps tests improvements Change log sfor ZCL command send * Changes restyle Remove redundant changes Remove acces point class - not ready to merge Code cleanup * Add integration tests README file Improve relative paths in unit test README file * Improve spelling * Add new .wordlist exceptions * Restore 40s timeout for session establishment in device controller * Add resolve step in wifi_provisioning tests * Improve lock and light control tests add wifi provisioning and resolve node steps * Changes restyle --- .github/.wordlist.txt | 5 + .vscode/launch.json | 8 +- .vscode/tasks.json | 2 +- scripts/constraints.txt | 86 ++++- scripts/requirements.mbed.txt | 3 +- scripts/tests/mbed/mbed_unit_tests.sh | 2 +- scripts/tests/mbed/mount_new_mbed_device.sh | 36 +++ .../mbed/integration_tests/README.md | 234 ++++++++++++++ .../mbed/integration_tests/common/__init__.py | 0 .../mbed/integration_tests/common/device.py | 118 +++++++ .../mbed/integration_tests/common/fixtures.py | 137 ++++++++ .../common/pigweed_client.py | 45 +++ .../common/serial_connection.py | 128 ++++++++ .../integration_tests/common/serial_device.py | 119 +++++++ .../mbed/integration_tests/common/utils.py | 295 ++++++++++++++++++ .../mbed/integration_tests/conftest.py | 34 ++ .../lighting-app/__init__.py | 0 .../lighting-app/test_app.py | 223 +++++++++++++ .../integration_tests/lock-app/__init__.py | 0 .../integration_tests/lock-app/test_app.py | 214 +++++++++++++ .../integration_tests/pigweed-app/__init__.py | 0 .../integration_tests/pigweed-app/test_app.py | 39 +++ .../mbed/integration_tests/pytest.ini | 7 + .../mbed/integration_tests/shell/__init__.py | 0 .../mbed/integration_tests/shell/test_app.py | 239 ++++++++++++++ .../mbed/integration_tests/test_set.in | 5 + .../integration_tests/unit-tests/test_app.py | 33 ++ .../mbed/{ => unit_tests}/.gitignore | 0 .../mbed/{ => unit_tests}/CMakeLists.txt | 2 +- .../mbed/{ => unit_tests}/README.md | 6 +- .../mbed/{ => unit_tests}/config.in | 0 .../main/include/CHIPProjectConfig.h | 0 .../mbed/{ => unit_tests}/main/main.cpp | 0 .../mbed/{ => unit_tests}/mbed_app.json | 0 34 files changed, 1994 insertions(+), 26 deletions(-) create mode 100644 scripts/tests/mbed/mount_new_mbed_device.sh create mode 100644 src/test_driver/mbed/integration_tests/README.md create mode 100644 src/test_driver/mbed/integration_tests/common/__init__.py create mode 100644 src/test_driver/mbed/integration_tests/common/device.py create mode 100644 src/test_driver/mbed/integration_tests/common/fixtures.py create mode 100644 src/test_driver/mbed/integration_tests/common/pigweed_client.py create mode 100644 src/test_driver/mbed/integration_tests/common/serial_connection.py create mode 100644 src/test_driver/mbed/integration_tests/common/serial_device.py create mode 100644 src/test_driver/mbed/integration_tests/common/utils.py create mode 100644 src/test_driver/mbed/integration_tests/conftest.py create mode 100644 src/test_driver/mbed/integration_tests/lighting-app/__init__.py create mode 100644 src/test_driver/mbed/integration_tests/lighting-app/test_app.py create mode 100644 src/test_driver/mbed/integration_tests/lock-app/__init__.py create mode 100644 src/test_driver/mbed/integration_tests/lock-app/test_app.py create mode 100644 src/test_driver/mbed/integration_tests/pigweed-app/__init__.py create mode 100644 src/test_driver/mbed/integration_tests/pigweed-app/test_app.py create mode 100644 src/test_driver/mbed/integration_tests/pytest.ini create mode 100644 src/test_driver/mbed/integration_tests/shell/__init__.py create mode 100644 src/test_driver/mbed/integration_tests/shell/test_app.py create mode 100644 src/test_driver/mbed/integration_tests/test_set.in create mode 100644 src/test_driver/mbed/integration_tests/unit-tests/test_app.py rename src/test_driver/mbed/{ => unit_tests}/.gitignore (100%) rename src/test_driver/mbed/{ => unit_tests}/CMakeLists.txt (98%) rename src/test_driver/mbed/{ => unit_tests}/README.md (97%) rename src/test_driver/mbed/{ => unit_tests}/config.in (100%) rename src/test_driver/mbed/{ => unit_tests}/main/include/CHIPProjectConfig.h (100%) rename src/test_driver/mbed/{ => unit_tests}/main/main.cpp (100%) rename src/test_driver/mbed/{ => unit_tests}/mbed_app.json (100%) diff --git a/.github/.wordlist.txt b/.github/.wordlist.txt index 9e5d03248c6df2..11ff1b84cd8831 100644 --- a/.github/.wordlist.txt +++ b/.github/.wordlist.txt @@ -51,6 +51,7 @@ armeabi ARMmbed armv asdk +AssertionError ASYNC att attId @@ -387,6 +388,7 @@ FOTA FreeRTOS FreeRTOSConfig fsl +fstab fsync fullclean gcloud @@ -768,6 +770,7 @@ PyFunction pylint PyObject PyRun +pytest QEMU Qorvo QPG @@ -781,6 +784,7 @@ qvCHIP RADVD raspberryPi RasPi +rAv RCP ReadConfigValue readelf @@ -866,6 +870,7 @@ SLAAC SLTB SLWSTK SmartThings +smoketest SMP socat socio diff --git a/.vscode/launch.json b/.vscode/launch.json index 147053871024d8..f89d0eaf3c462b 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -192,7 +192,7 @@ "name": "Debug Mbed unit tests", "type": "cortex-debug", "request": "launch", - "cwd": "${workspaceRoot}/src/test_driver/mbed", + "cwd": "${workspaceRoot}/src/test_driver/mbed/unit_tests", "executable": "./build-${input:mbedTarget}/${input:mbedDebugProfile}/chip-mbed-unit-tests.elf", "armToolchainPath": "${env:PW_ENVIRONMENT_ROOT}/cipd/pigweed/bin/", // Pigweed environment bootstraping required "servertype": "openocd", @@ -225,7 +225,7 @@ "name": "Debug Mbed unit tests [remote]", "type": "cortex-debug", "request": "launch", - "cwd": "${workspaceRoot}/src/test_driver/mbed", + "cwd": "${workspaceRoot}/src/test_driver/mbed/unit_tests", "executable": "./build-${input:mbedTarget}/${input:mbedDebugProfile}/chip-mbed-unit-tests.elf", "armToolchainPath": "${env:PW_ENVIRONMENT_ROOT}/cipd/pigweed/bin/", // Pigweed environment bootstraping required "servertype": "external", @@ -252,7 +252,7 @@ "name": "Flash Mbed unit tests", "type": "cortex-debug", "request": "launch", - "cwd": "${workspaceRoot}/src/test_driver/mbed", + "cwd": "${workspaceRoot}/src/test_driver/mbed//unit_tests", "executable": "./build-${input:mbedTarget}/${input:mbedFlashProfile}/chip-mbed-unit-tests.elf", "armToolchainPath": "${env:PW_ENVIRONMENT_ROOT}/cipd/pigweed/bin/", // Pigweed environment bootstraping required "servertype": "openocd", @@ -277,7 +277,7 @@ "name": "Flash Mbed unit tests [remote]", "type": "cortex-debug", "request": "launch", - "cwd": "${workspaceRoot}/src/test_driver/mbed", + "cwd": "${workspaceRoot}/src/test_driver/mbed/unit_tests", "executable": "./build-${input:mbedTarget}/${input:mbedFlashProfile}/chip-mbed-unit-tests.elf", "armToolchainPath": "${env:PW_ENVIRONMENT_ROOT}/cipd/pigweed/bin/", // Pigweed environment bootstraping required "servertype": "external", diff --git a/.vscode/tasks.json b/.vscode/tasks.json index ce4fecb97314ee..fda87757b21a9c 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -167,7 +167,7 @@ "base": "$gcc", "fileLocation": [ "relative", - "${workspaceFolder}/src/test_driver/mbed/build" + "${workspaceFolder}/src/test_driver/mbed/unit_tests/build" ] } } diff --git a/scripts/constraints.txt b/scripts/constraints.txt index ed8c52b36fa478..7536963ec9345a 100644 --- a/scripts/constraints.txt +++ b/scripts/constraints.txt @@ -9,13 +9,16 @@ anytree==2.8.0 appdirs==1.4.4 # via # -r requirements.txt + # mbed-os-tools # virtualenv appnope==0.1.2 # via -r requirements.txt +attrs==21.2.0 + # via pytest backcall==0.2.0 # via ipython -bidict==0.21.2 - # via python-socketio +beautifulsoup4==4.10.0 + # via mbed-os-tools bitstring==3.1.7 # via -r requirements.esp32.txt brotli==1.0.9 @@ -29,13 +32,18 @@ chardet==4.0.0 click==7.1.2 # via # -r requirements.esp32.txt + # -r requirements.txt # flask # mbed-tools # pip-tools colorama==0.4.4 - # via west + # via + # mbed-os-tools + # west coloredlogs==15.0.1 # via -r requirements.txt +construct==2.10.54 + # via -r requirements.esp32.txt cryptography==3.4.7 # via -r requirements.esp32.txt cxxfilt==0.2.2 @@ -50,6 +58,10 @@ docopt==0.6.2 # via pykwalify ecdsa==0.17.0 # via -r requirements.esp32.txt +fastcore==1.3.26 + # via ghapi +fasteners==0.16.3 + # via mbed-os-tools filelock==3.0.12 # via virtualenv flask-compress==1.10.0 @@ -64,11 +76,14 @@ flask==0.12.5 future==0.18.2 # via # -r requirements.esp32.txt + # mbed-os-tools # mobly -gdbgui==0.13.2.0 ; platform_machine != "aarch64" +gdbgui==0.13.2.0 # via -r requirements.esp32.txt gevent==1.5.0 # via gdbgui +ghapi==0.1.19 + # via -r requirements.txt gitdb==4.0.7 # via gitpython gitpython==3.1.14 @@ -79,8 +94,12 @@ humanfriendly==9.2 # via coloredlogs idna==2.10 # via requests +iniconfig==1.1.1 + # via pytest intelhex==2.3.0 - # via -r requirements.txt + # via + # -r requirements.txt + # mbed-os-tools ipython-genutils==0.2.0 # via traitlets ipython==7.24.1 @@ -93,8 +112,14 @@ jinja2==3.0.1 # via # flask # mbed-tools +junit-xml==1.9 + # via mbed-os-tools +kconfiglib==13.7.1 + # via -r requirements.esp32.txt lockfile==0.12.2 - # via -r requirements.txt + # via + # -r requirements.txt + # mbed-os-tools mako==1.1.4 # via pdoc3 markdown==3.3.4 @@ -105,14 +130,22 @@ markupsafe==2.0.1 # mako matplotlib-inline==0.1.2 # via ipython -mbed-tools==7.22.0 +mbed-ls==1.8.11 ; platform_machine != "aarch64" and sys_platform == "linux" + # via -r requirements.mbed.txt +mbed-os-tools==1.8.11 + # via mbed-ls +mbed-tools==7.22.0 ; platform_machine != "aarch64" and sys_platform == "linux" # via -r requirements.mbed.txt mobly==1.10.1 # via -r requirements.txt numpy==1.20.3 # via pandas packaging==20.9 - # via west + # via + # fastcore + # ghapi + # pytest + # west pandas==1.2.4 ; platform_machine != "aarch64" and platform_machine != "arm64" # via -r requirements.txt parso==0.8.2 @@ -129,12 +162,16 @@ pickleshare==0.7.5 # via ipython pip-tools==6.1.0 # via -r requirements.txt +pluggy==1.0.0 + # via pytest portpicker==1.4.0 # via # -r requirements.txt # mobly -prettytable==0.7.2 - # via -r requirements.mbed.txt +prettytable==2.2.1 + # via + # mbed-ls + # mbed-os-tools prompt-toolkit==3.0.20 # via ipython protobuf==3.17.3 @@ -146,6 +183,8 @@ psutil==5.8.0 # mobly ptyprocess==0.7.0 # via pexpect +py==1.10.0 + # via pytest pycparser==2.20 # via cffi pyelftools==0.27 @@ -167,18 +206,23 @@ pyparsing==2.3.1 pyserial==3.5 # via # -r requirements.esp32.txt + # mbed-os-tools # mbed-tools # mobly +pytest==6.2.5 ; platform_machine != "aarch64" and sys_platform == "linux" + # via -r requirements.mbed.txt python-dateutil==2.8.1 # via # pandas # pykwalify python-dotenv==0.17.1 # via mbed-tools -python-engineio==4.2.0 +python-engineio==3.14.2 # via python-socketio -python-socketio<5 - # via flask-socketio +python-socketio==4.6.1 + # via + # -r requirements.esp32.txt + # flask-socketio pytz==2021.1 # via pandas pyudev==0.22.0 @@ -192,6 +236,7 @@ reedsolo==1.5.4 requests==2.25.1 # via # -r requirements.txt + # mbed-os-tools # mbed-tools ruamel.yaml.clib==0.2.2 # via ruamel.yaml @@ -201,18 +246,27 @@ six==1.16.0 # via # anytree # ecdsa + # fasteners + # junit-xml + # mbed-os-tools # protobuf # python-dateutil + # python-engineio + # python-socketio # pyudev # virtualenv smmap==4.0.0 # via gitdb +soupsieve==2.2.1 + # via beautifulsoup4 tabulate==0.8.9 # via mbed-tools timeout-decorator==0.5.0 # via mobly toml==0.10.2 - # via pep517 + # via + # pep517 + # pytest tqdm==4.61.1 # via mbed-tools traitlets==5.0.5 @@ -228,7 +282,9 @@ virtualenv==20.4.7 watchdog==2.1.2 # via -r requirements.txt wcwidth==0.2.5 - # via prompt-toolkit + # via + # prettytable + # prompt-toolkit werkzeug==0.16.1 # via flask west==0.11.0 diff --git a/scripts/requirements.mbed.txt b/scripts/requirements.mbed.txt index 0197a607c7d4b1..47907c083849eb 100644 --- a/scripts/requirements.mbed.txt +++ b/scripts/requirements.mbed.txt @@ -1,2 +1,3 @@ mbed-tools>=7.0.0 ; platform_machine != 'aarch64' and sys_platform == 'linux' -prettytable==0.7.2 ; platform_machine != 'aarch64' and sys_platform == 'linux' +pytest==6.2.5 ; platform_machine != 'aarch64' and sys_platform == 'linux' +mbed-ls==1.8.11 ; platform_machine != 'aarch64' and sys_platform == 'linux' diff --git a/scripts/tests/mbed/mbed_unit_tests.sh b/scripts/tests/mbed/mbed_unit_tests.sh index 8829f3c656c4f5..8e79635f6ed2ae 100755 --- a/scripts/tests/mbed/mbed_unit_tests.sh +++ b/scripts/tests/mbed/mbed_unit_tests.sh @@ -18,7 +18,7 @@ cd "$(dirname "$0")"/../../.. CHIP_ROOT=$PWD -cd "$CHIP_ROOT"/src/test_driver/mbed/ +cd "$CHIP_ROOT"/src/test_driver/mbed/unit_tests/ SUPPORTED_TOOLCHAIN=(GCC_ARM ARM) SUPPORTED_TARGET_BOARD=(CY8CPROTO_062_4343W) diff --git a/scripts/tests/mbed/mount_new_mbed_device.sh b/scripts/tests/mbed/mount_new_mbed_device.sh new file mode 100644 index 00000000000000..885102d1802a14 --- /dev/null +++ b/scripts/tests/mbed/mount_new_mbed_device.sh @@ -0,0 +1,36 @@ +#!/usr/bin/env bash +DIR=/dev/disk/by-id +DEVICE_CONFIG_FILE=/etc/fstab + +echo "Add new device start..." +echo "Connect your device via USB" + +res=$(inotifywait "$DIR") +if [[ ${res} != *"CREATE"* ]]; then + echo "Create new device in /dev/disk/by-id directory error" + exit 1 +fi + +new_device_id=$(echo "$res" | awk '{printf $NF}') + +if sudo cat "$DEVICE_CONFIG_FILE" | grep -q "$new_device_id"; then + echo "$new_device_id device is already set" + exit 0 +fi + +device_index=1 + +while :; do + dir_name="MBED_$device_index" + if [ ! -d /media/"$dir_name" ]; then + break + fi + + ((device_index++)) +done + +sudo mkdir -p /media/MBED_"$device_index" +line="/dev/disk/by-id/$new_device_id /media/MBED_$device_index vfat rw,user,sync,nofail,umask=007,gid=20 0 0" +echo "$line" | sudo tee -a "$DEVICE_CONFIG_FILE" + +echo "Finished" diff --git a/src/test_driver/mbed/integration_tests/README.md b/src/test_driver/mbed/integration_tests/README.md new file mode 100644 index 00000000000000..9166fbf5f27435 --- /dev/null +++ b/src/test_driver/mbed/integration_tests/README.md @@ -0,0 +1,234 @@ +

+ ARM Mbed-OS logo +

+ +

Matter Arm Mbed OS Integration Tests

+ +This page describes the Matter project's functional testing approach for Mbed +applications. It allows you to better understand the use of tools and frameworks +for target validation. + +
+ +- [Overview](#overview) +- [Setup](#setup) + - [Environment setup](#environment-setup) + - [Tools installation](#tools-installation) + - [Setup WiFi access point](#setup-wifi-access-point) + - [Mount the device](#mount-the-device) +- [Prepare device under test](#prepare-device-under-test) +- [Tests configuration](#tests-configuration) +- [Test run](#test-run) +- [Tests results](#tests-results) + +
+ +# Overview + +According to the Matter project design idea: + +_"The ability to run tests on actual and emulated hardware is paramount in +embedded projects. CHIP is no exception. We want on-device testing to be a first +class goal of CHIP architecture. On-device testing requirements apply both to +Continuous Integration testing for main CHIP software stack development and to +eventual CHIP product certification."_ + +However, functional testing requires a host machine to run and control the +testing program. Connection and data exchange between the host machine and the +device under test is necessary. Various communication interfaces and protocols +are used for this purpose (i.e serial port, network communication via Ethernet, +or WiFi). + +The common functional test scenario involves the following steps: + +- Get binaries image of testing application (build directly or download CI + artifacts) +- Flash binary image to the device under test +- Configuration functional tests +- Run testing +- Collecting and processing the results + +Matter Arm Mbed OS Integration Tests happens at system level on real hardware. +The host machine running the tests should be connected to the board under test +via serial port. The tests send a succession of commands to the connected boards +or trigger external tools action that changes the device state and asserts the +results reported by the hardware. + +For example, here is a test validating that WiFi connection works: + +**Preparation:** The device is connected to the host via serial port and +executes the shell example application. + +**The test:** + +1. Checking if the device is connected +1. Sending the command connecting with network credentials +1. Check device response +1. Check the device IP address + +The Mbed integration tests are coded in Python and use the pyTest framework. +This also allows for easy integration with external CHIP tools such as +device-controller. + +Python CHIP Controller and RPC console are required for the correct run +integration tests. + +# Setup + +## Environment setup + +The first step check out the Matter repository and sync submodules using the +following command: + + $ git submodule update --init + +Building the application requires the use of **ARM Mbed-OS** sources and the +**arm-none-gnu-eabi** toolchain. The OpenOCD package is used for flashing +purpose.
Some additional packages may be needed, depending on selected +build target and its requirements. + +> **The VSCode devcontainer has these components pre-installed. Using the VSCode +> devcontainer is the recommended way to interact with Arm Mbed-OS port of the +> Matter Project.** +> +> **Please read this [README.md](../../../../docs/VSCODE_DEVELOPMENT.md) for +> more information about using VSCode in container.** + +To initialize the development environment, download all registered sub-modules +and activate the environment: + +``` +$ source ./scripts/bootstrap.sh +$ source ./scripts/activate.sh +``` + +If packages are already installed then you just need to activate the development +environment: + +``` +$ source ./scripts/activate.sh +``` + +## Tools installation + +Python CHIP Controller and RPC console are required for the correct run +integration tests. Build and install them inside the development environment. + +For building and installing Python CHIP Controller please visit +[Python CHIP Controller](../../../../docs/guides/python_chip_controller_building.md) + +For building and installing RPC console please visit +[CHIP RPC CONSOLE](../../../../examples/common/pigweed/rpc_console/README.md) + +## Setup WiFi access point + +The way of running the WiFi access point depends on the platform on which the +tests are run. Choose the best one. Just remember the network credentials ssid +and password. + +## Mount the device + +There is a special script for the easy Mbed board mounting. It adds a static +entry in fstab with a new connected device. + +Then you can just need to call `sudo mount -a` to mount the device. + +To add the new Mbed device you should: + +1. Run script `bash src/scripts/tests/mbed/mount_new_mbed_device.sh` +2. Plug the device +3. Run `sudo mount -a` + +That's all. The new device is ready for testing. + +# Prepare device under test + +Preparation of the device for testing should consist of two steps: + +- prepare binary image - building an right application from sources +- flash binary image to device + +For more information how to build and flash example application please visit +their documentation. + +# Tests configuration + +Mbed integration tests can be configured by PyTest command line arguments. Every +test call may contain a specific test configuration. The list of supported +parameters: + +**[Common]** + +- _platforms_ - list of platforms that can be used to run the tests. Platforms + are separated by a comma +- _binaries_ - platform and associated binary in the form platform:binary. + Multiple values are separated by a comma +- _serial_inter_byte_delay_ - time in second between two bytes sent on the + serial line (accepts floats), default=None +- _serial_baudrate_ - baudrate of the serial port used, default=115200 + +**[Test specific]** + +- _network_ - WiFi network credentials to which we want to connect device. + Format network_ssid:network_password + +# Test run + +To run Mbed integration tests execute the pytest command with the arguments +mentioned above. For example: + +`pytest --platforms=CY8CPROTO_062_4343W --network=$AP_SSID:$AP_PASSWORD ... src/test_driver/mbed/integration_tests/{APP_NAME}/test_app.py` + +The Mbed integration testes cases are divided into separate directory depends on +the testing Matter application: + +- shell - testing shell commands and check base device functionalities +- lock-app - testing WiFi provisioning and execute ZCL command to control + lock, use RPC client to run base device functionalities, control lock and + trigger some button actions +- lighting-app - testing WiFi provisioning and execute ZCL command to control + light, use RPC client to run base device functionalities, control light and + trigger some button actions +- pigweed-app - use RPC client to send echo message and receive the response +- unit-tests - check unit-tests result + +For more details on how to run tests using PyTest see: +[PyTest doc](https://docs.pytest.org/en/6.2.x/usage.html) + +Pytest markers have been added to run a specific set of tests: + +- smoketest - check base communication and correct launch of the application + +# Tests results + +Adding `-rAv` arguments to Pytest cause that short tests summary is on the +output. + +For example: + +``` +pytest -rAv simple_test.py +``` + +Output: + +``` +=================================================================================================================== short test summary info ==================================================================================================================== +PASSED CHIP/src/test_driver/mbed/integration_tests/shell/test_app.py::test_smoke_test +PASSED CHIP/src/test_driver/mbed/integration_tests/shell/test_app.py::test_help_check +PASSED CHIP/src/test_driver/mbed/integration_tests/shell/test_app.py::test_log_check +PASSED CHIP/src/test_driver/mbed/integration_tests/shell/test_app.py::test_rand_check +PASSED CHIP/src/test_driver/mbed/integration_tests/shell/test_app.py::test_base64_encode_decode +FAILED CHIP/src/test_driver/mbed/integration_tests/shell/test_app.py::test_wifi_mode - AssertionError: assert 'true' == 'false' +===================================================================================================== 1 failed, 4 passed, 7 warnings in 20.71s (0:03:29) ===================================================================================================== +``` + +There is also an option to save test results to HTML file. Adding +`--html=` arguments to Pytest cause that all test results are +saved to HTML file and can be open in your browser. + +For example: + +``` +pytest --html=result.html simple_test.py +``` diff --git a/src/test_driver/mbed/integration_tests/common/__init__.py b/src/test_driver/mbed/integration_tests/common/__init__.py new file mode 100644 index 00000000000000..e69de29bb2d1d6 diff --git a/src/test_driver/mbed/integration_tests/common/device.py b/src/test_driver/mbed/integration_tests/common/device.py new file mode 100644 index 00000000000000..61879f2ca77a42 --- /dev/null +++ b/src/test_driver/mbed/integration_tests/common/device.py @@ -0,0 +1,118 @@ +# Copyright (c) 2009-2021 Arm Limited +# SPDX-License-Identifier: Apache-2.0 +# +# 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. + +import logging +import queue +from time import sleep, time +from typing import Optional + +log = logging.getLogger(__name__) + + +class Device: + + def __init__(self, name: Optional[str] = None): + """ + Base Device runner class containing device handling functions and logging + :param name: Logging name for the client + """ + self.iq = queue.Queue() + self.oq = queue.Queue() + if name is None: + self.name = str(hex(id(self))) + else: + self.name = name + + def send(self, command, expected_output=None, wait_before_read=None, wait_for_response=10, assert_output=True): + """ + Send command for client + :param command: Command + :param expected_output: Reply to wait from the client + :param wait_before_read: Timeout after write + :param wait_for_response: Timeout waiting the response + :param assert_output: Assert the fail situations to end the test run + :return: If there's expected output then the response line is returned + """ + log.debug('{}: Sending command to client: "{}"'.format( + self.name, command)) + self.flush(0) + self._write(command) + if expected_output is not None: + if wait_before_read is not None: + sleep(wait_before_read) + return self.wait_for_output(expected_output, wait_for_response, assert_output) + + def flush(self, timeout: float = 0) -> [str]: + """ + Flush the lines in the input queue + :param timeout: The timeout before flushing starts + :type timeout: float + :return: The lines removed from the input queue + :rtype: list of str + """ + sleep(timeout) + lines = [] + while True: + try: + lines.append(self._read_line(0)) + except queue.Empty: + return lines + + def wait_for_output(self, search: str, timeout: float = 10, assert_timeout: bool = True) -> [str]: + """ + Wait for expected output response + :param search: Expected response string + :type search: str + :param timeout: Response waiting time + :type timeout: float + :param assert_timeout: Assert on timeout situations + :type assert_timeout: bool + :return: Line received before a match + :rtype: list of str + """ + lines = [] + start = time() + now = 0 + timeout_error_msg = '{}: Didn\'t find {} in {} s'.format( + self.name, search, timeout) + + while time() - start <= timeout: + try: + line = self._read_line(1) + if line: + lines.append(line) + if search in line: + end = time() + return lines + + except queue.Empty: + last = now + now = time() + if now - start >= timeout: + if assert_timeout: + log.error(timeout_error_msg) + assert False, timeout_error_msg + else: + log.warning(timeout_error_msg) + return [] + if now - last > 1: + log.info('{}: Waiting for "{}" string... Timeout in {:.0f} s'.format(self.name, search, + abs(now - start - timeout))) + + def _write(self, data): + self.oq.put(data) + + def _read_line(self, timeout): + return self.iq.get(timeout=timeout) diff --git a/src/test_driver/mbed/integration_tests/common/fixtures.py b/src/test_driver/mbed/integration_tests/common/fixtures.py new file mode 100644 index 00000000000000..32f943c98a5a6f --- /dev/null +++ b/src/test_driver/mbed/integration_tests/common/fixtures.py @@ -0,0 +1,137 @@ +# Copyright (c) 2009-2021 Arm Limited +# SPDX-License-Identifier: Apache-2.0 +# +# 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. + +from typing import List, Optional, Any, Mapping + +import mbed_lstools +import pytest +from time import sleep + +from .device import Device + +from .serial_connection import SerialConnection +from .serial_device import SerialDevice + +import logging +log = logging.getLogger(__name__) + + +@pytest.fixture(scope="session") +def platforms(request): + if request.config.getoption('platforms'): + return request.config.getoption('platforms').split(',') + else: + return [ + 'CY8CPROTO_062_4343W' + ] + + +@pytest.fixture(scope="session") +def serial_inter_byte_delay(request): + if request.config.getoption('serial_inter_byte_delay'): + return float(request.config.getoption('serial_inter_byte_delay')) + return None + + +@pytest.fixture(scope="session") +def serial_baudrate(request): + if request.config.getoption('serial_baudrate'): + return int(request.config.getoption('serial_baudrate')) + return 115200 + + +@pytest.fixture(scope="session") +def network(request): + if request.config.getoption('network'): + credentials = request.config.getoption('network') + params = credentials.split(':') + return (params[0], params[1]) + return None + + +class BoardAllocation: + def __init__(self, description: Mapping[str, Any]): + self.description = description + self.device = None + + +class BoardAllocator: + def __init__(self, platforms_supported: List[str], serial_inter_byte_delay: float, baudrate: int): + mbed_ls = mbed_lstools.create(list_unmounted=True) + boards = mbed_ls.list_mbeds( + filter_function=lambda m: m['platform_name'] in platforms_supported) + self.board_description = boards + self.allocation = [] + self.serial_inter_byte_delay = serial_inter_byte_delay + self.baudrate = baudrate + for desc in boards: + self.allocation.append(BoardAllocation(desc)) + + def allocate(self, name: str = None): + for alloc in self.allocation: + if alloc.device is None: + platform = alloc.description['platform_name'] + log.info('Start {} board allocation'.format(platform)) + + # Create the serial connection + connection = SerialConnection( + port=alloc.description["serial_port"], + baudrate=self.baudrate, + inter_byte_delay=self.serial_inter_byte_delay + ) + connection.open() + + # Create the serial device + alloc.device = SerialDevice(connection, name) + alloc.device.start() + alloc.device.reset(duration=1) + alloc.device.flush(1) + + sleep(2) + + log.info('Allocate {} board as serial device'.format(platform)) + + return alloc.device + return None + + def release(self, device: Device) -> None: + for alloc in self.allocation: + if alloc.device == device and alloc.device is not None: + + # Stop activities + alloc.device.stop() + alloc.device.serial.close() + + # Cleanup + alloc.device = None + + log.info('Release {} board'.format( + alloc.description['platform_name'])) + + +@pytest.fixture(scope="session") +def board_allocator( + platforms: List[str], + serial_inter_byte_delay: float, + serial_baudrate: int, +): + yield BoardAllocator(platforms, serial_inter_byte_delay, serial_baudrate) + + +@pytest.fixture(scope="function") +def device(board_allocator): + device = board_allocator.allocate(name='DUT') + yield device + board_allocator.release(device) diff --git a/src/test_driver/mbed/integration_tests/common/pigweed_client.py b/src/test_driver/mbed/integration_tests/common/pigweed_client.py new file mode 100644 index 00000000000000..eb5c4b992e6209 --- /dev/null +++ b/src/test_driver/mbed/integration_tests/common/pigweed_client.py @@ -0,0 +1,45 @@ +# Copyright (c) 2009-2021 Arm Limited +# SPDX-License-Identifier: Apache-2.0 +# +# 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. + +import os +from pathlib import Path +import importlib + +from pw_hdlc.rpc import HdlcRpcClient, default_channels + + +class PigweedClient: + def __init__(self, device, protos): + """ + Pigweed Client class containing RPC client initialization and service functions + Create HdlcRpcCLient object and redirect serial communication to it + :param device: test device instance + :param protos: array of RPC protocols + """ + self.device = device + self.device.stop() + self.last_timeout = self.device.serial.get_timeout() + self.device.serial.set_timeout(0.01) + self._pw_rpc_client = HdlcRpcClient(lambda: self.device.serial.read(4096), + protos, default_channels(self.device.serial.write)) + self._rpcs = self._pw_rpc_client.rpcs() + + def __del__(self): + self.device.serial.set_timeout(self.last_timeout) + self.device.start() + + @property + def rpcs(self): + return self._rpcs diff --git a/src/test_driver/mbed/integration_tests/common/serial_connection.py b/src/test_driver/mbed/integration_tests/common/serial_connection.py new file mode 100644 index 00000000000000..e3a621baaad37e --- /dev/null +++ b/src/test_driver/mbed/integration_tests/common/serial_connection.py @@ -0,0 +1,128 @@ +# Copyright (c) 2009-2021 Arm Limited +# SPDX-License-Identifier: Apache-2.0 +# +# 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. + +import logging +from time import sleep + +from serial import Serial, SerialException + +log = logging.getLogger(__name__) + + +class SerialConnection: + """ + Serial Connection class containing serial connection handling functions + :param port: serial port name + :param baudrate: serial baudrate + :param timeout: serial read timeout in seconds (float) + :param inter_byte_delay: time in second between two bytes sent on the serial line (float) + """ + + def __init__(self, port=None, baudrate=9600, timeout=1, inter_byte_delay=None): + self.ser = Serial(port, baudrate, timeout=timeout) + self.inter_byte_delay = inter_byte_delay + + def open(self): + """ + Open serial port connection + """ + if not self.ser.is_open: + self.ser.open() + + def read(self, size=1): + """ + Read bytes from serial port + :return: Bytes from serial stream + """ + if not self.ser.is_open: + return None + try: + output = self.ser.read(size) + return output + except SerialException as se: + log.error('Serial connection read error: {}'.format(se)) + return None + + def readline(self): + """ + Read line from serial port + :return: One line from serial stream + """ + if not self.ser.is_open: + return None + try: + output = self.ser.readline() + return output + except SerialException as se: + log.error('Serial connection read line error: {}'.format(se)) + return None + + def write(self, data): + """ + Write data to serial port + :param data: Data to send + """ + if not self.ser.is_open: + return + try: + if self.inter_byte_delay: + for byte in data: + self.ser.write(bytes([byte])) + sleep(self.inter_byte_delay) + else: + self.ser.write(data) + except SerialException as se: + log.error('Serial connection write error: {}'.format(se)) + + def send_break(self, duration=0.25): + """ + Send break condition to serial port + :param duration: Break duration + """ + if not self.ser.is_open: + return None + try: + self.ser.send_break(duration) + except SerialException as se: + log.error('Serial connection send break error: {}'.format(se)) + + def get_timeout(self): + """ + Get read timeout of serial port + :return: Read timeout value in seconds + """ + try: + timeout = self.ser.timeout + except SerialException as se: + log.error('Serial connection get read timeout error: {}'.format(se)) + + return timeout + + def set_timeout(self, timeout=1): + """ + Set read timeout of serial port + :param timeout: timeout value in seconds + """ + try: + self.ser.timeout = timeout + except SerialException as se: + log.error('Serial connection set read timeout error: {}'.format(se)) + + def close(self): + """ + Close serial port connection + """ + log.info('Close serial port') + self.ser.close() diff --git a/src/test_driver/mbed/integration_tests/common/serial_device.py b/src/test_driver/mbed/integration_tests/common/serial_device.py new file mode 100644 index 00000000000000..4e8205e39f7783 --- /dev/null +++ b/src/test_driver/mbed/integration_tests/common/serial_device.py @@ -0,0 +1,119 @@ +# Copyright (c) 2009-2021 Arm Limited +# SPDX-License-Identifier: Apache-2.0 +# +# 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. + +import logging +import re +import threading + +from .device import Device + +log = logging.getLogger(__name__) + + +def strip_escape(string_to_escape) -> str: + """ + Strip escape characters from string. + :param string_to_escape: string to work on + :return: stripped string + """ + raw_ansi_pattern = r'\033\[((?:\d|;)*)([a-zA-Z])' + ansi_pattern = raw_ansi_pattern.encode() + ansi_eng = re.compile(ansi_pattern) + matches = [] + for match in ansi_eng.finditer(string_to_escape): + matches.append(match) + matches.reverse() + for match in matches: + start = match.start() + end = match.end() + string_to_escape = string_to_escape[0:start] + string_to_escape[end:] + return string_to_escape + + +class SerialDevice(Device): + + def __init__(self, serial_connection, name=None): + """ + Serial Device runner class containing device handling functions and logging, inherits the Device runner class + :param serial_connection: Serial connection object + :param name: Logging name for the client + """ + self.serial = serial_connection + self.run = False + super(SerialDevice, self).__init__(name) + + input_thread_name = '<-- {}'.format(self.name) + output_thread_name = '--> {}'.format(self.name) + + self.it = threading.Thread( + target=self._input_thread, name=input_thread_name) + self.ot = threading.Thread( + target=self._output_thread, name=output_thread_name) + + def reset(self, duration=0.25): + """ + Sends break to serial connection + :param duration: Break duration + """ + self.serial.send_break(duration) + + def start(self): + """ + Start the processing of the serial + """ + log.info('Starting "{}" runner...'.format(self.name)) + self.run = True + self.it.start() + self.ot.start() + log.info('"{}" runner started'.format(self.name)) + + def stop(self): + """ + Stop the processing of the serial + """ + log.info('Stopping "{}" runner...'.format(self.name)) + self.run = False + self.oq.put(None) + self.it.join() + self.ot.join() + log.info('"{}" runner stoped'.format(self.name)) + + def _input_thread(self): + while self.run: + line = self.serial.readline() + if line: + plain_line = strip_escape(line) + # Testapp uses \r to print characters to the same line, strip those and return only the last part + # If there is only one \r, don't remove anything. + if b'\r' in line and line.count(b'\r') > 1: + plain_line = plain_line.split(b'\r')[-2] + # Debug traces use tabulator characters, change those to spaces for readability + plain_line = plain_line.replace(b'\t', b' ') + plain_line = plain_line.decode('utf-8', 'ignore') + plain_line.rstrip() + log.info('<--|{}| {}'.format(self.name, plain_line.strip())) + self.iq.put(plain_line) + else: + pass + + def _output_thread(self): + while self.run: + line = self.oq.get() + if line: + log.info('-->|{}| {}'.format(self.name, line.strip())) + data = line + '\n' + self.serial.write(data.encode('utf-8')) + else: + log.debug('Nothing sent') diff --git a/src/test_driver/mbed/integration_tests/common/utils.py b/src/test_driver/mbed/integration_tests/common/utils.py new file mode 100644 index 00000000000000..1f22eddbd15df1 --- /dev/null +++ b/src/test_driver/mbed/integration_tests/common/utils.py @@ -0,0 +1,295 @@ +# Copyright (c) 2009-2021 Arm Limited +# SPDX-License-Identifier: Apache-2.0 +# +# 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. + + +import sys +import os +import platform +import random +import shlex +import re + +from chip.setup_payload import SetupPayload +from chip import exceptions + +if platform.system() == 'Darwin': + from chip.ChipCoreBluetoothMgr import CoreBluetoothManager as BleManager +elif sys.platform.startswith('linux'): + from chip.ChipBluezMgr import BluezManager as BleManager + +import logging +log = logging.getLogger(__name__) + + +class ParsingError(exceptions.ChipStackException): + def __init__(self, msg=None): + self.msg = "Parsing Error: " + msg + + def __str__(self): + return self.msg + + +def get_device_details(device): + """ + Get device details from logs + :param device: serial device instance + :return: device details dictionary or None + """ + ret = device.wait_for_output("SetupQRCode") + if ret == None or len(ret) < 2: + return None + + qr_code = re.sub( + r"[\[\]]", "", ret[-1].partition("SetupQRCode:")[2]).strip() + try: + device_details = dict(SetupPayload().ParseQrCode( + "VP:vendorpayload%{}".format(qr_code)).attributes) + except exceptions.ChipStackError as ex: + log.error(ex.msg) + return None + + return device_details + + +def ParseEncodedString(value): + if value.find(":") < 0: + raise ParsingError( + "Value should be encoded in encoding:encodedvalue format") + enc, encValue = value.split(":", 1) + if enc == "str": + return encValue.encode("utf-8") + b'\x00' + elif enc == "hex": + return bytes.fromhex(encValue) + raise ParsingError("Only str and hex encoding is supported") + + +def ParseValueWithType(value, type): + if type == 'int': + return int(value) + elif type == 'str': + return value + elif type == 'bytes': + return ParseEncodedString(value) + elif type == 'bool': + return (value.upper() not in ['F', 'FALSE', '0']) + else: + raise ParsingError('Cannot recognize type: {}'.format(type)) + + +def FormatZCLArguments(args, command): + commandArgs = {} + for kvPair in args: + if kvPair.find("=") < 0: + raise ParsingError("Argument should in key=value format") + key, value = kvPair.split("=", 1) + valueType = command.get(key, None) + commandArgs[key] = ParseValueWithType(value, valueType) + return commandArgs + + +def send_zcl_command(devCtrl, line): + """ + Send ZCL message to device: + [key=value]... + :param devCtrl: device controller instance + :param line: command line + :return: error code and command responde + """ + res = None + err = 0 + try: + args = shlex.split(line) + all_commands = devCtrl.ZCLCommandList() + if len(args) < 5: + raise exceptions.InvalidArgumentCount(5, len(args)) + + if args[0] not in all_commands: + raise exceptions.UnknownCluster(args[0]) + command = all_commands.get(args[0]).get(args[1], None) + # When command takes no arguments, (not command) is True + if command == None: + raise exceptions.UnknownCommand(args[0], args[1]) + err, res = devCtrl.ZCLSend(args[0], args[1], int( + args[2]), int(args[3]), int(args[4]), FormatZCLArguments(args[5:], command), blocking=True) + if err != 0: + log.error("Failed to send ZCL command [{}] {}.".format(err, res)) + elif res != None: + log.info("Success, received command response:") + log.info(res) + else: + log.info("Success, no command response.") + except exceptions.ChipStackException as ex: + log.error("An exception occurred during processing ZCL command:") + log.error(str(ex)) + err = -1 + except Exception as ex: + log.error("An exception occurred during processing input:") + log.error(str(ex)) + err = -1 + + return (err, res) + + +def scan_chip_ble_devices(devCtrl): + """ + BLE scan CHIP device + BLE scanning for 10 seconds and collect the results + :param devCtrl: device controller instance + :return: List of visible BLE devices + """ + devices = [] + bleMgr = BleManager(devCtrl) + bleMgr.scan("-t 10") + + for device in bleMgr.peripheral_list: + devIdInfo = bleMgr.get_peripheral_devIdInfo(device) + if devIdInfo: + devInfo = devIdInfo.__dict__ + devInfo["name"] = device.Name + devices.append(devInfo) + + return devices + + +def check_chip_ble_devices_advertising(devCtrl, name, deviceDetails=None): + """ + Check if CHIP device advertise + BLE scanning for 10 seconds and compare with device details + :param devCtrl: device controller instance + :param name: device advertising name + :param name: device details + :return: True if device advertise else False + """ + ble_chip_device = scan_chip_ble_devices(devCtrl) + if ble_chip_device == None or len(ble_chip_device) == 0: + log.info("No BLE CHIP device found") + return False + + chip_device_found = False + + for ble_device in ble_chip_device: + if deviceDetails != None: + if (ble_device["name"] == name and + int(ble_device["discriminator"]) == int(deviceDetails["Discriminator"]) and + int(ble_device["vendorId"]) == int(deviceDetails["VendorID"]) and + int(ble_device["productId"]) == int(deviceDetails["ProductID"])): + chip_device_found = True + break + else: + if (ble_device["name"] == name): + chip_device_found = True + break + + return chip_device_found + + +def connect_device_over_ble(devCtrl, discriminator, pinCode, nodeId=None): + """ + Connect to Matter accessory device over BLE + :param devCtrl: device controller instance + :param discriminator: CHIP device discriminator + :param pinCode: CHIP device pin code + :param nodeId: default value of node ID + :return: node ID is provisioning successful, otherwise None + """ + if nodeId == None: + nodeId = random.randint(1, 1000000) + + try: + devCtrl.ConnectBLE(int(discriminator), int(pinCode), int(nodeId)) + except exceptions.ChipStackException as ex: + log.error("Connect device over BLE failed: {}".format(str(ex))) + return None + + return nodeId + + +def close_connection(devCtrl, nodeId): + """ + Close the BLE connection + :param devCtrl: device controller instance + :return: true if successful, otherwise false + """ + try: + devCtrl.CloseSession(nodeId) + except exceptions.ChipStackException as ex: + log.error("Close session failed: {}".format(str(ex))) + return False + + return True + + +def close_ble(devCtrl): + """ + Close the BLE connection + :param devCtrl: device controller instance + :return: true if successful, otherwise false + """ + try: + devCtrl.CloseBLEConnection() + except exceptions.ChipStackException as ex: + log.error("Close BLE connection failed: {}".format(str(ex))) + return False + + return True + + +def commissioning_wifi(devCtrl, ssid, password, nodeId): + """ + Commissioning a Wi-Fi device + :param devCtrl: device controller instance + :param ssid: network ssid + :param password: network password + :param nodeId: value of node ID + :return: error code + """ + + # Inject the credentials to the device + err, res = send_zcl_command( + devCtrl, "NetworkCommissioning AddWiFiNetwork {} 0 0 ssid=str:{} credentials=str:{} breadcrumb=0 timeoutMs=1000".format(nodeId, ssid, password)) + if err != 0 and res["Status"] != 0: + log.error("Set Wi-Fi credentials failed [{}]".format(err)) + return err + + # Enable the Wi-Fi interface + err, res = send_zcl_command( + devCtrl, "NetworkCommissioning EnableNetwork {} 0 0 networkID=str:{} breadcrumb=0 timeoutMs=1000".format(nodeId, ssid)) + if err != 0 and res["Status"] != 0: + log.error("Enable Wi-Fi failed [{}]".format(err)) + return err + + return err + + +def resolve_device(devCtrl, nodeId): + """ + Discover IP address and port of the device. + :param devCtrl: device controller instance + :param nodeId: value of node ID + :return: device IP address and port if successful, otherwise None + """ + ret = None + try: + err = devCtrl.ResolveNode(int(nodeId)) + if err == 0: + ret = devCtrl.GetAddressAndPort(int(nodeId)) + if ret == None: + log.error("Get address and port failed") + else: + log.error("Resolve node failed [{}]".format(err)) + except exceptions.ChipStackException as ex: + log.error("Resolve node failed {}".format(str(ex))) + + return ret diff --git a/src/test_driver/mbed/integration_tests/conftest.py b/src/test_driver/mbed/integration_tests/conftest.py new file mode 100644 index 00000000000000..56f549b83d119c --- /dev/null +++ b/src/test_driver/mbed/integration_tests/conftest.py @@ -0,0 +1,34 @@ +# Copyright (c) 2009-2021 Arm Limited +# SPDX-License-Identifier: Apache-2.0 +# +# 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. + +import pytest + +pytest_plugins = ['common.fixtures'] + + +def pytest_addoption(parser): + """ + Function for pytest to enable own custom commandline arguments + :param parser: argparser + :return: + """ + parser.addoption('--platforms', action='store', + help='List of platforms that can be used to run the tests. Platforms are separated by a comma') + parser.addoption('--serial_inter_byte_delay', action='store', + help='Time in second between two bytes sent on the serial line (accepts floats)') + parser.addoption('--serial_baudrate', action='store', + help='Baudrate of the serial port used', default='115200') + parser.addoption('--network', action='store', + help='WiFi network credentials to which we want to connect device. Format network_ssid:network_password') diff --git a/src/test_driver/mbed/integration_tests/lighting-app/__init__.py b/src/test_driver/mbed/integration_tests/lighting-app/__init__.py new file mode 100644 index 00000000000000..e69de29bb2d1d6 diff --git a/src/test_driver/mbed/integration_tests/lighting-app/test_app.py b/src/test_driver/mbed/integration_tests/lighting-app/test_app.py new file mode 100644 index 00000000000000..27099d3ade10e2 --- /dev/null +++ b/src/test_driver/mbed/integration_tests/lighting-app/test_app.py @@ -0,0 +1,223 @@ +# Copyright (c) 2009-2021 Arm Limited +# SPDX-License-Identifier: Apache-2.0 +# +# 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. + +import pytest +from time import sleep + +from chip import ChipDeviceCtrl + +from common.utils import * + +from common.pigweed_client import PigweedClient +from device_service import device_service_pb2 +from button_service import button_service_pb2 +from lighting_service import lighting_service_pb2 +from pw_status import Status + +import logging +log = logging.getLogger(__name__) + +BLE_DEVICE_NAME = "MBED-lighting" +DEVICE_NODE_ID = 1234 +TEST_BRIGHTNESS_LEVEL = 200 +RPC_PROTOS = [device_service_pb2, button_service_pb2, lighting_service_pb2] + + +@pytest.mark.smoketest +def test_smoke_test(device): + device.reset(duration=1) + ret = device.wait_for_output("Mbed lighting-app example application start") + assert ret != None and len(ret) > 0 + ret = device.wait_for_output("Mbed lighting-app example application run") + assert ret != None and len(ret) > 0 + + +def test_wifi_provisioning(device, network): + network_ssid = network[0] + network_pass = network[1] + + devCtrl = ChipDeviceCtrl.ChipDeviceController() + + device_details = get_device_details(device) + assert device_details != None and len(device_details) != 0 + + assert check_chip_ble_devices_advertising( + devCtrl, BLE_DEVICE_NAME, device_details) + + ret = connect_device_over_ble(devCtrl, int(device_details["Discriminator"]), int( + device_details["SetUpPINCode"]), DEVICE_NODE_ID) + assert ret != None and ret == DEVICE_NODE_ID + + ret = device.wait_for_output("Device completed Rendezvous process") + assert ret != None and len(ret) > 0 + + ret = commissioning_wifi(devCtrl, network_ssid, + network_pass, DEVICE_NODE_ID) + assert ret == 0 + + ret = device.wait_for_output("StationConnected") + assert ret != None and len(ret) > 0 + + ret = device.wait_for_output("address set") + assert ret != None and len(ret) > 0 + + device_ip_address = ret[-1].partition("address set:")[2].strip() + + ret = resolve_device(devCtrl, DEVICE_NODE_ID) + assert ret != None and len(ret) == 2 + + ip_address = ret[0] + port = ret[1] + + assert device_ip_address == ip_address + + assert close_connection(devCtrl, DEVICE_NODE_ID) + assert close_ble(devCtrl) + + +def test_light_ctrl(device, network): + network_ssid = network[0] + network_pass = network[1] + + devCtrl = ChipDeviceCtrl.ChipDeviceController() + + device_details = get_device_details(device) + assert device_details != None and len(device_details) != 0 + + assert check_chip_ble_devices_advertising( + devCtrl, BLE_DEVICE_NAME, device_details) + + ret = connect_device_over_ble(devCtrl, int(device_details["Discriminator"]), int( + device_details["SetUpPINCode"]), DEVICE_NODE_ID) + assert ret != None and ret == DEVICE_NODE_ID + + ret = device.wait_for_output("Device completed Rendezvous process") + assert ret != None and len(ret) > 0 + + ret = commissioning_wifi(devCtrl, network_ssid, + network_pass, DEVICE_NODE_ID) + assert ret == 0 + + ret = resolve_device(devCtrl, DEVICE_NODE_ID) + assert ret != None and len(ret) == 2 + + err, res = send_zcl_command( + devCtrl, "OnOff On {} 1 0".format(DEVICE_NODE_ID)) + assert err == 0 + + ret = device.wait_for_output("Turn On Action has been completed", 20) + assert ret != None and len(ret) > 0 + + err, res = send_zcl_command( + devCtrl, "OnOff Off {} 1 0".format(DEVICE_NODE_ID)) + assert err == 0 + + ret = device.wait_for_output("Turn Off Action has been completed", 20) + assert ret != None and len(ret) > 0 + + err, res = send_zcl_command( + devCtrl, "OnOff Toggle {} 1 0".format(DEVICE_NODE_ID)) + assert err == 0 + + ret = device.wait_for_output("Turn On Action has been completed", 20) + assert ret != None and len(ret) > 0 + + err, res = send_zcl_command(devCtrl, "LevelControl MoveToLevel {} 1 0 level={} transitionTime=1 optionMask=0 optionOverride=0".format( + DEVICE_NODE_ID, TEST_BRIGHTNESS_LEVEL)) + assert err == 0 + + ret = device.wait_for_output( + "Setting brightness level to {}".format(TEST_BRIGHTNESS_LEVEL), 20) + assert ret != None and len(ret) > 0 + + assert close_connection(devCtrl, DEVICE_NODE_ID) + assert close_ble(devCtrl) + + +def test_device_info_rpc(device): + pw_client = PigweedClient(device, RPC_PROTOS) + status, payload = pw_client.rpcs.chip.rpc.Device.GetDeviceInfo() + assert status.ok() == True + assert payload.vendor_id != None and payload.product_id != None and payload.serial_number != None + + device_details = get_device_details(device) + assert device_details != None and len(device_details) != 0 + + assert int(device_details["VendorID"]) == payload.vendor_id + assert int(device_details["ProductID"]) == payload.product_id + assert int(device_details["Discriminator"] + ) == payload.pairing_info.discriminator + assert int(device_details["SetUpPINCode"]) == payload.pairing_info.code + + +def test_device_factory_reset_rpc(device): + pw_client = PigweedClient(device, RPC_PROTOS) + status, payload = pw_client.rpcs.chip.rpc.Device.FactoryReset() + assert status.ok() == True + + +def test_device_reboot_rpc(device): + pw_client = PigweedClient(device, RPC_PROTOS) + status, payload = pw_client.rpcs.chip.rpc.Device.Reboot() + assert status == Status.UNIMPLEMENTED + + +def test_device_ota_rpc(device): + pw_client = PigweedClient(device, RPC_PROTOS) + status, payload = pw_client.rpcs.chip.rpc.Device.TriggerOta() + assert status == Status.UNIMPLEMENTED + + +def test_ligth_ctrl_rpc(device): + pw_client = PigweedClient(device, RPC_PROTOS) + + # Check light on + status, payload = pw_client.rpcs.chip.rpc.Lighting.Set(on=True) + assert status.ok() == True + status, payload = pw_client.rpcs.chip.rpc.Lighting.Get() + assert status.ok() == True + assert payload.on == True + + # Check light off + status, payload = pw_client.rpcs.chip.rpc.Lighting.Set(on=False) + assert status.ok() == True + status, payload = pw_client.rpcs.chip.rpc.Lighting.Get() + assert status.ok() == True + assert payload.on == False + + +def test_button_ctrl_rpc(device): + pw_client = PigweedClient(device, RPC_PROTOS) + + # Check button 0 (lighting) + status, payload = pw_client.rpcs.chip.rpc.Lighting.Get() + assert status.ok() == True + initial_state = bool(payload.on) + + compare_state = not initial_state + status, payload = pw_client.rpcs.chip.rpc.Button.Event(idx=0, pushed=True) + assert status.ok() == True + sleep(2) + status, payload = pw_client.rpcs.chip.rpc.Lighting.Get() + assert status.ok() == True + assert payload.on == compare_state + + compare_state = initial_state + status, payload = pw_client.rpcs.chip.rpc.Button.Event(idx=0, pushed=True) + assert status.ok() == True + sleep(2) + status, payload = pw_client.rpcs.chip.rpc.Lighting.Get() + assert status.ok() == True + assert payload.on == compare_state diff --git a/src/test_driver/mbed/integration_tests/lock-app/__init__.py b/src/test_driver/mbed/integration_tests/lock-app/__init__.py new file mode 100644 index 00000000000000..e69de29bb2d1d6 diff --git a/src/test_driver/mbed/integration_tests/lock-app/test_app.py b/src/test_driver/mbed/integration_tests/lock-app/test_app.py new file mode 100644 index 00000000000000..2fca2b5356f735 --- /dev/null +++ b/src/test_driver/mbed/integration_tests/lock-app/test_app.py @@ -0,0 +1,214 @@ +# Copyright (c) 2009-2021 Arm Limited +# SPDX-License-Identifier: Apache-2.0 +# +# 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. + +import pytest +from time import sleep + +from chip import ChipDeviceCtrl + +from common.utils import * + +from common.pigweed_client import PigweedClient +from device_service import device_service_pb2 +from button_service import button_service_pb2 +from locking_service import locking_service_pb2 +from pw_status import Status + +import logging +log = logging.getLogger(__name__) + +BLE_DEVICE_NAME = "MBED-lock" +DEVICE_NODE_ID = 1234 +RPC_PROTOS = [device_service_pb2, button_service_pb2, locking_service_pb2] + + +@pytest.mark.smoketest +def test_smoke_test(device): + device.reset(duration=1) + ret = device.wait_for_output("Mbed lock-app example application start") + assert ret != None and len(ret) > 0 + ret = device.wait_for_output("Mbed lock-app example application run") + assert ret != None and len(ret) > 0 + + +def test_wifi_provisioning(device, network): + network_ssid = network[0] + network_pass = network[1] + + devCtrl = ChipDeviceCtrl.ChipDeviceController() + + device_details = get_device_details(device) + assert device_details != None and len(device_details) != 0 + + assert check_chip_ble_devices_advertising( + devCtrl, BLE_DEVICE_NAME, device_details) + + ret = connect_device_over_ble(devCtrl, int(device_details["Discriminator"]), int( + device_details["SetUpPINCode"]), DEVICE_NODE_ID) + assert ret != None and ret == DEVICE_NODE_ID + + ret = device.wait_for_output("Device completed Rendezvous process") + assert ret != None and len(ret) > 0 + + ret = commissioning_wifi(devCtrl, network_ssid, + network_pass, DEVICE_NODE_ID) + assert ret == 0 + + ret = device.wait_for_output("StationConnected") + assert ret != None and len(ret) > 0 + + ret = device.wait_for_output("address set") + assert ret != None and len(ret) > 0 + + device_ip_address = ret[-1].partition("address set:")[2].strip() + + ret = resolve_device(devCtrl, DEVICE_NODE_ID) + assert ret != None and len(ret) == 2 + + ip_address = ret[0] + port = ret[1] + + assert device_ip_address == ip_address + + assert close_connection(devCtrl, DEVICE_NODE_ID) + assert close_ble(devCtrl) + + +def test_lock_ctrl(device, network): + network_ssid = network[0] + network_pass = network[1] + + devCtrl = ChipDeviceCtrl.ChipDeviceController() + + device_details = get_device_details(device) + assert device_details != None and len(device_details) != 0 + + assert check_chip_ble_devices_advertising( + devCtrl, BLE_DEVICE_NAME, device_details) + + ret = connect_device_over_ble(devCtrl, int(device_details["Discriminator"]), int( + device_details["SetUpPINCode"]), DEVICE_NODE_ID) + assert ret != None and ret == DEVICE_NODE_ID + + ret = device.wait_for_output("Device completed Rendezvous process") + assert ret != None and len(ret) > 0 + + ret = commissioning_wifi(devCtrl, network_ssid, + network_pass, DEVICE_NODE_ID) + assert ret == 0 + + ret = resolve_device(devCtrl, DEVICE_NODE_ID) + assert ret != None and len(ret) == 2 + + err, res = send_zcl_command( + devCtrl, "OnOff Off {} 1 0".format(DEVICE_NODE_ID)) + assert err == 0 + + ret = device.wait_for_output("Unlock Action has been completed", 20) + assert ret != None and len(ret) > 0 + + err, res = send_zcl_command( + devCtrl, "OnOff On {} 1 0".format(DEVICE_NODE_ID)) + assert err == 0 + + ret = device.wait_for_output("Lock Action has been completed", 20) + assert ret != None and len(ret) > 0 + + err, res = send_zcl_command( + devCtrl, "OnOff Toggle {} 1 0".format(DEVICE_NODE_ID)) + assert err == 0 + + ret = device.wait_for_output("Unlock Action has been completed", 20) + assert ret != None and len(ret) > 0 + + assert close_connection(devCtrl, DEVICE_NODE_ID) + assert close_ble(devCtrl) + + +def test_device_info_rpc(device): + pw_client = PigweedClient(device, RPC_PROTOS) + status, payload = pw_client.rpcs.chip.rpc.Device.GetDeviceInfo() + assert status.ok() == True + assert payload.vendor_id != None and payload.product_id != None and payload.serial_number != None + + device_details = get_device_details(device) + assert device_details != None and len(device_details) != 0 + + assert int(device_details["VendorID"]) == payload.vendor_id + assert int(device_details["ProductID"]) == payload.product_id + assert int(device_details["Discriminator"] + ) == payload.pairing_info.discriminator + assert int(device_details["SetUpPINCode"]) == payload.pairing_info.code + + +def test_device_factory_reset_rpc(device): + pw_client = PigweedClient(device, RPC_PROTOS) + status, payload = pw_client.rpcs.chip.rpc.Device.FactoryReset() + assert status.ok() == True + + +def test_device_reboot_rpc(device): + pw_client = PigweedClient(device, RPC_PROTOS) + status, payload = pw_client.rpcs.chip.rpc.Device.Reboot() + assert status == Status.UNIMPLEMENTED + + +def test_device_ota_rpc(device): + pw_client = PigweedClient(device, RPC_PROTOS) + status, payload = pw_client.rpcs.chip.rpc.Device.TriggerOta() + assert status == Status.UNIMPLEMENTED + + +def test_lock_ctrl_rpc(device): + pw_client = PigweedClient(device, RPC_PROTOS) + + # Check locked + status, payload = pw_client.rpcs.chip.rpc.Locking.Set(locked=True) + assert status.ok() == True + status, payload = pw_client.rpcs.chip.rpc.Locking.Get() + assert status.ok() == True + assert payload.locked == True + + # Check unlocked + status, payload = pw_client.rpcs.chip.rpc.Locking.Set(locked=False) + assert status.ok() == True + status, payload = pw_client.rpcs.chip.rpc.Locking.Get() + assert status.ok() == True + assert payload.locked == False + + +def test_button_ctrl_rpc(device): + pw_client = PigweedClient(device, RPC_PROTOS) + + # Check button 0 (locking) + status, payload = pw_client.rpcs.chip.rpc.Locking.Get() + assert status.ok() == True + initial_state = bool(payload.locked) + + compare_state = not initial_state + status, payload = pw_client.rpcs.chip.rpc.Button.Event(idx=0, pushed=True) + assert status.ok() == True + sleep(2) + status, payload = pw_client.rpcs.chip.rpc.Locking.Get() + assert status.ok() == True + assert payload.locked == compare_state + + compare_state = initial_state + status, payload = pw_client.rpcs.chip.rpc.Button.Event(idx=0, pushed=True) + assert status.ok() == True + sleep(2) + status, payload = pw_client.rpcs.chip.rpc.Locking.Get() + assert status.ok() == True + assert payload.locked == compare_state diff --git a/src/test_driver/mbed/integration_tests/pigweed-app/__init__.py b/src/test_driver/mbed/integration_tests/pigweed-app/__init__.py new file mode 100644 index 00000000000000..e69de29bb2d1d6 diff --git a/src/test_driver/mbed/integration_tests/pigweed-app/test_app.py b/src/test_driver/mbed/integration_tests/pigweed-app/test_app.py new file mode 100644 index 00000000000000..ad6ee4f9a142fe --- /dev/null +++ b/src/test_driver/mbed/integration_tests/pigweed-app/test_app.py @@ -0,0 +1,39 @@ +# Copyright (c) 2009-2021 Arm Limited +# SPDX-License-Identifier: Apache-2.0 +# +# 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. + +import pytest +from echo_service import echo_pb2 + +from common.pigweed_client import PigweedClient + +RPC_PROTOS = [echo_pb2] +PW_ECHO_TEST_MESSAGE = "Test_message" + + +@pytest.mark.smoketest +def test_smoke_test(device): + device.reset(duration=1) + ret = device.wait_for_output("Mbed pigweed-app example application start") + assert ret != None and len(ret) > 0 + ret = device.wait_for_output("Mbed pigweed-app example application run") + assert ret != None and len(ret) > 0 + + +def test_echo(device): + pw_client = PigweedClient(device, RPC_PROTOS) + status, payload = pw_client.rpcs.pw.rpc.EchoService.Echo( + msg=PW_ECHO_TEST_MESSAGE) + assert status.ok() == True + assert payload.msg == PW_ECHO_TEST_MESSAGE diff --git a/src/test_driver/mbed/integration_tests/pytest.ini b/src/test_driver/mbed/integration_tests/pytest.ini new file mode 100644 index 00000000000000..6854576f00d5b4 --- /dev/null +++ b/src/test_driver/mbed/integration_tests/pytest.ini @@ -0,0 +1,7 @@ +[pytest] +log_cli = true +log_level = INFO +log_format = %(asctime)s.%(msecs)03d %(levelname)s %(message)s +log_cli_format = %(asctime)s.%(msecs)03d %(levelname)s %(message)s +markers = + smoketest: Test with large coverage and short run time diff --git a/src/test_driver/mbed/integration_tests/shell/__init__.py b/src/test_driver/mbed/integration_tests/shell/__init__.py new file mode 100644 index 00000000000000..e69de29bb2d1d6 diff --git a/src/test_driver/mbed/integration_tests/shell/test_app.py b/src/test_driver/mbed/integration_tests/shell/test_app.py new file mode 100644 index 00000000000000..6dcc37a89775a3 --- /dev/null +++ b/src/test_driver/mbed/integration_tests/shell/test_app.py @@ -0,0 +1,239 @@ +# Copyright (c) 2009-2021 Arm Limited +# SPDX-License-Identifier: Apache-2.0 +# +# 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. + +import pytest +import re +from packaging import version +from time import sleep + +from chip.setup_payload import SetupPayload +from chip import exceptions +from chip import ChipDeviceCtrl +from common.utils import * +import logging +log = logging.getLogger(__name__) + +BLE_DEVICE_NAME = "MBED-shell" + +SHELL_COMMAND_NAME = ["echo", "log", "rand", "ping", "send", "base64", "version", + "ble", "wifi", "config", "device", "onboardingcodes", "dns", "help", "exit"] +WIFI_MODE_NAME = ["disable", "ap", "sta"] + + +def get_shell_command(response): + return [line.split()[0].strip() for line in response] + + +def parse_config_response(response): + config = {} + for param in response: + param_name = param.split(":")[0].lower() + if "discriminator" in param_name: + value = int(param.split(":")[1].strip(), 16) + elif "pincode" in param_name: + value = int(param.split(":")[1].strip()) + else: + value = int(param.split(":")[1].split()[0].strip()) + + if "productrevision" in param_name: + param_name = "productrev" + + config[param_name] = value + return config + + +def parse_boarding_codes_response(response): + codes = {} + for param in response: + codes[param.split(":")[0].lower()] = param.split()[1].strip() + return codes + + +@pytest.mark.smoketest +def test_smoke_test(device): + device.reset(duration=1) + ret = device.wait_for_output("Mbed shell example application start") + assert ret != None and len(ret) > 0 + ret = device.wait_for_output("Mbed shell example application run") + assert ret != None and len(ret) > 0 + + +def test_help_check(device): + ret = device.send(command="help", expected_output="Done") + assert ret != None and len(ret) > 1 + shell_commands = get_shell_command(ret[1:-1]) + assert set(SHELL_COMMAND_NAME) == set(shell_commands) + + +def test_echo_check(device): + ret = device.send(command="echo Hello", expected_output="Done") + assert ret != None and len(ret) > 1 + assert "Hello" in ret[-2] + + +def test_log_check(device): + ret = device.send(command="log Hello", expected_output="Done") + assert ret != None and len(ret) > 1 + assert "[INFO][CHIP]: [TOO]Hello" in ret[-2] + + +def test_rand_check(device): + ret = device.send(command="rand", expected_output="Done") + assert ret != None and len(ret) > 1 + assert ret[-2].rstrip().isdigit() + + +def test_base64_encode_decode(device): + hex_string = "1234" + ret = device.send(command="base64 encode {}".format( + hex_string), expected_output="Done") + assert ret != None and len(ret) > 1 + base64code = ret[-2] + ret = device.send(command="base64 decode {}".format( + base64code), expected_output="Done") + assert ret != None and len(ret) > 1 + assert ret[-2].rstrip() == hex_string + + +def test_version_check(device): + ret = device.send(command="version", expected_output="Done") + assert ret != None and len(ret) > 1 + assert "CHIP" in ret[-2].split()[0] + app_version = ret[-2].split()[1] + assert isinstance(version.parse(app_version), version.Version) + + +def test_ble_adv_check(device): + devCtrl = ChipDeviceCtrl.ChipDeviceController() + + ret = device.send(command="ble adv start", expected_output="Done") + assert ret != None and len(ret) > 0 + ret = device.send(command="ble adv state", expected_output="Done") + assert ret != None and len(ret) > 1 + assert "enabled" in ret[-2].split()[-1] + + sleep(1) + + assert check_chip_ble_devices_advertising(devCtrl, BLE_DEVICE_NAME) + + ret = device.send(command="ble adv stop", expected_output="Done") + assert ret != None and len(ret) > 0 + ret = device.send(command="ble adv state", expected_output="Done") + assert ret != None and len(ret) > 1 + assert "disabled" in ret[-2].split()[-1] + + sleep(1) + + assert not check_chip_ble_devices_advertising(devCtrl, BLE_DEVICE_NAME) + + +def test_device_config_check(device): + ret = device.send(command="config", expected_output="Done") + assert ret != None and len(ret) > 2 + + config = parse_config_response(ret[1:-1]) + + for param_name, value in config.items(): + ret = device.send(command="config {}".format( + param_name), expected_output="Done") + assert ret != None and len(ret) > 1 + if "discriminator" in param_name: + assert int(ret[-2].split()[0], 16) == value + else: + assert int(ret[-2].split()[0]) == value + + new_value = int(config['discriminator']) + 1 + ret = device.send(command="config discriminator {}".format( + new_value), expected_output="Done") + assert ret != None and len(ret) > 1 + assert "Setup discriminator set to: {}".format(new_value) in ret[-2] + + ret = device.send(command="config discriminator", expected_output="Done") + assert ret != None and len(ret) > 1 + assert int(ret[-2].split()[0], 16) == new_value + + +def test_on_boarding_codes(device): + ret = device.send(command="onboardingcodes", expected_output="Done") + assert ret != None and len(ret) > 2 + + boarding_codes = parse_boarding_codes_response(ret[1:-1]) + + for param, value in boarding_codes.items(): + ret = device.send(command="onboardingcodes {}".format( + param), expected_output="Done") + assert ret != None and len(ret) > 1 + assert value == ret[-2].strip() + + try: + device_details = dict(SetupPayload().ParseQrCode( + "VP:vendorpayload%{}".format(boarding_codes['qrcode'])).attributes) + except exceptions.ChipStackError as ex: + log.error(ex.msg) + assert False + assert device_details != None and len(device_details) != 0 + + try: + device_details = dict(SetupPayload().ParseManualPairingCode( + boarding_codes['manualpairingcode']).attributes) + except exceptions.ChipStackError as ex: + log.error(ex.msg) + assert False + assert device_details != None and len(device_details) != 0 + + +def test_wifi_mode(device): + ret = device.send(command="wifi mode", expected_output="Done") + assert ret != None and len(ret) > 1 + current_mode = ret[-2].strip() + assert current_mode in WIFI_MODE_NAME + + for mode in [n for n in WIFI_MODE_NAME if n != current_mode]: + print(mode) + ret = device.send(command="wifi mode {}".format( + mode), expected_output="Done") + assert ret != None and len(ret) > 0 + + ret = device.send(command="wifi mode", expected_output="Done") + assert ret != None and len(ret) > 1 + assert ret[-2].strip() == mode + + +def test_wifi_connect(device, network): + network_ssid = network[0] + network_pass = network[1] + + ret = device.send(command="wifi connect {} {}".format( + network_ssid, network_pass), expected_output="Done") + assert ret != None and len(ret) > 0 + + ret = device.wait_for_output("StationConnected", 30) + assert ret != None and len(ret) > 0 + + +def test_device_factory_reset(device): + ret = device.send(command="device factoryreset") + + sleep(1) + + ret = device.wait_for_output("Mbed shell example application start") + assert ret != None and len(ret) > 0 + ret = device.wait_for_output("Mbed shell example application run") + assert ret != None and len(ret) > 0 + + +def test_exit_check(device): + ret = device.send(command="exit", expected_output="Goodbye") + assert ret != None and len(ret) > 0 diff --git a/src/test_driver/mbed/integration_tests/test_set.in b/src/test_driver/mbed/integration_tests/test_set.in new file mode 100644 index 00000000000000..ebc8aeae33fdb7 --- /dev/null +++ b/src/test_driver/mbed/integration_tests/test_set.in @@ -0,0 +1,5 @@ +lock-app +lighting-app +pigweed-app +shell +unit-tests \ No newline at end of file diff --git a/src/test_driver/mbed/integration_tests/unit-tests/test_app.py b/src/test_driver/mbed/integration_tests/unit-tests/test_app.py new file mode 100644 index 00000000000000..04f81ae7320f4e --- /dev/null +++ b/src/test_driver/mbed/integration_tests/unit-tests/test_app.py @@ -0,0 +1,33 @@ +# Copyright (c) 2009-2021 Arm Limited +# SPDX-License-Identifier: Apache-2.0 +# +# 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. + +import pytest +import re + + +def test_unit_tests(device): + device.reset(duration=1) + # smoke test + ret = device.wait_for_output("Mbed unit-tests application start") + assert ret != None and len(ret) > 0 + ret = device.wait_for_output("Mbed unit-tests application run", 60) + assert ret != None and len(ret) > 0 + + ret = device.wait_for_output("CHIP test status:", 500) + # extract number of failures: + test_status = ret[-1] + result = re.findall(r'\d+', test_status) + assert len(result) == 1 + assert int(result[0]) == 0 diff --git a/src/test_driver/mbed/.gitignore b/src/test_driver/mbed/unit_tests/.gitignore similarity index 100% rename from src/test_driver/mbed/.gitignore rename to src/test_driver/mbed/unit_tests/.gitignore diff --git a/src/test_driver/mbed/CMakeLists.txt b/src/test_driver/mbed/unit_tests/CMakeLists.txt similarity index 98% rename from src/test_driver/mbed/CMakeLists.txt rename to src/test_driver/mbed/unit_tests/CMakeLists.txt index f4b921528f6317..e1fd925374ebb8 100644 --- a/src/test_driver/mbed/CMakeLists.txt +++ b/src/test_driver/mbed/unit_tests/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.19.0) -get_filename_component(CHIP_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../../.. REALPATH) +get_filename_component(CHIP_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../../../.. REALPATH) configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/config.in diff --git a/src/test_driver/mbed/README.md b/src/test_driver/mbed/unit_tests/README.md similarity index 97% rename from src/test_driver/mbed/README.md rename to src/test_driver/mbed/unit_tests/README.md index d3487dd9482d9b..925db3e6321704 100644 --- a/src/test_driver/mbed/README.md +++ b/src/test_driver/mbed/unit_tests/README.md @@ -51,8 +51,8 @@ build target and its requirements. > devcontainer is the recommended way to interact with Arm Mbed-OS port of the > Matter Project.** > -> **Please read this [README.md](../../..//docs/VSCODE_DEVELOPMENT.md) for more -> information about using VSCode in container.** +> **Please read this [README.md](../../../../docs/VSCODE_DEVELOPMENT.md) for +> more information about using VSCode in container.** To initialize the development environment, download all registered sub-modules and activate the environment: @@ -183,7 +183,7 @@ devices: - More details and guidelines about porting new hardware into the Matter project with Mbed OS can be found in - [MbedNewTarget](../../../docs/guides/mbedos_add_new_target.md) + [MbedNewTarget](../../../../docs/guides/mbedos_add_new_target.md) - Some useful information about HW platform specific settings can be found in `test_driver/mbed/mbed_app.json`. Information about this file syntax and its meaning in mbed-os project can be diff --git a/src/test_driver/mbed/config.in b/src/test_driver/mbed/unit_tests/config.in similarity index 100% rename from src/test_driver/mbed/config.in rename to src/test_driver/mbed/unit_tests/config.in diff --git a/src/test_driver/mbed/main/include/CHIPProjectConfig.h b/src/test_driver/mbed/unit_tests/main/include/CHIPProjectConfig.h similarity index 100% rename from src/test_driver/mbed/main/include/CHIPProjectConfig.h rename to src/test_driver/mbed/unit_tests/main/include/CHIPProjectConfig.h diff --git a/src/test_driver/mbed/main/main.cpp b/src/test_driver/mbed/unit_tests/main/main.cpp similarity index 100% rename from src/test_driver/mbed/main/main.cpp rename to src/test_driver/mbed/unit_tests/main/main.cpp diff --git a/src/test_driver/mbed/mbed_app.json b/src/test_driver/mbed/unit_tests/mbed_app.json similarity index 100% rename from src/test_driver/mbed/mbed_app.json rename to src/test_driver/mbed/unit_tests/mbed_app.json From 69e96c920289c1eb3ece433d4316b560464322db Mon Sep 17 00:00:00 2001 From: Michael Spang Date: Mon, 29 Nov 2021 23:10:59 -0500 Subject: [PATCH 19/42] Fix unexpected firmware selection by flashing scripts (#12345) Currently the flashing scripts will flash a firmware .bin from the current directory, if it exists with the right filename, and otherwise finds the firmware in the same directory as the wrapper. It is confusing that changing directories influences the firmware selection. Downloading a built firmware archive, unpacking it, and running the wrapper should always flash the firmware that was unpacked. Remove the search logic. Similarly, remove the concept of detection of "optional" firmware constituents by file presence. The command line should determine the requisite artifacts; continuing when expected files are missing is not desirable. Finally, fix rebuilds of flashing scripts after the python generator's imports change by adding those to inputs in the build file. --- build/toolchain/flashable_executable.gni | 3 ++ scripts/flashing/efr32_firmware_utils.py | 4 +-- scripts/flashing/esp32_firmware_utils.py | 15 ++++---- scripts/flashing/firmware_utils.py | 35 ++++++------------- scripts/flashing/nrfconnect_firmware_utils.py | 4 +-- scripts/flashing/p6_firmware_utils.py | 4 +-- scripts/flashing/qpg_firmware_utils.py | 4 +-- third_party/efr32_sdk/efr32_executable.gni | 9 ++--- third_party/p6/p6_executable.gni | 10 +++--- third_party/qpg_sdk/qpg_executable.gni | 10 +++--- 10 files changed, 48 insertions(+), 50 deletions(-) diff --git a/build/toolchain/flashable_executable.gni b/build/toolchain/flashable_executable.gni index afd155547a12a3..fdcb716cbaeb6e 100644 --- a/build/toolchain/flashable_executable.gni +++ b/build/toolchain/flashable_executable.gni @@ -57,6 +57,7 @@ template("gen_flashing_script") { [ "flashing_script_generator", "flashing_script_name", + "flashing_script_inputs", "flashing_options", "deps", "data_deps", @@ -72,6 +73,7 @@ template("gen_flashing_script") { ] script = flashing_script_generator + inputs = flashing_script_inputs } } @@ -131,6 +133,7 @@ template("flashable_executable") { gen_flashing_script("$target_name.flashing") { flashing_script_generator = invoker.flashing_script_generator + flashing_script_inputs = invoker.flashing_script_inputs flashing_script_name = "$root_out_dir/${invoker.flashing_script_name}" if (defined(invoker.flashing_options)) { flashing_options = invoker.flashing_options diff --git a/scripts/flashing/efr32_firmware_utils.py b/scripts/flashing/efr32_firmware_utils.py index 35812f847c3507..d04e106f894c6d 100755 --- a/scripts/flashing/efr32_firmware_utils.py +++ b/scripts/flashing/efr32_firmware_utils.py @@ -153,8 +153,8 @@ def actions(self): if self.erase().err: return self - application = self.optional_file(self.option.application) - if application: + if self.option.application: + application = self.option.application if self.flash(application).err: return self if self.option.verify_application: diff --git a/scripts/flashing/esp32_firmware_utils.py b/scripts/flashing/esp32_firmware_utils.py index bbbabb79d1d2bd..a61e93097a174e 100755 --- a/scripts/flashing/esp32_firmware_utils.py +++ b/scripts/flashing/esp32_firmware_utils.py @@ -73,6 +73,7 @@ """ import os +import pathlib import sys import firmware_utils @@ -222,7 +223,8 @@ 'help': 'Bootloader image', 'default': None, 'argparse': { - 'metavar': 'FILE' + 'metavar': 'FILE', + 'type': pathlib.Path, }, }, 'bootloader_offset': { @@ -237,7 +239,8 @@ 'help': 'Partition table image', 'default': None, 'argparse': { - 'metavar': 'FILE' + 'metavar': 'FILE', + 'type': pathlib.Path, }, }, 'partition_offset': { @@ -408,11 +411,11 @@ def actions(self): if self.erase().err: return self - bootloader = self.optional_file(self.option.bootloader) - application = self.optional_file(self.option.application) - partition = self.optional_file(self.option.partition) + if self.option.application: + application = self.option.application + bootloader = self.option.bootloader + partition = self.option.partition - if bootloader or application or partition: # Collect the flashable items. flash = [] if bootloader: diff --git a/scripts/flashing/firmware_utils.py b/scripts/flashing/firmware_utils.py index fcc312b07a4467..52391efe018c34 100644 --- a/scripts/flashing/firmware_utils.py +++ b/scripts/flashing/firmware_utils.py @@ -15,6 +15,7 @@ """Utitilies to flash or erase a device.""" import argparse +import pathlib import errno import locale import os @@ -62,7 +63,8 @@ 'help': 'Flash an image', 'default': None, 'argparse': { - 'metavar': 'FILE' + 'metavar': 'FILE', + 'type': pathlib.Path, }, }, 'verify_application': { @@ -320,8 +322,8 @@ def format_command(self, template, args=None, opt=None): ↦ ρᵢ if opt[name]==σᵢ ρ otherwise """ - if isinstance(template, str): - result = [template.format_map(opt)] + if isinstance(template, str) or isinstance(template, pathlib.Path): + result = [str(template).format_map(opt)] elif isinstance(template, list): result = [] for i in template: @@ -362,26 +364,6 @@ def format_command(self, template, args=None, opt=None): raise ValueError('Unknown: {}'.format(template)) return result - def find_file(self, filename, dirs=None): - """Resolve a file name; also checks the script directory.""" - if os.path.isabs(filename) or os.path.exists(filename): - return filename - dirs = dirs or [] - if self.argv0: - dirs.append(os.path.dirname(self.argv0)) - for directory in dirs: - name = os.path.join(directory, filename) - if os.path.exists(name): - return name - raise FileNotFoundError(errno.ENOENT, os.strerror(errno.ENOENT), - filename) - - def optional_file(self, filename, dirs=None): - """Resolve a file name, if present.""" - if filename is None: - return None - return self.find_file(filename, dirs) - def parse_argv(self, argv): """Handle command line options.""" self.argv0 = argv[0] @@ -426,10 +408,15 @@ def make_wrapper(self, argv): defaults = [] for key, value in vars(args).items(): if key in self.option and value != getattr(self.option, key): - defaults.append(' {}: {},'.format(repr(key), repr(value))) + if isinstance(value, pathlib.Path): + defaults.append(' {}: os.path.join(os.path.dirname(sys.argv[0]), {}),'.format( + repr(key), repr(str(value)))) + else: + defaults.append(' {}: {},'.format(repr(key), repr(value))) script = """ import sys + import os.path DEFAULTS = {{ {defaults} diff --git a/scripts/flashing/nrfconnect_firmware_utils.py b/scripts/flashing/nrfconnect_firmware_utils.py index ea7d68faaede25..1d8a90baac37d2 100755 --- a/scripts/flashing/nrfconnect_firmware_utils.py +++ b/scripts/flashing/nrfconnect_firmware_utils.py @@ -140,8 +140,8 @@ def actions(self): if self.erase().err: return self - application = self.optional_file(self.option.application) - if application: + if self.option.application: + application = self.option.application if self.flash(application).err: return self if self.option.verify_application: diff --git a/scripts/flashing/p6_firmware_utils.py b/scripts/flashing/p6_firmware_utils.py index 098adb77e982ec..0fe247247b4070 100755 --- a/scripts/flashing/p6_firmware_utils.py +++ b/scripts/flashing/p6_firmware_utils.py @@ -127,8 +127,8 @@ def actions(self): if self.erase().err: return self - application = self.optional_file(self.option.application) - if application: + if self.option.application: + application = self.option.application if self.flash(application).err: return self if self.option.verify_application: diff --git a/scripts/flashing/qpg_firmware_utils.py b/scripts/flashing/qpg_firmware_utils.py index c5df781c89c894..525a931c35fb80 100644 --- a/scripts/flashing/qpg_firmware_utils.py +++ b/scripts/flashing/qpg_firmware_utils.py @@ -111,8 +111,8 @@ def actions(self): if self.erase().err: return self - application = self.optional_file(self.option.application) - if application: + if self.option.application: + application = self.option.application if self.flash(application).err: return self if self.option.verify_application: diff --git a/third_party/efr32_sdk/efr32_executable.gni b/third_party/efr32_sdk/efr32_executable.gni index 62934ccc961c0c..702c9fa567f3e5 100644 --- a/third_party/efr32_sdk/efr32_executable.gni +++ b/third_party/efr32_sdk/efr32_executable.gni @@ -30,11 +30,12 @@ template("efr32_executable") { # or in different containers. flashing_runtime_target = target_name + ".flashing_runtime" + flashing_script_inputs = [ + "${chip_root}/scripts/flashing/efr32_firmware_utils.py", + "${chip_root}/scripts/flashing/firmware_utils.py", + ] copy(flashing_runtime_target) { - sources = [ - "${chip_root}/scripts/flashing/efr32_firmware_utils.py", - "${chip_root}/scripts/flashing/firmware_utils.py", - ] + sources = flashing_script_inputs outputs = [ "${root_out_dir}/{{source_file_part}}" ] } diff --git a/third_party/p6/p6_executable.gni b/third_party/p6/p6_executable.gni index d7a824ddbe603e..bec0a3e3835a5c 100644 --- a/third_party/p6/p6_executable.gni +++ b/third_party/p6/p6_executable.gni @@ -31,11 +31,13 @@ template("p6_executable") { #or in different containers. flashing_runtime_target = target_name + ".flashing_runtime" + flashing_script_inputs = [ + "${chip_root}/scripts/flashing/firmware_utils.py", + "${chip_root}/scripts/flashing/p6_firmware_utils.py", + ] + copy(flashing_runtime_target) { - sources = [ - "${chip_root}/scripts/flashing/firmware_utils.py", - "${chip_root}/scripts/flashing/p6_firmware_utils.py", - ] + sources = flashing_script_inputs outputs = [ "${root_out_dir}/{{source_file_part}}" ] } diff --git a/third_party/qpg_sdk/qpg_executable.gni b/third_party/qpg_sdk/qpg_executable.gni index ab9b6a1461065a..068c857a6f9f16 100644 --- a/third_party/qpg_sdk/qpg_executable.gni +++ b/third_party/qpg_sdk/qpg_executable.gni @@ -30,11 +30,13 @@ template("qpg_executable") { # or in different containers. flashing_runtime_target = target_name + ".flashing_runtime" + flashing_script_inputs = [ + "${chip_root}/scripts/flashing/firmware_utils.py", + "${chip_root}/scripts/flashing/qpg_firmware_utils.py", + ] + copy(flashing_runtime_target) { - sources = [ - "${chip_root}/scripts/flashing/firmware_utils.py", - "${chip_root}/scripts/flashing/qpg_firmware_utils.py", - ] + sources = flashing_script_inputs outputs = [ "${root_out_dir}/{{source_file_part}}" ] } From 749ee767c2be10c5aa6fa6f9f3d55a415b59d6ae Mon Sep 17 00:00:00 2001 From: Victor Morales Date: Mon, 29 Nov 2021 20:11:53 -0800 Subject: [PATCH 20/42] Bump ubuntu wget package to 1.20.3-1ubuntu2 (#12344) Signed-off-by: Victor Morales --- integrations/docker/images/chip-build-k32w/Dockerfile | 2 +- integrations/docker/images/chip-build-mbed-os/Dockerfile | 2 +- integrations/docker/images/chip-build-telink/Dockerfile | 2 +- integrations/docker/images/chip-build/version | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/integrations/docker/images/chip-build-k32w/Dockerfile b/integrations/docker/images/chip-build-k32w/Dockerfile index da801c43e8872e..51b6a5c4ca56cb 100644 --- a/integrations/docker/images/chip-build-k32w/Dockerfile +++ b/integrations/docker/images/chip-build-k32w/Dockerfile @@ -4,7 +4,7 @@ FROM connectedhomeip/chip-build:${VERSION} as build RUN set -x \ && apt-get update \ && DEBIAN_FRONTEND=noninteractive apt-get install -fy --no-install-recommends \ - wget=1.20.3-1ubuntu1 \ + wget=1.20.3-1ubuntu2 \ unzip=6.0-25ubuntu1 \ && apt-get clean \ && rm -rf /var/lib/apt/lists/ \ diff --git a/integrations/docker/images/chip-build-mbed-os/Dockerfile b/integrations/docker/images/chip-build-mbed-os/Dockerfile index c2f1526fd3833b..ee47fc681eeb89 100644 --- a/integrations/docker/images/chip-build-mbed-os/Dockerfile +++ b/integrations/docker/images/chip-build-mbed-os/Dockerfile @@ -4,7 +4,7 @@ FROM connectedhomeip/chip-build:${VERSION} as build RUN set -x \ && apt-get update \ && DEBIAN_FRONTEND=noninteractive apt-get install -fy --no-install-recommends \ - wget=1.20.3-1ubuntu1 \ + wget=1.20.3-1ubuntu2 \ && apt-get clean \ && rm -rf /var/lib/apt/lists/ \ && : # last line diff --git a/integrations/docker/images/chip-build-telink/Dockerfile b/integrations/docker/images/chip-build-telink/Dockerfile index b4457612e09d1c..695f7349fc9473 100644 --- a/integrations/docker/images/chip-build-telink/Dockerfile +++ b/integrations/docker/images/chip-build-telink/Dockerfile @@ -4,7 +4,7 @@ FROM connectedhomeip/chip-build:${VERSION} as build RUN set -x \ && apt-get update \ && DEBIAN_FRONTEND=noninteractive apt-get install -fy --no-install-recommends \ - wget=1.20.3-1ubuntu1 \ + wget=1.20.3-1ubuntu2 \ && apt-get clean \ && rm -rf /var/lib/apt/lists/ \ && : # last line diff --git a/integrations/docker/images/chip-build/version b/integrations/docker/images/chip-build/version index eac4bbdd5d6a21..742eec9c06b86e 100644 --- a/integrations/docker/images/chip-build/version +++ b/integrations/docker/images/chip-build/version @@ -1 +1 @@ -0.5.30 Version bump reason: ESP32 update to newest 4.4 commit: ddc44956bf718540d5451e17e1becf6c7dffe5b8 +0.5.31 Version bump reason: Upgrade wget package version to 1.20.3-1ubuntu2 From b2f981e109b26be833060ef6189c0cb8746eeaf3 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Mon, 29 Nov 2021 23:12:33 -0500 Subject: [PATCH 21/42] Enable ASAN for yaml tests on Darwin. (#12341) --- .github/workflows/tests.yaml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 7770cb5e70c0d0..afd197f554ce4d 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -115,12 +115,14 @@ jobs: strategy: matrix: - type: [tsan] + type: [tsan, asan] eventloop: [eventloop_same, eventloop_separate] env: USE_SEPARATE_EVENTLOOP: ${{ matrix.eventloop == 'eventloop_separate' }} USE_TSAN: ${{ matrix.type == 'tsan' }} + USE_ASAN: ${{ matrix.type == 'asan' }} + if: github.actor != 'restyled-io[bot]' runs-on: macos-latest @@ -159,11 +161,11 @@ jobs: - name: Run Build Test Server timeout-minutes: 10 run: | - scripts/examples/gn_build_example.sh examples/all-clusters-app/linux out/debug/standalone/ chip_config_network_layer_ble=false is_tsan=${USE_TSAN} + scripts/examples/gn_build_example.sh examples/all-clusters-app/linux out/debug/standalone/ chip_config_network_layer_ble=false is_tsan=${USE_TSAN} is_asan=${USE_ASAN} - name: Build chip-tool timeout-minutes: 10 run: | - scripts/examples/gn_build_example.sh examples/chip-tool out/debug/standalone/ is_tsan=${USE_TSAN} config_use_separate_eventloop=${USE_SEPARATE_EVENTLOOP} + scripts/examples/gn_build_example.sh examples/chip-tool out/debug/standalone/ is_tsan=${USE_TSAN} is_asan=${USE_ASAN} config_use_separate_eventloop=${USE_SEPARATE_EVENTLOOP} - name: Copy objdir run: | # The idea is to not upload our objdir unless builds have From 677d87eeec92227dab45778a749a3e9c26da2fac Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Mon, 29 Nov 2021 23:13:08 -0500 Subject: [PATCH 22/42] Allow using symbolic error names in YAML. (#12340) Fixes https://github.com/project-chip/connectedhomeip/issues/12318 --- src/app/tests/suites/TestCluster.yaml | 44 +- src/app/tests/suites/TestGroupsCluster.yaml | 2 - .../tests/suites/TestModeSelectCluster.yaml | 4 +- .../suites/certification/Test_TC_BI_1_1.yaml | 2 +- .../suites/certification/Test_TC_BI_2_1.yaml | 6 +- .../certification/Test_TC_BOOL_1_1.yaml | 2 +- .../certification/Test_TC_BOOL_2_1.yaml | 2 +- .../suites/certification/Test_TC_CC_1_1.yaml | 4 +- .../suites/certification/Test_TC_CC_2_1.yaml | 78 +-- .../certification/Test_TC_DIAGTH_1_1.yaml | 4 +- .../suites/certification/Test_TC_EMR_1_1.yaml | 2 +- .../suites/certification/Test_TC_FLW_1_1.yaml | 2 +- .../suites/certification/Test_TC_FLW_2_1.yaml | 8 +- .../suites/certification/Test_TC_ILL_1_1.yaml | 2 +- .../suites/certification/Test_TC_LVL_1_1.yaml | 4 +- .../suites/certification/Test_TC_LVL_3_1.yaml | 2 - .../suites/certification/Test_TC_MC_1_1.yaml | 4 +- .../suites/certification/Test_TC_MC_3_1.yaml | 2 +- .../suites/certification/Test_TC_MC_3_7.yaml | 4 +- .../suites/certification/Test_TC_OCC_1_1.yaml | 2 +- .../suites/certification/Test_TC_OCC_2_1.yaml | 6 +- .../suites/certification/Test_TC_OO_1_1.yaml | 4 +- .../suites/certification/Test_TC_OO_2_1.yaml | 4 +- .../suites/certification/Test_TC_PCC_1_1.yaml | 4 +- .../suites/certification/Test_TC_PCC_2_1.yaml | 42 +- .../suites/certification/Test_TC_PRS_1_1.yaml | 10 +- .../suites/certification/Test_TC_PRS_2_1.yaml | 18 +- .../suites/certification/Test_TC_RH_1_1.yaml | 4 +- .../suites/certification/Test_TC_TM_1_1.yaml | 2 +- .../certification/Test_TC_TSTAT_1_1.yaml | 4 +- .../certification/Test_TC_TSTAT_2_1.yaml | 38 +- .../certification/Test_TC_TSUIC_1_1.yaml | 4 +- .../certification/Test_TC_TSUIC_2_1.yaml | 6 - .../certification/Test_TC_TSUIC_2_2.yaml | 6 +- .../certification/Test_TC_WNCV_1_1.yaml | 4 +- .../certification/Test_TC_WNCV_2_1.yaml | 44 +- .../common/ClusterTestGeneration.js | 43 +- .../CHIP/templates/clusters-tests.zapt | 2 + .../Framework/CHIPTests/CHIPClustersTests.m | 497 ++++++++++-------- .../chip-tool/zap-generated/test/Commands.h | 204 +++---- 40 files changed, 588 insertions(+), 538 deletions(-) diff --git a/src/app/tests/suites/TestCluster.yaml b/src/app/tests/suites/TestCluster.yaml index 2b828da8a5afa2..6f0e588ecaae8f 100644 --- a/src/app/tests/suites/TestCluster.yaml +++ b/src/app/tests/suites/TestCluster.yaml @@ -25,7 +25,7 @@ tests: - label: "Send Test Not Handled Command" command: "testNotHandled" response: - error: 0x85 # INVALID_COMMAND + error: INVALID_COMMAND - label: "Send Test Specific Command" command: "testSpecific" @@ -56,7 +56,7 @@ tests: - name: "arg2" value: 6 response: - error: 0x85 # INVALID_COMMAND + error: INVALID_COMMAND # Tests for Boolean attribute @@ -624,7 +624,7 @@ tests: arguments: value: "TestValueLongerThan10" response: - error: 0x87 # CONSTRAINT_ERROR + error: CONSTRAINT_ERROR - label: "Read attribute OCTET_STRING" command: "readAttribute" @@ -690,7 +690,7 @@ tests: arguments: value: "☉TestValueLongerThan10☉" response: - error: 0x87 # CONSTRAINT_ERROR + error: CONSTRAINT_ERROR - label: "Read attribute CHAR_STRING" command: "readAttribute" @@ -816,7 +816,7 @@ tests: response: # No such endpoint, so expect an error. # SDK returning wrong error code here so far. - errorWrongValue: 0x7F # UNSUPPORTED_ENDPOINT + errorWrongValue: UNSUPPORTED_ENDPOINT - label: "Send Test Command to unsupported cluster" command: "test" @@ -824,7 +824,7 @@ tests: response: # No TestCluster on that, so expect an error. # SDK returning wrong error code here so far. - errorWrongValue: 0xC3 # UNSUPPORTED_CLUSTER + errorWrongValue: UNSUPPORTED_CLUSTER # Tests for vendor id @@ -1474,7 +1474,7 @@ tests: arguments: value: 255 response: - error: 0x87 # CONSTRAINT_ERROR + error: CONSTRAINT_ERROR - label: "Read attribute NULLABLE_BITMAP8 unchanged Value" command: "readAttribute" @@ -1514,7 +1514,7 @@ tests: arguments: value: 65535 response: - error: 0x87 # CONSTRAINT_ERROR + error: CONSTRAINT_ERROR - label: "Read attribute NULLABLE_BITMAP16 unchanged Value" command: "readAttribute" @@ -1554,7 +1554,7 @@ tests: arguments: value: 4294967295 response: - error: 0x87 # CONSTRAINT_ERROR + error: CONSTRAINT_ERROR - label: "Read attribute NULLABLE_BITMAP32 unchanged Value" command: "readAttribute" @@ -1594,7 +1594,7 @@ tests: arguments: value: "18446744073709551615" response: - error: 0x87 # CONSTRAINT_ERROR + error: CONSTRAINT_ERROR - label: "Read attribute NULLABLE_BITMAP64 unchanged Value" command: "readAttribute" @@ -1634,7 +1634,7 @@ tests: arguments: value: 255 response: - error: 0x87 # CONSTRAINT_ERROR + error: CONSTRAINT_ERROR - label: "Read attribute NULLABLE_INT8U unchanged Value" command: "readAttribute" @@ -1674,7 +1674,7 @@ tests: arguments: value: 65535 response: - error: 0x87 # CONSTRAINT_ERROR + error: CONSTRAINT_ERROR - label: "Read attribute NULLABLE_INT16U unchanged Value" command: "readAttribute" @@ -1714,7 +1714,7 @@ tests: arguments: value: 4294967295 response: - error: 0x87 # CONSTRAINT_ERROR + error: CONSTRAINT_ERROR - label: "Read attribute NULLABLE_INT32U unchanged Value" command: "readAttribute" @@ -1754,7 +1754,7 @@ tests: arguments: value: "18446744073709551615" response: - error: 0x87 # CONSTRAINT_ERROR + error: CONSTRAINT_ERROR - label: "Read attribute NULLABLE_INT64U unchanged Value" command: "readAttribute" @@ -1794,7 +1794,7 @@ tests: arguments: value: -128 response: - error: 0x87 # CONSTRAINT_ERROR + error: CONSTRAINT_ERROR - label: "Read attribute NULLABLE_INT8S unchanged Value" command: "readAttribute" @@ -1834,7 +1834,7 @@ tests: arguments: value: -32768 response: - error: 0x87 # CONSTRAINT_ERROR + error: CONSTRAINT_ERROR - label: "Read attribute NULLABLE_INT16S unchanged Value" command: "readAttribute" @@ -1874,7 +1874,7 @@ tests: arguments: value: -2147483648 response: - error: 0x87 # CONSTRAINT_ERROR + error: CONSTRAINT_ERROR - label: "Read attribute NULLABLE_INT32S unchanged Value" command: "readAttribute" @@ -1917,7 +1917,7 @@ tests: # work around that. value: "-9223372036854775807LL - 1" response: - error: 0x87 # CONSTRAINT_ERROR + error: CONSTRAINT_ERROR - label: "Read attribute NULLABLE_INT64S unchanged Value" command: "readAttribute" @@ -1957,7 +1957,7 @@ tests: arguments: value: 255 response: - error: 0x87 # CONSTRAINT_ERROR + error: CONSTRAINT_ERROR - label: "Read attribute NULLABLE_ENUM8 unchanged Value" command: "readAttribute" @@ -1997,7 +1997,7 @@ tests: arguments: value: 65535 response: - error: 0x87 # CONSTRAINT_ERROR + error: CONSTRAINT_ERROR - label: "Read attribute NULLABLE_ENUM16 unchanged Value" command: "readAttribute" @@ -2111,7 +2111,7 @@ tests: attribute: "list_int8u" response: # SDK returning wrong error code here so far. - errorWrongValue: 0x7F # UNSUPPORTED_ENDPOINT + errorWrongValue: UNSUPPORTED_ENDPOINT - label: "Read attribute from nonexistent cluster." endpoint: 0 @@ -2119,4 +2119,4 @@ tests: attribute: "list_int8u" response: # SDK returning wrong error code here so far. - errorWrongValue: 0xC3 # UNSUPPORTED_CLUSTER + errorWrongValue: UNSUPPORTED_CLUSTER diff --git a/src/app/tests/suites/TestGroupsCluster.yaml b/src/app/tests/suites/TestGroupsCluster.yaml index e8958f43c030c6..678b7378761093 100644 --- a/src/app/tests/suites/TestGroupsCluster.yaml +++ b/src/app/tests/suites/TestGroupsCluster.yaml @@ -334,8 +334,6 @@ tests: - label: "Remove All" command: "RemoveAllGroups" - response: - error: 0x00 - label: "View Group 1 (removed)" command: "ViewGroup" diff --git a/src/app/tests/suites/TestModeSelectCluster.yaml b/src/app/tests/suites/TestModeSelectCluster.yaml index 44b3b2fcd61dac..238cadd7b28f7c 100644 --- a/src/app/tests/suites/TestModeSelectCluster.yaml +++ b/src/app/tests/suites/TestModeSelectCluster.yaml @@ -64,8 +64,6 @@ tests: values: - name: "NewMode" value: 4 - response: - error: 0 - label: "Verify Current Mode Change" command: "readAttribute" @@ -80,4 +78,4 @@ tests: - name: "NewMode" value: 2 response: - error: 0x87 # CONSTRAINT_ERROR + error: CONSTRAINT_ERROR diff --git a/src/app/tests/suites/certification/Test_TC_BI_1_1.yaml b/src/app/tests/suites/certification/Test_TC_BI_1_1.yaml index 9d389f31c051c6..624c46b839d4ab 100644 --- a/src/app/tests/suites/certification/Test_TC_BI_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_BI_1_1.yaml @@ -33,7 +33,7 @@ tests: arguments: value: 1 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "reads back global attribute: ClusterRevision" command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_BI_2_1.yaml b/src/app/tests/suites/certification/Test_TC_BI_2_1.yaml index 687f57035305f6..544c61bf5bb798 100644 --- a/src/app/tests/suites/certification/Test_TC_BI_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_BI_2_1.yaml @@ -90,7 +90,7 @@ tests: arguments: value: 0 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Reads back the mandatory non-global attribute: StatusFlags" command: "readAttribute" @@ -214,7 +214,7 @@ tests: arguments: value: 0 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Reads back the optional non-global attribute: Polarity" disabled: true @@ -273,7 +273,7 @@ tests: arguments: value: 0 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Reads back the optional non-global attribute: ApplicationType" disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_BOOL_1_1.yaml b/src/app/tests/suites/certification/Test_TC_BOOL_1_1.yaml index 899eff727eec19..31b3818ccdf7ed 100644 --- a/src/app/tests/suites/certification/Test_TC_BOOL_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_BOOL_1_1.yaml @@ -33,7 +33,7 @@ tests: arguments: value: 1 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "reads back global attribute: ClusterRevision" command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_BOOL_2_1.yaml b/src/app/tests/suites/certification/Test_TC_BOOL_2_1.yaml index b96f166e6ad3bc..86901b60b0a639 100644 --- a/src/app/tests/suites/certification/Test_TC_BOOL_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_BOOL_2_1.yaml @@ -39,7 +39,7 @@ tests: arguments: value: 1 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Reads back the mandatory non-global attribute: StateValue" command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_CC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_CC_1_1.yaml index 6f4e025ea0790e..c1828d03fa53a8 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_1_1.yaml @@ -34,7 +34,7 @@ tests: arguments: value: 4 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "reads back global attribute: ClusterRevision" disabled: true @@ -57,7 +57,7 @@ tests: arguments: value: 0 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "reads back optional global attribute: FeatureMap" disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_CC_2_1.yaml b/src/app/tests/suites/certification/Test_TC_CC_2_1.yaml index 7af07b6feda8f7..4051073ea3b27f 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_2_1.yaml @@ -40,7 +40,7 @@ tests: arguments: value: 0 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Reads back mandatory attribute: CurrentHue" command: "readAttribute" @@ -69,7 +69,7 @@ tests: arguments: value: 0 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Reads back mandatory attribute: CurrentSaturation" command: "readAttribute" @@ -98,7 +98,7 @@ tests: arguments: value: 24939 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Reads back mandatory attribute: CurrentX" command: "readAttribute" @@ -127,7 +127,7 @@ tests: arguments: value: 24701 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Reads back mandatory attribute: CurrentY" command: "readAttribute" @@ -160,7 +160,7 @@ tests: arguments: value: 250 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Reads back mandatory attribute: ColorTemperatureMireds" disabled: true @@ -192,7 +192,7 @@ tests: arguments: value: 1 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Reads back mandatory attribute: ColorMode" disabled: true @@ -246,7 +246,7 @@ tests: arguments: value: 0 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Reads back mandatory attribute: EnhancedCurrentHue" command: "readAttribute" @@ -276,7 +276,7 @@ tests: arguments: value: 1 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Reads back mandatory attribute: EnhancedColorMode" disabled: true @@ -304,7 +304,7 @@ tests: arguments: value: 0 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Reads back mandatory attribute: ColorLoopActive" command: "readAttribute" @@ -332,7 +332,7 @@ tests: arguments: value: 0 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Reads back mandatory attribute: ColorLoopDirection" command: "readAttribute" @@ -359,7 +359,7 @@ tests: arguments: value: 25 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Reads back mandatory attribute: ColorLoopTime" command: "readAttribute" @@ -388,7 +388,7 @@ tests: arguments: value: 8960 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Reads back mandatory attribute: ColorLoopStartEnhancedHue" command: "readAttribute" @@ -417,7 +417,7 @@ tests: arguments: value: 0 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Reads back mandatory attribute: ColorLoopStoredEnhancedHue" command: "readAttribute" @@ -447,7 +447,7 @@ tests: arguments: value: 0 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Reads back mandatory attribute: ColorCapabilities" command: "readAttribute" @@ -478,7 +478,7 @@ tests: arguments: value: 0 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Reads back mandatory attribute: ColorTempPhysicalMinMireds" command: "readAttribute" @@ -509,7 +509,7 @@ tests: arguments: value: 65279 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Reads back mandatory attribute: ColorTempPhysicalMaxMireds" command: "readAttribute" @@ -532,7 +532,7 @@ tests: arguments: value: 0 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Reads back optional attribute: CoupleColorTempToLevelMinMireds" command: "readAttribute" @@ -584,7 +584,7 @@ tests: arguments: value: 0 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Reads back optional attribute: RemainingTime" command: "readAttribute" @@ -607,7 +607,7 @@ tests: arguments: value: 0 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Reads back optional attribute: DriftCompensation" command: "readAttribute" @@ -630,7 +630,7 @@ tests: arguments: value: "" response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Reads back optional attribute: CompensationText" disabled: true @@ -656,7 +656,7 @@ tests: arguments: value: 0 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Read back the mandatory attribute: NumberOfPrimaries" command: "readAttribute" @@ -679,7 +679,7 @@ tests: arguments: value: 0 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Read back the mandatory attribute: Primary1X" command: "readAttribute" @@ -702,7 +702,7 @@ tests: arguments: value: 0 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Read back the mandatory attribute: Primary1Y" command: "readAttribute" @@ -724,7 +724,7 @@ tests: arguments: value: 0 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Read back the mandatory attribute: Primary1Intensity" disabled: true @@ -748,7 +748,7 @@ tests: arguments: value: 0 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Read back the mandatory attribute: Primary2X" command: "readAttribute" @@ -771,7 +771,7 @@ tests: arguments: value: 0 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Read back the mandatory attribute: Primary2Y" command: "readAttribute" @@ -793,7 +793,7 @@ tests: arguments: value: 0 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Read back the mandatory attribute: Primary2Intensity" disabled: true @@ -817,7 +817,7 @@ tests: arguments: value: 0 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Read back the mandatory attribute: Primary3X" command: "readAttribute" @@ -840,7 +840,7 @@ tests: arguments: value: 0 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Read back the mandatory attribute: Primary3Y" command: "readAttribute" @@ -862,7 +862,7 @@ tests: arguments: value: 0 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Read back the mandatory attribute: Primary3Intensity" disabled: true @@ -887,7 +887,7 @@ tests: arguments: value: 0 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Read back the mandatory attribute: Primary4X" command: "readAttribute" @@ -910,7 +910,7 @@ tests: arguments: value: 0 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Read back the mandatory attribute: Primary4Y" command: "readAttribute" @@ -932,7 +932,7 @@ tests: arguments: value: 0 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Read back the mandatory attribute: Primary4Intensity" disabled: true @@ -956,7 +956,7 @@ tests: arguments: value: 0 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Read back the mandatory attribute: Primary5X" command: "readAttribute" @@ -979,7 +979,7 @@ tests: arguments: value: 0 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Read back the mandatory attribute: Primary5Y" command: "readAttribute" @@ -1001,7 +1001,7 @@ tests: arguments: value: 0 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Read back the mandatory attribute: Primary5Intensity" disabled: true @@ -1025,7 +1025,7 @@ tests: arguments: value: 0 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Read back the mandatory attribute: Primary6X" command: "readAttribute" @@ -1048,7 +1048,7 @@ tests: arguments: value: 0 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Read back the mandatory attribute: Primary6Y" command: "readAttribute" @@ -1070,7 +1070,7 @@ tests: arguments: value: 0 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Read back the mandatory attribute: Primary6Intensity" disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DIAGTH_1_1.yaml b/src/app/tests/suites/certification/Test_TC_DIAGTH_1_1.yaml index a8c8de7ebf1093..587de9dd1ee353 100644 --- a/src/app/tests/suites/certification/Test_TC_DIAGTH_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DIAGTH_1_1.yaml @@ -33,7 +33,7 @@ tests: arguments: value: 1 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "reads back global attribute: ClusterRevision" command: "readAttribute" @@ -55,7 +55,7 @@ tests: arguments: value: 0 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "reads back optional global attribute: FeatureMap" disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_EMR_1_1.yaml b/src/app/tests/suites/certification/Test_TC_EMR_1_1.yaml index 583a2046328cb3..d61b322f7c199d 100644 --- a/src/app/tests/suites/certification/Test_TC_EMR_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_EMR_1_1.yaml @@ -33,7 +33,7 @@ tests: arguments: value: 1 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "reads back global attribute: ClusterRevision" command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_FLW_1_1.yaml b/src/app/tests/suites/certification/Test_TC_FLW_1_1.yaml index d85605f11d621d..918d28cd25459e 100644 --- a/src/app/tests/suites/certification/Test_TC_FLW_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_FLW_1_1.yaml @@ -34,7 +34,7 @@ tests: arguments: value: 2 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "reads back global attribute: ClusterRevision" disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_FLW_2_1.yaml b/src/app/tests/suites/certification/Test_TC_FLW_2_1.yaml index bbcebc7cdf0287..513a58f0df4da3 100644 --- a/src/app/tests/suites/certification/Test_TC_FLW_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_FLW_2_1.yaml @@ -47,7 +47,7 @@ tests: arguments: value: 0 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "write the default value to optional attribute: MinMeasuredValue" command: "writeAttribute" @@ -55,7 +55,7 @@ tests: arguments: value: 0 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "write the default value to optional attribute: MaxMeasuredValue" command: "writeAttribute" @@ -63,7 +63,7 @@ tests: arguments: value: 0 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "read the mandatory attribute: MeasuredValue" command: "readAttribute" @@ -110,7 +110,7 @@ tests: arguments: value: 0 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "read the optional attribute: Tolerance" disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_ILL_1_1.yaml b/src/app/tests/suites/certification/Test_TC_ILL_1_1.yaml index 9e5eefd04863bb..f8180c0503c3f1 100644 --- a/src/app/tests/suites/certification/Test_TC_ILL_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_ILL_1_1.yaml @@ -33,7 +33,7 @@ tests: arguments: value: 1 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "reads back global attribute: ClusterRevision" command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_LVL_1_1.yaml b/src/app/tests/suites/certification/Test_TC_LVL_1_1.yaml index 0d2a46c4d93a9a..27f2f4c707af63 100644 --- a/src/app/tests/suites/certification/Test_TC_LVL_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LVL_1_1.yaml @@ -34,7 +34,7 @@ tests: arguments: value: 4 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "reads back global attribute: ClusterRevision" disabled: true @@ -57,7 +57,7 @@ tests: arguments: value: 0 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "reads back optional global attribute: FeatureMap" disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_LVL_3_1.yaml b/src/app/tests/suites/certification/Test_TC_LVL_3_1.yaml index 47698730c50b20..3fc1821e631d93 100644 --- a/src/app/tests/suites/certification/Test_TC_LVL_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LVL_3_1.yaml @@ -96,8 +96,6 @@ tests: attribute: "default move rate" arguments: value: 20 - response: - error: 0 - label: "reads default move rate attribute from DUT" command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_MC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_MC_1_1.yaml index 3f1b1ebf93eac8..f57d7c76555d6f 100644 --- a/src/app/tests/suites/certification/Test_TC_MC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_MC_1_1.yaml @@ -34,7 +34,7 @@ tests: arguments: value: 1 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "reads back global attribute: ClusterRevision" disabled: true @@ -57,7 +57,7 @@ tests: arguments: value: 0 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "reads back optional global attribute: FeatureMap" disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_MC_3_1.yaml b/src/app/tests/suites/certification/Test_TC_MC_3_1.yaml index 868e771606a6d9..e8550620be8920 100644 --- a/src/app/tests/suites/certification/Test_TC_MC_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_MC_3_1.yaml @@ -138,5 +138,5 @@ tests: - name: "keyCode" value: 0xFF response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE # TODO: Add Step 10 (TH sends Keycode to DUT, when DUT in a processing state) diff --git a/src/app/tests/suites/certification/Test_TC_MC_3_7.yaml b/src/app/tests/suites/certification/Test_TC_MC_3_7.yaml index 106c34819c10e0..305d8a58dc4e93 100644 --- a/src/app/tests/suites/certification/Test_TC_MC_3_7.yaml +++ b/src/app/tests/suites/certification/Test_TC_MC_3_7.yaml @@ -54,7 +54,7 @@ tests: - name: "applicationId" value: "NonAvailableApp" response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE # TODO: Update the corresponding values when feature is supported - label: "Launch an app with the provided a application ID" @@ -82,4 +82,4 @@ tests: - name: "applicationId" value: "HelloWorldApp2" response: - error: 2 + error: INVALID_COMMAND diff --git a/src/app/tests/suites/certification/Test_TC_OCC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_OCC_1_1.yaml index d858b61a3c7d22..cc92469b06504a 100644 --- a/src/app/tests/suites/certification/Test_TC_OCC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_OCC_1_1.yaml @@ -33,7 +33,7 @@ tests: arguments: value: 2 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "reads back global attribute: ClusterRevision" disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_OCC_2_1.yaml b/src/app/tests/suites/certification/Test_TC_OCC_2_1.yaml index c8e37ae6357b24..9ef3efec118120 100644 --- a/src/app/tests/suites/certification/Test_TC_OCC_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_OCC_2_1.yaml @@ -42,7 +42,7 @@ tests: arguments: value: 0 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Reads back mandatory attribute: Occupancy" command: "readAttribute" @@ -74,7 +74,7 @@ tests: arguments: value: 0 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Reads back mandatory attribute: OccupancySensorType" command: "readAttribute" @@ -106,7 +106,7 @@ tests: arguments: value: 1 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Reads back mandatory attribute: OccupancySensorTypeBitmap" command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_OO_1_1.yaml b/src/app/tests/suites/certification/Test_TC_OO_1_1.yaml index 531ae03ff568d1..189f8d1246d472 100644 --- a/src/app/tests/suites/certification/Test_TC_OO_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_OO_1_1.yaml @@ -33,7 +33,7 @@ tests: arguments: value: 3 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "reads back global attribute: ClusterRevision" command: "readAttribute" @@ -53,7 +53,7 @@ tests: arguments: value: 0 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "reads back optional global attribute: FeatureMap" command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_OO_2_1.yaml b/src/app/tests/suites/certification/Test_TC_OO_2_1.yaml index ff86ffd281191e..489501e63d9fa6 100644 --- a/src/app/tests/suites/certification/Test_TC_OO_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_OO_2_1.yaml @@ -32,7 +32,7 @@ tests: arguments: value: 0 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "reads back mandatory attribute: OnOff" command: "readAttribute" @@ -71,7 +71,7 @@ tests: arguments: value: 0 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "write the default value to LT attribute: OnTime" command: "writeAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_PCC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_PCC_1_1.yaml index 221c4706240212..c0b6266c1b09d2 100644 --- a/src/app/tests/suites/certification/Test_TC_PCC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_PCC_1_1.yaml @@ -34,7 +34,7 @@ tests: arguments: value: 3 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "reads back global attribute: ClusterRevision" disabled: true @@ -57,7 +57,7 @@ tests: arguments: value: 0 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "reads back optional global attribute: FeatureMap" disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_PCC_2_1.yaml b/src/app/tests/suites/certification/Test_TC_PCC_2_1.yaml index e0b7884b0cc1ca..0ba0be5ed96b63 100644 --- a/src/app/tests/suites/certification/Test_TC_PCC_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_PCC_2_1.yaml @@ -112,7 +112,7 @@ tests: arguments: value: null response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "write to the mandatory attribute: MaxSpeed" disabled: true @@ -121,7 +121,7 @@ tests: arguments: value: null response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "write to the mandatory attribute: MaxFlow" disabled: true @@ -130,7 +130,7 @@ tests: arguments: value: null response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "write to the mandatory attribute: EffectiveOperationMode" disabled: true @@ -139,7 +139,7 @@ tests: arguments: value: desc response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "write to the mandatory attribute: EffectiveControlMode" disabled: true @@ -148,7 +148,7 @@ tests: arguments: value: desc response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "write to the mandatory attribute: Capacity" disabled: true @@ -157,7 +157,7 @@ tests: arguments: value: null response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "read the mandatory attribute: MaxPressure" disabled: true @@ -479,7 +479,7 @@ tests: arguments: value: null response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "write to the optional attribute: MaxConstPressure" disabled: true @@ -488,7 +488,7 @@ tests: arguments: value: null response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "write to the optional attribute: MinCompPressure" disabled: true @@ -497,7 +497,7 @@ tests: arguments: value: null response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "write to the optional attribute: MaxCompPressure" disabled: true @@ -506,7 +506,7 @@ tests: arguments: value: null response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "write to the optional attribute: MinConstSpeed" disabled: true @@ -515,7 +515,7 @@ tests: arguments: value: null response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "write to the optional attribute: MaxConstSpeed" disabled: true @@ -524,7 +524,7 @@ tests: arguments: value: null response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "write to the optional attribute: MinConstFlow" disabled: true @@ -533,7 +533,7 @@ tests: arguments: value: null response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "write to the optional attribute: MaxConstFlow" disabled: true @@ -542,7 +542,7 @@ tests: arguments: value: null response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "write to the optional attribute: MinConstTemp" disabled: true @@ -551,7 +551,7 @@ tests: arguments: value: null response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "write to the optional attribute: MaxConstTemp" disabled: true @@ -560,7 +560,7 @@ tests: arguments: value: null response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "write to the optional attribute: PumpStatus" disabled: true @@ -569,7 +569,7 @@ tests: arguments: value: 0 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "write to the optional attribute: Speed" disabled: true @@ -578,7 +578,7 @@ tests: arguments: value: null response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "write to the optional attribute: LifetimeRunningHours" disabled: true @@ -586,8 +586,6 @@ tests: attribute: "LifetimeRunningHours" arguments: value: 0 - response: - error: 0 - label: "write to the optional attribute: Power" disabled: true @@ -596,7 +594,7 @@ tests: arguments: value: null response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "write to the optional attribute: LifetimeEnergyConsumed" disabled: true @@ -604,8 +602,6 @@ tests: attribute: "LifetimeEnergyConsumed" arguments: value: 0 - response: - error: 0 - label: "read the optional attribute: MinConstPressure" disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_PRS_1_1.yaml b/src/app/tests/suites/certification/Test_TC_PRS_1_1.yaml index 99972df2a85a5a..c918eab4e769e3 100644 --- a/src/app/tests/suites/certification/Test_TC_PRS_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_PRS_1_1.yaml @@ -40,7 +40,7 @@ tests: arguments: value: 2 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Reads back global attribute: ClusterRevision" command: "readAttribute" @@ -71,7 +71,7 @@ tests: arguments: value: 0 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Reads back mandatory global attribute: AttributeList" disabled: true @@ -103,7 +103,7 @@ tests: arguments: value: 0 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Reads back mandatory global attribute: CommandList" disabled: true @@ -134,7 +134,7 @@ tests: arguments: value: 0 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Reads back mandatory global attribute: EventList" disabled: true @@ -165,7 +165,7 @@ tests: arguments: value: 0 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Reads back optional global attribute: FeatureMap" disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_PRS_2_1.yaml b/src/app/tests/suites/certification/Test_TC_PRS_2_1.yaml index e6a59094d197aa..17b2e336d74d1d 100644 --- a/src/app/tests/suites/certification/Test_TC_PRS_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_PRS_2_1.yaml @@ -32,7 +32,7 @@ tests: arguments: value: 0 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Reads back mandatory attribute: MeasuredValue" command: "readAttribute" @@ -53,7 +53,7 @@ tests: arguments: value: 0 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Reads back mandatory attribute: MinMeasuredValue" command: "readAttribute" @@ -74,7 +74,7 @@ tests: arguments: value: 0 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Reads back mandatory attribute: MaxMeasuredValue" command: "readAttribute" @@ -96,7 +96,7 @@ tests: arguments: value: 0 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Reads back optional attribute: Tolerance" disabled: true @@ -120,7 +120,7 @@ tests: arguments: value: 0 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Reads back optional attribute: ScaledValue" disabled: true @@ -143,7 +143,7 @@ tests: arguments: value: 0 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Reads back optional attribute: MinScaledValue" disabled: true @@ -166,7 +166,7 @@ tests: arguments: value: 0 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Reads back optional attribute: MaxScaledValue" disabled: true @@ -189,7 +189,7 @@ tests: arguments: value: 0 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Reads back optional attribute: ScaledTolerance" disabled: true @@ -212,7 +212,7 @@ tests: arguments: value: 0 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Reads back optional attribute: Scale" disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_RH_1_1.yaml b/src/app/tests/suites/certification/Test_TC_RH_1_1.yaml index 4bb7859efadf98..3c86ae17041679 100644 --- a/src/app/tests/suites/certification/Test_TC_RH_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_RH_1_1.yaml @@ -34,7 +34,7 @@ tests: arguments: value: 1 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "reads back global attribute: ClusterRevision" disabled: true @@ -57,7 +57,7 @@ tests: arguments: value: 0 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "reads back optional global attribute: FeatureMap" disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_TM_1_1.yaml b/src/app/tests/suites/certification/Test_TC_TM_1_1.yaml index 210bd0068db40e..8af5e442c5af94 100644 --- a/src/app/tests/suites/certification/Test_TC_TM_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_TM_1_1.yaml @@ -33,7 +33,7 @@ tests: arguments: value: 3 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "reads back global attribute: ClusterRevision" command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_TSTAT_1_1.yaml b/src/app/tests/suites/certification/Test_TC_TSTAT_1_1.yaml index c2aef38be7097e..60630c24c85614 100644 --- a/src/app/tests/suites/certification/Test_TC_TSTAT_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_TSTAT_1_1.yaml @@ -34,7 +34,7 @@ tests: arguments: value: 5 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "reads back global attribute: ClusterRevision" disabled: true @@ -57,7 +57,7 @@ tests: arguments: value: 0 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "reads back optional global attribute: FeatureMap" disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_TSTAT_2_1.yaml b/src/app/tests/suites/certification/Test_TC_TSTAT_2_1.yaml index 58bdea35932bd6..1167226de7f301 100644 --- a/src/app/tests/suites/certification/Test_TC_TSTAT_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_TSTAT_2_1.yaml @@ -44,7 +44,7 @@ tests: arguments: value: null response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Read back mandatory attributes from DUT: LocalTemperature" disabled: true @@ -78,7 +78,7 @@ tests: arguments: value: 700 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Read back mandatory attributes from DUT: AbsMinHeatSetpointLimit" command: "readAttribute" @@ -111,7 +111,7 @@ tests: arguments: value: 3000 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Read back mandatory attributes from DUT: AbsMaxHeatSetpointLimit" command: "readAttribute" @@ -144,7 +144,7 @@ tests: arguments: value: 1600 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Read back mandatory attributes from DUT: AbsMinCoolSetpointLimit" command: "readAttribute" @@ -177,7 +177,7 @@ tests: arguments: value: 3200 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Read back mandatory attributes from DUT: AbsMaxCoolSetpointLimit" command: "readAttribute" @@ -205,7 +205,7 @@ tests: arguments: value: 0 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Read back mandatory attributes from DUT: PICoolingDemand" disabled: true @@ -234,7 +234,7 @@ tests: arguments: value: 0 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Read back mandatory attributes from DUT: PIHeatingDemand" disabled: true @@ -787,7 +787,7 @@ tests: arguments: value: 0 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Read back optional attributes from DUT: AlarmMask" disabled: true @@ -824,7 +824,7 @@ tests: arguments: value: 0 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Read back optional attributes from DUT: ThermostatRunningMode" disabled: true @@ -850,7 +850,7 @@ tests: arguments: value: 0 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Read back optional attributes from DUT: StartOfWeek" command: "readAttribute" @@ -883,7 +883,7 @@ tests: arguments: value: 0 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Read back optional attributes from DUT: NumberOfWeeklyTransitions" disabled: true @@ -917,7 +917,7 @@ tests: arguments: value: 0 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Read back optional attributes from DUT: NumberOfDailyTransitions" disabled: true @@ -1059,7 +1059,7 @@ tests: arguments: value: 0 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Read back optional attributes from DUT: ThermostatRunningState" disabled: true @@ -1096,7 +1096,7 @@ tests: arguments: value: 0 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Read back optional attributes from DUT: SetpointChangeSource" disabled: true @@ -1131,7 +1131,7 @@ tests: arguments: value: null response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Read back optional attributes from DUT: SetpointChangeAmount" disabled: true @@ -1166,7 +1166,7 @@ tests: arguments: value: 0 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Read back optional attributes from DUT: SetpointChangeSourceTimestamp" @@ -1203,7 +1203,7 @@ tests: arguments: value: null response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Read back optional attributes from DUT: OccupiedSetback" disabled: true @@ -1307,7 +1307,7 @@ tests: arguments: value: null response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Read back optional attributes from DUT: UnoccupiedSetback" disabled: true @@ -1640,7 +1640,7 @@ tests: arguments: value: null response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "Read back optional attributes from DUT: ACCoilTemperature" disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_TSUIC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_TSUIC_1_1.yaml index 379044e479db86..41c37c5248deeb 100644 --- a/src/app/tests/suites/certification/Test_TC_TSUIC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_TSUIC_1_1.yaml @@ -34,7 +34,7 @@ tests: arguments: value: 2 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "reads back global attribute: ClusterRevision" disabled: true @@ -57,7 +57,7 @@ tests: arguments: value: 0 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "reads back optional global attribute: FeatureMap" disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_TSUIC_2_1.yaml b/src/app/tests/suites/certification/Test_TC_TSUIC_2_1.yaml index 987fcabfdfe94e..83989269a01bb4 100644 --- a/src/app/tests/suites/certification/Test_TC_TSUIC_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_TSUIC_2_1.yaml @@ -37,8 +37,6 @@ tests: attribute: "temperature display mode" arguments: value: 0 - response: - error: 0 - label: "read the mandatory attribute: TemperatureDisplayMode" command: "readAttribute" @@ -71,8 +69,6 @@ tests: attribute: "keypad lockout" arguments: value: 0 - response: - error: 0 - label: "read the mandatory attribute: KeypadLockout" command: "readAttribute" @@ -105,8 +101,6 @@ tests: attribute: "schedule programming visibility" arguments: value: 0 - response: - error: 0 - label: "read the optional attribute: ScheduleProgrammingVisibility" command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_TSUIC_2_2.yaml b/src/app/tests/suites/certification/Test_TC_TSUIC_2_2.yaml index 4d72eb5256613c..de77153951dddf 100644 --- a/src/app/tests/suites/certification/Test_TC_TSUIC_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_TSUIC_2_2.yaml @@ -49,7 +49,7 @@ tests: arguments: value: 2 response: - error: 135 + error: CONSTRAINT_ERROR - label: "Writes a value of 0 to KeypadLockout attribute of DUT" command: "writeAttribute" @@ -120,7 +120,7 @@ tests: arguments: value: 6 response: - error: 135 + error: CONSTRAINT_ERROR - label: "Writes a value of 0 to ScheduleProgrammingVisibility attribute of DUT" @@ -158,4 +158,4 @@ tests: arguments: value: 2 response: - error: 135 + error: CONSTRAINT_ERROR diff --git a/src/app/tests/suites/certification/Test_TC_WNCV_1_1.yaml b/src/app/tests/suites/certification/Test_TC_WNCV_1_1.yaml index 76d11c08e4ac19..82b3e5351c31f7 100644 --- a/src/app/tests/suites/certification/Test_TC_WNCV_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_WNCV_1_1.yaml @@ -38,7 +38,7 @@ tests: arguments: value: 201 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "3b: reads back global attribute: ClusterRevision" command: "readAttribute" @@ -65,7 +65,7 @@ tests: arguments: value: 32769 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "3b: reads back global attribute: FeatureMap" command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_WNCV_2_1.yaml b/src/app/tests/suites/certification/Test_TC_WNCV_2_1.yaml index 6a76205605021f..307a32b99a58b1 100644 --- a/src/app/tests/suites/certification/Test_TC_WNCV_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_WNCV_2_1.yaml @@ -38,7 +38,7 @@ tests: arguments: value: 250 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "3b: reads back the RO mandatory attribute: Type" command: "readAttribute" @@ -64,7 +64,7 @@ tests: arguments: value: 128 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "3b: reads back the RO mandatory attribute: ConfigStatus" command: "readAttribute" @@ -91,7 +91,7 @@ tests: arguments: value: 128 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "3b: reads back the RO mandatory attribute: OperationalStatus" command: "readAttribute" @@ -117,7 +117,7 @@ tests: arguments: value: 250 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "3b: reads back the RO mandatory attribute: EndProductType" command: "readAttribute" @@ -142,8 +142,6 @@ tests: attribute: "Mode" arguments: value: 8 - response: - error: 0 - label: "3b: reads back the RW mandatory attribute: Mode" command: "readAttribute" @@ -172,7 +170,7 @@ tests: arguments: value: 20000 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "3b: reads back the RO optional attribute: @@ -204,7 +202,7 @@ tests: arguments: value: 20000 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "3b: reads back the RO optional attribute: @@ -236,7 +234,7 @@ tests: arguments: value: 20000 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "3b: reads back the RO optional attribute: @@ -268,7 +266,7 @@ tests: arguments: value: 20000 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "3b: reads back the RO optional attribute: @@ -298,7 +296,7 @@ tests: arguments: value: 255 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "3b: reads back the RO optional attribute: InstalledOpenLimitLift" command: "readAttribute" @@ -328,7 +326,7 @@ tests: arguments: value: 255 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "3b: reads back the RO optional attribute: InstalledClosedLimitLift" @@ -358,7 +356,7 @@ tests: arguments: value: 255 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "3b: reads back the RO optional attribute: InstalledOpenLimitTilt" command: "readAttribute" @@ -388,7 +386,7 @@ tests: arguments: value: 255 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "3b: reads back the RO optional attribute: InstalledClosedLimitTilt" @@ -417,7 +415,7 @@ tests: arguments: value: 4096 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "5b: reads back the RO mandatory attribute: SafetyStatus" command: "readAttribute" @@ -448,7 +446,7 @@ tests: arguments: value: 255 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "5b: reads back the RO optional attribute: PhysicalClosedLimitLift" disabled: true @@ -481,7 +479,7 @@ tests: arguments: value: 255 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "5b: reads back the RO optional attribute: PhysicalClosedLimitTilt" disabled: true @@ -510,7 +508,7 @@ tests: arguments: value: 255 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "5b: reads back the RO optional attribute: CurrentPositionLift" command: "readAttribute" @@ -538,7 +536,7 @@ tests: arguments: value: 255 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "5b: reads back the RO optional attribute: CurrentPositionTilt" command: "readAttribute" @@ -569,7 +567,7 @@ tests: arguments: value: 255 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "5b: reads back the RO optional attribute: NumberOfActuationsLift" disabled: true @@ -601,7 +599,7 @@ tests: arguments: value: 255 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "5b: reads back the RO optional attribute: NumberOfActuationsTilt" disabled: true @@ -633,7 +631,7 @@ tests: arguments: value: 200 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "5b: reads back the RO optional attribute: @@ -665,7 +663,7 @@ tests: arguments: value: 200 response: - error: 0x88 # UNSUPPORTED_WRITE + error: UNSUPPORTED_WRITE - label: "5b: reads back the RO optional attribute: diff --git a/src/app/zap-templates/common/ClusterTestGeneration.js b/src/app/zap-templates/common/ClusterTestGeneration.js index 519f6976a02712..cce097787c912d 100644 --- a/src/app/zap-templates/common/ClusterTestGeneration.js +++ b/src/app/zap-templates/common/ClusterTestGeneration.js @@ -29,20 +29,21 @@ const templateUtil = require(zapPath + 'dist/src-electron/generator/template-uti const { getClusters, getCommands, getAttributes, isTestOnlyCluster } = require('./simulated-clusters/SimulatedClusters.js'); const { asBlocks } = require('./ClustersHelper.js'); -const kClusterName = 'cluster'; -const kEndpointName = 'endpoint'; -const kGroupId = 'groupId'; -const kCommandName = 'command'; -const kWaitCommandName = 'wait'; -const kIndexName = 'index'; -const kValuesName = 'values'; -const kConstraintsName = 'constraints'; -const kArgumentsName = 'arguments'; -const kResponseName = 'response'; -const kDisabledName = 'disabled'; -const kResponseErrorName = 'error'; -const kPICSName = 'PICS'; -const kSaveAsName = 'saveAs'; +const kClusterName = 'cluster'; +const kEndpointName = 'endpoint'; +const kGroupId = 'groupId'; +const kCommandName = 'command'; +const kWaitCommandName = 'wait'; +const kIndexName = 'index'; +const kValuesName = 'values'; +const kConstraintsName = 'constraints'; +const kArgumentsName = 'arguments'; +const kResponseName = 'response'; +const kDisabledName = 'disabled'; +const kResponseErrorName = 'error'; +const kResponseWrongErrorName = 'errorWrongValue'; +const kPICSName = 'PICS'; +const kSaveAsName = 'saveAs'; class NullObject { toString() @@ -183,13 +184,23 @@ function setDefaultArguments(test) delete test[kArgumentsName].value; } +function ensureValidError(response, errorName) +{ + if (isNaN(response[errorName])) { + response[errorName] = "EMBER_ZCL_STATUS_" + response[errorName]; + } +} + function setDefaultResponse(test) { const defaultResponse = {}; setDefault(test, kResponseName, defaultResponse); + const hasResponseError = (kResponseErrorName in test[kResponseName]) || (kResponseWrongErrorName in test[kResponseName]); + const defaultResponseError = 0; setDefault(test[kResponseName], kResponseErrorName, defaultResponseError); + setDefault(test[kResponseName], kResponseWrongErrorName, defaultResponseError); const defaultResponseValues = []; setDefault(test[kResponseName], kValuesName, defaultResponseValues); @@ -201,7 +212,6 @@ function setDefaultResponse(test) setDefault(test[kResponseName], kSaveAsName, defaultResponseSaveAs); const hasResponseValue = 'value' in test[kResponseName]; - const hasResponseError = 'error' in test[kResponseName]; const hasResponseConstraints = 'constraints' in test[kResponseName] && Object.keys(test[kResponseName].constraints).length; const hasResponseValueOrConstraints = hasResponseValue || hasResponseConstraints; @@ -218,6 +228,9 @@ function setDefaultResponse(test) throwError(test, errorStr); } + ensureValidError(test[kResponseName], kResponseErrorName); + ensureValidError(test[kResponseName], kResponseWrongErrorName); + // Step that waits for a particular event does not requires constraints nor expected values. if (test.isWait) { return; diff --git a/src/darwin/Framework/CHIP/templates/clusters-tests.zapt b/src/darwin/Framework/CHIP/templates/clusters-tests.zapt index 93ceef87abd87e..f9b2ca96b9ea65 100644 --- a/src/darwin/Framework/CHIP/templates/clusters-tests.zapt +++ b/src/darwin/Framework/CHIP/templates/clusters-tests.zapt @@ -9,6 +9,8 @@ #import "CHIPErrorTestUtils.h" +#import + // system dependencies #import diff --git a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m index fe88d4b7fea619..398b677475125b 100644 --- a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m +++ b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m @@ -26,6 +26,8 @@ #import "CHIPErrorTestUtils.h" +#import + // system dependencies #import @@ -221,7 +223,7 @@ - (void)testSendClusterTest_TC_BI_1_1_000001_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"write the default values to mandatory global attribute: ClusterRevision Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); [expectation fulfill]; }]; @@ -479,7 +481,7 @@ - (void)testSendClusterTest_TC_BI_2_1_000009_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write the default values to mandatory non-global attribute: StatusFlags Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); [expectation fulfill]; }]; @@ -745,7 +747,7 @@ - (void)testSendClusterTest_TC_BOOL_1_1_000001_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"write the default values to mandatory global attribute: ClusterRevision Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); [expectation fulfill]; }]; @@ -836,7 +838,7 @@ - (void)testSendClusterTest_TC_BOOL_2_1_000002_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write the default value to mandatory non-global attribute: StateValue Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); [expectation fulfill]; }]; @@ -885,7 +887,7 @@ - (void)testSendClusterTest_TC_CC_1_1_000000_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"write the default values to mandatory global attribute: ClusterRevision Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); [expectation fulfill]; }]; @@ -956,7 +958,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000002_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write the default value to mandatory attribute: CurrentHue Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); [expectation fulfill]; }]; @@ -1046,13 +1048,14 @@ - (void)testSendClusterTest_TC_CC_2_1_000006_WriteAttribute id currentSaturationArgument; currentSaturationArgument = [NSNumber numberWithUnsignedChar:0]; - [cluster writeAttributeCurrentSaturationWithValue:currentSaturationArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write the default value to mandatory attribute: CurrentSaturation Error: %@", err); + [cluster + writeAttributeCurrentSaturationWithValue:currentSaturationArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write the default value to mandatory attribute: CurrentSaturation Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); - [expectation fulfill]; - }]; + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -1143,7 +1146,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000010_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write the default value to mandatory attribute: CurrentX Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); [expectation fulfill]; }]; @@ -1237,7 +1240,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000014_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write the default values to mandatory attribute: CurrentY Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); [expectation fulfill]; }]; @@ -1465,7 +1468,8 @@ - (void)testSendClusterTest_TC_CC_2_1_000024_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write the default values to mandatory attribute: EnhancedCurrentHue Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); + XCTAssertEqual( + [CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); [expectation fulfill]; }]; @@ -1569,13 +1573,14 @@ - (void)testSendClusterTest_TC_CC_2_1_000029_WriteAttribute id colorLoopActiveArgument; colorLoopActiveArgument = [NSNumber numberWithUnsignedChar:0]; - [cluster writeAttributeColorLoopActiveWithValue:colorLoopActiveArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write the default values to mandatory attribute: ColorLoopActive Error: %@", err); + [cluster + writeAttributeColorLoopActiveWithValue:colorLoopActiveArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write the default values to mandatory attribute: ColorLoopActive Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); - [expectation fulfill]; - }]; + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -1663,7 +1668,8 @@ - (void)testSendClusterTest_TC_CC_2_1_000033_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write the default values to mandatory attribute: ColorLoopDirection Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); + XCTAssertEqual( + [CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); [expectation fulfill]; }]; @@ -1748,13 +1754,14 @@ - (void)testSendClusterTest_TC_CC_2_1_000037_WriteAttribute id colorLoopTimeArgument; colorLoopTimeArgument = [NSNumber numberWithUnsignedShort:25U]; - [cluster writeAttributeColorLoopTimeWithValue:colorLoopTimeArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write the default values to mandatory attribute: ColorLoopTime Error: %@", err); + [cluster + writeAttributeColorLoopTimeWithValue:colorLoopTimeArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write the default values to mandatory attribute: ColorLoopTime Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); - [expectation fulfill]; - }]; + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -1844,7 +1851,8 @@ - (void)testSendClusterTest_TC_CC_2_1_000041_WriteAttribute @"Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], + EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); [expectation fulfill]; }]; @@ -1937,7 +1945,8 @@ - (void)testSendClusterTest_TC_CC_2_1_000045_WriteAttribute @"ColorLoopStoredEnhancedHue Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], + EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); [expectation fulfill]; }]; @@ -2028,13 +2037,14 @@ - (void)testSendClusterTest_TC_CC_2_1_000049_WriteAttribute id colorCapabilitiesArgument; colorCapabilitiesArgument = [NSNumber numberWithUnsignedShort:0U]; - [cluster writeAttributeColorCapabilitiesWithValue:colorCapabilitiesArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write the default values to mandatory attribute: ColorCapabilities Error: %@", err); + [cluster + writeAttributeColorCapabilitiesWithValue:colorCapabilitiesArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write the default values to mandatory attribute: ColorCapabilities Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); - [expectation fulfill]; - }]; + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -2130,7 +2140,8 @@ - (void)testSendClusterTest_TC_CC_2_1_000053_WriteAttribute @"Write the default values to mandatory attribute: ColorTempPhysicalMinMireds Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); + XCTAssertEqual( + [CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); [expectation fulfill]; }]; @@ -2229,7 +2240,8 @@ - (void)testSendClusterTest_TC_CC_2_1_000057_WriteAttribute @"Write the default values to mandatory attribute: ColorTempPhysicalMaxMireds Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); + XCTAssertEqual( + [CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); [expectation fulfill]; }]; @@ -2299,7 +2311,8 @@ - (void)testSendClusterTest_TC_CC_2_1_000060_WriteAttribute @"CoupleColorTempToLevelMinMireds Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], + EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); [expectation fulfill]; }]; @@ -2468,13 +2481,14 @@ - (void)testSendClusterTest_TC_CC_2_1_000067_WriteAttribute id remainingTimeArgument; remainingTimeArgument = [NSNumber numberWithUnsignedShort:0U]; - [cluster writeAttributeRemainingTimeWithValue:remainingTimeArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write the default values to optional attribute: RemainingTime Error: %@", err); + [cluster + writeAttributeRemainingTimeWithValue:remainingTimeArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write the default values to optional attribute: RemainingTime Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); - [expectation fulfill]; - }]; + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -2538,13 +2552,14 @@ - (void)testSendClusterTest_TC_CC_2_1_000070_WriteAttribute id driftCompensationArgument; driftCompensationArgument = [NSNumber numberWithUnsignedChar:0]; - [cluster writeAttributeDriftCompensationWithValue:driftCompensationArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write the default values to optional attribute: DriftCompensation Error: %@", err); + [cluster + writeAttributeDriftCompensationWithValue:driftCompensationArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write the default values to optional attribute: DriftCompensation Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); - [expectation fulfill]; - }]; + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -2631,13 +2646,14 @@ - (void)testSendClusterTest_TC_CC_2_1_000074_WriteAttribute id numberOfPrimariesArgument; numberOfPrimariesArgument = [NSNumber numberWithUnsignedChar:0]; - [cluster writeAttributeNumberOfPrimariesWithValue:numberOfPrimariesArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write the default mandatory attribute: NumberOfPrimaries Error: %@", err); + [cluster + writeAttributeNumberOfPrimariesWithValue:numberOfPrimariesArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write the default mandatory attribute: NumberOfPrimaries Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); - [expectation fulfill]; - }]; + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -2704,7 +2720,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000077_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write the default mandatory attribute: Primary1X Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); [expectation fulfill]; }]; @@ -2773,7 +2789,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000080_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write the default mandatory attribute: Primary1Y Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); [expectation fulfill]; }]; @@ -2861,7 +2877,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000084_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write the default mandatory attribute: Primary2X Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); [expectation fulfill]; }]; @@ -2930,7 +2946,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000087_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write the default mandatory attribute: Primary2Y Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); [expectation fulfill]; }]; @@ -3018,7 +3034,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000091_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write the default mandatory attribute: Primary3X Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); [expectation fulfill]; }]; @@ -3087,7 +3103,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000094_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write the default mandatory attribute: Primary3Y Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); [expectation fulfill]; }]; @@ -3175,7 +3191,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000098_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write the default mandatory attribute: Primary4X Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); [expectation fulfill]; }]; @@ -3244,7 +3260,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000101_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write the default mandatory attribute: Primary4Y Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); [expectation fulfill]; }]; @@ -3332,7 +3348,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000105_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write the default mandatory attribute: Primary5X Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); [expectation fulfill]; }]; @@ -3401,7 +3417,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000108_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write the default mandatory attribute: Primary5Y Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); [expectation fulfill]; }]; @@ -3489,7 +3505,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000112_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write the default mandatory attribute: Primary6X Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); [expectation fulfill]; }]; @@ -3558,7 +3574,7 @@ - (void)testSendClusterTest_TC_CC_2_1_000115_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write the default mandatory attribute: Primary6Y Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); [expectation fulfill]; }]; @@ -9100,7 +9116,7 @@ - (void)testSendClusterTest_TC_EMR_1_1_000001_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"write the default values to mandatory global attribute: ClusterRevision Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); [expectation fulfill]; }]; @@ -9148,7 +9164,7 @@ - (void)testSendClusterTest_TC_FLW_1_1_000000_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"write the default values to mandatory global attribute: ClusterRevision Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); [expectation fulfill]; }]; @@ -9224,13 +9240,14 @@ - (void)testSendClusterTest_TC_FLW_2_1_000003_WriteAttribute id minMeasuredValueArgument; minMeasuredValueArgument = [NSNumber numberWithShort:0]; - [cluster writeAttributeMinMeasuredValueWithValue:minMeasuredValueArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"write the default value to optional attribute: MinMeasuredValue Error: %@", err); + [cluster + writeAttributeMinMeasuredValueWithValue:minMeasuredValueArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"write the default value to optional attribute: MinMeasuredValue Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); - [expectation fulfill]; - }]; + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -9246,13 +9263,14 @@ - (void)testSendClusterTest_TC_FLW_2_1_000004_WriteAttribute id maxMeasuredValueArgument; maxMeasuredValueArgument = [NSNumber numberWithShort:0]; - [cluster writeAttributeMaxMeasuredValueWithValue:maxMeasuredValueArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"write the default value to optional attribute: MaxMeasuredValue Error: %@", err); + [cluster + writeAttributeMaxMeasuredValueWithValue:maxMeasuredValueArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"write the default value to optional attribute: MaxMeasuredValue Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); - [expectation fulfill]; - }]; + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -9398,7 +9416,7 @@ - (void)testSendClusterTest_TC_ILL_1_1_000001_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"write the default values to mandatory global attribute: ClusterRevision Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); [expectation fulfill]; }]; @@ -9448,7 +9466,7 @@ - (void)testSendClusterTest_TC_LVL_1_1_000000_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"write the default values to mandatory global attribute: ClusterRevision Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); [expectation fulfill]; }]; @@ -10359,7 +10377,7 @@ - (void)testSendClusterTest_TC_MC_1_1_000000_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"write the default values to mandatory global attribute: ClusterRevision Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); [expectation fulfill]; }]; @@ -10427,7 +10445,7 @@ - (void)testSendClusterTest_TC_OCC_1_1_000001_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"write the default values to mandatory global attribute: ClusterRevision Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); [expectation fulfill]; }]; @@ -10474,7 +10492,7 @@ - (void)testSendClusterTest_TC_OCC_2_1_000001_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Writes the respective default value to mandatory attribute: Occupancy Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); [expectation fulfill]; }]; @@ -10547,7 +10565,8 @@ - (void)testSendClusterTest_TC_OCC_2_1_000004_WriteAttribute @"Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); + XCTAssertEqual( + [CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); [expectation fulfill]; }]; @@ -10624,7 +10643,8 @@ - (void)testSendClusterTest_TC_OCC_2_1_000007_WriteAttribute @"OccupancySensorTypeBitmap Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], + EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); [expectation fulfill]; }]; @@ -10736,7 +10756,7 @@ - (void)testSendClusterTest_TC_OO_1_1_000001_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"write the default values to mandatory global attribute: ClusterRevision Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); [expectation fulfill]; }]; @@ -10806,7 +10826,7 @@ - (void)testSendClusterTest_TC_OO_1_1_000004_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"write the default values to optional global attribute: FeatureMap Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); [expectation fulfill]; }]; @@ -12491,7 +12511,7 @@ - (void)testSendClusterTest_TC_PRS_1_1_000002_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write the default values to mandatory global attribute: ClusterRevision Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); [expectation fulfill]; }]; @@ -12553,13 +12573,14 @@ - (void)testSendClusterTest_TC_PRS_2_1_000001_WriteAttribute id measuredValueArgument; measuredValueArgument = [NSNumber numberWithShort:0]; - [cluster writeAttributeMeasuredValueWithValue:measuredValueArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write the default values to mandatory attribute: MeasuredValue Error: %@", err); + [cluster + writeAttributeMeasuredValueWithValue:measuredValueArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write the default values to mandatory attribute: MeasuredValue Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); - [expectation fulfill]; - }]; + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -12619,13 +12640,14 @@ - (void)testSendClusterTest_TC_PRS_2_1_000004_WriteAttribute id minMeasuredValueArgument; minMeasuredValueArgument = [NSNumber numberWithShort:0]; - [cluster writeAttributeMinMeasuredValueWithValue:minMeasuredValueArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write the default values to mandatory attribute: MinMeasuredValue Error: %@", err); + [cluster + writeAttributeMinMeasuredValueWithValue:minMeasuredValueArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write the default values to mandatory attribute: MinMeasuredValue Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); - [expectation fulfill]; - }]; + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -12685,13 +12707,14 @@ - (void)testSendClusterTest_TC_PRS_2_1_000007_WriteAttribute id maxMeasuredValueArgument; maxMeasuredValueArgument = [NSNumber numberWithShort:0]; - [cluster writeAttributeMaxMeasuredValueWithValue:maxMeasuredValueArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write the default values to mandatory attribute: MaxMeasuredValue Error: %@", err); + [cluster + writeAttributeMaxMeasuredValueWithValue:maxMeasuredValueArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write the default values to mandatory attribute: MaxMeasuredValue Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); - [expectation fulfill]; - }]; + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -12739,7 +12762,7 @@ - (void)testSendClusterTest_TC_PCC_1_1_000000_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"write the default values to mandatory global attribute: ClusterRevision Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); [expectation fulfill]; }]; @@ -13061,7 +13084,7 @@ - (void)testSendClusterTest_TC_RH_1_1_000000_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"write the default values to mandatory global attribute: ClusterRevision Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); [expectation fulfill]; }]; @@ -13204,7 +13227,7 @@ - (void)testSendClusterTest_TC_TM_1_1_000001_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"write the default values to mandatory global attribute: ClusterRevision Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); [expectation fulfill]; }]; @@ -13319,7 +13342,7 @@ - (void)testSendClusterTest_TC_TSTAT_1_1_000000_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"write the default values to mandatory global attribute: ClusterRevision Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); [expectation fulfill]; }]; @@ -13418,7 +13441,8 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000003_WriteAttribute @"AbsMinHeatSetpointLimit Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); + XCTAssertEqual( + [CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); [expectation fulfill]; }]; @@ -13521,7 +13545,8 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000007_WriteAttribute @"AbsMaxHeatSetpointLimit Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); + XCTAssertEqual( + [CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); [expectation fulfill]; }]; @@ -13624,7 +13649,8 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000011_WriteAttribute @"AbsMinCoolSetpointLimit Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); + XCTAssertEqual( + [CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); [expectation fulfill]; }]; @@ -13727,7 +13753,8 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000015_WriteAttribute @"AbsMaxCoolSetpointLimit Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); + XCTAssertEqual( + [CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); [expectation fulfill]; }]; @@ -14721,7 +14748,7 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000054_WriteAttribute NSLog(@"Writes the respective default value to optional attributes to DUT: StartOfWeek Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); [expectation fulfill]; }]; @@ -14789,7 +14816,8 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000057_WriteAttribute @"NumberOfWeeklyTransitions Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], + EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); [expectation fulfill]; }]; @@ -14833,7 +14861,8 @@ - (void)testSendClusterTest_TC_TSTAT_2_1_000059_WriteAttribute @"NumberOfDailyTransitions Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], + EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); [expectation fulfill]; }]; @@ -16067,7 +16096,7 @@ - (void)testSendClusterTest_TC_TSUIC_1_1_000000_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"write the default values to mandatory global attribute: ClusterRevision Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); [expectation fulfill]; }]; @@ -16711,7 +16740,7 @@ - (void)testSendClusterTest_TC_DIAGTH_1_1_000001_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"write the default values to mandatory global attribute: ClusterRevision Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); [expectation fulfill]; }]; @@ -16789,7 +16818,7 @@ - (void)testSendClusterTest_TC_WNCV_1_1_000001_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"3a: write a value into the RO mandatory global attribute: ClusterRevision Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); [expectation fulfill]; }]; @@ -16859,7 +16888,7 @@ - (void)testSendClusterTest_TC_WNCV_1_1_000004_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"3a: write the default value to optional global attribute: FeatureMap Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); [expectation fulfill]; }]; @@ -16929,7 +16958,7 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000001_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"3a: write a value into the RO mandatory attribute: Type Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); [expectation fulfill]; }]; @@ -16999,7 +17028,7 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000004_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"3a: write a value into the RO mandatory attribute: ConfigStatus Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); [expectation fulfill]; }]; @@ -17071,7 +17100,7 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000007_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"3a: write a value into the RO mandatory attribute: OperationalStatus Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); [expectation fulfill]; }]; @@ -17139,13 +17168,14 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000010_WriteAttribute id endProductTypeArgument; endProductTypeArgument = [NSNumber numberWithUnsignedChar:250]; - [cluster writeAttributeEndProductTypeWithValue:endProductTypeArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"3a: write a value into the RO mandatory attribute: EndProductType Error: %@", err); + [cluster + writeAttributeEndProductTypeWithValue:endProductTypeArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"3a: write a value into the RO mandatory attribute: EndProductType Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); - [expectation fulfill]; - }]; + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -17288,7 +17318,8 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000016_WriteAttribute @"TargetPositionLiftPercent100ths Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], + EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); [expectation fulfill]; }]; @@ -17364,7 +17395,8 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000019_WriteAttribute @"TargetPositionTiltPercent100ths Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], + EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); [expectation fulfill]; }]; @@ -17440,7 +17472,8 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000022_WriteAttribute @"CurrentPositionLiftPercent100ths Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], + EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); [expectation fulfill]; }]; @@ -17516,7 +17549,8 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000025_WriteAttribute @"CurrentPositionTiltPercent100ths Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], + EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); [expectation fulfill]; }]; @@ -17591,7 +17625,8 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000028_WriteAttribute NSLog(@"3a: write a value into the RO optional attribute: InstalledOpenLimitLift Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); + XCTAssertEqual( + [CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); [expectation fulfill]; }]; @@ -17665,7 +17700,8 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000031_WriteAttribute @"Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], + EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); [expectation fulfill]; }]; @@ -17739,7 +17775,8 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000034_WriteAttribute NSLog(@"3a: write a value into the RO optional attribute: InstalledOpenLimitTilt Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); + XCTAssertEqual( + [CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); [expectation fulfill]; }]; @@ -17813,7 +17850,8 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000037_WriteAttribute @"Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], + EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); [expectation fulfill]; }]; @@ -17884,7 +17922,7 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000040_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"5a: write a value into the RO mandatory attribute: SafetyStatus Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); [expectation fulfill]; }]; @@ -17956,7 +17994,8 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000043_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"5a: write a value into the RO optional attribute: CurrentPositionLift Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); + XCTAssertEqual( + [CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); [expectation fulfill]; }]; @@ -18029,7 +18068,8 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000046_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"5a: write a value into the RO optional attribute: CurrentPositionTilt Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); + XCTAssertEqual( + [CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); [expectation fulfill]; }]; @@ -18104,7 +18144,8 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000049_WriteAttribute @"CurrentPositionLiftPercentage Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], + EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); [expectation fulfill]; }]; @@ -18180,7 +18221,8 @@ - (void)testSendClusterTest_TC_WNCV_2_1_000052_WriteAttribute @"CurrentPositionTiltPercentage Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 136); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], + EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); [expectation fulfill]; }]; @@ -18531,7 +18573,7 @@ - (void)testSendClusterTestCluster_000001_TestNotHandled [cluster testNotHandledWithCompletionHandler:^(NSError * _Nullable err) { NSLog(@"Send Test Not Handled Command Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 133); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_INVALID_COMMAND); [expectation fulfill]; }]; @@ -18608,7 +18650,7 @@ - (void)testSendClusterTestCluster_000004_TestAddArguments CHIPTestClusterClusterTestAddArgumentsResponseParams * _Nullable values, NSError * _Nullable err) { NSLog(@"Send failing Test Add Arguments Command Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 133); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_INVALID_COMMAND); [expectation fulfill]; }]; @@ -20669,7 +20711,7 @@ - (void)testSendClusterTestCluster_000093_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write attribute OCTET_STRING Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 135); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_CONSTRAINT_ERROR); [expectation fulfill]; }]; @@ -20908,7 +20950,7 @@ - (void)testSendClusterTestCluster_000103_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write attribute CHAR_STRING - Value too long Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 135); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_CONSTRAINT_ERROR); [expectation fulfill]; }]; @@ -22809,13 +22851,14 @@ - (void)testSendClusterTestCluster_000158_WriteAttribute id nullableBitmap8Argument; nullableBitmap8Argument = [NSNumber numberWithUnsignedChar:255]; - [cluster writeAttributeNullableBitmap8WithValue:nullableBitmap8Argument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_BITMAP8 Invalid Value Error: %@", err); + [cluster + writeAttributeNullableBitmap8WithValue:nullableBitmap8Argument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_BITMAP8 Invalid Value Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 135); - [expectation fulfill]; - }]; + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -22948,13 +22991,14 @@ - (void)testSendClusterTestCluster_000164_WriteAttribute id nullableBitmap16Argument; nullableBitmap16Argument = [NSNumber numberWithUnsignedShort:65535U]; - [cluster writeAttributeNullableBitmap16WithValue:nullableBitmap16Argument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_BITMAP16 Invalid Value Error: %@", err); + [cluster + writeAttributeNullableBitmap16WithValue:nullableBitmap16Argument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_BITMAP16 Invalid Value Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 135); - [expectation fulfill]; - }]; + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -23087,13 +23131,14 @@ - (void)testSendClusterTestCluster_000170_WriteAttribute id nullableBitmap32Argument; nullableBitmap32Argument = [NSNumber numberWithUnsignedInt:4294967295UL]; - [cluster writeAttributeNullableBitmap32WithValue:nullableBitmap32Argument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_BITMAP32 Invalid Value Error: %@", err); + [cluster + writeAttributeNullableBitmap32WithValue:nullableBitmap32Argument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_BITMAP32 Invalid Value Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 135); - [expectation fulfill]; - }]; + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -23226,13 +23271,14 @@ - (void)testSendClusterTestCluster_000176_WriteAttribute id nullableBitmap64Argument; nullableBitmap64Argument = [NSNumber numberWithUnsignedLongLong:18446744073709551615ULL]; - [cluster writeAttributeNullableBitmap64WithValue:nullableBitmap64Argument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_BITMAP64 Invalid Value Error: %@", err); + [cluster + writeAttributeNullableBitmap64WithValue:nullableBitmap64Argument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_BITMAP64 Invalid Value Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 135); - [expectation fulfill]; - }]; + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -23369,7 +23415,7 @@ - (void)testSendClusterTestCluster_000182_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write attribute NULLABLE_INT8U Invalid Value Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 135); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_CONSTRAINT_ERROR); [expectation fulfill]; }]; @@ -23504,13 +23550,14 @@ - (void)testSendClusterTestCluster_000188_WriteAttribute id nullableInt16uArgument; nullableInt16uArgument = [NSNumber numberWithUnsignedShort:65535U]; - [cluster writeAttributeNullableInt16uWithValue:nullableInt16uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_INT16U Invalid Value Error: %@", err); + [cluster + writeAttributeNullableInt16uWithValue:nullableInt16uArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_INT16U Invalid Value Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 135); - [expectation fulfill]; - }]; + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -23643,13 +23690,14 @@ - (void)testSendClusterTestCluster_000194_WriteAttribute id nullableInt32uArgument; nullableInt32uArgument = [NSNumber numberWithUnsignedInt:4294967295UL]; - [cluster writeAttributeNullableInt32uWithValue:nullableInt32uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_INT32U Invalid Value Error: %@", err); + [cluster + writeAttributeNullableInt32uWithValue:nullableInt32uArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_INT32U Invalid Value Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 135); - [expectation fulfill]; - }]; + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -23782,13 +23830,14 @@ - (void)testSendClusterTestCluster_000200_WriteAttribute id nullableInt64uArgument; nullableInt64uArgument = [NSNumber numberWithUnsignedLongLong:18446744073709551615ULL]; - [cluster writeAttributeNullableInt64uWithValue:nullableInt64uArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_INT64U Invalid Value Error: %@", err); + [cluster + writeAttributeNullableInt64uWithValue:nullableInt64uArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_INT64U Invalid Value Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 135); - [expectation fulfill]; - }]; + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -23925,7 +23974,7 @@ - (void)testSendClusterTestCluster_000206_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write attribute NULLABLE_INT8S Invalid Value Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 135); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_CONSTRAINT_ERROR); [expectation fulfill]; }]; @@ -24060,13 +24109,14 @@ - (void)testSendClusterTestCluster_000212_WriteAttribute id nullableInt16sArgument; nullableInt16sArgument = [NSNumber numberWithShort:-32768]; - [cluster writeAttributeNullableInt16sWithValue:nullableInt16sArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_INT16S Invalid Value Error: %@", err); + [cluster + writeAttributeNullableInt16sWithValue:nullableInt16sArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_INT16S Invalid Value Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 135); - [expectation fulfill]; - }]; + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -24199,13 +24249,14 @@ - (void)testSendClusterTestCluster_000218_WriteAttribute id nullableInt32sArgument; nullableInt32sArgument = [NSNumber numberWithInt:-2147483648L]; - [cluster writeAttributeNullableInt32sWithValue:nullableInt32sArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_INT32S Invalid Value Error: %@", err); + [cluster + writeAttributeNullableInt32sWithValue:nullableInt32sArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_INT32S Invalid Value Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 135); - [expectation fulfill]; - }]; + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -24338,13 +24389,14 @@ - (void)testSendClusterTestCluster_000224_WriteAttribute id nullableInt64sArgument; nullableInt64sArgument = [NSNumber numberWithLongLong:-9223372036854775807LL - 1]; - [cluster writeAttributeNullableInt64sWithValue:nullableInt64sArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_INT64S Invalid Value Error: %@", err); + [cluster + writeAttributeNullableInt64sWithValue:nullableInt64sArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_INT64S Invalid Value Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 135); - [expectation fulfill]; - }]; + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -24481,7 +24533,7 @@ - (void)testSendClusterTestCluster_000230_WriteAttribute completionHandler:^(NSError * _Nullable err) { NSLog(@"Write attribute NULLABLE_ENUM8 Invalid Value Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 135); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_CONSTRAINT_ERROR); [expectation fulfill]; }]; @@ -24616,13 +24668,14 @@ - (void)testSendClusterTestCluster_000236_WriteAttribute id nullableEnum16Argument; nullableEnum16Argument = [NSNumber numberWithUnsignedShort:65535U]; - [cluster writeAttributeNullableEnum16WithValue:nullableEnum16Argument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write attribute NULLABLE_ENUM16 Invalid Value Error: %@", err); + [cluster + writeAttributeNullableEnum16WithValue:nullableEnum16Argument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write attribute NULLABLE_ENUM16 Invalid Value Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 135); - [expectation fulfill]; - }]; + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } @@ -28515,7 +28568,7 @@ - (void)testSendClusterTestModeSelectCluster_000007_ChangeToMode completionHandler:^(NSError * _Nullable err) { NSLog(@"Change to Unsupported Mode Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 135); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_CONSTRAINT_ERROR); [expectation fulfill]; }]; diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 0b49c3230f3b3c..c862884a3ef01f 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -270,7 +270,7 @@ class Test_TC_BI_1_1 : public TestCommand void OnFailureResponse_1(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -674,7 +674,7 @@ class Test_TC_BI_2_1 : public TestCommand void OnFailureResponse_9(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -1133,7 +1133,7 @@ class Test_TC_BOOL_1_1 : public TestCommand void OnFailureResponse_1(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -1313,7 +1313,7 @@ class Test_TC_BOOL_2_1 : public TestCommand void OnFailureResponse_2(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -1413,7 +1413,7 @@ class Test_TC_CC_1_1 : public TestCommand void OnFailureResponse_0(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -3443,7 +3443,7 @@ class Test_TC_CC_2_1 : public TestCommand void OnFailureResponse_2(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -3522,7 +3522,7 @@ class Test_TC_CC_2_1 : public TestCommand void OnFailureResponse_6(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -3601,7 +3601,7 @@ class Test_TC_CC_2_1 : public TestCommand void OnFailureResponse_10(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -3680,7 +3680,7 @@ class Test_TC_CC_2_1 : public TestCommand void OnFailureResponse_14(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -3872,7 +3872,7 @@ class Test_TC_CC_2_1 : public TestCommand void OnFailureResponse_24(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -3969,7 +3969,7 @@ class Test_TC_CC_2_1 : public TestCommand void OnFailureResponse_29(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -4047,7 +4047,7 @@ class Test_TC_CC_2_1 : public TestCommand void OnFailureResponse_33(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -4125,7 +4125,7 @@ class Test_TC_CC_2_1 : public TestCommand void OnFailureResponse_37(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -4203,7 +4203,7 @@ class Test_TC_CC_2_1 : public TestCommand void OnFailureResponse_41(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -4281,7 +4281,7 @@ class Test_TC_CC_2_1 : public TestCommand void OnFailureResponse_45(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -4360,7 +4360,7 @@ class Test_TC_CC_2_1 : public TestCommand void OnFailureResponse_49(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -4439,7 +4439,7 @@ class Test_TC_CC_2_1 : public TestCommand void OnFailureResponse_53(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -4518,7 +4518,7 @@ class Test_TC_CC_2_1 : public TestCommand void OnFailureResponse_57(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -4577,7 +4577,7 @@ class Test_TC_CC_2_1 : public TestCommand void OnFailureResponse_60(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -4712,7 +4712,7 @@ class Test_TC_CC_2_1 : public TestCommand void OnFailureResponse_67(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -4772,7 +4772,7 @@ class Test_TC_CC_2_1 : public TestCommand void OnFailureResponse_70(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -4852,7 +4852,7 @@ class Test_TC_CC_2_1 : public TestCommand void OnFailureResponse_74(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -4912,7 +4912,7 @@ class Test_TC_CC_2_1 : public TestCommand void OnFailureResponse_77(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -4972,7 +4972,7 @@ class Test_TC_CC_2_1 : public TestCommand void OnFailureResponse_80(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -5051,7 +5051,7 @@ class Test_TC_CC_2_1 : public TestCommand void OnFailureResponse_84(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -5111,7 +5111,7 @@ class Test_TC_CC_2_1 : public TestCommand void OnFailureResponse_87(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -5190,7 +5190,7 @@ class Test_TC_CC_2_1 : public TestCommand void OnFailureResponse_91(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -5250,7 +5250,7 @@ class Test_TC_CC_2_1 : public TestCommand void OnFailureResponse_94(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -5329,7 +5329,7 @@ class Test_TC_CC_2_1 : public TestCommand void OnFailureResponse_98(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -5389,7 +5389,7 @@ class Test_TC_CC_2_1 : public TestCommand void OnFailureResponse_101(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -5468,7 +5468,7 @@ class Test_TC_CC_2_1 : public TestCommand void OnFailureResponse_105(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -5528,7 +5528,7 @@ class Test_TC_CC_2_1 : public TestCommand void OnFailureResponse_108(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -5607,7 +5607,7 @@ class Test_TC_CC_2_1 : public TestCommand void OnFailureResponse_112(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -5667,7 +5667,7 @@ class Test_TC_CC_2_1 : public TestCommand void OnFailureResponse_115(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -14043,7 +14043,7 @@ class Test_TC_EMR_1_1 : public TestCommand void OnFailureResponse_1(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -14143,7 +14143,7 @@ class Test_TC_FLW_1_1 : public TestCommand void OnFailureResponse_0(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -14375,7 +14375,7 @@ class Test_TC_FLW_2_1 : public TestCommand void OnFailureResponse_3(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -14396,7 +14396,7 @@ class Test_TC_FLW_2_1 : public TestCommand void OnFailureResponse_4(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -14695,7 +14695,7 @@ class Test_TC_ILL_1_1 : public TestCommand void OnFailureResponse_1(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -14795,7 +14795,7 @@ class Test_TC_LVL_1_1 : public TestCommand void OnFailureResponse_0(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -16176,7 +16176,7 @@ class Test_TC_MC_1_1 : public TestCommand void OnFailureResponse_0(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -16893,7 +16893,7 @@ class Test_TC_OCC_1_1 : public TestCommand void OnFailureResponse_1(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -17103,7 +17103,7 @@ class Test_TC_OCC_2_1 : public TestCommand void OnFailureResponse_1(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -17163,7 +17163,7 @@ class Test_TC_OCC_2_1 : public TestCommand void OnFailureResponse_4(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -17224,7 +17224,7 @@ class Test_TC_OCC_2_1 : public TestCommand void OnFailureResponse_7(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -17524,7 +17524,7 @@ class Test_TC_OO_1_1 : public TestCommand void OnFailureResponse_1(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -17583,7 +17583,7 @@ class Test_TC_OO_1_1 : public TestCommand void OnFailureResponse_4(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -20085,7 +20085,7 @@ class Test_TC_PRS_1_1 : public TestCommand void OnFailureResponse_2(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -20309,7 +20309,7 @@ class Test_TC_PRS_2_1 : public TestCommand void OnFailureResponse_1(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -20368,7 +20368,7 @@ class Test_TC_PRS_2_1 : public TestCommand void OnFailureResponse_4(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -20427,7 +20427,7 @@ class Test_TC_PRS_2_1 : public TestCommand void OnFailureResponse_7(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -20527,7 +20527,7 @@ class Test_TC_PCC_1_1 : public TestCommand void OnFailureResponse_0(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -21164,7 +21164,7 @@ class Test_TC_RH_1_1 : public TestCommand void OnFailureResponse_0(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -21521,7 +21521,7 @@ class Test_TC_TM_1_1 : public TestCommand void OnFailureResponse_1(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -21816,7 +21816,7 @@ class Test_TC_TSTAT_1_1 : public TestCommand void OnFailureResponse_0(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -22782,7 +22782,7 @@ class Test_TC_TSTAT_2_1 : public TestCommand void OnFailureResponse_3(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -22862,7 +22862,7 @@ class Test_TC_TSTAT_2_1 : public TestCommand void OnFailureResponse_7(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -22942,7 +22942,7 @@ class Test_TC_TSTAT_2_1 : public TestCommand void OnFailureResponse_11(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -23022,7 +23022,7 @@ class Test_TC_TSTAT_2_1 : public TestCommand void OnFailureResponse_15(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -23763,7 +23763,7 @@ class Test_TC_TSTAT_2_1 : public TestCommand void OnFailureResponse_54(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -23822,7 +23822,7 @@ class Test_TC_TSTAT_2_1 : public TestCommand void OnFailureResponse_57(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -23862,7 +23862,7 @@ class Test_TC_TSTAT_2_1 : public TestCommand void OnFailureResponse_59(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -25501,7 +25501,7 @@ class Test_TC_TSUIC_1_1 : public TestCommand void OnFailureResponse_0(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -26512,7 +26512,7 @@ class Test_TC_DIAGTH_1_1 : public TestCommand void OnFailureResponse_1(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -26701,7 +26701,7 @@ class Test_TC_WNCV_1_1 : public TestCommand void OnFailureResponse_1(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -26762,7 +26762,7 @@ class Test_TC_WNCV_1_1 : public TestCommand void OnFailureResponse_4(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -27606,7 +27606,7 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnFailureResponse_1(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -27667,7 +27667,7 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnFailureResponse_4(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -27728,7 +27728,7 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnFailureResponse_7(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -27789,7 +27789,7 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnFailureResponse_10(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -27907,7 +27907,7 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnFailureResponse_16(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -27969,7 +27969,7 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnFailureResponse_19(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -28031,7 +28031,7 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnFailureResponse_22(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -28093,7 +28093,7 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnFailureResponse_25(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -28154,7 +28154,7 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnFailureResponse_28(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -28215,7 +28215,7 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnFailureResponse_31(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -28276,7 +28276,7 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnFailureResponse_34(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -28337,7 +28337,7 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnFailureResponse_37(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -28398,7 +28398,7 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnFailureResponse_40(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -28459,7 +28459,7 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnFailureResponse_43(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -28520,7 +28520,7 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnFailureResponse_46(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -28581,7 +28581,7 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnFailureResponse_49(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -28642,7 +28642,7 @@ class Test_TC_WNCV_2_1 : public TestCommand void OnFailureResponse_52(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 136)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } @@ -34262,7 +34262,7 @@ class TestCluster : public TestCommand void OnFailureResponse_1(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 133)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_INVALID_COMMAND)); NextTest(); } @@ -34349,7 +34349,7 @@ class TestCluster : public TestCommand void OnFailureResponse_4(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 133)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_INVALID_COMMAND)); NextTest(); } @@ -35973,7 +35973,7 @@ class TestCluster : public TestCommand void OnFailureResponse_93(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 135)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); NextTest(); } @@ -36170,7 +36170,7 @@ class TestCluster : public TestCommand void OnFailureResponse_103(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 135)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); NextTest(); } @@ -37845,7 +37845,7 @@ class TestCluster : public TestCommand void OnFailureResponse_158(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 135)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); NextTest(); } @@ -37959,7 +37959,7 @@ class TestCluster : public TestCommand void OnFailureResponse_164(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 135)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); NextTest(); } @@ -38073,7 +38073,7 @@ class TestCluster : public TestCommand void OnFailureResponse_170(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 135)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); NextTest(); } @@ -38187,7 +38187,7 @@ class TestCluster : public TestCommand void OnFailureResponse_176(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 135)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); NextTest(); } @@ -38301,7 +38301,7 @@ class TestCluster : public TestCommand void OnFailureResponse_182(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 135)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); NextTest(); } @@ -38415,7 +38415,7 @@ class TestCluster : public TestCommand void OnFailureResponse_188(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 135)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); NextTest(); } @@ -38529,7 +38529,7 @@ class TestCluster : public TestCommand void OnFailureResponse_194(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 135)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); NextTest(); } @@ -38643,7 +38643,7 @@ class TestCluster : public TestCommand void OnFailureResponse_200(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 135)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); NextTest(); } @@ -38757,7 +38757,7 @@ class TestCluster : public TestCommand void OnFailureResponse_206(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 135)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); NextTest(); } @@ -38871,7 +38871,7 @@ class TestCluster : public TestCommand void OnFailureResponse_212(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 135)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); NextTest(); } @@ -38985,7 +38985,7 @@ class TestCluster : public TestCommand void OnFailureResponse_218(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 135)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); NextTest(); } @@ -39099,7 +39099,7 @@ class TestCluster : public TestCommand void OnFailureResponse_224(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 135)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); NextTest(); } @@ -39213,7 +39213,7 @@ class TestCluster : public TestCommand void OnFailureResponse_230(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 135)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); NextTest(); } @@ -39327,7 +39327,7 @@ class TestCluster : public TestCommand void OnFailureResponse_236(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 135)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); NextTest(); } @@ -44773,7 +44773,7 @@ class TestModeSelectCluster : public TestCommand void OnFailureResponse_7(uint8_t status) { - VerifyOrReturn(CheckValue("status", status, 135)); + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); NextTest(); } From 4c37486c51ee1b96f98a8aedcea30a0da732aec4 Mon Sep 17 00:00:00 2001 From: Yufeng Wang Date: Mon, 29 Nov 2021 21:26:26 -0800 Subject: [PATCH 23/42] Update General Commissioning cluster to align with the latest spec (#12343) * Update General Commissioning cluster to align with the latest spec * Run codegen --- .../chip/general-commissioning-cluster.xml | 5 +- .../python/chip/clusters/Objects.py | 13 +++-- .../app-common/zap-generated/attribute-id.h | 4 +- .../zap-generated/attributes/Accessors.cpp | 58 +++++++++++++++++++ .../zap-generated/attributes/Accessors.h | 10 ++++ .../zap-generated/cluster-objects.h | 25 ++++---- .../app-common/zap-generated/ids/Attributes.h | 8 +-- 7 files changed, 97 insertions(+), 26 deletions(-) diff --git a/src/app/zap-templates/zcl/data-model/chip/general-commissioning-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/general-commissioning-cluster.xml index 8b5b3652adcafb..0957d69b704b3a 100644 --- a/src/app/zap-templates/zcl/data-model/chip/general-commissioning-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/general-commissioning-cluster.xml @@ -21,6 +21,7 @@ limitations under the License. + @@ -40,8 +41,8 @@ limitations under the License. This cluster is used to set, remove and update fabric information on a commissionee. Breadcrumb BasicCommissioningInfoList - RegulatoryConfigList - LocationCapabilityList + RegulatoryConfig + LocationCapability Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index 1fb41413cc819e..be946a135b6d61 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -6525,6 +6525,7 @@ class GeneralCommissioningError(IntEnum): kOk = 0x00 kValueOutsideRange = 0x01 kInvalidAuthentication = 0x02 + kNotCommissioning = 0x03 class RegulatoryLocationType(IntEnum): kIndoor = 0x00 @@ -6695,7 +6696,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.List[GeneralCommissioning.Structs.BasicCommissioningInfoType]' = None @dataclass - class RegulatoryConfigList(ClusterAttributeDescriptor): + class RegulatoryConfig(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x0030 @@ -6706,12 +6707,12 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[GeneralCommissioning.Enums.RegulatoryLocationType]]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[typing.List[GeneralCommissioning.Enums.RegulatoryLocationType]]' = None + value: 'typing.Optional[uint]' = None @dataclass - class LocationCapabilityList(ClusterAttributeDescriptor): + class LocationCapability(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x0030 @@ -6722,9 +6723,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[GeneralCommissioning.Enums.RegulatoryLocationType]]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'typing.Optional[typing.List[GeneralCommissioning.Enums.RegulatoryLocationType]]' = None + value: 'typing.Optional[uint]' = None @dataclass class FeatureMap(ClusterAttributeDescriptor): diff --git a/zzz_generated/app-common/app-common/zap-generated/attribute-id.h b/zzz_generated/app-common/app-common/zap-generated/attribute-id.h index f79b7e04b4b590..3420054b90337b 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attribute-id.h +++ b/zzz_generated/app-common/app-common/zap-generated/attribute-id.h @@ -367,8 +367,8 @@ // Server attributes #define ZCL_BREADCRUMB_ATTRIBUTE_ID (0x0000) #define ZCL_BASICCOMMISSIONINGINFO_LIST_ATTRIBUTE_ID (0x0001) -#define ZCL_REGULATORYCONFIG_LIST_ATTRIBUTE_ID (0x0002) -#define ZCL_LOCATIONCAPABILITY_LIST_ATTRIBUTE_ID (0x0003) +#define ZCL_REGULATORYCONFIG_ATTRIBUTE_ID (0x0002) +#define ZCL_LOCATIONCAPABILITY_ATTRIBUTE_ID (0x0003) // Attribute ids for cluster: Network Commissioning diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp index 75f8126d7ec313..04e6867ce8887d 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp @@ -5476,6 +5476,64 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) } // namespace Breadcrumb +namespace RegulatoryConfig { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::GeneralCommissioning::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::GeneralCommissioning::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); +} + +} // namespace RegulatoryConfig + +namespace LocationCapability { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +{ + NumericAttributeTraits::StorageType temp; + uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::GeneralCommissioning::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = NumericAttributeTraits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + NumericAttributeTraits::StorageType storageValue; + NumericAttributeTraits::WorkingToStorage(value, storageValue); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteServerAttribute(endpoint, Clusters::GeneralCommissioning::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); +} + +} // namespace LocationCapability + } // namespace Attributes } // namespace GeneralCommissioning diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h index a637fc51b37221..60ab0babe3e6c2 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h @@ -1059,6 +1059,16 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value); // int64u EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value); } // namespace Breadcrumb +namespace RegulatoryConfig { +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // enum8 +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +} // namespace RegulatoryConfig + +namespace LocationCapability { +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // enum8 +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +} // namespace LocationCapability + } // namespace Attributes } // namespace GeneralCommissioning diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h index ed25803b4b13f8..903b348781c138 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h @@ -7793,6 +7793,7 @@ enum class GeneralCommissioningError : uint8_t kOk = 0x00, kValueOutsideRange = 0x01, kInvalidAuthentication = 0x02, + kNotCommissioning = 0x03, }; // Need to convert consumers to using the new enum classes, so we // don't just have casts all over. @@ -8090,28 +8091,28 @@ struct TypeInfo static constexpr AttributeId GetAttributeId() { return Attributes::BasicCommissioningInfoList::Id; } }; } // namespace BasicCommissioningInfoList -namespace RegulatoryConfigList { +namespace RegulatoryConfig { struct TypeInfo { - using Type = DataModel::List; - using DecodableType = DataModel::DecodableList; - using DecodableArgType = const DataModel::DecodableList &; + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; static constexpr ClusterId GetClusterId() { return Clusters::GeneralCommissioning::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RegulatoryConfigList::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::RegulatoryConfig::Id; } }; -} // namespace RegulatoryConfigList -namespace LocationCapabilityList { +} // namespace RegulatoryConfig +namespace LocationCapability { struct TypeInfo { - using Type = DataModel::List; - using DecodableType = DataModel::DecodableList; - using DecodableArgType = const DataModel::DecodableList &; + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; static constexpr ClusterId GetClusterId() { return Clusters::GeneralCommissioning::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::LocationCapabilityList::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::LocationCapability::Id; } }; -} // namespace LocationCapabilityList +} // namespace LocationCapability namespace FeatureMap { struct TypeInfo { diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h index 274616f63e20c2..6d2abd1247bc8e 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h @@ -1146,13 +1146,13 @@ namespace BasicCommissioningInfoList { static constexpr AttributeId Id = 0x00000001; } // namespace BasicCommissioningInfoList -namespace RegulatoryConfigList { +namespace RegulatoryConfig { static constexpr AttributeId Id = 0x00000002; -} // namespace RegulatoryConfigList +} // namespace RegulatoryConfig -namespace LocationCapabilityList { +namespace LocationCapability { static constexpr AttributeId Id = 0x00000003; -} // namespace LocationCapabilityList +} // namespace LocationCapability namespace FeatureMap { static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; From 20c564bedb47070c838869dde00a8729b22fe5f3 Mon Sep 17 00:00:00 2001 From: Seth Rickard Date: Mon, 29 Nov 2021 23:28:00 -0600 Subject: [PATCH 24/42] Add ECC hardware acceleration for TI platform (#11682) * Add ECC hardware acceleration for TI platform Add MbedTLS ALT source files for the Texas Instruments CC13X2_26X2 platform to enable hardware acceleration of ECDSA and ECDHE. This was done to address timeout issues with PASE and CASE test cases in TE#6. The test cases would fail due to a gross timeout even though the sessions were established. This change requires a new version of the SimpleLink SDK to avoid a BLE ROM symbol collision. A new version of the SimpleLink SDK based on the 5.30 SDK is used here. Documentation has been updated in associated project READMEs. The button middleware driver API has been updated and associated calls in examples have been updated to match. Address an issue where the SHA-256 hardware acceleration did not copy the digest buffer. It was incorrectly assumed that the digest buffer would be empty when a SHA context was cloned. This addresses an issue in decoding ZCL messages. * Restyled by gn * Restyled by prettier-markdown * fix copy/paste error * update pump README * Add DMM Compatible BLE User config for Matter Replace TI SDK BLE user config to enable DMM hooks. Co-authored-by: Alexander D'abreu * update copyright and make pretty * update HEAP and cstack size from TE#7 * Restyled by gn Co-authored-by: Restyled.io Co-authored-by: Alexander D'abreu --- .../images/matter_ti_overview_simplified.png | Bin 0 -> 75738 bytes docs/guides/ti_platform_overview.md | 121 ++++ examples/lock-app/cc13x2x7_26x2x7/README.md | 47 +- examples/lock-app/cc13x2x7_26x2x7/chip.syscfg | 18 +- .../lock-app/cc13x2x7_26x2x7/main/AppTask.cpp | 22 +- .../main/include/CHIPProjectConfig.h | 16 - .../lock-app/cc13x2x7_26x2x7/main/main.cpp | 8 +- .../cc13x2x7_26x2x7/README.md | 26 +- .../cc13x2x7_26x2x7/chip.syscfg | 18 +- examples/pump-app/cc13x2x7_26x2x7/README.md | 33 +- examples/pump-app/cc13x2x7_26x2x7/chip.syscfg | 49 +- .../pump-app/cc13x2x7_26x2x7/main/AppTask.cpp | 29 +- .../pump-app/cc13x2x7_26x2x7/main/main.cpp | 8 +- .../cc13x2x7_26x2x7/README.md | 33 +- .../cc13x2x7_26x2x7/chip.syscfg | 48 +- .../cc13x2x7_26x2x7/main/AppTask.cpp | 29 +- .../cc13x2x7_26x2x7/main/main.cpp | 8 +- src/platform/cc13x2_26x2/BLEManagerImpl.cpp | 17 - .../cc13x2_26x2/CHIPDevicePlatformConfig.h | 2 +- src/platform/cc13x2_26x2/FreeRTOSConfig.h | 2 +- .../cc13x2_26x2/ThreadStackManagerImpl.cpp | 10 + src/platform/cc13x2_26x2/ble_user_config.c | 530 ++++++++++++++++++ .../crypto/cc13x2_26x2-mbedtls-config.h | 8 +- src/platform/cc13x2_26x2/crypto/ecdh_alt.c | 314 +++++++++++ src/platform/cc13x2_26x2/crypto/ecdsa_alt.c | 289 ++++++++++ src/platform/cc13x2_26x2/crypto/sha256_alt.c | 2 + third_party/ti_simplelink_sdk/BUILD.gn | 2 + .../ti_simplelink_sdk/ti_simplelink_sdk.gni | 16 +- 28 files changed, 1476 insertions(+), 229 deletions(-) create mode 100755 docs/guides/images/matter_ti_overview_simplified.png create mode 100644 docs/guides/ti_platform_overview.md create mode 100644 src/platform/cc13x2_26x2/ble_user_config.c create mode 100644 src/platform/cc13x2_26x2/crypto/ecdh_alt.c create mode 100755 src/platform/cc13x2_26x2/crypto/ecdsa_alt.c diff --git a/docs/guides/images/matter_ti_overview_simplified.png b/docs/guides/images/matter_ti_overview_simplified.png new file mode 100755 index 0000000000000000000000000000000000000000..2586fa41fdd97aecf59f78ac5060af273da89c03 GIT binary patch literal 75738 zcmc$`30zX?+dtgYG^I^hX*OkAjZ0ZlEGaIT;{v3n0V)W*2Q8cV&F^{M-}C-I@BcZUPvn7f?sMPQeqHzX zIyX<+Td!8!thi*!lGVqLSvoFRvfOaVl4a^Ee*nI*hgiG@{`)T2(b{53N$VC4aPqyE zxt;lvC8de0=FTh!&J_ZVxdty;q8=yz_g&)9q$lv@`jDfiLLmMZLc-4kc`mUI^7Qlz zzUUtUcUlSDB8xk2X%3Bmf0UTN+57qoF0NHL{*wK8`*#z2f4sWNU*S#bC6~JN=CK>; z&%?LB*;##kyZe^l9V1Jpm+XAMvgWeVkH!l3Vih(8tbcb+OJV!|OXi6Rul8A3KR9*! zyiGRRRy$X_siOwfmeE148zGGsj&r573Es$e8gDWt$m1pQBZf9E!;EYICc1DuQMag8 z_GgQP=PH_jtr3AcP;=hr9v z?04{gcZj}NkaXCv|Bad15TRcT*SX~no{afa4pM981Z$-{3x`Wau`wLGRp_M>C4dl< z%8Lt%*eIP$jNxApPP)eMZh71uB9|Pg?s7(tYV}LQ%H#i7SoOE{_SNapL<~dy#Hx1X zOz*TJ-dex}z-Qwn17nrWS)nrwJ9WZL0H%7+u!07X4zNcOv z$FDm;C6%l8xI4rhv;cnXxzM!Y3%mVcm=h2h27+1gazJSn+Bxq1I8wcPB{0Rmj^>IH zH+#hB56-Ai^GooOcBPn4!%5)x|IG~>PBBNdTc`A8lDN4uS#8|4Jyg;Wwe5f~_~|c- zfnkx%03j)9nJVY|h*Cj1xxW=zWqHr0;np(_3J#kh`1Db5y<}`)EOMJ$oOk!u*c$2P zdMT;R`l=y;Qa3?6HUuk-r?2rzgih;@L5m3C3_s%^q!lG^5As?3& z+qwL>;_}SCPvrXz+m|D9_}3gX61>?`u4J>KaulvIxPk=TyF7+?nsjBKQfd^(n{apA zzO353M|;P3>-8J#1bKZ+-fv*<(`3a35 zwP)H<8@6aiAWR*qReK^2rCOLQzpz^i;%*6k!g-@;h`rKMo5}BYuE`7YiKW7@-9;7g zr%?y?3zi9rP?3$S3FL5dacp{bo2qf8=ix#`5!joCwXg=objQ)Xpe|j;J1v^?k=p?7 zm;6QW^-b?~DMrjGfR`U8o^Dnd-%wHFyld3lH=8gUr5BpOMGddz3_Al-OiF41tMH^2c;y(@6xa4d*Mld1Hh-!P+6V zNawf04Ua@Z{)F?5IyzHso^-z{b};Hm&TqOYNgPf!MQazrZQ#z8EXqSIWE8Q4wAOxm z7i=xzQnSO#jHVNW4Lx}h@X-0)?9UbWD`r}zuAHYt(NoxC709-F;bF5(XSEI14R(?@ z91ga-pC2;xYEl{22xI3R>@>?SlRwrbKl+o-O1b(^=G&UTgB=?JztWAh_uI1t7B%+x z{?caWT@RWPzK_tjuWL%>+`e{>m|@GFAU&RVoZu=6CN*wSAm&Y9r95o)rZ}`uXEE9w z(@Pk6&d7E)p|i5WcOr07Z@pEky4X~!<1u1kw z=cEnzMJ1orId8=RZ+){j+NQfcDs1lbFq~K&;dqEHreA1(R_y%SpO>A$0X$Js7->nH z_wsN#3;BxDi@y_G^77yy7pgTovc*lokgAk;E&eEllw|QaWR5A!sSL-}CB@(8W({o7|*c`j79`~ZWL&)dBJRA@gtkrZZMqz*Zh+SL0@Ii_l@Ux{g!arOjQ zgf5{rl85?+fU(wjexu1t{t8dWn%p@5>=BB$Qh4RHFzsz8z&lWfDpl)upw&rhS>DTi zsROAikZxDHG@%lKWzMwvq{_erpSE_b)3;172Te>OYQiG{Qd|B-p7)tf9-J~JH&_z1 z3ittDHt%<3sw4x-)KuK1W@SV|3QF3ZwUEXtj;gycAnfGATOeZksiK_nFq65NJSju0 z;-6SgRXIPcK}(IoS_5Mzf1|I0fZw|=7u4X$8)$`XV|E-jPm6OxoPm`Y-VTDXx$ga4 z1NpdGJMg)LN6yw>V-YixHUs(Cb?|%^E>!Su2aLi!XE$_r;x)#7SC3@?6Fo&y&EFCA zY!`t->Jwyc@Z)ORN!qgtecgNk6s zlf!2iu=}YWSLb9fD^aX)t7>A*dyKb9R&6q^x4KMflT_ zz|GcA+f_T2AKG9}y?U0Zi`k{M+>(>{D&iF5^NPeC+!Gr>a!U+*9NEk_(yJCeWEEd- zgb&`SjRJZz7)lQ!o^F>b3LDP;e1MA1vX(wv3)r8&Z!#MlWJ*7=-JZ;OUE{oDmuXK| z88SB6fJ8WIy2Wi(|2>WGc?vI~t$@@5lHeb1bC@$-xVxBM2J=uKN3n0TFLC0LBL4`` zmz>cN9M@yz&~W(fbN+|^Ar@MUtLCLcH(z%1`T6ijdrwHUz9`q-|NZE|JIB%Pj%mBg zXLgTNTzT9Vut)Ng0QEcWPcSb2yv^T+9dS&mGLX+d_v@64>=yT`y)iTD*=uUECa{dA zMMq^ulvZTE6K(cyKeDSGrMNHlu;xG^mzxDc%tFZ&+Autw+YRfRUxhR3=fGdD!F{y6 zbnl0B#+W!&bGDZVqbk6J`g==7eS@r^i7C0EIQ+VV_mh=R9W-fE$=>=4+!SZBdI7x6q{oKS6gPeikZlP5}i^}L9%)nHiq6&~r zBZ@y$^N*#ihZGzT?Vfs|eR`_j?LK#4*K@~5J2o`r3Ap9Vt-8DS#->~FPTp~P9Nj_oihTW9~EVu3*>dVM1STzx^mxW{u2__y; z1cXb}lUqmfDq)BJt$f_%9H&wO0-&*03A8nt4Ve`^>rJ2L+YX%Cv&*+#+4qE(bG0^h zX{$jhyalef40}?HaP8lS##KUWG2hj{d?suUfb4!{XYQ+{_!}!h&=>FzAt4k!dAV$B ztS9lK#)d=2-G1snQ5w`^Jx#Nc8#-{094Z@1ar>M?+o$SVQ{_uzEBg`6s82J66s;v1 ztCumPf}%g|5wu&{=k+2YYIgJ_7xs6AZ83e(C4THReLd-4>1oo-zlOtQ+jvet!0ju> zYn)aLSAiA66-#~i{>$&#(D3_fR1&=1VP5VYvC+G8jQKwl93^a+8e3fj)uRw_2ly^U z6g@=&jO|xbVJ~sR7uh+Ad0qzH_1Hj)F6gDjmy*szxm6&9rEM?2=%@GyQ$63{>FT!_G0^A zQZ+bhAvu{J!ty!sZ+V=(Kqt(f;}SFM^U_!hTTPTmy<{KpR6jibbFR=q zJf$Rk3c3NJ-2)`Q@t9nf4mEz&qz{&?h89=z-hRnr%yi4<{^8Vymh~r9QP1qg`oS?% zNv!6cv!|je|I0hc`Bm`a8>>`)NWE0{R@qNfzs?U(LyaAB{rIqDQLUBTR~f$ObLqq` zTx@JQkl#?bxuIo?Uw+VyLp%TVYCFRwDgOg-y(A^X12ix^c)a>%#O-;-4PI1R`(Jx^ z@sv39k7xsG3{o5inj5f-yS!##_#j|H67R}2KQQ4di=W@jR~w>9s${}+nK+q5&KK|D z^v|}2uQb%#Hn8)<{(0Ncy8o*)Khz$QQ`|O}_@^)0px5KL41pOVuk(Zd)?oMi+%Ixt zk#X*;xCLgD0y>YpUKmp3>;F^1C1~?SQy3wq*5|R}c^2-FotS1x5{5>v0bFpL;@@M!H98xBB1({(?!=Y%cEX-p1z` zm*Tf0KGvk7s@}S`NExdZN~`ssrn|CPZPXH2BKK5+#Mw&#PASqJv`7>Ls&t3##_~O* z5@e`n{iwbDlmRA2H;JdY-LQ3Wx2sJa%SybGIMw2eUER`n(d&ix~7{O5xS2*XtFv zQOguO$d!2k@2)=B9Q&KMyC&+ArejT-vB>s2=6c1FXj4alhfmJ6rYfcj4_(67R^J$F zhmaQwjH6mttFznpA;M(P-pszz9qP*dw^Hjrb{rIxtNc)Tl0AJbucK|X#BGcc^3iF! ztZsU%0~vJu5g^Vpm49WkCpsTLn`CeL)Q+^mX2-R6>-`eGUwxAqAKfk6al+mDl%k>O z=;+Zi*5HCcBE+ulTJN^hQ+*I>&$UUud(NR#StBZ)+l-}{5j>lwyx$bECi11` z^6Aa1+{`{e0N4A?+D$rcyHotkA$HTyXCPWIlqoQ*&F`h^iE0r|NjVghMG?GjQh==_ zf<8aA3N65tgz?9km@(dHK^P-J+t+o~o!lyGs)mHdeTcjmB??Dp2n#}ui9NQNC=ZH9 zXw)An7L^t|Dd)WR5M>^Uxv6j`Venpc4~ZK)Sz3ODOCCGa%_{S~<%};jEyMWCZYF7_ z6gk~U8+Bz)9~IaSrCvFUB$!Ek;-13-3WgAMV<*^5b^-o?x`Ls?LBMXZ7mcV^t%@J_ zhj$#Rw$L*)2Ocw=WwYnv9b!zakq0Ud$`&rkdgP2DRJ^#SDTdf)C0iuqy#=CTMNq1c zxFJBh;CQnxg?ED}fz+f`9&0=z9v9=e#SguSXa?NJ#v1)=3YG}o7-9n1R~XZ-xOP=x z+*S~y_o`(n6ciaE;|mbI@RxRDIu-HIdS|g)l7$O8wfodLmm;OnQ>jbJtdO{-X6CzG z<9yWYeme<48hQ73xjFcY>FkUTQXh?c_(;W%E{YFDcbcvLK_p}~)OD*==Dsgr64}{9 z7psY)s2d$>#<@%K*Ch0+_$5>fI72QaHMRVjB~5DDNp-hQwR`GT6yIs2#T5OfSfq#; z89FB6&$de-ydcL%E<7H|RdGmA{=oUC2dyc%Nqcd&Fc5amdQZ=3w(Kky1m7vxa0RG9 zK5u*Q)mLR)taT{yZ<6e+G5kb)rlO>bdiF%+693w2ipGuN<%#xt9u}ytHiT5StNFfC z>8`Z6MY`Mqcl)kYqa(~m*(S>ciE=CrcO?#vREX@2N9f?FD+HBKf{Y}MPdA+Gql|8{k0d05iN z=7{@m)qdE0r@akYuanfI+x3`~4XHZX+>V?<6x)E|mHg0(E8EHGKPik=K3JMT%^jl~ zleGBvj9ZP@_~+@gt!D7*B4;{%eok@gOgz4)VzQRgPwer9Tq?&_WWq*X z#iWG5&{~|3dM5K=nlh5w*^DSVdbh8J)+Fu6J@ZELktyhi+ zQSmdfjhBxh1eH6fXF~n*6S#MpS{%{tk|XTN{_nJ5Xlp!BY5YPFh=;6Q(%J0osy8_1 zgxfMrIMO^qG4<@2e79LqB?ReZ3L$Gl~kipwbjv zK3Bn&Nl!Xa=%oOuu*WFslve6$QDP65f#6{~i6#2os9W6$fRfQUMq#Etrl_SS#krqO zAiEWld|+(Wh&|xf!kpY4YtDl`4n4+*l2R0JQg2TLZ-PX3@psoGDri^m1uOMBi&##Q z^Q1Sg_9qi%6>o)AKTv?sGtuvx+vZpq#je$W<+F4>)e~|bHZ?MZF)ox2tnw>p0#A zDEm~`+6%}vpFGiZldKjuq(M1ZSd3_s&q2j;v~P0}U_!}%n?odG<-i#WUdk)nojhl- zx1Yj;irb(X%HK$mgEX~K3b5R52qBETt3mxi9wFLl#g3E4c)(ta4eD{i_vcK}10SW@ z)Ul8sxp-D`f0ZjgFiRupS1G;XWlkEJ;^iKdkYy{eF6j3uwxz9q!d3w$GM{N}eHoI| zqh>Kv#L?K9>(ViF?0u^Aq?H8^Dyi7Zpk3Rd$-ZY_r0Zi{Ip8UnfcmB8h(R{U#^Vd* zfMJY{vg!*CI$g?@!u_9lBR#&zOs1P!JrCHoL&J(U2Wb1mX|wHy883FWD{YO?MGT0D*Gy>)$Dty$VU% z8y_ z;_v^}H2cLK(D>=b`lbB(dwZiSRMVCo!03jyEY3p{D8d*vw@dItU1DwdEcjvTrOEFf z*dxT844a{QeI^=FwL_j50GH0G|qU1`ylo9KR)hv*4KAKgqA zZaLD$#yH|NjI@BDe{1izfW0$*s$+EkZ+cL$FbR&ixx~_iEdA39;dYdu_2X#o*0k;@ zn>*RU5|6un$lzQ*eMVRYpyBrZcaki`?SvlwpBbIqG2CTx^>%7BOtBI2W6Q-}?f3}j zqmPYwf*02lm0|Xth`HBRtY-{euu*(taLgYX)d|^Y z9g`go^-&N1x3j_9@814fOUE8gnc?|BD}4TxR;?wEL(VRztG?)yXru1@jH-n23FnXQ znb|~Q>p%+b$xRNjGi1$e6H);o*>tT6>D;|a?7Zk)DebEdxF9PgIUM3-dGfpil*}cZ zDM~Or|J;ECeHVY^o4r*Gnci~5r~?DlQ+n{CJE<6u9hb#@V0k`Kr+Pjj;=K%x+Tkv| zt`h?(!AzUjuJ95iZb*}qGaK)sOpT{I4>e zH^gH=^S6wFh;yUz_-$+ZUj=Cbwkuans)``voBHnTSe^`%IYt!L=4quUA`Ats-NM|7 zM2j@aLH?y97i;neaDl#3!gI%nPBydLPK*V}<$CxBz&97jC>BQO60~h&&RZW|NNXNo z7Fl=i_~h#44u)IGitWJBs!UwH@A5aEQ*HcXl}p7i5@G`8Hz zI|qcy5zD`&j6f2I$hzalcjNc$o4&5YQ7F5@%o_TmHWK{wTAT(zGgiy-P==RHMP(PN z7Anq?Xp8fMNKe9a`5Yv#EB~O}MimPNyPbcZXtbyl-I%60yZI{+{^%<~NNU0=^fKB( z2yE*#u$3j*AiTm&YpOae`jFq}g(OqjxGQWf7p9Uo8C?&ukvXtMGX)qjIuNi2Gq1i` zr&^%?R@)Bd_vj>E)3G`8Y<+DYtE?U)GC>lm`TYCGXmMb0v~Jd;XISmZrMViYD>?1I zAyPHo-;nDf7*x`W(oqQ_D$STxU7_d>Km)=1D)aQV^n!Ywf3H4RGBeSuQyiOpoYZ{v z2|VNt3#THNc&0SzWo0`OC~KSD`xbWqsRi!juGj=B_;~zvot!gQEmDks3}g!ZwcmQj zeuvoZ3(GH%AYzRbQpV7XaGQq)N4~fd!q&&cK3%$&Q~fp9n7y14?a>n>8CY+QKuv*A zDU8(=6Vh={=px6iZf577Zg^XIkml3zS7s9cUBI&A=|q!915sT=QGNKD6MxqoO{)`~gm@sX~`bIE9*mjO8QqwpETKmR^jEJ?#BhWGm2E z{c~l7;78LZ>*mdPOa^qTqlY7VwiJ3OckrR~?iCw7eCy4S*2uKfs4JyZ^uP@%$0w37 z5}l&aqiedqm*?p5uC@)3_?}Ko2V}ULOvlQFe$je*+C|T^* zGr86K7i`WG$Z!8Uu$}*l0HN&z!{uIWaO&sQ!<}?drG@(e`i>+2*~d`CO2ZX-dtJHr z{-cjBYhttQ|BX8y3=H4es0SC%&3*<^Hm*5+z4m;8&42cRE8Dx9*P6Y_uU>l;Cwc2mmZC7M25k!tHMYAWh#uTW2C(?gBth-_Txh1DkR(08G>3JzK8- ze;nj!upM4DH`3od+PD=nH%vg!y`ar(?1x#~q)3V|0&=~G;vuFO+HAFR%PRb1^F-4+m|ron37NzNGpi>XdKY)XW0oM}?k5FF@U(Wcg&`fK>fmm9MPvUaWcwY~SD zPoF?c+vfbr3JI%r6?@27GC{h*7Hg_0A-Y6#SdlJm@R(Ue#*{qbs%i_c_FxG%6|}kc zlPnGN*~<(PwrG2&c>@2A-BUN;qK#tGz7I+Gw~V3p~H%Cr-qPlt0QZmUxF%*Mw;j?pTw5#7?=vZ8DD%pHZ); z+wkeMxzo6#kq?fS#HLsboR{R{QoWbQYWOwvu{yo3rBC;HwLYv!)Y(4t>ZgZNM{-Vt zifLo=;F>k)1&Jy-QM0iy^F_&_ z@o#IJX%wjeeWze*LEkl##W%YF0S#FN_RCLyi^@bK2Mz6{=FjPnv~;Tk!*n8Er&FfI zRfBZ-Jgz-WEkSiP9Fy?ccxvx+{raI>B z#Vo;RqSo$@(5)w5om{a&*J)bC;%4oe?)}bpe&z=2r?s-+T)_>L8$x0sfYhw7P98d+ z&3JhnG>vM_xf^UZ`V&J^?8(z+woA*ch_|Ha2{lZQ>7q1&i)r(uZx<}_exP3gO~6kK zf*%S^Yq*F%sZPg3y1J?8Y`-GPk~$47VFqu0l>v5563a222MAPQe~qhO!`u(GC&|I_ zj`q!mhP=E@y^T!Q<*U6Ey>ye2+s^Z>y5wt)_iXUL29X?9H@QfSU0C!GudH^~$+h>L zsMFQ0;E0v_M9wjEzTcp;hq9oodwLyEgGH9Ct&N5!q)BOWb$nTnFMU`ftBnaA&6?t_ z@XUl^(7w=vV{X)F7`V6Uyn=bfc$re6n|gu{WpJ~nx+5K(v*GkhUGr8abU+QXq2>FPAdg>ShZ6Wh$ zqLf(2icU|5Et{vL9mzFARC@5tYpoLRH64x z(GMmL6N8R5Wf~N>mX07(0U67RFZH{juJj$O5uu>|xh&d;=UO4MMQ>60=@+gi-SU;QyCtoySP=NyG{$2}erUl2NkA~oyLAlOS z-Aqx$UIwLaT1A5aV#%~nO{1r<2fPnkh@GaL$kWGUoGd?0!Rq)n-Gl;65r|v9o_?I{ z(%a|O7GDd>d+$hp8pTZ?^6KDlltaZ;-B2;SipUDh1=Eoax@|8;<=Gb5FKC2Ka?~Gk zjo`=XMGuhTWBBdX{xRLw=p<&5Uqz}#+`Nh`l3`>xB;I)Ku`@2SuIig3YeW}1{ZBWK zba03m>Rg8z_j)bi^sU;xQOnYHz|i??w9gx>3d%SmrgU){Gpnts&2x{fyN^ka~63JC}nGRKhjt?E;ZkU3>4D@q$RrFrBr&+r^O-zVgY$Z!qxGMM4&e;CY zC9ZJ?hV*OV$`VL}Phe@H8J+mZ*jhd22vFMKAHi0juU^2Wo+*h+f+S z$No{4Vbajf@}57jL7_K@Q=VNaKP2N9!V}i*zTXZDIw7Xb*fN`Z!D#u^XG_VS_vkSj zxSqT=>jJh3DW^)Ew~tu0mn2AS8(L2qLU2X?rdmx?W%)7pTJZaH$FgM1hwH1v&Jm}azC+w+E>@{H+MhKM6=B4&@ZOxu}tK~N~ zT!9t+Q2X(mIxLlt$PF604jXFr>NCrpvo$sqc);o}@PFtgV!_~Hqi(CR816Ay7~gd^ z@>Z=o6ubTqt66w`r#*GNBB3v=#}Ug!HID?{WKJ1`N~&UJQz&Wj*+?JO! z#0?AKX$hLVy!)eCb0`OF1gFaXb&W(eg-)(&HOPzh(I@4su}#{n<@m}K8_2CCpxt2y z+kGC3KI6D^>#lx)vX#{&PjwZ3EG>?#@Gk%b`Q)g5Fw zX%g4)b5DUozoQ2Pq%C>mj4ojK=K_++oqQDM%x2)Hg*R(gH=8j$_Re5e&hu|cl|{cg z-HMz37MISnKrb6LydW^f`V|PunZ}m0X(97QM?LGKjRLZXhaqWsg?vtvj*WU9oe!N^ zzBQM_xDP914)|ZAppwH92L^v=LjwvZ2@JG}jXUeNnhvZO}pjLhjnUmQLSZVM~rI zDRoY)Z7X)DO0@V>DEc15{zT9to_9V7#b->8ZHWCxjvyR8!7#mg;3u*B1 zvqTIa#&V8rqiN+LO-pMj;N-WJTjHjU!ocYZ;lIfSo_E_CZu*}gn%I-?oIo1}0i|p4 zP&}x(V{I~LxCGEDn`VY#JXK6@IFddktM?En8wg@3e_bAG*%-YMYRJ$8uViEe6lsKl zK4!r^km?$@Pi|$)R|kDeA9>l4IGtq4V{HGe&TNYB`pTqd32ZG6??EC5W$?fT;hhg7rJa3z|=e0(Aro}r0%#Y!)njpH6f0NwPLm}pj2k#9B?z#d zFft=7+wU;oA-wQWO>}Udfcd)d#a(IVRi*=z5URKTu@uMvnmKjT2lQLxalBgvEC=|& zUVw$2omyNWD{Ou3&Vm?HC~{0$@Xm!vQ!V?#LIbpS8=!Q*_HN_!>zd}?YP@@G! zr1MT74X(tkaTGwr$%A_YvfWtGE$$s$7@W^5_WBKlPgcFF%M#9`gKod8>Ey+R(Jklp~0bcM7AtAEV|z0a*jyO`hIKXj}C_ zxKLS&s4l;+6$S)>eK`N-G=%1qQhqYmc)*@Gq#xnO8}4m7`hX+M`=>C#)Bm(IG{FY-itv(nip)7n70nHEXMo}|#4=P)2g!oCY$)@v~~V8}vn zIr|xTM|+j5KZU`%U#a1V9PLJk84I?=hfFcCe?;}_3 zHwgw^?ox^O8wVmyZG4rVA_a*-J=$>AU}G`n*mMzu-8FRnEJ=!J-gqHyw?S=< zOJ+r1EzVKwAv)0(AI@13^gSc1&ky`I>At$3YDGrEIdxIW=K@BeVqV?p>}1zM7k8QF zGdojr=O&#@e*|y01VifOj^zE_cqLJ=x!VI<8GLWFOQ^wPm6d%>zqwFTKbazH(4M85k-gRn0X=TNgtLGg`01sF! z@RxF$dTWCjHy~L1`9iQ;y+IDkeE)h|Pn|9wT96Qn3;FWHip3w)`MDR2RNXKy79g8X zx_*7u;vYSzMuyi#Omb&Gk6-{0kzW6t%916&gRZ56Z{glTAG2tKP}*Sm^z;||$p7@Q ztGp`XsD4lM1a(@+6d@EkRA*cKA>3{wrj4pUJu8`D*nPNY+;*8}*lxTx3{Tql>(iW&W6KkT%M?`cau1 znexhF>ERw|Y-hq>FtkwksX?H^_zxiIX8BC#TZa|~3M@2Os8ue4O+P>p^2ZRYDF7Iy_zNMvtYF;*zDzi8|NMUb7R@F4~Qu$@Lp@P)h#l9I&E%P zX6DH&;z&=3WHWlw@P?LKqi^@37a;EAhF@{25!u>3bT6rOP-XptadIwZh&H$5pO?1( zXb2LG=D6qqCT8sONSjAdTgDfmdbh^VG`UCQQ%k#7(k8rqS@9U;UWf-x$lu>*On$R z0Sqo2X)|z7=0MoI+`!vC2k6}D;=#;VL8dbzhLy1pQJ{-jS^%Z>A#dcxoZ^WeGclE; z#p>ysGyWHnL#xClRrqtAfhztnFSi&?tmt`0L|Rr zY!L3^o*sIe$**sfPt?!dmtN)Ln0Ojn(8Wnw_C`ek!?iMDP#Q>9;2Kq1N&EI@SwMlzkK=4EnC-e{uWH+?Ey*oaV z_xcdS`po5dNNRYa}Yhp47p!Kln>1@Z{H zlU8LSV0N^JIo4#eoI-;_-Z=Sbe{A1x2VwMF;+Ge1L; z+I!#HVJ#%w#~p;+DCI{<`Oxf~fOFn>*qOT))fGK&?mTxzU@5;h1K>Du=Zow$S7FG) z!3P$Fc`k8SF5!tb#fzs+%e&MpE~!j!8f)ip%H2$Ob52pr;^hpAv6TULBhZW5=!kwq z0f|g>%lRtNh<*x=@A=Zv4G>W{fIKb?X3#S&|<_HI8t#L zD`p}y*isHceU$$`+lxj|0MO77AMHD8-p@>p5n~;SN-WXoNK}g}0-{8De$nlZJkMP2 zouwrz(Bn!#OBB>Ev9-Iji|ab#Z=6aJhKA1hz#2OfZ;h%enMN~=dK7nbhFMNX0hcQ8 zQhfAs!Q}&B8aZ0uG#7fxL9f4TjlrCDVc))!+i!HL?Nl*cd3se~h9=O-1;73MMs2?L zaw}ju$Y&&AI`_D>mA7rjwxhb~M+kY__A|)S(QhXw>))YJo#IBv%t|i5;&Xu)o~98* zj%_{au~(2DGKWf}(x<3`&x3lYIKCV>2()qhRXQmF`pZ>B#qc;@^Nd|xoF(ar1^6Jx zYqv-0@uAd@z0U1MKlk)(ZlH^dVdNTA?{imj>B3Z)tn)xC?$abLG)GGZVpLP5i*{3N zMm2dq{vvEI%G*5r4Kp=?=J4rE<^k!B#8FNFu@ta1cWq~Xk6+lb1oTGk zNt#63wxwY?V}_H`U+BkvFJ-kOjmn?dQDXI{=ocI=U$oov=5sA&X^LhDv%8O12!Jb( z6E+BIi84Y^2hVWoPaO2!NUn5ffO+gNpSvY;&3HRInusH!S*^O5pelxc^p9Iig$K|M z$=s1f58q9iKrkdn3;vZLfctvZL{SqPuRI2}i2q(SO1(E#|8S2j`6M9-Av9Y)9NI~P z)GSQEc*?Si;$5IS~1fXe3a47!O!;xGZR`M9Av#S*uS4*_9yv474Eqp z$cuUrqHB~cb-cO{eW zEwXN!sWI?}l)a*(ACGwIuzn=B?y4vXDj(>gP!u17XZI8uQTnZI|26vgk>wXMt>S6 z;P36mhph*qEpdY#$NUJ7XrQ#QBk5$6MR7K~6KZO6@nI+`;La&_YNzt=@gEbhna2xx zw=4S!%PYrBLjgopI@CxjB?(T0Ua%X3#4~I1-oP{U#jz&bIXjQ%6{0H`^S7Hj9k-^v zfT&{t(cJSjI-CzK!N2xa6ZSnh(#(IJMvsrk5;VGU4`dsja!~K+Jgr%bZ1!HRNzoJ! zdU^qhK_PjK79*p;?wPp3oe&v#D3_&|;tCN%b3*;J%Uwop#{|Bd-Gf#m(S9A5v%(6D zKCcQ6odecJ{{8O)5Hg6nl7$0WW0X(;UNbMw5^*^eH#OCt$GV!ziCkU5ny zEtjk*G4LM?Z&`5wFk zhMRpZ9iINb4;ap73&fvc3D-64!8i7o#aDodJvvp_kLZUmE2)GMd;gi_g(Xwj1p-!a zXXFR8C0lSHDl}nqWBt|-qo1n^w5$-^C7rZf4lya%GHOHHA*noC08oQ}jTRKcQ!Ub& zybLNix4G|00|wmR(fLqU^176AvVo)U$ZF|*dY=vXc_lOo(O-d#)h8kSR>xiVB5r-} z_p2vD?NO2r2-Zflaf!wD3~Xl%>*8bh1#;^;$p`J$ewfm|=E&i5r;L9n*(%l*|4aeF zoOzw~xiP4hlR#sA-Ic#v0Z4VZ%8wKrs_^PJAsMJZ|$y}rZYImwgoe!j6hQh2nVC^7W5H=Za*L#9k~%RkP#?lijv9{ z4@e@W$HP(Fus^FW-sbE5f;-S-^%qJ2+m}i}a>f8Qvt+Q?2U9O@ZS;>3X%nZswE%?; zH0eo}!U(b`AhhdJJDa!f;ao!74yT>VZ=BWL6#!UD0DYSO(DJEE8?Tf@24gQ7rEDd! zZ8Isz3F2SO^-bJh{<%T(-j4kMzlsH2y2jT0TZBUxcmHsYiSAQQ>0G*6Wxl5yGUgkb zB84Bj+*;3u+dlYW7^`B_If5n&o?x`QZ|$DtO96oAwyfI70>^Syl|u-2QawnqgxURe z*^gO6skrayZP1slqRdPx5`ArfUPgO*RBRgUc+;2cbkw~j)DY;fTMJ_25k7Isspzdi zCZ-UA!1E)yhBj=o!I>{H*+LKOhnx8UUb;VZ*u~t!u|gylXd8-m{d6%a^kPjmPQ&i$ z)fF}fb92R?eH`5dUF%86{7=>wK@}j+erU;tnNctA-WPq9W)=$uBx94GYRK&nlcqqM zto&1lFTg7E85m*2_c3+24|Ac|mxWAn(5VBaM(!uw1zdC&!5Py&Wdj!bbUo1gYR|sB zfeAO78UPU$jmG8?%KnJyB&W|p?f05SQm!riUY92(v~`C4q3DG@Ml(EV{$jli*qgGn zRfB19z^H>+9y+hst(yk&yJ;IjD5FLfyso)f-$`I~jrf-tI1B22#-CO^#CjWqpuK#* zXv4m|=t=8ALniL`U9qZ)>l|Ife|_G8U}>JYvNYHDe5f3#8Q{BoHDbHH9H{Ar+Q4$? z%5!N)ShG=I1();efItSd&lhQL``o6i*=Wlnc?)VxHOzStnP_QkcYWt!X9_*gW3$%! z-Tlf1xWKQzV*xNIPga2rwOp3zhEI8A?ed|{Yg41XqP=az-3%#<1MpZawwK%ovKvzsLyimWhn02A60UFCdt+ zN)f1KM1N}=y%7<--mi}!g`q^$8o)HliyvQJ3$t!=_?MnKu!JJSd91rE&ubPF^L6X| z?HgLe5E`#+*ihCx@gnHo-3pQrTiQY6*W|Y%zUK4`x3ZnU7nzv5r^&deM?@MNt|xB< zNJReQqVpwBA#!Xc>)T5pZWw9}43B-OoInqt{?ONrli&QWPhiLbPR1v&@v>OjChQR) zxM(y0a(a29E}a?tmZ*#4fzn_L7_{R{g8TDX^0oA;F_08Xn-xv_sD{)@YC*8VLm z-u5{&yl?il2T-j09~Q4Z-1*CU&B%yv(J!zD;5fwiM>XreDz05D;XG3UMI&;6`ea`^ zKITNB$zlNw&iXHg*|Od*AEb~7psWw5%CF8o4+s3=ukq+be`tTFbiP8klz$>?7C&RzMu&U}UJb=}%^C`cpEVQDH=HMth;s``F! zR{{^-eQv5*rh*J=&ZKje%m)9Rd;q#N+0T)9beWxNCY%s5D2$@{GWhU^R0RQ-l8t*p4Zx zba&hPEs(3`EhIZ>X1fSzCDEIWQMJNfnKXArQ!Y$E4B%}=KQe91rcOm9?u}jH_SWd= zlmCaXHvvmB{rbn7X{u=(Ypg6yopRF2G%H1O!)bHLE%ybN%3KM}T|u;|Y*ok{H5atp zQISjmHPKcn%?%U^6*E%=LQ+{2MgI@hEZ^_@zQ2Fhm0evI@;vvs&wb9h&-t9sxm6-n zQAaC>OO?VTaC^^^bwfBD}8;KC<&t3c!V$ijS!sFU5 zrrt|V1?dxDgnDVBHg9a?xMcOUd>HMWeBU-huw(~!-<|M?sMzx)`q;zYh^kF*;2SXJ zB53LnveNpjYNzE{Aa)f007^EiJ>sc1UkU79vq7SVzuT6vJubPGAyF);^PS6zR$3~nHlM1x{c{3V`3u#O3y@mO{yE^8}F6mS3vwc|zZ46mtJCZC0!#JJX5$TYY zDx&qFXzZB3=1|Lai2qNO=-M^51d|(z<4MOq_wC|bm6R6g0phYAEuTmR0V!_D;SNR$ zbXMi$(1dRHMo4u2bNZnU_2SCJ4&EOl_|hYUl5zD@!7;VP$(fHc5l;%|cmFQwMyzJ$ zAuuZGfJp=n`zE3$338>Y*kM!A)7w_$zFeID#c`(L1zj=S7dIQ;N!IvfQt+-?Kj2{G9cf||o^9RiP|oAhf&2Cy+u@`0jj?~r3|T{O zsM-h zOmdf!J>DMR?C z#RAkAGXq7yVV!zgyl-5&&Wc!LHEC|i)Eju#hIKU!Rjra_=kEw^KRb#1y~g*K#X;wy z(uCzf<;A%=Od@Ki8g00Pm2ZU_4jp36{%YZ86%5Cl1Jka!MrWOZ2pCyj(}nc&r^iWZtUpy}rjZ;xnSTe17*?%VFqL zY`8%f;A8=`pE$eTbCc0XA{)~)H}yo&I?t*2x>n?6rEvmlSJ-i%=hpU7kYnD>bCc&s zS6ilk-z@YFin#B|<9|R0k{pteg;!Qt1=81cZ>6u@NI2$5-oRYWxJ%1Dyc4dz#TJ&` zsyiECabQt=XW4BnZ=X6$r^Sfuc$;vz+(Y5lYv^0H+}$*jZFlF6mI6VpEJ^4iMAoL1 z$7bo}ax0DyFXBNgh6Uq3hoJ?7@C`J6bVt$*#SQ+>W0g!@)#}FJmbi zl+96YD?<*rqXan;J$&_Y(q^Eql*i)_EL@TPu5EPQBw1?5tL-DwW}sF6+xy#u@4Zd& z*fD%ygPNfJck`9~BzXP-R?~H6j?&orWl^>1(wU?V`4gU=4Xh)B`GVILc(KMwRg_D|i~fxC;JG2@MF`j69%<5u?eHBi zDjSAXr+13eJOb?oqC^DiNqyb6xb#W$rQ`6Dlyx(@ z<-ue~xfwr${G&KwVQ1Dj1h7cT@s5f z5zZKA2{1KtiJoAFXK#HM>+r#JiPVQb6&v!9$Q#Ccr#mM5hC4C!aKZKi_C`Mfw4t*>*XKHcbomCe_E7 zJ4j7BA|X(Awn;pqCtVpvs=&4QjnBRxv&D5|`;zxHyq%ohxvT9ouuHu&p~JP=1Cjht zqlaV6!8mZxPcIs@__>*I_f&LKMdZTnK4^(hFeG(1%icZsj}d27W`*WKUt^W1ve zu@}6`aaW507ZJ?(4Ie4INtk_N8JI(?lN7{t#75jn=6`9PkEP?;C`KT(NX}n_2Kp{8 z3#_VB`Wrg7p}Drf`F~#s4$!VGV8ic1wDKG#V$NrutzT@TnKu1tu9#r)5E|o5T>FZi zJRowc-TbFb+nJ5SKM=X)&yH+ zvj!s4+-?!!@VIr3rk3&x5O^Czv7s=M((}R~IrJ@1%`iCU9j2!)fMkAtj487T7W_~{ z_z77n)8VsWXU;Sg=GT`6l*Q)oD_Kix?tK|6jnnD0w&Gz^rWhLja#ERtG||IYU)%C= z+O&k|Hq0%8`Zlv-nfoQ{lQ>A}^I9d%$n2x5V+hlvGKn6)nq<|C!umM2k4CT4CG~51SCB|jN9_aTaMAoI{Jpyc-m5ui z_xqe~!@tu5?&a%`_uPuRhCQfZq-WBHDN`(+>?9lv4?X)cnV%(&2z@@TlwbDD5@e>$_w{PA7xNZqlo^bvgr!VH08?|1Rrj6o|_^%JPQqWOvy-Y;UZN-gGXAs$5>E_ zbz4?&x*pb#jNBtCDO-9ZDsT*__vEr6qa2`%l6DP+!fxC}0iz1?%*Yn2Q4*+NdaWuZ0>9dc+-$Py0^$kX# zkQ-hgxY+SUa1&?;VmO;S9tfdSl)Ft#w#E?uPO{Wf*Cl0iV9r(93QDcHSNaiq8PW$V z#LOL*%9&g)qxsoAKYZCU&CSW?SA$>xG3Ao6#-Iywps@M%g5gG6*x2e~&;0)KKuc+k zI+}hKx$modSvJou(i#uL!{?gHM1=4|Ej5#>2te`kel4F)#`@K+1Aw$27Yu%8Su3P? zE0SYsET!p;dO{5?Y^>OS0Rk(Nn%W+7JM612^3vulH1?AKb?3>7jY@^%LD!FB@eIn_ zo_rSAMPfV9w&WFIS`h$_8qQ|1b5K}@txgtRb(g={MfF_U(-!O;DeG;tUjva4pVT)) zX5T16oNw4Xz4NO=gDZHCoNLncxWQ`#(IDLHNggB7sasdH;Cj%jKBjviF~6f9^(Vfk zFT*&aX3(LOcVFLxg`TYGa=Tqc;*Rq*yv4(JxErGyV+H=1-q9!UgH%vYCsBIN zzWQw+l5_Fz98^$X-Y=z5!S}gGm|o<1ynW4Lxs{fOwifMa11TA&=qG*9Wbm%EVwL6E zTg3{+w*1Inp%i-y{Ip6%Df7jyc_IZ(q1HXQjWz&+{ch^qrBZO>&t%1y=anH4MQ;m* zQv%PN_RH?RE*SXL-#7uG&=%`w5XZ9~`Sgrhdyc2buJ%soylb}?Pa&D_FZbC@{XPkA zj4FDyz@R3AoCU>tv}pcJ>%025H{}x60WvD=0=+S|LxgE{3in%iez$SCpZo5^fF;@Y zq1Oz`-yKO-4>iXYtTQ_QslX9gLcke-g+$*zMql1l>CzoKXmyVWxFfUtlQx~PI8Za3 z(jO@E_NAFPiaqONQYPejJP7fdy`5Lci@>3+l6RNtAMs0v|A3p%N0*Tq(DuP%Abl0Yc_~t9 zrJt=2%6m=xeyF7P<$2Ei(6e#yb)X2XK9w^I)9;w==uh%ksC?E{DQ>y=9FMnW=~oxt z+5kb~WXN0FajNG#?R+86tGY0Gvv>13FY2J4`TW$_$Yh=NXu9|mj|wiYV|qbJEaJW7 z&HPZki2SlGFTaWPd~-6+_v&I}S-=xYVe1ro-uv#SJz0V=Yg0k&1&AM!eV=Zk5zu~< zjO#p4>LK^8?$4r&ij!R0?(MntYex zYHo17vNc)lc0-ylQYQ<`*A?&ei{q*t5gn*qI6&xp&-`1);T-^{&6$VbkWR!+(Wf=YBA>7cRm{B2OHrp?1$H3o#V- zpw+29=EOrDG(8(O+}M$^1o9RXtKT3*GbHiCH|Zc3e^G!TT*FDii#cIP?MA4+r?cP~ zf@jgay2GGNM$~3oi z1Gen^Y|-p58T5U~-KPV?5SIWCPQvRSm8T^yHJgjPMI zDb}uzx^>^;Se@ZbRKX%Z)-84?L$irSv*iP!=KCHi z@r%MQyD~B&hGbXpNXKz+=?_W#Akriy0J@y?>o-5eMRz;*He8T?+>@oUODU7wxsage z+>}l3L?8_cu?{6txO2)Sc&i<=xZbehj11~L43#Oj#bh3Gb{C5ki~)hIOSO$wu+W2( z4xi^%C%>gC72$a0Irh;vGvZjq0FRh7XWjWw2!a>;DLJ&Tw6z5MdG@}0+a-GUt5OMr z1JO0j=1q0qH9uJcHEkBKF54Dd;nnpwsrdKe(3 zxRS;9^l|CA?gC(QSyx#$ud*|PuQS8D=qRpZ*iB*S)wLDM!#^bEGIw1~i)moFIxP6t z1K{?a!!h2xDDlO5M$EG^HeBtdTu!PnB@V z#8L^mL03;dv%#ETZ?ApTact!*m(Eft-U_u`y*zJ!>j8j5J>8f5u)H=xdEH{6TWPE< z?1|>ec^((vV^#)XHwRB%+@+2X9e&JaJ__7L3Rcw^oPLZ8aLw!}==&NlneQ5N|Ix_a z>S~B~e1l1Dm^j9@XcM>iL*U}`d*P+f;7veNDBQ)^VmgP&zKF~JCNhtrq_@Rvj-!Pd z>Cjy;L7q#>WT~IhjxPmk-liuIg9Oc%?XNBfX0YIu^NPLzgFw&&dELyom`!2uc6wni z^+Ydyb12_>nF)B2b*at7vZ$qf?XNTUlFM83P`NjeTj#$gHvEa(qQRq~3aPFnVgVZsoArn&`>)Coa#Fw=Rd6Z*rk=Go{o$ z7@pLwvod`A&F{)DfUwdgJ(yQ{VQVA zE>b#)C?|XEXv?p60pW!-$etks^B?+5$wS#oe`cZj3tVib1J6b&xW^DNtUvD`pgSZUtE)%>-(C?J*zYz0Yz9$Rd_`Y> z`u`SLi=HG6mz?f6`k?Jzt2plZZjL{M>nl`283?$W6(xDnFq0t8Ef)odEcBW1)#Kgf zXb^GUtYV$+*s(b((ULcg(!mo4f9?-UY0-5a;hEP$rEoY2bfK64f{ zVtF{1{~;@x<}u+<4d(E>zfpf3HkB40({3>`i*+PUdo6 z*|YXe@zBeCw5~hcf({c~QU1e`$@TVM2!fLG{8GXgc06pQ@&jgiCOE>6?uED4ZH?{b z`1B;$d{f%l$Q`Z<&-k<;3 z*Duy~c1y+E$ObjlWon@`KD}ekkUE6uG#1D-V9-*9u1CSk)1fV|5+6!(=!sqynEf3) zokvo1$lsmGlzw88IeCCU3H&_Qaw4gPG?u;a0R%;X@fZz?j=BZ}`H0SbXN$y_NjL`R zo!I;wm}<#C;S1-@PSWwlP#}RearvWGw)J{)ypSCG#U=qcCNMHLSIS{2!fg~Lshho= zcz7@6i!JG(Jr3ja{s-&^W;aI*mSot-kmxhW&^@cSn%Xvy9zDDdyP-Bzd)hvuJpdYvGpQK$IP_JVg@%Ht`7 z+Gk;*iiQk0op+LlYqccF>E3wXp63F4?~W%gpxFqZk|WT=%~BWO zO_ucNhh;ac!kmkMPQx6#u^4SFWRi{C`yy0PjRyyIBmGRRP+qJ!9C$MP&4DnPG&fuQ ze;4B}JEJ;L`g3=h5e4^?8RGFrrHmteViS>{&*I5#(9AGKL{K)6!~`yi?Gm>%y1i5p zXL~iBW_l*V>1v(J$dBQD=v08cstZkFEzSQ3{s?GgIk+ZLJ4+RWiRM58iV|SRupvre zgRb#c_c4alW;~9c*Qac^aEG*C^sSH4bu*8B>zoozmzHv!XoG8$hpX}Hlf#AJfuTW* zPjt8v@}RSSM2;9n#Nvr4uMKq_J})R~8NASH3_1N(2qbMcE#vW?9Ngi2A#OHCIV*9&GbWO%sV$b0`Nn*>*ZU|HzTjr zx?z1D`!E{JbF*5dfkuCk)D`!&f_=jK&z>@;i{syE)q%gP5Z~$?<)KJ+t*BP0e%~)dSY&P6~b5ix_ z9iR(xv|7KJypJc^B+Dou2ebso6hJ(ti zR(&a(ydW=Oa%9eFW}ENYDRSruSsh}#mN42oX5O`Q)SYm^jXSKkahKoCn;k=E@}<9< zxN9(Ox-uF7DggCGrv4FPxr$T7LdNgGr73)Dd>_LJmETQzUc>Y4?Dxn);_F7I1kuH@X0n90lSPuL5}@>XAy4NHj%}^H z@g#52fsszAdm)OpZD_~!MfUN5i;jG{SH`#ujun3E-3TSzun&nUL zh6-+^67<#rF#)wFdo7`FZ;PWDfasf1B6(8&cZ%d zE!o>nMi>SZmNKv>OSfFne=tn9!ld-pV^0;Gf{Z`lFB=@8ifMkd3qGX*W0U~*<(6Re zM4c8b+D?srD@J?TN2=$exLFJlKWms3OPj~ROCM8vUi3v)#LpYBDx!3)vKggaPWgCW zjSJp!p%+h6PV=k-p|m*fPGcytmuFx?q(|@Y6>y=g$#fbD=$$5zSf`4N=8X^Y;EW@p z0Ybop(U~Oy!9+r=?-_wlI5-DV-|fvt(N+vi5qAI)U7i?s$JGyRu^rNrSl6E%IwAzJ zSpd3|FIZ@B)iPtO)H6aw)#vjz;<~P0u&;JJI2=qmlZZjLs^cPGvxE(-PfX4-y`D_*`|$O^8xDYA`vXEBiv6CnrhT>KUCc2fv#2(Rz6XekX?S>B1P?QIC&*)9(S1)i#p4$^3$L0%57NxeV;* z$@O1R{iHBc49ON&TQuK{X(+genXQ7Dupt4q=diMdi_O^~xqZ-Q&K5J#5m<+W+Lg5G z<2XN_S{G;6AT(QAN^di;9O!4GZrrtv_0Cf)NA&j1I2Tn!lTtf~bhjG0)uGoS5JKK( zZ*{xc^ez;NLnS;u>TIMp2y_LRQ>JgOmlnW=np+a%@q>XX_d zRL79RM_&I(uoAp^R~7#dG)?N&$i#_eT$#!~DF&Hte(7`R%tGFy{rv zMaV?rt z{%Ni;f66V4uoQzLv`hMCP66dh`_62n7sRU0va|e1eGHt}cnbHVyh4HK>fayh&UcZh z%G$uRW`q>_mnXGEjlKO_?B9WU3E_>|z3a;}Ppppgj&L4_S~^?@(ZD+P1@{0CimWx9 z+30dSvp++8*IV*)Xl`*f%>IF5i6~mUsb81&!H{{~ynKv(HMpwN514OS@kI_Dt6cBc zlhANobEt%!*WRzo*!XZ9-hRPC!HR-mjYGzec;M=ah=5r?7tNPX8mANxW}S~MPa1aSXoJkz>_QnW3cB#P%pn2w4TC7h?iqQu?(4lk*NQlv zxfNM!!F7H0e^G{>#9k7e+p^Hr^-?M zgNiO_N0`p!FtH;&O*L5!g)${~>ZMD}r@WF&W!C`qIqwf#Pi&E}_%Zq1AQg@rqAk(q zdJuMhRNbgFM~U%-Efo@<(-B*C$C9I6{DGiigDQe&#_TS6Rv`5^$47cE7T zGW7HtrkYt0ZWT-#rQ0DDjwtI2c=jliUU7Wddv7f>zkdPql=>r*fLmnvo0!#iJNEdU zYJWcH@$m9-wc*9Giouv@-0$akIlFaZuU36I!4vbdVO%!(oL6M$W+Y57gP<(zVr(R! z!^P&SoL-m6dLxH_4r?}#PG!A=2wy0bjQvy?H3@!EsSEu_2v7sz?bPG;!c8 zD(6BI1|wv}3H|*Zye+u0ZeJ^kSyn8mVU~KoI7Kf#KC;r{~7%1zK6Y(xvxz{z%;4)irI*2uxL z3nB)U)Z&azxVB`#eNB6vVE*qfw<8~SsTaBF0XW2-4gkN}=$~Q|-i}xKy}yOfBE>yz zkucWwOYye7CN9P&|H9e=-evZ<)Foe|E%P-nWb4~=gd<8-{w0|mdr;h2dY^y%hc-s0 zf6is-UvOIhTb6W&7m?YiS15@nASFS4|9MAYg`woF%ND5lQ6(}yi#NKe=mdJ{@Sc{! ze<{7X>+*rL?!pSgeZXj+;6MN{`q|}}i%jX^cD2MuP4R_SCZ&S6+o0bC!;k*HtTumV zBEkM&D+O1Ee(zB)iTB(ZzBkz&fc3rvZ{LXnklsfj%OblqsaYEsB1X?0Dd|Su8mXrE z^*=b&*<&J$-LAbSVeO@9mlUV#<(OS@?!*?*hHProO$2{E9r8Bs#2Dx=RC93M&hXZR z>5qh-B8z1gjJzc~p|&})vWV5s^W9(;Otw7Hcx%o}4n|(EYg>Nwpy^JsM}qfHk=Nl@ zqWPP(ti}_!t6Kf_Z6GTtzdiIo@ zPvUQ0sK-)+dRonCg-!r|MW#s z{vbKQgzfUA$JVWS`yA_l)|kD;)$7@HZaF?kzfP}kU*oK3NBR({kB1OjN( zn>SZ5>vG)spP@Q2KOX;!nmF1qHuoRswOlU(l{czhx%=0z54rdT{Ud%kB0abL_>EtF z{fpOF;+!L4Aq4hV+20b+0Pyrq<#oM#e*F3dXL8=+7~{k7BS_VY$&1sJh|_%e!0fN^ zdbyQ2lAgM1)ur8cM$7NHDj0p^sJLcusp2~|pk-Em*uK5@534SZ0r)@B+@!ouO1iaw zuOqO{t-5m1J@B{KE@029Rl6zY8{eN$ZltaH3-vEQG#v&zzF+k;^1okl%c@nVtN+`} z{I|&DkNyYY|IfqL{SEH_COd$v<*2-yb48Km*#6&Wo&aeW<$nlq)vBXE{jI*=Uh%eE z^9F9HC(rHjZ%vw)2CrK6NcDMF`jTGT0wTiu0}L!BEeHDqRa?v}qzHq$ipG`NB>3}* z^Z6D_SB=WR=dhpMgaPG-Ge?5&p>CC!AaYA&c<>U2f%N2ON(;fuY>UO|>J%Z~zg6nE z^af9f_35idrJ_sG`JrhECut&`tZETa`BcEhfHwhfg@A|Bd?`li&+TlJ(3ZbQqcJLN zU#dsYyr%&JyE%4A3oO0D^Wf`)v4tPOzon;s1o|=%qHa?`lI5BL;LR0)H!shBc1815 zXs)hyNZ7GP<8pO;MPRwt z_bTb62o{z#!xaTDAiFni&+D12=N3t+#<11w(~Y+fF>xGaJxoQT!s&pAzW~D)kFNdt<@)k3-{-62TZwcQZ&MOM>a~V;N80}K zs66`91#hDu&UMG4{RJM&vmPf2Y0`Vi9=TWEzI6M3kEAMKRD&}%;U=BQuDcik3BB0o zNrju9o506Eizb)VopJn*4v*~10+69DP=mpQ=itTY@cCv8ulm;Pb8`3pLzd6)1} z2*55O0;Z)F|7b)J1`y*vKH0a$lV%)t1h+IN2`WXFL{%k6xiyZKB<>|xj z9Q!qetQNk@ zE?#Cm?*s1P1(owV)k^*rqr9I7auuJvF4$gf7?(qc;cJ7*a()+{elWBV`^#xwP0_tR zaYLHllf3C4fTr+bydRni_bnkxpQ@?CG_nS( z8OU~C5kTH*(`eI}7$H6SI6ke?-hY)4Mc~A~V@=a?>>cs2U7e_q>TRc0L2Exof<>N_ zvxg3wzUu|iyiAIqi#~k>=g|;z4=TWug=y12?!`~ZJHXFfm~ZA5VY|I6I{FvN;%LdC zMZu|Er|@VXcPirYswu^}3+ypJ-w0eqVKr379Wj^9zfEjp9$&x|wt8R)<^zEOaYvJL zQOdZ_v|(fr`aAP~TM3BKRp6*O0uqQ0<{Zb}I+@-PR$TVRPC=U#_z`R4&|DYt5FVcU zxiZ{*u&=bDp-5dHHpnnNU#;-Dug}oAiCo@{X1)6mO#XV}o8r?h$=13Ug<%V-RgA2R zGO;zh&T?3|eBlRtD+)^5e>dx{*u4>CbSbEa;>^w{Nd%@VLr)`Pxf< z>g$gZ(hJx77fUq#tIQFa#vt!D_4*@!3~{r6KWopfR9V=zH^ljV$N3_;lG~^oNl;sB zM=psAqeFf8zI2-a=~tB>qrN757x4mEp37u{tNP4r6sPmEGUmXBcuTgevIVsnQa;iW^{BNQe8(-al8~hD>s+M2w>B$p9yf)_NZ2Qda~y+_#jCf z-02y25>f^?d$oE0)a-uB^KBbcW9?PmyQfdMEd|!sQUV>yjZ2nW9vlgkg&){bMbe=8 z*i6UKgX_*8Xa>j$ZtsA{cnk$|< zE50{)NPqdPlTIxBJp^V|H5HoM_og9aO%yW@dPT3{pnuTIGVmiet3hDI*t@(38$_$g z@YsI)Q4RQt=bH``>>LfVi=wxiVQ%QsyB*b+z462qO|6c3f$129E&LhqP+}{>x`top za0u{j_a`TLE&a_@vryg3rx|g$;Ls+6?n=IQ^idAXwh=?lSKF9-+yEtef&PSveB!~qlk3t<3F@BrEkEW$na zRz)95Pn9#qeb@;k8JgqtCzYmIcdZp$uF##9-+DElA!!CeGtb-mP+wleF16|oAo$mP z%VEIiyBa%1OyT-Ev2k7eM}%Osyk-Hi(SC=UgOPL`Z_It3RrdR;2nL|M7>(}H^Ld#KweNMapQ~b_wLMzMaL@ebTIt5P z%hiT3D5n#qzIucC?AvX}%N}cVt7UpGkPL&+Q~q45^Dt9_AERVqG_+s}qf}L(Pi=#X z_wyY`onCb1=mFstKvC^SmQTXK(cGGFW+_W%wb9l6`)qw5_wQTyEjD*O5V)#e@t^+@VrQQs6HaxP&HWNd?FcL8XO0*llxBr)Srqjr4ms}2- z59gg3IfLLHm0TBleEAj#unzC#jJ11T_CUW%rqPvi%FsAlqZ&y2<6Kx)`2ANdLuntA zi=uR5vb!_LVYQzcCcJL3nw;~33E#hrIVidAcm#8Y+2cy5tm-ojw(&O+n2!XbM?#n3 z>^_Z!9F*YoqM>d|zgf~J@FL0zL)UM>_Ta%bc z>(oo#tXl%PO{$Psp2Kr(L-&qcMKx(sHDtW4Uk$MFqxdxIauqxPxwEfsZ!!7o)BK(I z?s-mmQl}@e0%zbJGU7@RUd!~{h@6f?R@EKCK&<>vVCab-(yn<>dr0*8QMOCOPGG=h z$eKVutv*u)>*!|kD6R1D{-)sNQX11jo&Cx>B!O<`!%d?0^cyzsNLSNuqc@;3QaE6E z>)g^!InhU`&NlrQU3y54Z3M1*-$T3X<_lO`;D@9?P!s4{=@Kq_bu{%> zH#L>16{w-OFZcP=2J;b0M#P;vYTR<9M{mB>$+o?D%N!d@Hl$BUm$ z!qr~;zxfumBPchs!QsUADD?n?g9ud!W4m5Ov}sl*r2UBhvYo+F8cL903LfyRoPBL9 zRpvIdZvqPq9SvE+|~>ms_D0O5%XDtz48SJ>7I~wHeVS7ARC-#kV4)9}YWg3kUGg^OgWOuFoQSSQF z8#FL0!8h@mgW9F}mlx@u_N>8z_Xsdsbd3X43FgSNu9U$=yVy8$QuI%Fd(Hi7? zzSxXY$s@Qdw|FQxL&k2Pzbk=};}aPShRF_cAt41jBJM8hDY(&d1_nUyEW5LjQN)@6 zJg{Zg^83s7$=C9kOg}XkCr_eO-SdkaN%$HpN!NHM>{`~0;ka$p%h%k#vTJS-&Hb%E zDc~BARwK1lFw5Aa5jvMz!XSaLT+o1NmdZ+yP;mxXY4o|}{L{p*ca9*z&OYjktMs_A z4&!mg?U-88pV;9e*@+PTses$uXNvg}flGSo{#9o3y(&Bu?VJlzU4A~)GZy8LUN!w3 zOL7q&{=Kt2N>_4FAeDNLh2eww{&}`~T>>buun4zkE8p3EeA3i?loPX}Pj7W8X}LzW z>u`GNaS3C?KB%0sk71#*FEt->)p^xr{V#`Y<;9wk(7ks%=2Kf@|ESf<#Es~V0YQSS zxUi#!qv%s~t<>;-D&04tI{sc`spEZWY1m5^_)u|uphb`Kcc+`zYfrL6o2*1%ckV6g zaB<*>ow-?&fb45)VCf= zq`&Dg9-*_Mqiz|D_*D1gA#&o8NNKz_gXgu7BX!cw={G^2zmO6eQ6f9@p>|xjud&U$ z(3%qBi0FqeRDhEjLUjr@1AcQz1swDSNd1Hx*#G8i-1bHo!7K}R=WS__ z3qq*(ZjI7_h6?jA*%I_?$aYi(xO_AkCB3}|BrAtP^3Ie-m_Q`6`-S&6*-hN{2DYQbXE zR$HlnGOI`6HqR-o(T2FJ(>7s;d8ceDjRQiQAjl|k{?CAO@cgGQmc7bh1XefpJ-l|# zm}KafXOkCEI}qGO?tIb;mYHVpL^ZNO#feaiRbLgpTg%tOvM=^6`xa+s*9IdpOde{6 zuU4=BBrgu+X>P+7_#i;!!e4dF`4hWU!=;~IY33=WZBKa z7vF(IGmKPAyhh7MUig597WolK-T;2_ZBL6-T9kyknLr#_>hSPGp8$PRq?ilGM@Oa@ zf1outfN%gemj2J-;fYtmVdp1|-W4y++mR2NJ8Cq6&z;V!+KRsKYQmb(7ZQgCesHRe4?tkqG+sRAxNmNAT;Ao~pu{g?R#g2*7zQ{TDB&M|K+KVVwrVA^cRMXZ zzMb?5*5UK^7D}Bvd3#PZpA&9z0S0_bHhlu_1D}b{7pAe4=P~KCzg)sEy}IVP0hkpU zWP=-=p8vQt`rba|rk!M#z?X$F*TfJ~LJwj(_5sGL0>)9+KawH@Gv%gvmeJE!!VG+4 zu%kOjcgXJ8>b)P|)93E*3$8=hhkkHay;#Cg3d!i$ZvLB2<{toiR#|<_Lze0OSr5%q z8~iY3T1wtP8)|o$!oWbp&r}i(I=yOamh1y7h73x%&{Z$iQzZc`Rnh%sLwI8V1vKOF z3PO3^)^dQ+?nm4CJCNX>i&rrJBM+toqU$3S*5lXXK!7QaVc5|`VAieO)RPe zW(RzMt@ppN#Q$#k^+|o*k-rxuu4DA?fS~g8nE?iuTZ31W4;((FszL8J_9%%2(3r#h ziHE9Ydni<4s%sQr1L7c~G9XWJF3%$k9GESGLiJ>Wdg?bt4}bj{qld@&}?tcrvVqec+U#w%}<)S*cudS}KJC8gWNQKywL z_nS(P53GVqb*=11p7PcPL3d)uj*gXc3%}j76D`%nu&{#KzMc8mKyOQlsGt4ewURfm zKNTSdS`>iPPXGMq9?ZLF%xrXhZ#2fCrfdE-*kc=R-hTtu@;IgejXV6Ba=CB5gEc<< zK7jhya;6q&8_1CI#9*FDR$Zac0tStuZsLse96P z3p9?nQQ{m(YRg@>N?l$HIWnO>Bd;h_llOvgU=1a%-&cE2@7 zv4mlaxyl*=uDg!K!AnP^ug>LZh0YiL0)p8thY$1(UWjRZEDv@_{SM|pu!DGEpV)3@ zwuWskJ6+z}a<`+iflNS#@zDvljYE|;_GqSV+Mo9O$%4SI3+vT2y2?53JK3}~RvwOH zwL^-TdAmc95KZgQ^O_BgIGac)1j@h5^i|Athm_8w$`gJ_ARY(pDm=$)TrW}tMqM5L znCUTW7V4#19kc0`^`n{JzFxhChDJ;BU>dj0*C5;e+M2iC`vR~*-~6xpo00B zUGuYTP_{EKueeSxE21e-XO_q`E&Mo^01bFJ;Q^if!)Y5_yf!~-bC*BY*b8dc3o^xx z47|%YV_G@IM7cKM#?a{RY@^dZ{iUrHO)Z%nIACjA20XY+2Ou(Sm=UbvKGU*N9jX$D zz{#+Ch8Fv`S^l!O`$)Pe=vux}<-u|XZFc#3qUI_fCzWdnLnER!_&3*lI`$VBx zQjgM_@xtd`h{hBCAJfBK7C!PF8|ShAt&vCU4G}4lOu*@K_3gbEXRloWX4Wf1K{lNC zmd6ycaf(bj)Dt}{d35ljPg{jVyyh#&2?r6cY-Dr7nw8zq2=LGYc7wP6 zZDF)FG8CkI<>Ic+7MvJWF?W9&x-(x(Y}RO#oai-tV>;H`RI5SB7->~qbLCI{L+;d;M&;<)dmXeL$_5PoWK=JD(Q zxe@L1jmUq;I`bMxXDploNP)6xnP|~94`7%Z(JbRGaPZPy6%>8}?binSLQ2l`&oqyI z;g`y$*Oz8v86fV;^3v?Q%QS1lTnI&yk}F`w=8tIsb6-yyM1}-ZF0FfyRe&b|_0oE3 z*#pF?xg@uq>@CusSe~>6U&{?=RV}Y%y0CW*~I2=e;s13 ze1O`@)rUcawlIIjq)&igrWWrA;A!CIKxa_6wsVscy6{GITjfYXFBTS>&x|vPH)yNj zkm)uAH)c7pV##;JF>#^CB*)S&;Nje43EB?{OcE%X9`6*Z`!Y}b$KeC0+8X5*z_e5w z_Wmn7PMR@*+oimoh*LqVDX_ZxF9Cv=qGXEvTXeFn#RsB71*yrZ7{#8nDe_krDh0m=dh4+5c$ZyBw0UY@sbpPL1$Qoht%ECksO&b<(% zEDxwBNuJ=7mwEmvB8dOu`JwiEp$k%-tYO|RipQY!U~4n5wtp({-%6Mpo_7u2y%cR> zF)t?FI1aGpLGQO?{=Kf1IxSH0YT3Nri2a3PA?>RkS(?ci6Z`!CeD>kxdiMJN*B3fs zc0Hr(Udtzs7XN>wy?0pCOY=8u!-7W<5ji5F!VyFSrAt>1f`|~MO82OM5D6f?D~h0~ zsPvYAlt>9tAreYJYzWdrh=kB<2t`OjNeH}~fF959-1qN!pX>Slk&BY=?(FRB>}O_Y zXW&g{od?5cspt>0a)&>Q@x5)zXTtw9oGU@gpAwDkP8W>Da=8gCQ|uU74%=i zeoa?B4LQl}q3?n@WgC|00&VZoH~Z^;)K37%+j22LXwP8-n$;|Ks^q|jyy;u+n{n@ z5s<6Ow_%gjD+v1#de~9{c$GO=`M2pG;X%^?2g;=zb?puHlRu{mbIdjnqJa2~bitNO zkh}Rhe_+Tp;}4UAN4X;4-Z8rk7~_^8IpTd6a^4JZ8eBC2fR*!<=KBLLUjfKPx81#Q znxWWfK|i02c8}pYHe*Z@Wp=^fNH2zm0vkh5bYQz4xA~=&H6F~=us^F*&2&^&ox2>* zbrp7-uDv+yK`X6V_*A-V5(w#D<(wj-nf)gpR?E;OKb13rFF|ISU0x4^Ah^zq_ zbp@H*jpEreDj>0;AGBkvmkBBYC3w(;xys@=S9C#sy^mYu8=D0y7yjKn?P&jqJ$)0> z{t~3i3!z3%Gavyl2LKa?gv++E%ePYBU&yPmKK8xPAQq`u2i7!bZqSJ4)i{VZiU^Lo z9mOe^Jd!Z}hUa}F4V)p@QVp>IJMdUju6Z`4lv8J#a-Ewoa9}2Pu`FDuI`blSN3d+kuxD!{9zDz{x6GY2zUwIn0oVrH=(Vql9wCct6EdHRbYPJR5W%c2_k`u+ zOm?c_`cc!!)I5F&Ja;A^cLBhd`fo_S3@={MaHdCv37#jZ#~=)BR|s zxDKyEdXDemHE9Wm;x0N)tjxybkx@|anJC7=p6`6p3nEizIn!$ywv=@cXN5##FutBM~HEYK9s1cSW zSB8iV?5r^MEJ1svKgMA?l@_GU<_jxtUX6xG>StBYR#!2DdRJ5$1DA%hms+XK+8|P6 zlzQtJqT_DVU?~ACr zV4?YcVguYb@}iT-s}x!9i}n7JLaqML#`vNcm>S; z*s_M24=Ct>0u)_cH4#3y)Qwp3zR`=9;~$RqW0Q%|a zm#6Qy+5$fq&|dDrQ(oxh1%2(n;#|lg>O`nqg5*EN(m2tBrhMT{ik6{ckondm_-*q3 zq5}kH>%U&iovCrOmMEj2XMMqclu8qEt7x|f?*$!wQq&IP=sXb5G!KyJ1`XLY_Sw;C+Eh6Q#U ziby8H)65nw7pv@=L!O>5;^RM9tEj!@Z;{Qqm#VPXPpsNoYNO%Gk~(D6Kf*5}*wjFt$oLMf;Cy)gQ&<FBBo z;VLxac?(dp!h=u}eu&2m`n6+XTfCVcA1>h{E)bzb_vJ6%pcVGXdctbHK`U#{^E@KS zB~UYjGH=iH98tQZ3k*@f-CCXb;ZSrDYhH(oim7UrAh<0^*<7F9WTcr_MrSF-{sIZ` zxCjp~nY5b`cBtyjJ$K(1l{6*fr3YSQ2fl9?|IkQpzX}}Y4O+1}wXN6i1@rMa@8l;3 zzc}2~*PT$}NYQHmE$Z-6gsRuo~ zWHc9#me`}JZyI(P{RM@*3oyebhY|;SdJpD>_?VQ5n!XBYpMD|InVf4vIYyZ4M`cj*)^lq^jm)5g~RZR>t4QV`-=Q- zfXLb9Ddpehi@CsvK*-4X`1#W%^JxD9 zEl~1g+CPmSc8pGtSIb2q&F8f+QqFVxkPPXqPD!N8tmpOh?GC$-WnC+HRm}L~sMyu7 z+{xkyqI=^Sh%{E=F%L56lFGg9GUS3QSvq$zzopeh6PHNJmDH8Vm6Wupxj{mA(l-}F zMfbtR2{Ygt!oYk%&zmh_EOL0E2v71h|$nL^i+%FlSiP@E7R7Mxq%6@X~{liK;c?;D>< zo?x3#KXZ&;4pPJzpNI`FeTGzy<`slmpBcZ@pBrwAQg`zzD1P5q(p)MG+e`3k&+Xw0 zy11)4hwt#fHLyMWI=38IqV(usJNH-Ryz?~lNL=3iHqw|9KMQUFjz7Sq?8&Zgm$hlZ zN2ul6kaCF9k*S#c>Tz`@Ne$vDcGWEf(JKZbRcok0+pBxe6hb5Jl41~w$>I9J=cSJK9xJ|^)j>3S^8l-_U&C#Fc%@svq|Af zJZU($^0SkPz(bN8x+NDR>}qQ3oGsXFo!@A_0)G_?LU5y9LPMcIHTL>bwXPY27lYGF zdyFg)poO@f0#qEHZ*LlvSbxOS&bdF6G=}#V&+e1M7`mUPKqB`(;cao6+vnUI8wbr* zo*UFMIFH+`&y0zG5^iM@P+H`xV5jj(>()wWjvrV3;NF zDjO5@hV7b<7db(y4yAXt*yX`(Hk5KhYeS!#beTjU-EwXf-$jE;zIhWbi&>9IJ(p4& z1LL&_eiQ?8R;Y?|;H>}WK>nF3U@!axhrbYg*%l9~Hag%|mRV@RCf&6}+=q?eZGUX% zM-Sp6QhCLpZ|_}^syt8qPOK=cOzC0m>6`FSKtW306Zm7s6evkAQFEKqC_dh==@qi3 zU5yKvP1gF2g|GJUPj~%VN?u|>Rv|y>)uqXCz=RXd zg3L^AE9(e13b>BVdv!AN8loN@poeIEoy>py*dN{dC0rNx{Z-Hb!VjXxxaJcu*5Gb` z+a&WMu=6~As9to^#djr2?WQLQf$|EO;I>uAv;N$6fx>MVhhx=4$su}fuZ|3vby0~M zZ-%H52!SQNHabmhqfP`K{)1o(tseED5jpnyh!OF-Fe35`$DcRgJ*`PTK0Yt%>afQ< za9s{kkzxG?{w|gOq|3oQdvhT=F znYKP%yT3hoIcUPPX2x%Eb!J}(xhJW_@7c(aaE?JP{!4cpzl_#Xj;X-$U+AY4_5ZL( zIJWzmT?=T8QMCK;bK1Z+*X&C0wx~<_ec}%rk~5k+T%`lv)@bwIfu8x7;R@dN&!!05 z|CkyMNgS600;Dq@2e%^Fz$Fj9bLuO2`-hzX+U4gM_tipek1v(q0gi=_UGjDxny>nB zol>Z(PMMBXjLjJk$9J%ZdkTBhwqpYg?x0AS!y4&Ac+Ar<}Wy^l{`0W5}8MCq+_E6v`M}%~P1FM?1Q>7dGC9Wcj-LaH$ z%uV*4Oxv^|Ki(dFd`06)T5 zGb&?|i2_$gz9Ea1$Z>%w3Os4R1B*85&se45_`TJGmM|Xa&x2Q5I<6d%s=x`? zOO<()<%m}+J#Y6W#ze>{4*Zy3w_x$o@IJ?p_3KAkasB{Ld20WBtSmPkAk;WJ=t)4|Sr^)n>pxW1lx(l}afEzs7uXp6feWdoEKb4v# zieC(=d_o%az7_||*oA(fAPtJznV&#a2#PlOGt_aQz4Tw(D}+%vH&~zpa)0Vna>LrT zs~p=m{ybCmA0K5o9cjFmD7!>p3$6u}rY6$|*iVjw`*W4Jy4A z^*g^V&*1>Jr?+EwodCYdp#R^T0EJ0U;ths}O#HF)glVR5V!wh<=AIYE7hY3 zYt@#ofJnor5H%2oxM%Bfhfwu5ySGaX4qeL}pT5FZ+0MXW8#S8`jW#b==Y_lXH`uIJ zYCgS%`>uXuD(W^&N+WK0+)w%sADh+gq!8t+!U|m~KjAFrzE;cm0C&+e{H7ANfI;J| zsK}c;RM>=Rj@MF~MoU0(xFAUm9%ml5uioBcitUMmGD zDCqU2-gBTzwcRSylsEt`sdTlt{q3E=NyhSqfwho@4n2XJl}Xp^&ke5s?@fDs?H?H{ z=r!bwz#Y37x2kIFIe;KK0J>UNe(bh~z-x#zaAIz#(d-}jQqXHZS6aO^Tv~rB=tCp2 z@W1n^R0LMvV_8i_9$gvRq8;U!29`l^{(q+i43thRIeSbp=)(uF4#Nh$5UdMd76#oz zX(;)&WPX^I`KnGLa!~Nqo|M&+*lJuSdvn+_4KV{MgU$R{AV4gLZ=id|a&Em*(U=He zus9A}P#H&uGsOx(N#(DRzE*bI-+y&GseIT}2s}xWYGL2Ir$4^|FULXAp-}aR4(VPF z74^s;vhkl@#3PLN03{SJ-rwH_vcTlOwO>pC?a`!GwMpguH8~W8|FZCwDDzeGPLC07 z%t5tVe`weOEj%CZPHEs(LA+QKDoz|3c>4Mc)-*O4f)NP)ZIh;eH-IRX!lT+pah#d7 zz)Cf*seIvoli1^7dKj*w?ktnEe+M6%;I7H9Itzpf9HTiCxvImT6D-JiG&FuH8wfV< zdr_$T>kP|w(?wG2_ZA0shcCN02S_iNHI0h@N~8^lyK-lCKYwE1Y|pey{nYyXBD0`Z zoI|D)AoGXx{EJMmG3327`73pKw?D7a_CRYnnQ7QIK<;!3hSR4yS)=&B^(p!wwD~&8 z>6W4Y7&?Gh$XN!R{Ugb1vdy{m!+H21<#Oj$E=F0-Y^AHs-Pl!ngv-RS03aNo#AtxU zny3LYe2Y5=9&_KqZu=o43YTsmcU=s-eAEqEhwA?;kYR(aN4_Zn^<#g$%Go)&FOfH` z@$r-97&?O*Gjw#JYk#HN4nBNAuV&c0b87ncQk{S7P@HRK;CW~CKM)Hz8sI!00@>V6 z1z@65N3c78Dv|-$&@`4YS*WQ+#}|Jq`2X=!%;iLmOO{Xz+@K_2IDP&{D?I&9e{!4) zR{!Cn(&Ju);VighE!M*UCSc32l;P~5TUGY|`lTPS z(cHiFnAi=0Tb;kV{{y0dEKJ1MUDHYDd%FZsIcO)#=r_ z1z5?3v+Ms~^7Mbs8vs9U$(#);$nbAd4J!bq06^bU%jw_u0ep0I_PDP*rORRQJb67A z>To_PbCtkV^DtmN?o=@y=E4@v$4q%gB~5Y#gi@F1Iyb{{jz+&0>oR2@OHGjk(N)TD z-*wz~JfoNFApqspzH*XrAb&XA@5C%H;CAmHCf^HcMt)Sn2WN8r2S61EtcfW*R)LD1 zQPA8)okr^_>=tm9mh;@K4+cfO`H2^35h<8pPrfxo`7Lfy3%pd6JhEL0x;P-Zc7XO; ziWUN1vQ=mla_yM?qzQI1&U4jtgaz8hI;EUwFC2~z0!WJUe9Uc_2WH zq=i%}IY*>!<4LccDQo^TDG_shBrUc~LQK@{Z$5oYRWh=Fl3lt}K{Dl2r$AG<#EQ58 z9Vg!pkg-Pc^dJh@pi;}`!ZOu+LEDhe8g4Qp+9ky|p&9mma2SP^xdy9@u$6C^(0V z;5x%1XQCcV;UZHxW?7Y07xFk;>kqVkat3wYhyvn0#L$+dbj7=GFC{=G%|k8d4kWZY z8+RdQ8RS`^rlfeRaKs53Fquly(>}Nuu~60QQ;jblpS-c3G-qV{^Ig>_=W zL6o@IfGC&zk7?+!LR1$eJthq`KAe3ktA}K3N;|5LAUFn^g`~lQ*2y5tP^63=p-Us4 zS?H-|I8;p35e$$UNApPkf;WECcvRi{O9IAL5Px1!5naI8sI5(nm$$EeHV-$>Ff_ut zmcUMcMBC?x0=?N1VOn)JGeeHWPAb_5823VIB}w_!^ZiHk#=&Ij|CkY}7HgYQuL7bI zV(@_(EV@*gNMGzBq4%D1?YW%glMAv_-ktkYodnBdFz%-n10L$9j%??8aQO!L1-cdQ zv~kvDOqxe-Z)7`Z3p!Hbu3@ZErepoAra%+@G1K}aB~UYQgNczcV{&nCiM!{&lO z6Q(YA-Uwqbef=9H?-ve10yB<`2N<_mNw1hO$p+cCY$`EjxkP|uE(9L5;XS7mW78G6 zH$@@Wr=uweDhB`SpX|w3vg#UqCeT#Ehk8&-{IF5QDBDa=pmG+q@TEZK?1~=F9Fb5} z3DYxC?M%5j?ll?tRtC4Sr{n#fz0U3msM4ER?Kws0j!Bj{-O9z?p~ou4LtJbseo?C@ zMZaOunmC9-_KMh{P0NrLj9VsUGMotkw*Zh+JghQ)*E>X+fhY zQO-c${>m)jWD!PwT~utn8^Oisg^A`piSsVErUh{DZAkj$joFm?BluVZ>iZ=D1ASJT z+I{O75~v>AeaQt8ApxiOh`TGeZwG}NYONt#N+i0YqJqF4P&zW9iYUsYkVwV$`b37= zR346Gi)VeY21i7Y(0mw>6Sf}hb4O(%fmqULWfIJ;jOMX!kNge0AxGt3RR{e6x|#Rz=s6qp*!Z0l4S?gFBBN z6s1ZCaDuA_TLp~yTJ$8+#CyHxjZfu3M1nq)^_*;B-A%9w#E}`j_)cbr)+Fsq>`UWg zvGk{YdSUvy7dVR@kDk$Q*>BRQ=k>ZI9cS-Wl&6Zo)3yY+34NFHZfCNiM{-m`Y-Oh1 zI#RYz|C0+^t?B%8*>(4T*KyvTey_OH%|tU$a{i6qdnxvQ2HYT}ihys=;Q|@;^JPoP7xo?>H%9k;>koZ zVo{ocde=7k`s$FOH-&nm5jx+b#NRC6D8%*lAN<^7K!|dYmy_?GWF$y}($w4Po^5kx zf(nZ^%OzK#S4Rc#9oIb@;l$@{S}~OpL%mFBYF6wu;NIg1L2fhDDdVCkak>@y{btec zFi|C9yHJ;sChZJ@g$cI|``|p3*LZc>)_>YoVCFbJxSw-QGV|9&y4mBTHNMM0PMMY^ zhzl4~1U_Ia@tRw29@y?M-BH!oyMTN^?a>PRgXz{~(Pc;W$T$c6x;r5ik}+AHM8+ zRhPSIpYLT&X5WHv^{I`Ib?tR`O})_+oICr=vo}ww)`6DB`*XEuZj(Qz`|r(y)cODx z<7_0M_{`I!45fw>Xlhj!N%uHk-Fkz^fBD{En<-p>po{dT8OFpJ$+X*R5FSK1190Wu zi1N~kNLnVn{zjAjD{YT)cerIbG#4pns!BO?4O$dGelogUQ~_v8=Oh5O*1%!a#tYnh zLH;E+lI4cEYmzo}PeF6vw-kSbW`7(GB;(C6L_a<7z#ZCg&y+f2zz}v7I8dw!NjoG~ zRLAL9)2pg;JrbXCO%r1YhtAzg5Dk~b9ggF6_(L@-O)u3|cUu(}Q96sA-K{ujH+S>T z+?c=MZS!}pc!$xwCu-tUFHqq=bz`` zs74%Tz!bHL;h6WQP#353aI?0iK6wV{RF*Wj=eadUtw9V^J5eSv0Kyn_8e{LLLia<~ zMjIqqUZ;0s%_0+BRc|HYGJ*5KBJ14{j zEI4zmdaWsOgX(MLT90(`QIVj^S+I_d8=-U2jc1{z2S74M^$+4e#VY)OKm}0iF8};s zk^z84>2j?;%>c`(_S5S~ZBS*1Tz_1Z-O5`sqUdsvTZ4lNo@rXP53bbTu0_?mNy#&2 zPc@YsU)!lwp-qW8s&cc+_q>MEuEkh_Y}bg^wEU%pUNLLd`^#SPqfxB816E!}oa6VO z;5+ztXCrSY{`x>v-PcP3O=c_fW5zRi5^2ki12v`QwBO=s_22kIGKWo#PO$~0J%>WY z27I{cyO0`8Wze57R4uowOgk1)Xm#aJvfQ^CjD8thHUphpS_A$c##1_!;cN4`+LsO@ z=S`4?>wAiuSb}|VKtA9rQpQkI(5Zv2k)A~InsjN-ev8U5pUgn2x4oU8D25APw8MnD zIeTB7h@HuiJhF?wlq1qch~7s{maaBvyaj)@8<*nQv+boKdyPdiMtT{K#}r|$}i9)1DVq#+%sjW zj1Lp&DS=|;+12)cl(^^JGz?2ITcFO~YSs!mrOJ%_ZONbUmQQRTs$qVnBTaLZ#@J?O z8dUYWkKX8h=Q>;3WI$rLn}fr&?eR(0m}Yo$$XRxIuxGQDINW6od|$T1lRk4Q7XT1B zIq{$f(9rt8Fs4{CEwAS)Y6=2m!M&X!^H$sFQngM=F8nHp**1`33S^0e#8x{a@OUxt z>d~)Zmfs#}#YBy96r9&w8iZ)yD3C_a$)$oKua&iBxy=>c!6C8))<+m~ckp!wMM*}P zD|JVjChL)Z?l1Pw!OxuncF7U~(Ac*!O(`C(FXB3m1WJqnBH~1kGUX1qu;^~s4S4u% z1(`0_XdG)o#T4h$j?b&Q**qPkqbu?gbbxXsWszA7pyXt{8X<+F#=HX5+n)4jkFecl z^iX~T$WEP(1Dz-QqjPbIau@m6%5~iX09lM@xxY{{I1f1x)ziC?-VR{dAJ;M&ZgbCj zB=2?L)$XUXFjW?GCP{%WZcS?;ub~GqAm;O}73A}$v3nx?uPuK-#ZWgvsMk@X;6+VL zgOavfBaIhVbNv#ns9ltV?9ebqAQventjTWYkHxctZeIkcVl-!NJ5}%31%|KGR_I)kAA|mW!a6tWWKGRtI~^z zI(3W#F=CQvb>2oohVFW&%I%RHz3;PUUXggAIuVz#PDQ5pdSGmBAMMn1DUVDwT|ddG z0c@}*|2Az0KKOssRWXtPx}%~tOCpW;gC2Y&XnY&eEM34bw(3YCw=VsMeXL+_Pyu{Z z_lb`Lf1<0G3Tk0SOrMOH!XW9KfMVoVm#na9d& z)|ApKgo%|AT!rhroGF5NCK0=wJ+xAdD;>tTS$)M2A-BU$higf04PCc0`cDzB<1p3T z?ZHP}k4!^7e&4<6s`PK0Umw{JPTKtT^r1tY+rV?Rn*8eF;`fG%Dr<90Yv4g*ylt`< z-5v#gb7joXJ8E0>a!UpqOkY$8rIm-~qm_45)B}q{j2aT0lCoXAm>Lhq_$1qGbn?Dw zOxt7y4K*Kbp0Ku*x@^_q8K7xHx-{Kf(m#cf7?A1?Jlqz2qUiLRKcV1F562M#hv9Zn zJ_%VKTJt`bTXDP(S0SbLQS^am>0N8Siu^*3ui`b*=7etG%qPLEYn~1B4vuHz8y+Pj zhFcim-2^g~alUqp%JG9tP&&3hvk&&<315v9z8ufscunTKsS#hm9nzJ@760xO8$FfG zxtQ>n-_qaGfa@m-*8E8lHhNg0?0v;~u3Ke*S{KN1&IFY+-rN0~PBKr;st>1doJ(Ys z=Jde1wXt)E)JFTA`Q_KrK%q72Isf!bT>*iYz1n&^n~O!rOJOU-l{fLHxn7%j8l(Zr z@zb3B#Jhr6p@oG$5`jCbV)Nb~6Q&-!%lS{#^tH~yrRC`r&Ty~dD=zPZmA_x9Lo96* z6C2zJd^`KUfZM@QQJUR>{jz|S19JNgf}-&b4kKP`Y~zv^Q@3y%ILw&xh_xBPZU>z7 zzwmhrm^WhLq6i@L$KXF+lh*=fdR0{eIJjS(5N_tXsqj8vQN+%y2TnAGqt=fZU*wd# z^%Uw(`-Rs_!T)OFpfGtNoh;a6zMEeg@rVz!j6OkAU7N#mC#tX;0FN~!xMQMz{V}GW zV)m~A{1B=CK<%3N%q0D9-Keb$J1h^^?i&(b0o+|i1T5jT+4vLOUlPM+gu?!6rj3vI zG9$wlwxmuOuZ*LY$7|byKjnN-$mi2-*SA&s*!`26zY>$-rG%v{d^!<2<9o(9JT>VE z_QAm;|8b;hkWDHP@Uf-N=1`~R#fQ7eACK1JNI_KY%!)~u~&cU5-|+8h1vq*&ffy`-6wht6`QN8Yy$w2kc>sXgx@ zpnd+Q9Q{~+9HH@^`VCgkX_zgCL|1;rr$YWu-`@$V4`UO<*m9-l$}R^;SokItZHw^K zg-idLhcsOeg)JfXHh9X)*eCw)q`_ooRLMD)~*a{FAu6X;-_itQ04)6F(lln zo~lL!a}j;efsOVW8%3}uoL2@HY!fU(#L6_|(X%ntsU>Nq3}zi9bXL2qbb?2PQMKG+ z8v5MA(S%jBd?YB|+|iR}pE+5uyh(Rtv$pHu!`MZd`9SVIlGb)Au+koW#=u<=tu!TFh22scii z%p&gj?wYyIR8=bxs*KG$O*q%R=SK9X8--+rj)5BmGV51u z>T^%p$Arb$5LeV}?-JQ?6XDja?%G>0sZ6S!q5V`x|5&>N{dRFv!k& z;*)qpyXk$|D@wbU>OKa0!~J(Y+vr)A9;aM&@bS@%_`BAx?el|V#t7Rtm-ppD4-TVe zOT(e!M4VtYVJ2sXUxyUp1RR+rzU44iWy#u;- z7VE9!Ej$~XNgj%)kbSPXdv%Mz7c`%Zk1H~>v)TjV?0qg( zlorL}(|dDbfl|wYRG!ZqBy91nO1`a8h5or1e{N>!s^8xT@FcpPIXTbhPX=Mfiv~FB zLnjqzLzxYeiUMSj5ZB_d@CUN#+dop25<66x*E2}Rk~<}tK=&0xy2?&xY`1ROG?126JBrS3 zerxABBxPeMVL5NwR6@Dof#)fR2!{u{&q-a@{i%n4?&nS2HAXz|_s}UkH*Z~eDWU>h zz9#cN{Y2I^yYdw28l%KqXD7v7N%#^GO|7g9+se&ZBYnB{Uq_iyeYxSyfe+0g>qq5z z{T`VuiUTF$y{Je3>vmIEdC`LCPnG-=BzPBXRuPQ5B+5&tFAMv7`(0ET*r1!-d8m!h z=Oo=nxHS|k%k4?EC#N$4no3Y3n7y(Kpc)up92aqE;@G933*b~=ZdCG$&37}&w?DO# z2L~u|_UW;P^>B;ZPROh~Inqa?;+qpaU93lDcav>vF^#V2F9OAi=M+bNlXX`WAjchp zR27LI-Sze0?)OK3?yFq!h>d>EiM3(Z+_&4{rr%dwI~VKXt|kg?JYM{#A)YBIsKHtZnmtU@ za(7Zbo!I4~2ohYT7~&NMLlG3$Lmop5t<~hJuLQN>+t<#lZ~pybp{m#Nfttp`rryAO zQ-()v|LF4{dW?%xxf+a?6`m@)b+~O(USWSmg)n)KtdXH+dZOok_8WT6O<`i#edbnVe44CGsO*0jyY?|GCH$O1m>cdTntp6u_AP4OTkAfV zELw%Pk|hvaMw`HWenNAO&9+VTt%F|O453-Oa(KS}5|ue6T-a_fnU?Gp#6UhWl++JT zD_x0goUWxQ*lS40xr$^pzvx;-|`Lt$p_2nX< zgccg#BDS|pF6W2rROU@Aa)br-x79uC8@Z8Do(qjhmb^5h`3ofNk30w<=}+0J5fREz z%?bBSPR>Z)UM`h1)aK-L*Q+euDLnP6;-O)8P(udeP+BNdwSbE-O6;qc!gBc#HCj);v7RNg+KbTdo=c0vq>>bMz;~JldZv z7UH&RR_|r-& zJ;xlXL@`w_g2hll`lDXhTLe-OaTPUHpdPDNwD_}(*Ec1Xx%$`#Jui~2xOi}a!S5H^ zm@Ye6xG4IvkwW^@sl@kUA3g`siV|G-yt!y>)i92L2$0*~4J!*u)0OX_Z!90{S{o8! zh3r{80^JipVg$y|te^Jrmh&T7Uv$0qECZrK?%y2%X+d;3YUl&2@&KJYWi)J zb=TIy7ykspw*ooapfb{_`4Y^Gx${W=0UF8F+ou&O>t>WgthBHZz>H}4E!%~-j)=CX zHF`2q@09!527UMOwk522C)^K`+aFWmFIzUfyyJ3xP+TdaeYSJv+=6Mt-HD3hTc=u# zLIW}}OoF#j)w8q}AW!((Ela=q-Mryjz$%?%*y3_ecTR+#P^kDF0Y)@qE3C4|KYB1? zM1kP)_5v);i{e@&idMB5d^sK~G|aSe%bj-~879b|#aP^6WX=ASuP!?{o}snt5?uAM z>11wb2Gm}?RtmS6iGSJW7tdkiycN4}$oP+A_|U2U3+1eRUgs_A&Sq zEy`)rB=^RijR89jnaxSR-ip$fcio@3*HdrJSyLI}QLJ3|SSx2Y;p5nbw1U`~STHnv zxFe(k3~ht?if8Q;VU}0t7k#)d4z8tjs46-+K0;gUYQmz3pZfl9`v{W+Ysd)hAq>&q zhD$B#DS)OWYYjB5T&giD6W`lEo*go*9=!GTLG+p%s7DP;fsqUDG`@fZ4nMOxa2;_~ z^!hf~6Dl(m9$se~(q=Dd;Nb$SZ{xHbKzFiMFcefA=Lq z)OUr*l+(hld*DOxe?AITzsNF}_wnv{j5Yi*LLUzWzTdCbK2EI`K2Fz7H)OevD2roN zVQwIm1s})=5IE(RLWYOp;2L0bvHSMsMPW?=dne=HHN8wu4+x7}?GD3^H&nlt+o4Zh z)RxCe`7Ae#5%Jx`*51PlG0m+%otXYD zHsJR0jn%WQWdj1pVUb0bccNKtFTE-xx1-x3E()$;i5(QJezln~9MvmOX3G(DsFG&b z5j*to9PljwZp6(T^Eo zBOSdoXkRy}aMivwxx_e~7;kvvVAh+w$K=-)s7bUfX`gxNBg4_AmDU;~N)@~(=vzJE z?BYa^z~E@d-y>SyZ-@m}6nJ@2m6qa|KaB!0u?G9C5ME^?!nwEp_)W&{d|c%`&{8*Bra zBA$U+O(nj()#u?Px`X#QsUaobX=6h-g|`bybAuH5H$VRnBKW==zh`0=EdV zNhHcbS<;EVdZi9N6!N0qWU0l}9TE`_o!QwfB)i%3D&!Hu=EuCdc_{Q&rfArfSG3=j z-+%7-%L(y2of@ZIUrZXMz}~@Hg}s$p9L_jS>?m~AwoJ5t+7j;9VXCojU*eqHdoTaV5+QsYu5g8hVXjtfes}=u&E0|v=5Ke6jtiGV``fhKdZVT@ zf2<98Y~F24C-3*Fe?i~3pUy{qSHym?SXVM%cUkn%;HI3FMA}Oky4SvsU&|bK@=7-^ zgra_{@5)^AuDVq@J}P01>)7t$+SXViv3~wRLeX8riVqz_sY2Gp!%=K8vQ}s@*YtUJ9oP5^y+rfoQy@2U@Mmb*c318Io4X4`o z2l+YnSVcGgw+F6|r#EQgf-$~LH>NwRkyKk4q;31}WnPpdQd&1_FI-)(T=RjUB&O7R zv?VmFV{?5kkE+*2x5y&d0;q^k18OppD^|Ybjj|q6SNE5(UI=~Hugw2t7!pqiXTImd zPPea9*!}I+Mt5k-*Nxe~Z~I-(OB7dQ6EM2Xvm_KI|M-qNQXLW6H0l+SA$YSpv!dg5 z@9^1{8v(bpqhebp80B57)Q@D1Xy^t*lAAqC19o(g2HV?hkv?yNo@Tdf9~cUW=%C7` z<9SX&gE9(&BuX8QVd-s?2DWOHxft=FJ@H*UjlO7YTRV%U%v%-jZlVxa8e*Vc^H6t{ zB~fp>Y|BHf*~}BcVL!l-OL!{o!DL*(dyhNVgd$nYdiMCxp2h%rxMP9aa7s8ZL;%LpE;3`gUgp5Bq%k-BZImZA+Otfi|of$kZ8WE zKhzCE0!wL2x7c{YNqJ#N;xS2l1@`Qu!kMpW`sm8VSaeTpVpCe}7o@>dtcj7<6dv1o zd)7QC7G3|85-)u)w##pgKHv*aiv@~>Iww=nVt?h2b-9YxHU-CdcTyaHF_G)rBNCj# z=Jo68-I{335rjm9Kkkk5E!I>g+u6`E@fp;{Y#q4bTmYFb2dq55B3*tuNRQ|@iaF!G zhHviljhsPi#E-RS?{9rK)HZxpN5&3NDSdflb8E-YMFpb!&;vb8*0@mXi^HQwoFv`} z0<v|8UB;Y)<(!RWBQ``o^zxabeF=Ds zH|zWwiSs6lhad9Wb?b?m?IREzC2?=yT4C3ZV5RJS`{NC*{7?rt9N{?D-y^rddQ|HK zX_C5@TaK%|EI)MB{tsJKho&sSY(oY8J*x=HQbWt2s>2<6{ zDOTUOBDR&9bB82z>*JW^5c)z2Y}RuT8~6xp&Dz5ht!F)+jS%KX&RGfn=&CX;w6Rgg z%=w-9)Xk@KV+Y#(fr}feFTLKf%S)F`atP4Xqoy=s6~QvTB|N_ao95JRtBr{@^gC;r zxX)}arc^Yybva;en**1t1@otyO&7(UtdTnB5#bkKiI2V8@+di8{<^Jwz@ds;RmmE+ zNa@&!Ge$xU@I_sEeKtj6TVhN>?U*J08q2k&!%$r71)}sD*~X-)PT(0RQY0> zU)ZA*t9@G)WYHQ=?Noa&h^kH+>q*MU=(-|aJn85)veqR3A*Z&O-;i9n>udFvTFpFZ zKU-QXXFmnUQJ$+xkJ`~80}Z+@9i*lC>C~*5(`RGDKen9CP@{&p8n5QN|`~`*bb(2VWX($gYs2437Ak;X=VFOqW zz&gN+A{`V$Y3}K3=zV!>2(4Vp2>Fa+W3*yy^9mZ)UtXokYZgi&ZLILNOzU(=Z{bo^ ztJ$X!e_|jChVu||-%oC+Io!V?+|sAIP$kSHX-h)IN=8fk9Y2Yf*lLZykEC#kH(s|U zRTUQJs!~KZ4x-d1up^Qo<6MCsSbV&XZ4>RvX#!;3LMjmLnYT5KOBnmtw9md_{p#8wiFn%`C1r=; zsjq0KebunZlCJ%2=`A6GXC1Xw*E7{9z2?Ys`mDQY9`51Czf4Hr8h{`z)uJrN1 z@6h9YfeAmWsdRf3g1onXh%9-v_-bcIj_zb@(E^4K z!;6w#kZPD%?fA_Vol>;JSIg|ppc-ndsTx|1AxXNz>xDSl6dPT-6Lx-n4_Z@&KAsj^;wS{CVM6_gRbeP>otZH zsz}`DdyIgOmP%HD~yvq+>NJ9so?T0Atb@oP&cpD#}YPIi1 zsY*;AQA(uGNx-VjJSaIf4p{FtRGr>u2^7tCf5WCIeQzICxkQ5ZsDqWhE`+>s)~qT@ zoGZy8;EKNl53Y!(VDms_f6J9zNqyJY#NYRk$vRfCHf~osu4gvJW+|=b3Un&%B8x7u ztMqA$CkhFp!z(0E+b&HzS|eo3&qfywpS!a75H?H2q;J0>WM<)a!JD)2@SnF3E$zys zoh;B1)ai(12mv}$Rh-&^^JS8s+0E-tsmnGN!WvFJkpAGJw^3)RXV18_Ec;Qibcjw! znZ;-632dZ(1D7|R&K1}7NK!G9(jg_I3a2B{Uap2y{pmt5yl3=3Ge zx1myAXWSg5ti2wk&c|EIB)!C3q1sOUPH7r!t0QSy4Z5Qa#8pEpTKm2~Dw35Pd6P1= zWZA*rWIF#YFPL8+K%|O=JvBz1ydL(B-dFG+GYklz22pI}>~joc{_M1A3E08*`TJam zCiPwJ+V!&09BHDR;}x5E!%ejP{vuNfLCUuAW~gHFD&-gRmz4CXo|g@#Am}cGcd2}w zwNyZSp|p3*-lMi5iPf~tb$ye1lifET$WYZ_Tf_M0N3mFWa?QCbU%FEx2*@t^;t(Bb zBuS)7XL9+Q%hWZTD&-*xT6(v~HmNq2q?Y6Cc0i#m%qD+H#`>VOb{(>Dbb&cl?pKT{ zBm95Oy?HpBTlYV#gHC$ds#9uitEx3VC~AsMI8`-NE2hLbQd)C~h$(bDrKY2(8dGx# z$uYzfp@X4fsv)8w(IP?+6(VN8J9^G}&hPs?=Y7Bbyw~;Kf83WK_ulu~Ykl@wdw?GB|0xHerva-d z^vj?65tjC)pg%DTALYL1Mo_83!Ayx6$9K;~bD8Z3g2p$G1lnbh6n%>U?LBgf+J~{T zCb);`Pb|%!gB3;`8b4Yd)!&{Tyu+;4?l|#P0Bd|GWLl5eyx{Rx0XVC8rWb!pm)wdU z?34xlXuCE}Uh}BtLrEdcud_T=iEiW&qcrts*%43n7B0RzqH0V%E^15kgr{vXqn^cInM0xVSMK z#z8ni?{IHKc6sR6+%I&HZ_w#aKaRTDkafMu=hf{|4ktMp9%CXd)| zpLJ}kJW==T3*O`43~6E^V)$d$wUy-gvxy7J6B_$dR55|+`58 z1>KR)GdjunaM&npOcmsMzv9gfryaX)1Oy*Bl4ibGr+u2R*N0KqCZ{&4b!{?3kY z)}Qd@G)n$MPJWko&)H8qW{wMYqD+kl0Tp#`o6LUu!b0JP_>kL|RpXW_4U3elHpVmp zqJkr2x?%>@tE;VuwyS8NymQ^jp|$^(Qf}80I(h9qIq7};Gndpy56me>MWVY4 zV-FK_zV>vGp8^>nrb$n|=|^z8CoNUNDhE4Dk`{8s@Xdd{B1C9Os$aM?*2>3OY`E96 zLe{IT<0onS=Z?vBIaxNh|5x=246S0@JjOj0oa)3OTSbCGSh^TnB0BZ;)$ZZ=cEjJ$ zF*m=QmR&m!Kq)^naDh*td$va>Q~?Qu5LcVJnSCwKMAE;xOnCf$%9k}(pp)V($qbr_ zQP}C)++jxFt4C_Ow5)BwF!bxx0Izump1B~;Z~wsV*?k&rA&7v7IHgPEmuxA8 zM~*9c88t`_UIdVTszU^tsK(ysWyVeYiG8KkciO#cd9yE!y3Kj${u|wJ{uQ8g7T)h& z3&bw^)!jgD8p2nQ4$vR&ckbD3a{HoU#S5KxojAU-DQyf)WjS~%*uC2=;N4>-Z|l=FD`XLha)p0s&I5O9P4Q_vnFssNoLCqV&~C)99uIkAr` z^~1i7H|4cBVO$vP<(CPtrBg+RS0keC^^G~+hl!3pB!b=7AWb8CMeU_=I{1oQUp&Oz({hXGKBx#ov}1m&58}%cgB#z zg6{q+2jnh&9B#n+u#vyS8Q?Pjv5?>8haOwlfREDKC>AvVxpiNDp5B!)fU*|yDz3-63UTI&9zod$q(Bm>0`dQ3gK zK=?d==SM*6svcbc8^*3q{q#V;8iz^WnWt(+o<5v9KujH4ZgUoqnI}I=S40z9G$|#E znLrrui3D#B>w*f<4Wo=WS2;Amq2%*5nSZ0v26X`7qp$Pzb4N!@@WeHAPN;+b#9<-E zgSQroxB9Us%no%${$+Eef_}CJQ6wFz0(@|r$yF%d-}nQ6_fG~U-sWp zUBvo=ER1+N)1T62zh)KB3G!&_`k>>~*?&;S-|P1Krn(DSl?RJ}IQXk#Kk~Z%}*#jpS3iv&(A&tTT-kniPKh2SeOjy&pM+eFbzT zhh3D}Bk)AKDFL6Pa+s{%9P44o|F|0Fi_lLmO;e}svcCx{{jB8Pjh(2AX zZ^Z*@8l}MelOKztJL+TaYL6Hxu%&gd?2D8d-n8!cPoXJ46Ru+(-050)&gR{X>)OS> zww~b3ykBUU&gXp22miH}2oP--03UMb39yLJ5#!^51C-*{#dDggO-}T2-cBWI4Z!kx zljlDZwtCL&{sN|g;?-o18&Ui+x>KDc7UDsX)^zb1fzsR>va;OC>RZiQO5Pc`zOz8D zmTo^zXTfr1UoBGg!VrO+(cDOnqZvE>VT=8uHzDsjr znvWISBdRnY&;Miyr9?Zt(?C}i(OCS;-U`czti^vq(PL-fD@)px!mLGMY9#?~g4|8= zaGuNf!3%GI=ydDcAq5zTKGt5l@4z}az*7HtDsBb4d)1#1X%`Pn7;La{#wzWZ5<*6c zubY`phk>;o4h!|QMO2+*8dI)nRTrJQHktR2`q;q^QfwDo3AwbJmlv*z)1h;MA6ll%YoyB^Jc2@3;P@&<@Sv3Z@XDU5xpi}yQqI`9A8Ot84 zW|^kj_NqX+QWH?wk7D&K@$Nf6NKZ{jaj{3;XD_A>q>R{aa`w zL1izjvJ5e067Y^pr-&mOK9UzG4ZxX^=(B)2vg_P>%+^X#F?ww zAx^!mbYKea_o*T;GeA;lZE{4y!&p!b4w6V@cV zkhbAtni+a@c*b$<*h#sKt0?^niG4^*?%euqSukq!yJyl1tf%Hk4zF_JqIRs|KH>;* z$-fn{l9|~P*4Y$y_^a*z=+eyBKfG69zk+=&9dk)Y5blQlrZ=A#UqZ%+It>dSi5%E@ z9pk))l-%G?A-a)Ydou!gT8XI%Z=KtzHub~@mOdjG1l-xO8}QU4Xm)Snal3H=Ms*Kf z4f+{=_hD;R0i75|IM<9Ii{^>k9XDjQkb)=gGL!Yg{wAUAoP>p3owap1J?0fRWX57?IAez1KFnOK4pr4!WT zfaogNGuZuL>eMs&H&Y;iBbZBlY5#VoZP;~ci#t*Xpt=E7qGWpD`k}j1)PUA!KP!O{ z-zQi8YCJy=Bz~oT9>~hSEvUJ;m?E@uQj5rZq;ok~aW2ehu|E;ii%PcT`ndx=D`!XL zI*6MD?0B**rNJ+~8B0xC?J;{c9qI}rjg`Iu8(8^1_>pY8S4A+Tx91kKI5y}GUIQsR z^yZ}^YLHw~D;7t%`)|jia5&hxKWiP)xNwuA)hD@ST1vZ8dU&73TK_g}5Sn^?HU_N)CTE+VpEp z1R0A3^{l|sM0PxUBNP<*IW`z@zv2gnnXAAO2|wb&JZ$t*t+@YgX}E!~nmhfBzeL7FF?9cvow=+ECXN?LU*W_{lX-<^ISr1ERL8>-8poOOE3wsg2so{VgvJa2JLBFxy{a ze3?LRd`5ph0PHJ#zebrh^Y6E}e*Nz+Fpai!cUbVBxqYp7U&tPP`o|Z)*T~}6ZMqnn zIB)#udz~x(=le1LUw;O&Fg7Lmc*$>W`+~mk$>Z<`Z{MH45%|{g?fAbtS%2E}F;KA= zNIM#FcHR15wEjWXIdiPgXk#jZnZ0gtq`hdtFmvz>c!(R7q}LW-KvozH)e7jC+n~>F zEcYRjy5~08bDO-CaopA_Zj0l)IpG^_zT;`{MB_?&W{E86_KS zEg1P?pF#0HX_Nq?anGf_5#RQ1!NRgqyMeNEs1r3SvSH(+tOI2?=Gp{L`z@tb=D1m-$>$Zi==us*xluS!5Je)!8?iAd_t$$ttz zHFHBN%T#hV1M+0+^1~Z~erEc|$brVypKyYA0-=ox_xYk7CpQ#vN+){cUM`&0T~;8Q zUXK7Wiw3gtqEH&l#MqT%j_+EJpYNGB1i^o{Y4V)6fX^K$GfEP8tURI`Irl+p6cyqT zR&OSS^#44%aZ}RSp%wizZ+ZRnd6`y?>7vdcOS6p(%2k{dP@gdon?QoFxX1_|a%*hE zA!3)n1Kz~^yH5Q`M*sM7!07JH@xaXd{%fGrL1ztpF|fQWQf66g6#waR!_tqBL>n0U zUyLdZPh*nmuuILNxZZ-YjKWWeW`3{|5P0p_Q4h>=@+E0zgBeJ_;4G?M?au7}uH)yY z7@3cE5(_VnBm}9@-PuHv*T@skrnOt%n~E`u@fU0}u|rYwE9aWt7Lcf+r)}KLrcu^-$3%1?cZS4-^c3V(_Dr_O`3Qin z5a`wv|3fR|^O`Rge)Rirp?88+;kRqHWdQ>-3x969W7B+Cxr)>EuoE2Idsk;pj|Y9a zRP!td4GNCwjERASY+&m$kE78Kb|&V>I0%tqRv(^6I;9Ox@?*X zADg0|L`m9s=V>az%!XePaKE*7x~TZ>Om_~Z)bbQ7TMe7m7TaK6Zg*ySr;+5@rsehB zqm+)jt;}TD+{Ep=6%@vVDx9HVoWp>57M_Z_*GC&&CsuZ7<6JBEJLv$Ih2$DTfQ zGfACf#c0y`y8Bl2V#|&zTNKZbZt|KU$?{Up;2uWUf#bD>r~`~w{*YTQ%dKu^k`HOV z%MA)oz%hQ(@2ZTYtGO>Ae7RA}(34pd-H=R|R1Z;XRU=hxL{86Q3J#IOdS8b!xc;&J zATzO{(hMBAF{G(V!rNJRNX6*uk!d?B{{Gz!n1gjovOg-HZA~MThL+@YBHG^6D1?K$m(4BDtNx<5gBD@}^&y)Rd*Xcbh_P7%YqA`_k6X;Vf}Aj$lD59REy+OI^Qe zd4_&P)t5WOY3T1JSZ|!CG*u<$8#m5<}zYR)jPjamK0pZ*oF996Ovuh|aweYZd)PDt{?%4nXIrPXw9II(m>PRj--N!cF(S$xUevcS_~+`?n5$ScYgO+ z1<9V{5A!@z0H$fUs$|!j>5(0A_!im)6QvDhmY8eDJ$w|s9d*lfHrX<1F@M7;0xTXt zqZ!)v_A76kTOtINY7iG%!(5yN1s*VMoV|TcsGi1J94T#6w7i&BLh81-0reS;Vcg0} zedViiIJ^1MHLwk{SX!+zC^|a5q)S$(L`ek4anHQY+MvGAuT0-WASh*}b#9|&e(xqq z@M9f0SLaeHSL&))uZH1{bWckWEy~Qbgeqon4f&gieXhwVa@F2*;eA^DE3i=4+btN$ zmv%BLH}9@G#J(ydN!M0v&cC9+dR<4M{+`!{IJZawmvHwB_Z7urkF@``@XB4tUJ~b$ z7DGKrm#nJ-NAhsmDE)ifHer`gMpZ1MGnlDfGk^t)&xYPa)r;M6oRZ8zu6NafDcRtG z0Tj`b{Sr(qMbccHpX2mHm}=a!My>V6^+q9-(@Q++h1>|!i9TsqVI%_Xq3n@NcuK93 zqDaJ>Nu&R(=e_5OSAzhSoBi9l$uA60h7**~p3Y28-U8?@m~|Iz?KW&ybge6xQssO}lBb z!B@wzjn_Qv(S>td94%L_NpHfRX20d{)MmQHdgUNvHpYU`kxZ-A;qWrc$<4FOmsrb4 zz=-_7eCw;J`s7)r;vzA{u3ip5U45lAOKyD4oN=?!?h+zqrSs^}nYjI@;vTB|;@yKG zEGDhVzi6&Vx!6-Z{u-989-rLc#~j8OT$j;!31-GH$iWM!((|QbcPD&;^J)E1v%<|= zbV@KcE#_U+E7KNysPdJ1HCS3??@JzkV3E>d=eQ~i>!FnLH(B%a&su?sTQ3Uo;K5Dx zi}ZtKb9zb6ZG_3l4GV^9Q}|6%!BWo_Y|AQiN=tn0Ci||&(&I48pOA;+e-90d^UkSl zGE){ad9ejiS`1Shjuk1DJJU%152MesI!M}c)|#G@Y8OW(rVJVKS`##WTnxX4 z89P;`>_HgFsD#aQP&86Z#|=ED9Gc4OV6gPc-sUiup{Bt0)+r_j+TimvsJ?_ILTtET zCNq+U{Xm}AggsqBi6kunYQ0cRfq3pegtTXZfXA>V;Cus3D8Re@UEyOq7$Q zSbz_$F^4>o6j5*M(_xbq*2r!7Q9vL_)c4r1mx|fw`?H174CT3IK`YM%dACRB@s;WV z>C@tELJyQ?CB*jOp9WuwCce;Cb8sPWIpW#l@{Zi+-ua#)QK%e>cA2!v>eZ7CDN#&c zNULzjN=#LRa^k8*^k9|4J`)#^M)mcROX3V`0x~2WYaJllTy?(~JsIX>E$t3z)Ss4} z?yGYPHhAM5<_`f(nlddytYjDlbM;zQtEi_aa=nsQ+C$5a=(y^){Qih_1Q%`Nddshh`tHj*5+;E0k8bb7P^6=Vo4o!q%3$ZflSF zNySk-DZ@ZY_0^el{LF@|G z*o-(P@i||KaspTDLSU3Pd)g3M=9e8L)cc%6-Z+(6>LTJ2=5^yN@qQZ6=|Ph+lmqJG zTv5HEjRA-ko7trPQx)}Oe5@ikuU^%WJ3|u*DXo_s%04or$xG;2Q=wN7D+L6;8316J zDi)VIkaxVjh&Q??Pi!zII=cSh{U-mWr=LFVEIQH$bqAA+q(&TTqH5koH3d#52S0g{ zGLww4eKx2N;;q@IaB7}tZVuXfm_|#~sL#DIt;kS+js1;-7 z(qGmut5#x1GP$zEs#8#Bl`nD(u2V|Qr|#AZF2Nk4Jv0T3gLOpYtC-a}IRiR0dh2J+ zoVSlSaj-Ww?j8%~GnQDWp^H&_Yb(!1oVzs$TCEN2&TylkZuT;?YvAlyZ>kW>W9E}V zA?Iboyf7SjEoJCNQ-i%{Jf|V1scHuQlw{XC;UANf{d=z3tc3nutgCr?yWwSB+m$<{ z&|-M1{zCmRN^NadS$M72Jhf(1&SVI($Vqc;T{bA+dzPX$XXCOqNlXaUI~t#&A9cx( z+-O>_#zEOZQ%V7?sR^w`Y(2M)h~`;&S}KfQph?;Y2>hG{ME+kTk!472^CshV^8Oqx zdpy0p@=UW`*M*`sdXB!uq@HbXb<7mLMy*L>QS<_-Fpt=aWeh?u)*NXsfQxzHob$&S zqF+*j49B$6+|zqNJt1l$-M9dyZF#@)xic>{BwzLQ9?hk0KnswzVsW9iSzYUBjy6mC zW~m_I^|D@O5p4GPs&&3Hv16g+~K-z*lRO$we(!?a?crMT&z>OZLMjfYn-?A zE<2C0o3^n#5^8)pVYe`}MR;&GS5}?M&dHOU-O_ZDMjO}T;LdR<3b#8<75|K6tq;D+ zeBR1Fy;KYRWM7Fz1VgGKf%%X{+bidKJhk=K$P0Qh;B60_g?R=1S=A-?e+s@tRHpPP zvI99_H&OF;s>e|o|LIYY)R1Sz<WSq*jqf7$&IH}nNDY6i82dlEy}qD zBmgO#N@`9@#I=-ZB~oY?RYXUj2VwKgkd9`dQwPyb#E{A??HH8R#1HlCc)Nz>hr@@? zSF;*!5jn&ugB~4rTBxyZ;J8z2d>Y}p9uT3utlNZ`4n5B@8hyka! zlHwXY=sZjuu8S}>0KLp!3W}}o(P9ED2)Z-I{rv0oE>)h%Pu-8vI@jXwk^QwZ@rqas~p+XdbhgSN`ABcy0b~k`8?%o3hFj zaE-4KZnJc$WCh*b7{kx@D1v9XuNtYar!V3=xX0yR7LrAY>({>{bbfae&XonS59Sz; zMSQ;3)g@?#ZnwP$84)IxY3x;l$$BxQ(WBP-rAw)H3Ppi7_5p?*Eg7OE5c?4(pw@BH zx?mtxi2b4~)28($?|*7_;9~wOHVbuxc>+-B3l>}~I95YDSyyd|vHZ}uR+iK^nmP?W7tF=xM+(&iu?Mw@uT$vA;7D8AXlQECWA?3u$7)GiKuro99`i|6x3(6OD=RXv+~C)UVt$MnyxBS{wU*M zOOw$vSRJ>@$c1Jv(7eP%c{P1nScky|MWKFAuGW4#f91tz|2qL;ZJ6qlxLEF~2{`^c z4%h8rEGs3!<}wJ^>xO+?@(f998b{kdtyyIsI~e17L5peXM#UPpUE$r1A8=AP>$oy2 zzN?^Y64DX&J(M_mjB)nyyQF&40y*5(j{Ro9Lo^H(V_|gvC12 z{x1#pfk?)*%IVQlvu1=Az1ZD^(E{yWk7}i)`a8ZS?JytA(UHL&i@=J8+r+xzHabMT zdzfJCF)OmxQ`a0&y7{?I!8CG1!>IGqsXZnOhC_egFSvSutAb;4THw4#*A2};91`Nk zvWC*CNrrQ8?X(R&Q8-q%Obt?cWd=<0z2l|Qq;BYZIJvN%$s(Wfc@A-o*?66TJosxr zM^b*GZ;W*z^W2obAxsjerad-DCEyUMT)E`xyp70OLLPiWZmH8DG>PYWI?j<;75VO0 zr?}KLn5pyg4OiEh80IvjUCFY?b#yszNqH8{d^Zlp6ZqsPMw$VTC}9)D3Q5phG}dL zZLDrQd&zx@1RU|W!R5?aa*$Bj!bB!O|rj$GpsLI-mQm=rTYVPD=LoTKfk{kxl|5tLy_ zZ|$Zq&a!k{<>L{-rY^y72ktb7UZiUTI36*SLWD{vBP%;bQ_p#-UDr;mTWpT!AW%o~ z*;e`7SyeN=;HN=Y$Qb-|HFzb$+xzGo6KYkSmzWx)nv4%@FkgRglE-lJ?$IGMq`SDNvFHHZ}*v_{qS!1X0 z_}?QXB~!(O%B1kkK28R0O0#JSbJQF&Z{fbqsv%{0HG5A};(%geWVA9^hwMx#%kx{Q zWQmTzlXyu!PoW^qS=qjU)t9RIilNHd^&=aCpXk5Q^ z6J@^e*wc|%FfFn6yAraakBGK5iuXR_2@9KfEEkOF@C!rmKJ6>(!k073pjj+Qb#x*e zH`!@<8JBXttlncfp~?n`wF{{?{=|5GL^@wfgXmgxuK?Uv=108LIo`p1gZX;Zd*VYC zcDcZi7$Rv+=7f|0&H<9qM0TK^G+Iug!i?%q;~?UjE|zy`mLuPw&K_M$nXuj`so zu>n(K>sHgu5S6SUymhc;RV1Y~c5j&h7S}We*S*yhq(YlFOPs5w)&NI+P@=}X_*MUG zEo8)0(!OvPBK=^W{}`a0xKg6R`LE5*S?M#QE?|#xip!-H_g{`GL`-o$CgRT6OFMER z8OqSipfQ(gigW&|$)S1m#K83Y@nb_5QI~?RZvaQ~MN;aLO`V#?Io01s>yCThKp|br zOhyk4E7*X)zPMo@9U`p&AF6{ZLZ&w^n^Rcmc|9)4`GeraJgAL$G#gc&aF0CSwMx*K z#%mNzQk&I_s^%kG-8eM`+EKjcT?y?8?dL|<6raV3Tk}jV8Bw}`xWJ}&>Xmu0rQT@E zEg* zRk~RT>*}77(C0ds=XyFzjzz1Yt&@;l-Lbm0hw>1Ani90wtUx#u)fVqTxtzi>(c!}DZFyH|^wK}pq=mm!VD&?9c#@cIHx)TsvM zeOJng+qqU&Sls6&*(t}H45U#1AQZ0=^$JTi3Kb$-S6V;!?y>Q<8alCUSuj*T(t%gh zJD?3wkG;~`3@7)mcv3#*%c@u1P`-ju@o+tx6o74D7~0E0MZ5z%W~o;g0h0M?)TDu~ z{Q6;aLqw-X`oQH9-_rOCqkiSp50Q(jnIzo8Bvb{*@QVPC96@#w^}y3vFIh%-KUNoi z=9v{;bK}EZZ;xm6&3F#nTQ!!_QpAG=!-;pPS7(mv8_zkgh{r1>&N=>&tUFP<$^Llh z^}vN*&uV(eq?vP)(xd^Qg=sD$X$l%-b0J0HuN!)=Fnzg&Z>X;+6UE3wX?h50PekmL z!y9G!Oi4?Zp*sK8vD-4H>>+!aNLlyNgq486D}^{h^R^GQ^6`DQxI+HG9W9N7WBiF8 z06HPRM>v%OhDJQOK z=Q%6=3Lp;4y5e126&=lVh;X-#Q<+VurEbzl`g0&AIEmAN*F;=5jtrOeZfH*Qc=2D0B!k|L(FM2g{{Dz_TM?WQ>e3kB1Vhq=)SWXcVq)hVD%rEb4shSOERoVN z_?qjey3(w6uM7iae+AJqUuHQ4QuZw93G9ZaZ_?D6)pp|gLZz!IJkqqLEBsA~JdV0t zpsnV92XlxRsKkh$%?%O7E*jT9mIlnHDw7)WBN^fvHG7MsPK`fchJpDvCauTRtR3%e2t26Zdlf*rRp8vK$6w9})N6*AnOR!6mrTd{g*=LzKLXuh zDEub8xZ#KHOO~%#Q|7Tc#KND)MEV5;en;~I82%RdmtT$y?|y(Z8FLUHJ5MKnqCC2; zx6|a?oy9!2DU87{>&l~juSz|04@1oK1dDeF{A}c!5z8-eC-C;e3EJu5flP`JVLSLhj3gcnU19MK9E7Ga=Wj5*_a0o&9*wjZouJt`zV|CG<`vmUCX$<^d z&6~b^eEi4aqKjAN;$I4c?NsRFC~(*u9789VDUB#KT(=Kcci!SU`z~aXI4Kb;DMPoy z!NH93^>GCw_qv;+5LgQH_DGR(#CmH){S5{(Ss~eYV;-QA3{Kot=AU6)r`U*@wB!F% zzOsZ!18}0TcY}>RP!M*bar;r+^7XE{b&K1vM6k8JQx+JNQa(92vRXPqoggF`FLd~> zxA=N3R3tMf;j@%qfyR5vRJ$=izs`39rB2pK+RnAg3S-ejkJB9@Yhc(q|F37GpOpt~ z-{`f=} z2loBoQ~dj9(cQ8JNzGU6zuyS$y^>7F?brVI^ZwgUfKUiiKpnP|%U`mUWk{pjx6hFO zRl`^A!`~;DPv#Ju--eL8p`yI&;S7=*%=S+yuGTr5p~y(Z=r!XhFl1#+fY4svtExA^ z_}sg3YID@ge))=^Omg$ayGRUnkp_%gM9tOdUm@Ww<@eaETFzdVfRgrw;<=lm8}H6` z?jnR0mftHGW{_kjLb&Dk4i>e^ZZ2Sxj9ZK6<~R^ij?wPo>B{zQThUBdQ?gM_F<^tTZt^|5I3n=TK*8_dN&HQ<(?f=`Kg0AiRenuSsuWzqk{yTf+=-=ow-(CRr z`sWiKq&xvE@z1ONG~YV@xW34r{QpB!m%>-tw`46IEKlAzF_Xvd+cjg0tJupwKl(qI CG+h<| literal 0 HcmV?d00001 diff --git a/docs/guides/ti_platform_overview.md b/docs/guides/ti_platform_overview.md new file mode 100644 index 00000000000000..37a8e065232810 --- /dev/null +++ b/docs/guides/ti_platform_overview.md @@ -0,0 +1,121 @@ +# Texas Instruments platform overview + +The TI platform is a [Matter][matter_gh] platform based on the Texas Instruments +Incorporated SimpleLink SDK. + +The following diagram is a simplified representation of a Matter application +which built on the TI Platform. + +

+ matter_ti_overview_simplified +

+ +## Texas Instruments SimpleLink SDK + +The SimpleLink™ CC13xx and CC26xx Software Development Kit (SDK) delivers +components that enable engineers to develop applications on the Texas +Instruments SimpleLink CC13xx and CC26xx family of wireless microcontrollers +(MCUs). This software toolkit provides a cohesive and consistent software +experience for all SimpleLink CC13xx and CC26xx wireless MCU users by packaging +essential software components, such as a Bluetooth® Low Energy (BLE) protocol +stack supporting Bluetooth 5.2, Bluetooth Mesh, Thread 1.1.1 networking stack +based on OpenThread, Zigbee 3.0 compliant protocol suite, RF-Proprietary +examples, TI’s 15.4 Stack as well as the TI-RTOS kernel and TI Drivers in one +easy-to-use software package along with example applications and documentation. +In addition, the Dynamic Multi-Protocol Manager (DMM) software component enables +multiprotocol development on a single SimpleLink wireless MCU through +time-division multiplexing. + +The SimpleLink MCU portfolio offers a single development environment that +delivers flexible hardware, software, and tool options for customers developing +wired and wireless applications. With 100 percent code reuse across host MCUs, +Wi-Fi™, Bluetooth Low Energy, Sub-1GHz devices and more, choose the MCU or +connectivity standard that fits your design. A one-time investment with the +SimpleLink software development kit allows you to reuse often, opening the door +to create unlimited applications. For more information, visit +www.ti.com/simplelink. + +
+ +## BLE and Thread stacks + +In the TI example applications the Bluetooth Low Energy protocol is used to +provision the Thread protocol to enable Matter communication. Then Thread is +used for IP communication with other Matter devices. + +The TI applications leverage the Bluetooth Low Energy stack on the CC13X2 and +CC26X2 families. This BLE software is distributed in binary form within the TI +SimpleLink SDK. The BLE stack leverages code that is present in the device ROM +for certain common BLE operations. + +These applications leverage the OpenThread stack available within the Matter +repository for Thread communication. Platform support source is built from the +SimpleLink SDK. + +These connection protocols can be run concurrently by using the Texas +Instruments Dynamic Multi-protocol Manager. + +
+ +## LwIP stack + +The Lightweight IP stack interfaces with the OpenThread stack to offer standard +IP connectivity protocols that OpenThread does not natively support. This offers +a standard socket based interface to the Matter platform. + +
+ +## MbedTLS + +The MbedTLS library is used by OpenThread and Matter for a wide variety of +protocols. This ranges from basic AES and SHA to cryptographic protocols like +ECDSA and ECDH. + +The MbedTLS library is hardware accelerated using the TI SimpleLink SDK drivers. +This is achieved through the usage of `_ALT` defines in the MbedTLS +configuration file. + +
+ +## Matter integration + +Matter interacts with LwIP, OpenThread, and the TI BLE stack to achieve the +protocol and application functionality. A BLE profile is registered with the +TI-BLE stack to enable provisioning and configuration. Once the device is +provisioned Matter will configure the OpenThread interface to connect to an +existing Thread network or to start its own network. From there the Matter IP +messages are sent to the LwIP stack to be routed to the OpenThread stack for +transmission. + +Overall, applications generally only need to interface with the Cluster Library +from Matter. The transport of messages and configuration of the device is all +handled by the platform implementation files. + +
+ +# Matter example applications + +Sample Matter applications are provided for the TI platform. These can be used +as reference for your own application. + +- [lock-app](../../examples/lock-app/cc13x2x7_26x2x7/README.md) +- [pump-app](../../examples/pump-app/cc13x2x7_26x2x7/README.md) +- [pump-controller-app](../../examples/pump-controller-app/cc13x2x7_26x2x7/README.md) + +
+ +## Build system + +The TI platform uses GN to generate ninja build scripts. Build files have +already been written to build and link the TI specific code within the +SimpleLink SDK. + +
+ +## TI Support + +For technical support, please consider creating a post on TI's [E2E forum][e2e]. +Additionally, we welcome any feedback. + +[e2e]: https://e2e.ti.com/support/wireless-connectivity/zigbee-and-thread +[matter_gh]: https://github.com/project-chip/connectedhomeip diff --git a/examples/lock-app/cc13x2x7_26x2x7/README.md b/examples/lock-app/cc13x2x7_26x2x7/README.md index 857dc6bf552159..d2c14aa666cc18 100644 --- a/examples/lock-app/cc13x2x7_26x2x7/README.md +++ b/examples/lock-app/cc13x2x7_26x2x7/README.md @@ -1,11 +1,11 @@ -# CHIP CC1352 CC2652 Lock Example Application +# Matter CC1352 CC2652 Lock Example Application -An example application showing the use [CHIP][chip] on the Texas Instruments -CC13X2_26X2 family of Wireless MCUs. +An example application showing the use of [Matter][matter] on the Texas +Instruments CC13X2_26X2 family of Wireless MCUs. --- -- [CHIP CC1352 CC2652 Lock Example Application](#chip-cc1352-cc2652-lock-example-application) +- [Matter CC1352 CC2652 Lock Example Application](#matter-cc1352-cc2652-lock-example-application) - [Introduction](#introduction) - [Device UI](#device-ui) - [Building](#building) @@ -19,7 +19,7 @@ CC13X2_26X2 family of Wireless MCUs. - [Provisioning](#provisioning) - [Bluetooth LE Advertising](#bluetooth-le-advertising) - [Bluetooth LE Rendezvous](#bluetooth-le-rendezvous) - - [CHIP Remote Commands](#chip-remote-commands) + - [Matter Remote Commands](#matter-remote-commands) - [TI Support](#ti-support) --- @@ -29,16 +29,16 @@ CC13X2_26X2 family of Wireless MCUs. ![CC1352R1_LAUNCHXL](doc/images/cc1352r1_launchxl.jpg) The CC13X2_26X2 lock example application provides a working demonstration of a -connected door lock device. This uses the open-source CHIP implementation and +connected door lock device. This uses the open-source Matter implementation and the Texas Instruments SimpleLink™ CC13x2 and CC26x2 software development kit. This example is enabled to build for CC2652R7 devices. This upcoming devices are currently not yet in full production. For more information on device -availability or early access to an engineering build of our CHIP-enabled SDK, -please reach out [here][ti_cc13x2_26x2_r7_chip_request]. +availability or early access to an engineering build of our Matter-enabled SDK, +please reach out [here][ti_cc13x2_26x2_r7_matter_request]. The lock example is intended to serve both as a means to explore the workings of -CHIP, as well as a template for creating real products based on the Texas +Matter, as well as a template for creating real products based on the Texas Instruments devices. ## Device UI @@ -66,7 +66,7 @@ section will need to be done when migrating to new versions of the SDK. This guide assumes that the environment is linux based, and recommends Ubuntu 20.04. - An engineering SDK from TI is required. Please request access for it - [here][ti_cc13x2_26x2_r7_chip_request]. + [here][ti_cc13x2_26x2_r7_matter_request]. - Follow the default installation instructions when executing the installer. @@ -152,15 +152,15 @@ Ninja to build the executable. - Run the build to produce a default executable. By default on Linux both the TI SimpleLink SDK and Sysconfig are located in a `ti` folder in the user's home directory, and you must provide the absolute path to them. For example - `/home/username/ti/simplelink_cc13x2_26x2_sdk_4_40_05_02_eng` and - `/home/username/ti/sysconfig_1.7.0`. On Windows the default directory is + `/home/username/ti/simplelink_cc13xx_cc26xx_sdk_5_30_03_01_eng` and + `/home/username/ti/sysconfig_1.10.0`. On Windows the default directory is `C:\ti`. Take note of this install path, as it will be used in the next step. ``` $ cd ~/connectedhomeip/examples/lock-app/cc13x2x7_26x2x7 - $ export TI_SIMPLELINK_SDK_ROOT=$HOME/ti/simplelink_cc13x2_26x2_sdk_4_40_05_02_eng - $ export TI_SYSCONFIG_ROOT=$HOME/ti/sysconfig_1.7.0 + $ export TI_SIMPLELINK_SDK_ROOT=$HOME/ti/simplelink_cc13xx_cc26xx_sdk_5_30_03_01_eng + $ export TI_SYSCONFIG_ROOT=$HOME/ti/sysconfig_1.10.0 $ gn gen out/debug --args="ti_simplelink_sdk_root=\"${TI_SIMPLELINK_SDK_ROOT}\" ti_sysconfig_root=\"${TI_SYSCONFIG_ROOT}\"" $ ninja -C out/debug @@ -252,8 +252,8 @@ Router][ot_border_router_setup]. ### Provisioning -The first step to bring the CHIP device onto the network is to provision it. Our -example accomplishes this with Bluetooth Low Energy (BLE) and the +The first step to bring the Matter device onto the network is to provision it. +Our example accomplishes this with Bluetooth Low Energy (BLE) and the [CHIPTool](../../../src/android/CHIPTool/README.md) mobile app. #### Bluetooth LE Advertising @@ -265,9 +265,9 @@ fully provisioned, BLE advertising will stop. #### Bluetooth LE Rendezvous -To commission and control this application within a CHIP-enabled Thread network, -consult the [CHIPTool README](../../../src/android/CHIPTool/README.md) for -information on the Android smartphone application. Reference the Device +To commission and control this application within a Matter-enabled Thread +network, consult the [CHIPTool README](../../../src/android/CHIPTool/README.md) +for information on the Android smartphone application. Reference the Device Configuration information printed in the Logging Output of this application. ## TI Support @@ -275,7 +275,7 @@ Configuration information printed in the Logging Output of this application. For technical support, please consider creating a post on TI's [E2E forum][e2e]. Additionally, we welcome any feedback. -[chip]: https://github.com/project-chip/connectedhomeip +[matter]: https://github.com/project-chip/connectedhomeip [ccs]: https://www.ti.com/tool/CCSTUDIO [ccs_after_launch]: https://software-dl.ti.com/ccs/esd/documents/users_guide/ccs_debug-main.html?configuration#after-launch @@ -287,14 +287,11 @@ Additionally, we welcome any feedback. https://software-dl.ti.com/ccs/esd/documents/users_guide/ccs_debug-main.html?configuration#manual-method [cc1352r1_launchxl]: https://www.ti.com/tool/LAUNCHXL-CC1352R1 [e2e]: https://e2e.ti.com/support/wireless-connectivity/zigbee-and-thread -[simplelink_sdk]: https://www.ti.com/tool/SIMPLELINK-CC13X2-26X2-SDK -[simplelink_sdk_4.30.00.54]: - https://www.ti.com/tool/download/SIMPLELINK-CC13X2-26X2-SDK/4.30.00.54 [sysconfig]: https://www.ti.com/tool/SYSCONFIG [sysconfig_recommended]: - https://software-dl.ti.com/ccs/esd/sysconfig/sysconfig-1.7.0_1746-setup.run + https://software-dl.ti.com/ccs/esd/sysconfig/sysconfig-1.10.0_2163-setup.run [ti_thread_dnd]: https://www.ti.com/wireless-connectivity/thread/design-development.html -[ti_cc13x2_26x2_r7_chip_request]: https://ti.com/chip_sdk +[ti_cc13x2_26x2_r7_matter_request]: https://ti.com/chip_sdk [ot_border_router_setup]: https://openthread.io/guides/border-router/build [uniflash]: https://www.ti.com/tool/download/UNIFLASH diff --git a/examples/lock-app/cc13x2x7_26x2x7/chip.syscfg b/examples/lock-app/cc13x2x7_26x2x7/chip.syscfg index c93e60f4846aaa..f195ca15ec32d7 100644 --- a/examples/lock-app/cc13x2x7_26x2x7/chip.syscfg +++ b/examples/lock-app/cc13x2x7_26x2x7/chip.syscfg @@ -17,6 +17,7 @@ * limitations under the License. */ + /* Modules */ var AESCCM = scripting.addModule("/ti/drivers/AESCCM"); var AESECB = scripting.addModule("/ti/drivers/AESECB"); @@ -38,7 +39,6 @@ var ECDH = scripting.addModule("/ti/drivers/ECDH"); /* Instances */ var AESCCM1 = AESCCM.addInstance(); -var AESCCM2 = AESCCM.addInstance(); var AESECB1 = AESECB.addInstance(); var AESECB2 = AESECB.addInstance(); var Button1 = Button.addInstance(); @@ -52,22 +52,18 @@ var TRNG1 = TRNG.addInstance(); var TRNG2 = TRNG.addInstance(); var TRNG3 = TRNG.addInstance(); var UART1 = UART.addInstance(); -var UART2 = UART.addInstance(); var AESCTRDRBG1 = AESCTRDRBG.addInstance(); var ECDH1 = ECDH.addInstance(); -var ECDH2 = ECDH.addInstance(); AESCTRDRBG1.$name = "CONFIG_AESCTRDRBG_0"; AESCTRDRBG1.aesctrObject.$name = "CONFIG_AESCTR_0"; AESCCM1.$name = "CONFIG_AESCCM0"; -AESCCM2.$name = "CONFIG_AESCCM_1"; AESECB1.$name = "CONFIG_AESECB0"; AESECB2.$name = "CONFIG_AESECB_1"; ECDH1.$name = "CONFIG_ECDH0"; -ECDH2.$name = "CONFIG_ECDH_1"; /* RTOS */ RTOS.name = "FreeRTOS"; @@ -78,7 +74,6 @@ Button1.$hardware = system.deviceData.board.components["BTN-1" Button1.gpioPin.$name = "CONFIG_GPIO_BTN1"; Button1.gpioPin.pull = "Pull Up"; Button1.gpioPin.interruptTrigger = "Falling Edge"; -Button1.gpioPin.pinInstance.$name = "CONFIG_PIN_BTN1"; /* Left Button */ Button2.$name = "CONFIG_BTN_RIGHT"; @@ -86,7 +81,6 @@ Button2.$hardware = system.deviceData.board.components["BTN-2" Button2.gpioPin.$name = "CONFIG_GPIO_BTN2"; Button2.gpioPin.pull = "Pull Up"; Button2.gpioPin.interruptTrigger = "Falling Edge"; -Button2.gpioPin.pinInstance.$name = "CONFIG_PIN_BTN2"; /* ======== CCFG ======== */ var CCFG = scripting.addModule("/ti/devices/CCFG"); @@ -104,11 +98,10 @@ if(deviceName.includes("RB")) } /* NVS */ NVS1.$name = "CONFIG_NVSINTERNAL"; -NVS1.internalFlash.regionBase = 0x78000; +NVS1.internalFlash.regionBase = 0xAA000; NVS1.internalFlash.regionSize = 0x4000; /* RF */ -RF.$name = "CONFIG_RF0"; /* if an antenna component exists, assign it to the rf instance */ if (system.deviceData.board && system.deviceData.board.components.RF) { RF.$hardware = system.deviceData.board.components.RF; @@ -126,7 +119,6 @@ LED1.$hardware = system.deviceData.board.components.LED_RED; LED1.gpioPin.$name = "CONFIG_GPIO_RLED"; LED1.gpioPin.mode = "Output"; LED1.gpioPin.callbackFunction = ""; -LED1.gpioPin.pinInstance.$name = "CONFIG_PIN_RLED"; /* Green LED */ LED2.$name = "CONFIG_LED_GREEN"; @@ -134,17 +126,11 @@ LED2.$hardware = system.deviceData.board.components.LED_GREEN; LED2.gpioPin.$name = "CONFIG_GPIO_GLED"; LED2.gpioPin.mode = "Output"; LED2.gpioPin.callbackFunction = ""; -LED2.gpioPin.pinInstance.$name = "CONFIG_PIN_GLED"; /* Debug UART */ UART1.$hardware = system.deviceData.board.components.XDS110UART; UART1.$name = "CONFIG_UART_DEBUG"; -/* Display UART */ -UART2.$name = "CONFIG_DISPLAY_UART"; -UART2.uart.txPin.$suggestSolution = "boosterpack.32"; -UART2.uart.rxPin.$suggestSolution = "boosterpack.18"; - /* TRNG */ TRNG1.$name = "CONFIG_TRNG_0"; TRNG2.$name = "CONFIG_TRNG_1"; diff --git a/examples/lock-app/cc13x2x7_26x2x7/main/AppTask.cpp b/examples/lock-app/cc13x2x7_26x2x7/main/AppTask.cpp index e0d522d588560f..8649f916b3ebb1 100644 --- a/examples/lock-app/cc13x2x7_26x2x7/main/AppTask.cpp +++ b/examples/lock-app/cc13x2x7_26x2x7/main/AppTask.cpp @@ -82,7 +82,7 @@ int AppTask::StartAppTask() int AppTask::Init() { LED_Params ledParams; - Button_Params buttionParams; + Button_Params buttonParams; cc13x2_26x2LogInit(); @@ -152,15 +152,17 @@ int AppTask::Init() PLAT_LOG("Initialize buttons"); Button_init(); - Button_Params_init(&buttionParams); - buttionParams.buttonEventMask = Button_EV_CLICKED | Button_EV_LONGCLICKED; - buttionParams.longPressDuration = 1000U; // ms - sAppLeftHandle = Button_open(CONFIG_BTN_LEFT, ButtonLeftEventHandler, &buttionParams); - - Button_Params_init(&buttionParams); - buttionParams.buttonEventMask = Button_EV_CLICKED | Button_EV_LONGCLICKED; - buttionParams.longPressDuration = 1000U; // ms - sAppRightHandle = Button_open(CONFIG_BTN_RIGHT, ButtonRightEventHandler, &buttionParams); + Button_Params_init(&buttonParams); + buttonParams.buttonEventMask = Button_EV_CLICKED | Button_EV_LONGCLICKED; + buttonParams.longPressDuration = 1000U; // ms + sAppLeftHandle = Button_open(CONFIG_BTN_LEFT, &buttonParams); + Button_setCallback(sAppLeftHandle, ButtonLeftEventHandler); + + Button_Params_init(&buttonParams); + buttonParams.buttonEventMask = Button_EV_CLICKED | Button_EV_LONGCLICKED; + buttonParams.longPressDuration = 1000U; // ms + sAppRightHandle = Button_open(CONFIG_BTN_RIGHT, &buttonParams); + Button_setCallback(sAppRightHandle, ButtonRightEventHandler); // Initialize BoltLock module PLAT_LOG("Initialize BoltLock"); diff --git a/examples/lock-app/cc13x2x7_26x2x7/main/include/CHIPProjectConfig.h b/examples/lock-app/cc13x2x7_26x2x7/main/include/CHIPProjectConfig.h index 96d0e31bcee6b0..5b5c95c5721145 100644 --- a/examples/lock-app/cc13x2x7_26x2x7/main/include/CHIPProjectConfig.h +++ b/examples/lock-app/cc13x2x7_26x2x7/main/include/CHIPProjectConfig.h @@ -30,20 +30,8 @@ #if BUILD_RELEASE // release build -// Security and Authentication enabled for release build. -#define CHIP_CONFIG_SECURITY_TEST_MODE 0 -#define CHIP_CONFIG_REQUIRE_AUTH 1 - #else // development build -// Security and Authentication disabled for development build. -// For convenience, enable CHIP Security Test Mode and disable the requirement for -// authentication in various protocols. -// WARNING: These options make it possible to circumvent basic CHIP security functionality, -// including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS. -#define CHIP_CONFIG_SECURITY_TEST_MODE 0 -#define CHIP_CONFIG_REQUIRE_AUTH 0 - // Use a default pairing code if one hasn't been provisioned in flash. #define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021 #define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR 0xF00 @@ -138,10 +126,6 @@ */ #define CHIP_DEVICE_CONFIG_ENABLE_THREAD_SRP_CLIENT 1 -#define CHIP_DEVICE_CONFIG_ENABLE_SED 1 -#define CHIP_DEVICE_CONFIG_SED_SLOW_POLLING_INTERVAL 5000 -#define CHIP_DEVICE_CONFIG_SED_FAST_POLLING_INTERVAL 5000 - /** * CHIP_CONFIG_EVENT_LOGGING_DEFAULT_IMPORTANCE * diff --git a/examples/lock-app/cc13x2x7_26x2x7/main/main.cpp b/examples/lock-app/cc13x2x7_26x2x7/main/main.cpp index 4db8ab020823a4..cc1c08bd82cf78 100644 --- a/examples/lock-app/cc13x2x7_26x2x7/main/main.cpp +++ b/examples/lock-app/cc13x2x7_26x2x7/main/main.cpp @@ -33,11 +33,13 @@ #include #include +#include +#include #include #include #include -#define TOTAL_ICALL_HEAP_SIZE (0xf000) +#define TOTAL_ICALL_HEAP_SIZE (0xc800) using namespace ::chip; using namespace ::chip::Inet; @@ -71,6 +73,10 @@ int main(void) UART_init(); + ECDH_init(); + + ECDSA_init(); + ECJPAKE_init(); AESECB_init(); diff --git a/examples/persistent-storage/cc13x2x7_26x2x7/README.md b/examples/persistent-storage/cc13x2x7_26x2x7/README.md index dba97e2896a48c..c07fd6b3864f54 100644 --- a/examples/persistent-storage/cc13x2x7_26x2x7/README.md +++ b/examples/persistent-storage/cc13x2x7_26x2x7/README.md @@ -1,11 +1,11 @@ -# CHIP CC1352 CC2652 Persistent Storage Example Application +# Matter CC1352 CC2652 Persistent Storage Example Application An example test application showing the persistent storage system for -[CHIP][chip] on the Texas Instruments CC13X2_26X2 family of Wireless MCUs. +[Matter][matter] on the Texas Instruments CC13X2_26X2 family of Wireless MCUs. --- -- [CHIP CC1352 CC2652 Persistent Storage Application](#chip-cc1352-cc2652-persistent-storage-example-application) +- [Matter CC1352 CC2652 Persistent Storage Application](#matter-cc1352-cc2652-persistent-storage-example-application) - [Introduction](#introduction) - [Device UI](#device-ui) - [Building](#building) @@ -26,8 +26,8 @@ offers information on proper usage of the KVS system. This example is enabled to build for CC2652R7 devices. This upcoming devices are currently not yet in full production. For more information on device -availability or early access to an engineering build of our CHIP-enabled SDK, -please reach out [here][ti_cc13x2_26x2_r7_chip_request]. +availability or early access to an engineering build of our Matter-enabled SDK, +please reach out [here][ti_cc13x2_26x2_r7_matter_request]. ## Device UI @@ -55,7 +55,7 @@ section will need to be done when migrating to new versions of the SDK. This guide assumes that the environment is linux based, and recommends Ubuntu 20.04. - An engineering SDK from TI is required. Please request access for it - [here][ti_cc13x2_26x2_r7_chip_request]. + [here][ti_cc13x2_26x2_r7_matter_request]. - Follow the default installation instructions when executing the installer. @@ -141,15 +141,15 @@ Ninja to build the executable. - Run the build to produce a default executable. By default on Linux both the TI SimpleLink SDK and Sysconfig are located in a `ti` folder in the user's home directory, and you must provide the absolute path to them. For example - `/home/username/ti/simplelink_cc13x2_26x2_sdk_4_40_05_02_eng` and - `/home/username/ti/sysconfig_1.7.0`. On Windows the default directory is + `/home/username/ti/simplelink_cc13xx_cc26xx_sdk_5_30_03_01_eng` and + `/home/username/ti/sysconfig_1.10.0`. On Windows the default directory is `C:\ti`. Take note of this install path, as it will be used in the next step. ``` $ cd ~/connectedhomeip/examples/lock-app/cc13x2x7_26x2x7 - $ export TI_SIMPLELINK_SDK_ROOT=$HOME/ti/simplelink_cc13x2_26x2_sdk_4_40_05_02_eng - $ export TI_SYSCONFIG_ROOT=$HOME/ti/sysconfig_1.7.0 + $ export TI_SIMPLELINK_SDK_ROOT=$HOME/ti/simplelink_cc13xx_cc26xx_sdk_5_30_03_01_eng + $ export TI_SYSCONFIG_ROOT=$HOME/ti/sysconfig_1.10.0 $ gn gen out/debug --args="ti_simplelink_sdk_root=\"${TI_SIMPLELINK_SDK_ROOT}\" ti_sysconfig_root=\"${TI_SYSCONFIG_ROOT}\"" $ ninja -C out/debug @@ -237,7 +237,7 @@ terminal emulator to that port to see the output with the following options: For technical support, please consider creating a post on TI's [E2E forum][e2e]. Additionally, we welcome any feedback. -[chip]: https://github.com/project-chip/connectedhomeip +[matter]: https://github.com/project-chip/connectedhomeip [ccs]: https://www.ti.com/tool/CCSTUDIO [ccs_after_launch]: https://software-dl.ti.com/ccs/esd/documents/users_guide/ccs_debug-main.html?configuration#after-launch @@ -250,6 +250,6 @@ Additionally, we welcome any feedback. [e2e]: https://e2e.ti.com/support/wireless-connectivity/zigbee-and-thread [sysconfig]: https://www.ti.com/tool/SYSCONFIG [sysconfig_recommended]: - https://software-dl.ti.com/ccs/esd/sysconfig/sysconfig-1.7.0_1746-setup.run -[ti_cc13x2_26x2_r7_chip_request]: https://ti.com/chip_sdk + https://software-dl.ti.com/ccs/esd/sysconfig/sysconfig-1.10.0_2163-setup.run +[ti_cc13x2_26x2_r7_matter_request]: https://ti.com/chip_sdk [uniflash]: https://www.ti.com/tool/download/UNIFLASH diff --git a/examples/persistent-storage/cc13x2x7_26x2x7/chip.syscfg b/examples/persistent-storage/cc13x2x7_26x2x7/chip.syscfg index c93e60f4846aaa..f195ca15ec32d7 100644 --- a/examples/persistent-storage/cc13x2x7_26x2x7/chip.syscfg +++ b/examples/persistent-storage/cc13x2x7_26x2x7/chip.syscfg @@ -17,6 +17,7 @@ * limitations under the License. */ + /* Modules */ var AESCCM = scripting.addModule("/ti/drivers/AESCCM"); var AESECB = scripting.addModule("/ti/drivers/AESECB"); @@ -38,7 +39,6 @@ var ECDH = scripting.addModule("/ti/drivers/ECDH"); /* Instances */ var AESCCM1 = AESCCM.addInstance(); -var AESCCM2 = AESCCM.addInstance(); var AESECB1 = AESECB.addInstance(); var AESECB2 = AESECB.addInstance(); var Button1 = Button.addInstance(); @@ -52,22 +52,18 @@ var TRNG1 = TRNG.addInstance(); var TRNG2 = TRNG.addInstance(); var TRNG3 = TRNG.addInstance(); var UART1 = UART.addInstance(); -var UART2 = UART.addInstance(); var AESCTRDRBG1 = AESCTRDRBG.addInstance(); var ECDH1 = ECDH.addInstance(); -var ECDH2 = ECDH.addInstance(); AESCTRDRBG1.$name = "CONFIG_AESCTRDRBG_0"; AESCTRDRBG1.aesctrObject.$name = "CONFIG_AESCTR_0"; AESCCM1.$name = "CONFIG_AESCCM0"; -AESCCM2.$name = "CONFIG_AESCCM_1"; AESECB1.$name = "CONFIG_AESECB0"; AESECB2.$name = "CONFIG_AESECB_1"; ECDH1.$name = "CONFIG_ECDH0"; -ECDH2.$name = "CONFIG_ECDH_1"; /* RTOS */ RTOS.name = "FreeRTOS"; @@ -78,7 +74,6 @@ Button1.$hardware = system.deviceData.board.components["BTN-1" Button1.gpioPin.$name = "CONFIG_GPIO_BTN1"; Button1.gpioPin.pull = "Pull Up"; Button1.gpioPin.interruptTrigger = "Falling Edge"; -Button1.gpioPin.pinInstance.$name = "CONFIG_PIN_BTN1"; /* Left Button */ Button2.$name = "CONFIG_BTN_RIGHT"; @@ -86,7 +81,6 @@ Button2.$hardware = system.deviceData.board.components["BTN-2" Button2.gpioPin.$name = "CONFIG_GPIO_BTN2"; Button2.gpioPin.pull = "Pull Up"; Button2.gpioPin.interruptTrigger = "Falling Edge"; -Button2.gpioPin.pinInstance.$name = "CONFIG_PIN_BTN2"; /* ======== CCFG ======== */ var CCFG = scripting.addModule("/ti/devices/CCFG"); @@ -104,11 +98,10 @@ if(deviceName.includes("RB")) } /* NVS */ NVS1.$name = "CONFIG_NVSINTERNAL"; -NVS1.internalFlash.regionBase = 0x78000; +NVS1.internalFlash.regionBase = 0xAA000; NVS1.internalFlash.regionSize = 0x4000; /* RF */ -RF.$name = "CONFIG_RF0"; /* if an antenna component exists, assign it to the rf instance */ if (system.deviceData.board && system.deviceData.board.components.RF) { RF.$hardware = system.deviceData.board.components.RF; @@ -126,7 +119,6 @@ LED1.$hardware = system.deviceData.board.components.LED_RED; LED1.gpioPin.$name = "CONFIG_GPIO_RLED"; LED1.gpioPin.mode = "Output"; LED1.gpioPin.callbackFunction = ""; -LED1.gpioPin.pinInstance.$name = "CONFIG_PIN_RLED"; /* Green LED */ LED2.$name = "CONFIG_LED_GREEN"; @@ -134,17 +126,11 @@ LED2.$hardware = system.deviceData.board.components.LED_GREEN; LED2.gpioPin.$name = "CONFIG_GPIO_GLED"; LED2.gpioPin.mode = "Output"; LED2.gpioPin.callbackFunction = ""; -LED2.gpioPin.pinInstance.$name = "CONFIG_PIN_GLED"; /* Debug UART */ UART1.$hardware = system.deviceData.board.components.XDS110UART; UART1.$name = "CONFIG_UART_DEBUG"; -/* Display UART */ -UART2.$name = "CONFIG_DISPLAY_UART"; -UART2.uart.txPin.$suggestSolution = "boosterpack.32"; -UART2.uart.rxPin.$suggestSolution = "boosterpack.18"; - /* TRNG */ TRNG1.$name = "CONFIG_TRNG_0"; TRNG2.$name = "CONFIG_TRNG_1"; diff --git a/examples/pump-app/cc13x2x7_26x2x7/README.md b/examples/pump-app/cc13x2x7_26x2x7/README.md index b8e270f63d9e4d..62a688e3aa53b5 100644 --- a/examples/pump-app/cc13x2x7_26x2x7/README.md +++ b/examples/pump-app/cc13x2x7_26x2x7/README.md @@ -48,13 +48,13 @@ pump and to control the state. The user LEDs on the LaunchPad are set on when the pump is started, and are set off when stopped. The LEDs will flash when in the transition state between started and stopped. -Short presses (less than 1000ms) of the left user button (`BTN-1`) are used for +Short presses (less than 1000ms) of the right user button (`BTN-2`) are used for toggling the pump state. -Short presses (less than 1000ms) of the right user button (`BTN-2`) are used for +Short presses (less than 1000ms) of the left user button (`BTN-1`) are used for toggling Matter BLE advertisements. -Long presses (greater than 5000ms) of the right user button (`BTN-2`) will +Long presses (greater than 5000ms) of the left user button (`BTN-1`) will initiate a factory reset of the device clearing all stored provisioning information to allow for a new network setup. @@ -75,8 +75,8 @@ section will need to be done when migrating to new versions of the SDK. packaged with the TI SDK. Check the following section for a list of changes needed. -- Download and install [SysConfig][sysconfig] - ([sysconfig-1.5.0_1397][sysconfig-1.5.0_1397]) +- Download and install [SysConfig][sysconfig] ([recommended + version][sysconfig_recommended]) - This may have already been installed with your SimpleLink SDK install. @@ -100,7 +100,7 @@ section will need to be done when migrating to new versions of the SDK. ``` $ cd ~/connectedhomeip - $ source ./script/bootstrap.sh + $ source ./scripts/bootstrap.sh ``` @@ -113,21 +113,21 @@ Ninja to build the executable. ``` $ cd ~/connectedhomeip - $ source ./script/activate.sh + $ source ./scripts/activate.sh ``` - Run the build to produce a default executable. By default on Linux both the TI SimpleLink SDK and Sysconfig are located in a `ti` folder in the user's home directory, and you must provide the absolute path to them. For example - `/home/username/ti/simplelink_cc13x2_26x2_sdk_4_40_05_02_eng` and - `/home/username/ti/sysconfig_1.6.0`. On Windows the default directory is - `C:\ti` + `/home/username/ti/simplelink_cc13xx_cc26xx_sdk_5_30_03_01_eng` and + `/home/username/ti/sysconfig_1.10.0`. On Windows the default directory is + `C:\ti`. ``` - $ cd ~/connectedhomeip/examples/pump-app/cc13x2_26x2 - $ export TI_SIMPLELINK_SDK_ROOT= - $ export TI_SYSCONFIG_ROOT= + $ cd ~/connectedhomeip/examples/pump-app/cc13x2x7_26x2x7 + $ export TI_SIMPLELINK_SDK_ROOT=$HOME/ti/simplelink_cc13xx_cc26xx_sdk_5_30_03_01_eng + $ export TI_SYSCONFIG_ROOT=$HOME/ti/sysconfig_1.10.0 $ gn gen out/debug --args="ti_simplelink_sdk_root=\"${TI_SIMPLELINK_SDK_ROOT}\" ti_sysconfig_root=\"${TI_SYSCONFIG_ROOT}\"" $ ninja -C out/debug @@ -220,12 +220,9 @@ Additionally, we welcome any feedback. [matter]: https://github.com/project-chip/connectedhomeip [cc1352r1_launchxl]: https://www.ti.com/tool/LAUNCHXL-CC1352R1 [e2e]: https://e2e.ti.com/support/wireless-connectivity/zigbee-and-thread -[simplelink_sdk]: https://www.ti.com/tool/SIMPLELINK-CC13X2-26X2-SDK -[simplelink_sdk_4.30.00.54]: - https://www.ti.com/tool/download/SIMPLELINK-CC13X2-26X2-SDK/4.30.00.54 [sysconfig]: https://www.ti.com/tool/SYSCONFIG -[sysconfig-1.5.0_1397]: - http://software-dl.ti.com/ccs/esd/sysconfig/sysconfig-1.5.0_1397-setup.run +[sysconfig_recommended]: + https://software-dl.ti.com/ccs/esd/sysconfig/sysconfig-1.10.0_2163-setup.run [ti_thread_dnd]: https://www.ti.com/wireless-connectivity/thread/design-development.html [ti_cc13x2_26x2_r7_matter_request]: https://ti.com/chip_sdk diff --git a/examples/pump-app/cc13x2x7_26x2x7/chip.syscfg b/examples/pump-app/cc13x2x7_26x2x7/chip.syscfg index 38a53e57d500fd..3f47781b9f518a 100644 --- a/examples/pump-app/cc13x2x7_26x2x7/chip.syscfg +++ b/examples/pump-app/cc13x2x7_26x2x7/chip.syscfg @@ -145,7 +145,7 @@ ECJPAKE1.$name = "CONFIG_ECJPAKE_0"; NVS1.$name = "CONFIG_NVSINTERNAL"; NVS1.internalFlash.$name = "ti_drivers_nvs_NVSCC26XX0"; -NVS1.internalFlash.regionBase = 0x78000; +NVS1.internalFlash.regionBase = 0xAA000; NVS1.internalFlash.regionSize = 0x4000; RTOS.name = "FreeRTOS"; @@ -169,25 +169,34 @@ UART2.$name = "CONFIG_DISPLAY_UART"; UART2.txPinInstance.$name = "CONFIG_PIN_6"; UART2.rxPinInstance.$name = "CONFIG_PIN_7"; -Button1.$name = "CONFIG_BTN_LEFT"; -Button1.gpioPin.$name = "CONFIG_GPIO_BTN1"; -Button1.gpioPin.gpioPin.$assign = "boosterpack.32"; -Button1.gpioPin.pinInstance.$name = "CONFIG_PIN_BTN1"; - -Button2.$name = "CONFIG_BTN_RIGHT"; -Button2.gpioPin.$name = "CONFIG_GPIO_BTN2"; -Button2.gpioPin.gpioPin.$assign = "boosterpack.13"; -Button2.gpioPin.pinInstance.$name = "CONFIG_PIN_BTN2"; - -LED1.$name = "CONFIG_LED_RED"; -LED1.gpioPin.$name = "CONFIG_GPIO_RLED"; -LED1.gpioPin.gpioPin.$assign = "boosterpack.10"; -LED1.gpioPin.pinInstance.$name = "CONFIG_PIN_RLED"; - -LED2.$name = "CONFIG_LED_GREEN"; -LED2.gpioPin.$name = "CONFIG_GPIO_GLED"; -LED2.gpioPin.gpioPin.$assign = "boosterpack.39"; -LED2.gpioPin.pinInstance.$name = "CONFIG_PIN_GLED"; + +/* Left Button */ +Button1.$name = "CONFIG_BTN_LEFT"; +Button1.$hardware = system.deviceData.board.components["BTN-1"]; +Button1.gpioPin.$name = "CONFIG_GPIO_BTN1"; +Button1.gpioPin.pull = "Pull Up"; +Button1.gpioPin.interruptTrigger = "Falling Edge"; + +/* Left Button */ +Button2.$name = "CONFIG_BTN_RIGHT"; +Button2.$hardware = system.deviceData.board.components["BTN-2"]; +Button2.gpioPin.$name = "CONFIG_GPIO_BTN2"; +Button2.gpioPin.pull = "Pull Up"; +Button2.gpioPin.interruptTrigger = "Falling Edge"; + +/* Red LED */ +LED1.$name = "CONFIG_LED_RED"; +LED1.$hardware = system.deviceData.board.components.LED_RED; +LED1.gpioPin.$name = "CONFIG_GPIO_RLED"; +LED1.gpioPin.mode = "Output"; +LED1.gpioPin.callbackFunction = ""; + +/* Green LED */ +LED2.$name = "CONFIG_LED_GREEN"; +LED2.$hardware = system.deviceData.board.components.LED_GREEN; +LED2.gpioPin.$name = "CONFIG_GPIO_GLED"; +LED2.gpioPin.mode = "Output"; +LED2.gpioPin.callbackFunction = ""; thread.deviceTypeReadOnly = true; thread.pm.$name = "ti_thread_pm_thread_pm0"; diff --git a/examples/pump-app/cc13x2x7_26x2x7/main/AppTask.cpp b/examples/pump-app/cc13x2x7_26x2x7/main/AppTask.cpp index a5883059abf71c..745949c9f30b56 100644 --- a/examples/pump-app/cc13x2x7_26x2x7/main/AppTask.cpp +++ b/examples/pump-app/cc13x2x7_26x2x7/main/AppTask.cpp @@ -163,15 +163,17 @@ int AppTask::Init() PLAT_LOG("Initialize buttons"); Button_init(); - Button_Params_init(&buttonParams); - buttonParams.buttonEventMask = Button_EV_CLICKED; - buttonParams.longPressDuration = 1000U; // ms - sAppLeftHandle = Button_open(CONFIG_BTN_LEFT, ButtonLeftEventHandler, &buttonParams); - Button_Params_init(&buttonParams); buttonParams.buttonEventMask = Button_EV_CLICKED | Button_EV_LONGPRESSED; buttonParams.longPressDuration = 5000U; // ms - sAppRightHandle = Button_open(CONFIG_BTN_RIGHT, ButtonRightEventHandler, &buttonParams); + sAppLeftHandle = Button_open(CONFIG_BTN_LEFT, &buttonParams); + Button_setCallback(sAppLeftHandle, ButtonLeftEventHandler); + + Button_Params_init(&buttonParams); + buttonParams.buttonEventMask = Button_EV_CLICKED; + buttonParams.longPressDuration = 1000U; // ms + sAppRightHandle = Button_open(CONFIG_BTN_RIGHT, &buttonParams); + Button_setCallback(sAppRightHandle, ButtonRightEventHandler); // Initialize Pump module PLAT_LOG("Initialize Pump"); @@ -182,7 +184,7 @@ int AppTask::Init() ConfigurationMgr().LogDeviceConfig(); // QR code will be used with CHIP Tool - PrintOnboardingCodes(chip::RendezvousInformationFlag::kBLE); + PrintOnboardingCodes(chip::RendezvousInformationFlags(chip::RendezvousInformationFlag::kBLE)); return 0; } @@ -220,7 +222,10 @@ void AppTask::ButtonLeftEventHandler(Button_Handle handle, Button_EventMask even { event.ButtonEvent.Type = AppEvent::kAppEventButtonType_Clicked; } - + else if (events & Button_EV_LONGPRESSED) + { + event.ButtonEvent.Type = AppEvent::kAppEventButtonType_LongPressed; + } // button callbacks are in ISR context if (xQueueSendFromISR(sAppEventQueue, &event, NULL) != pdPASS) { @@ -237,10 +242,6 @@ void AppTask::ButtonRightEventHandler(Button_Handle handle, Button_EventMask eve { event.ButtonEvent.Type = AppEvent::kAppEventButtonType_Clicked; } - else if (events & Button_EV_LONGPRESSED) - { - event.ButtonEvent.Type = AppEvent::kAppEventButtonType_LongPressed; - } // button callbacks are in ISR context if (xQueueSendFromISR(sAppEventQueue, &event, NULL) != pdPASS) { @@ -300,7 +301,7 @@ void AppTask::DispatchEvent(AppEvent * aEvent) { switch (aEvent->Type) { - case AppEvent::kEventType_ButtonLeft: + case AppEvent::kEventType_ButtonRight: if (AppEvent::kAppEventButtonType_Clicked == aEvent->ButtonEvent.Type) { // Toggle Pump state @@ -315,7 +316,7 @@ void AppTask::DispatchEvent(AppEvent * aEvent) } break; - case AppEvent::kEventType_ButtonRight: + case AppEvent::kEventType_ButtonLeft: if (AppEvent::kAppEventButtonType_Clicked == aEvent->ButtonEvent.Type) { // Toggle BLE advertisements diff --git a/examples/pump-app/cc13x2x7_26x2x7/main/main.cpp b/examples/pump-app/cc13x2x7_26x2x7/main/main.cpp index 03a1b6badebe6f..fb7c602527fea5 100644 --- a/examples/pump-app/cc13x2x7_26x2x7/main/main.cpp +++ b/examples/pump-app/cc13x2x7_26x2x7/main/main.cpp @@ -33,11 +33,13 @@ #include #include +#include +#include #include #include #include -#define TOTAL_ICALL_HEAP_SIZE (0xC000) +#define TOTAL_ICALL_HEAP_SIZE (0xc000) using namespace ::chip; using namespace ::chip::Inet; @@ -71,6 +73,10 @@ int main(void) UART_init(); + ECDH_init(); + + ECDSA_init(); + ECJPAKE_init(); AESECB_init(); diff --git a/examples/pump-controller-app/cc13x2x7_26x2x7/README.md b/examples/pump-controller-app/cc13x2x7_26x2x7/README.md index b252a2fce7d6a1..7c9e21ce726d91 100644 --- a/examples/pump-controller-app/cc13x2x7_26x2x7/README.md +++ b/examples/pump-controller-app/cc13x2x7_26x2x7/README.md @@ -49,13 +49,13 @@ pump and to control the state. The user LEDs on the LaunchPad are set on when the pump is started, and are set off when stopped. The LEDs will flash when in the transition state between started and stopped. -Short presses (less than 1000ms) of the left user button (`BTN-1`) are used for +Short presses (less than 1000ms) of the right user button (`BTN-2`) are used for toggling the pump state. -Short presses (less than 1000ms) of the right user button (`BTN-2`) are used for +Short presses (less than 1000ms) of the left user button (`BTN-1`) are used for toggling Matter BLE advertisements. -Long presses (greater than 5000ms) of the right user button (`BTN-2`) will +Long presses (greater than 5000ms) of the left user button (`BTN-1`) will initiate a factory reset of the device clearing all stored provisioning information to allow for a new network setup. @@ -76,8 +76,8 @@ section will need to be done when migrating to new versions of the SDK. packaged with the TI SDK. Check the following section for a list of changes needed. -- Download and install [SysConfig][sysconfig] - ([sysconfig-1.5.0_1397][sysconfig-1.5.0_1397]) +- Download and install [SysConfig][sysconfig] ([recommended + version][sysconfig_recommended]) - This may have already been installed with your SimpleLink SDK install. @@ -101,7 +101,7 @@ section will need to be done when migrating to new versions of the SDK. ``` $ cd ~/connectedhomeip - $ source ./script/bootstrap.sh + $ source ./scripts/bootstrap.sh ``` @@ -114,21 +114,21 @@ Ninja to build the executable. ``` $ cd ~/connectedhomeip - $ source ./script/activate.sh + $ source ./scripts/activate.sh ``` - Run the build to produce a default executable. By default on Linux both the TI SimpleLink SDK and Sysconfig are located in a `ti` folder in the user's home directory, and you must provide the absolute path to them. For example - `/home/username/ti/simplelink_cc13x2_26x2_sdk_4_40_05_02_eng` and - `/home/username/ti/sysconfig_1.6.0`. On Windows the default directory is - `C:\ti` + `/home/username/ti/simplelink_cc13xx_cc26xx_sdk_5_30_03_01_eng` and + `/home/username/ti/sysconfig_1.10.0`. On Windows the default directory is + `C:\ti`. ``` - $ cd ~/connectedhomeip/examples/pump-controller-app/cc13x2_26x2 - $ export TI_SIMPLELINK_SDK_ROOT= - $ export TI_SYSCONFIG_ROOT= + $ cd ~/connectedhomeip/examples/pump-controller-app/cc13x2x7_26x2x7 + $ export TI_SIMPLELINK_SDK_ROOT=$HOME/ti/simplelink_cc13xx_cc26xx_sdk_5_30_03_01_eng + $ export TI_SYSCONFIG_ROOT=$HOME/ti/sysconfig_1.10.0 $ gn gen out/debug --args="ti_simplelink_sdk_root=\"${TI_SIMPLELINK_SDK_ROOT}\" ti_sysconfig_root=\"${TI_SYSCONFIG_ROOT}\"" $ ninja -C out/debug @@ -221,12 +221,9 @@ Additionally, we welcome any feedback. [matter]: https://github.com/project-chip/connectedhomeip [cc1352r1_launchxl]: https://www.ti.com/tool/LAUNCHXL-CC1352R1 [e2e]: https://e2e.ti.com/support/wireless-connectivity/zigbee-and-thread -[simplelink_sdk]: https://www.ti.com/tool/SIMPLELINK-CC13X2-26X2-SDK -[simplelink_sdk_4.30.00.54]: - https://www.ti.com/tool/download/SIMPLELINK-CC13X2-26X2-SDK/4.30.00.54 [sysconfig]: https://www.ti.com/tool/SYSCONFIG -[sysconfig-1.5.0_1397]: - http://software-dl.ti.com/ccs/esd/sysconfig/sysconfig-1.5.0_1397-setup.run +[sysconfig_recommended]: + https://software-dl.ti.com/ccs/esd/sysconfig/sysconfig-1.10.0_2163-setup.run [ti_thread_dnd]: https://www.ti.com/wireless-connectivity/thread/design-development.html [ti_cc13x2_26x2_r7_matter_request]: https://ti.com/chip_sdk diff --git a/examples/pump-controller-app/cc13x2x7_26x2x7/chip.syscfg b/examples/pump-controller-app/cc13x2x7_26x2x7/chip.syscfg index 38a53e57d500fd..cd153a744fea1d 100644 --- a/examples/pump-controller-app/cc13x2x7_26x2x7/chip.syscfg +++ b/examples/pump-controller-app/cc13x2x7_26x2x7/chip.syscfg @@ -145,7 +145,7 @@ ECJPAKE1.$name = "CONFIG_ECJPAKE_0"; NVS1.$name = "CONFIG_NVSINTERNAL"; NVS1.internalFlash.$name = "ti_drivers_nvs_NVSCC26XX0"; -NVS1.internalFlash.regionBase = 0x78000; +NVS1.internalFlash.regionBase = 0xAA000; NVS1.internalFlash.regionSize = 0x4000; RTOS.name = "FreeRTOS"; @@ -169,25 +169,33 @@ UART2.$name = "CONFIG_DISPLAY_UART"; UART2.txPinInstance.$name = "CONFIG_PIN_6"; UART2.rxPinInstance.$name = "CONFIG_PIN_7"; -Button1.$name = "CONFIG_BTN_LEFT"; -Button1.gpioPin.$name = "CONFIG_GPIO_BTN1"; -Button1.gpioPin.gpioPin.$assign = "boosterpack.32"; -Button1.gpioPin.pinInstance.$name = "CONFIG_PIN_BTN1"; - -Button2.$name = "CONFIG_BTN_RIGHT"; -Button2.gpioPin.$name = "CONFIG_GPIO_BTN2"; -Button2.gpioPin.gpioPin.$assign = "boosterpack.13"; -Button2.gpioPin.pinInstance.$name = "CONFIG_PIN_BTN2"; - -LED1.$name = "CONFIG_LED_RED"; -LED1.gpioPin.$name = "CONFIG_GPIO_RLED"; -LED1.gpioPin.gpioPin.$assign = "boosterpack.10"; -LED1.gpioPin.pinInstance.$name = "CONFIG_PIN_RLED"; - -LED2.$name = "CONFIG_LED_GREEN"; -LED2.gpioPin.$name = "CONFIG_GPIO_GLED"; -LED2.gpioPin.gpioPin.$assign = "boosterpack.39"; -LED2.gpioPin.pinInstance.$name = "CONFIG_PIN_GLED"; +/* Left Button */ +Button1.$name = "CONFIG_BTN_LEFT"; +Button1.$hardware = system.deviceData.board.components["BTN-1"]; +Button1.gpioPin.$name = "CONFIG_GPIO_BTN1"; +Button1.gpioPin.pull = "Pull Up"; +Button1.gpioPin.interruptTrigger = "Falling Edge"; + +/* Left Button */ +Button2.$name = "CONFIG_BTN_RIGHT"; +Button2.$hardware = system.deviceData.board.components["BTN-2"]; +Button2.gpioPin.$name = "CONFIG_GPIO_BTN2"; +Button2.gpioPin.pull = "Pull Up"; +Button2.gpioPin.interruptTrigger = "Falling Edge"; + +/* Red LED */ +LED1.$name = "CONFIG_LED_RED"; +LED1.$hardware = system.deviceData.board.components.LED_RED; +LED1.gpioPin.$name = "CONFIG_GPIO_RLED"; +LED1.gpioPin.mode = "Output"; +LED1.gpioPin.callbackFunction = ""; + +/* Green LED */ +LED2.$name = "CONFIG_LED_GREEN"; +LED2.$hardware = system.deviceData.board.components.LED_GREEN; +LED2.gpioPin.$name = "CONFIG_GPIO_GLED"; +LED2.gpioPin.mode = "Output"; +LED2.gpioPin.callbackFunction = ""; thread.deviceTypeReadOnly = true; thread.pm.$name = "ti_thread_pm_thread_pm0"; diff --git a/examples/pump-controller-app/cc13x2x7_26x2x7/main/AppTask.cpp b/examples/pump-controller-app/cc13x2x7_26x2x7/main/AppTask.cpp index fd87dd8e650e05..ee332a4dadbd10 100644 --- a/examples/pump-controller-app/cc13x2x7_26x2x7/main/AppTask.cpp +++ b/examples/pump-controller-app/cc13x2x7_26x2x7/main/AppTask.cpp @@ -158,15 +158,17 @@ int AppTask::Init() PLAT_LOG("Initialize buttons"); Button_init(); - Button_Params_init(&buttonParams); - buttonParams.buttonEventMask = Button_EV_CLICKED; - buttonParams.longPressDuration = 1000U; // ms - sAppLeftHandle = Button_open(CONFIG_BTN_LEFT, ButtonLeftEventHandler, &buttonParams); - Button_Params_init(&buttonParams); buttonParams.buttonEventMask = Button_EV_CLICKED | Button_EV_LONGPRESSED; buttonParams.longPressDuration = 5000U; // ms - sAppRightHandle = Button_open(CONFIG_BTN_RIGHT, ButtonRightEventHandler, &buttonParams); + sAppLeftHandle = Button_open(CONFIG_BTN_LEFT, &buttonParams); + Button_setCallback(sAppLeftHandle, ButtonLeftEventHandler); + + Button_Params_init(&buttonParams); + buttonParams.buttonEventMask = Button_EV_CLICKED; + buttonParams.longPressDuration = 1000U; // ms + sAppRightHandle = Button_open(CONFIG_BTN_RIGHT, &buttonParams); + Button_setCallback(sAppRightHandle, ButtonRightEventHandler); // Initialize Pump module PLAT_LOG("Initialize Pump"); @@ -177,7 +179,7 @@ int AppTask::Init() ConfigurationMgr().LogDeviceConfig(); // QR code will be used with CHIP Tool - PrintOnboardingCodes(chip::RendezvousInformationFlag::kBLE); + PrintOnboardingCodes(chip::RendezvousInformationFlags(chip::RendezvousInformationFlag::kBLE)); return 0; } @@ -215,7 +217,10 @@ void AppTask::ButtonLeftEventHandler(Button_Handle handle, Button_EventMask even { event.ButtonEvent.Type = AppEvent::kAppEventButtonType_Clicked; } - + else if (events & Button_EV_LONGPRESSED) + { + event.ButtonEvent.Type = AppEvent::kAppEventButtonType_LongPressed; + } // button callbacks are in ISR context if (xQueueSendFromISR(sAppEventQueue, &event, NULL) != pdPASS) { @@ -232,10 +237,6 @@ void AppTask::ButtonRightEventHandler(Button_Handle handle, Button_EventMask eve { event.ButtonEvent.Type = AppEvent::kAppEventButtonType_Clicked; } - else if (events & Button_EV_LONGPRESSED) - { - event.ButtonEvent.Type = AppEvent::kAppEventButtonType_LongPressed; - } // button callbacks are in ISR context if (xQueueSendFromISR(sAppEventQueue, &event, NULL) != pdPASS) { @@ -295,7 +296,7 @@ void AppTask::DispatchEvent(AppEvent * aEvent) { switch (aEvent->Type) { - case AppEvent::kEventType_ButtonLeft: + case AppEvent::kEventType_ButtonRight: if (AppEvent::kAppEventButtonType_Clicked == aEvent->ButtonEvent.Type) { // Toggle Pump state @@ -310,7 +311,7 @@ void AppTask::DispatchEvent(AppEvent * aEvent) } break; - case AppEvent::kEventType_ButtonRight: + case AppEvent::kEventType_ButtonLeft: if (AppEvent::kAppEventButtonType_Clicked == aEvent->ButtonEvent.Type) { // Toggle BLE advertisements diff --git a/examples/pump-controller-app/cc13x2x7_26x2x7/main/main.cpp b/examples/pump-controller-app/cc13x2x7_26x2x7/main/main.cpp index 03a1b6badebe6f..fb7c602527fea5 100644 --- a/examples/pump-controller-app/cc13x2x7_26x2x7/main/main.cpp +++ b/examples/pump-controller-app/cc13x2x7_26x2x7/main/main.cpp @@ -33,11 +33,13 @@ #include #include +#include +#include #include #include #include -#define TOTAL_ICALL_HEAP_SIZE (0xC000) +#define TOTAL_ICALL_HEAP_SIZE (0xc000) using namespace ::chip; using namespace ::chip::Inet; @@ -71,6 +73,10 @@ int main(void) UART_init(); + ECDH_init(); + + ECDSA_init(); + ECJPAKE_init(); AESECB_init(); diff --git a/src/platform/cc13x2_26x2/BLEManagerImpl.cpp b/src/platform/cc13x2_26x2/BLEManagerImpl.cpp index 15d28f75ffef88..e917cedeee1066 100644 --- a/src/platform/cc13x2_26x2/BLEManagerImpl.cpp +++ b/src/platform/cc13x2_26x2/BLEManagerImpl.cpp @@ -692,8 +692,6 @@ CHIP_ERROR BLEManagerImpl::CreateEventHandler(void) */ uint8_t BLEManagerImpl::ProcessStackEvent(ICall_Hdr * pMsg) { - BLEMGR_LOG("BLEMGR: BLE Process Stack Event"); - // Always dealloc pMsg unless set otherwise uint8_t safeToDealloc = TRUE; @@ -783,8 +781,6 @@ void BLEManagerImpl::ProcessEvtHdrMsg(QueuedEvt_t * pMsg) { bool dealloc = TRUE; - BLEMGR_LOG("BLEMGR: ProcessEvtHdrMsg"); - switch (pMsg->event) { /* External CHIPoBLE Event trigger */ @@ -1391,7 +1387,6 @@ status_t BLEManagerImpl::EnqueueEvtHdrMsg(uint8_t event, void * pData) if (sInstance.mFlags.Has(Flags::kBLEStackInitialized)) { QueuedEvt_t * pMsg = (QueuedEvt_t *) ICall_malloc(sizeof(QueuedEvt_t)); - BLEMGR_LOG("BLEMGR: EnqueueEvtHdrMsg"); // Create dynamic pointer to message. if (pMsg) @@ -1402,8 +1397,6 @@ status_t BLEManagerImpl::EnqueueEvtHdrMsg(uint8_t event, void * pData) // Enqueue the message. success = Util_enqueueMsg(sEventHandlerMsgQueueID, BLEManagerImpl::sSyncEvent, (uint8_t *) pMsg); - BLEMGR_LOG("BLEMGR: Util_enqueueMsg compelte"); - return (success) ? SUCCESS : FAILURE; } @@ -1620,7 +1613,6 @@ void BLEManagerImpl::ClearPendingBLEParamUpdate(uint16_t connHandle) void BLEManagerImpl::UpdateBLERPA(void) { uint8_t * pRpaNew; - BLEMGR_LOG("BLEMGR: UpdateBLERPA"); // Read the current RPA. pRpaNew = GAP_GetDevAddress(FALSE); @@ -1633,7 +1625,6 @@ void BLEManagerImpl::UpdateBLERPA(void) void BLEManagerImpl::EventHandler(void * arg) { - BLEMGR_LOG("BLEMGR: EventHandler"); PlatformMgr().LockChipStack(); sInstance.EventHandler_init(); @@ -1657,12 +1648,9 @@ void BLEManagerImpl::EventHandler(void * arg) /* Lock CHIP Stack while processing BLE Stack/App events */ PlatformMgr().LockChipStack(); - BLEMGR_LOG("BLEMGR: EventHandler: Events received"); // Fetch any available messages that might have been sent from the stack if (ICall_fetchServiceMsg(&src, &dest, (void **) &hcipMsg) == ICALL_ERRNO_SUCCESS) { - BLEMGR_LOG("BLEMGR: EventHandler: Stack Event"); - uint8 safeToDealloc = TRUE; if ((src == ICALL_SERVICE_CLASS_BLE) && (dest == BLEManagerImpl::sSelfEntity)) @@ -1686,8 +1674,6 @@ void BLEManagerImpl::EventHandler(void * arg) // If RTOS queue is not empty, process CHIP messages. if (events & QUEUE_EVT) { - BLEMGR_LOG("BLEMGR: EventHandler: App Event"); - QueuedEvt_t * pMsg; for (;;) { @@ -1767,11 +1753,9 @@ void BLEManagerImpl::AdvTimeoutHandler(uintptr_t arg) void BLEManagerImpl::ClockHandler(uintptr_t arg) { ClockEventData_t * pData = (ClockEventData_t *) arg; - BLEMGR_LOG("BLEMGR: ClockHandler"); if (pData->event == READ_RPA_EVT) { - BLEMGR_LOG("BLEMGR: ClockHandler RPA EVT"); // Start the next period Util_startClock(&sInstance.clkRpaRead); @@ -1780,7 +1764,6 @@ void BLEManagerImpl::ClockHandler(uintptr_t arg) } else if (pData->event == SEND_PARAM_UPDATE_EVT) { - BLEMGR_LOG("BLEMGR: ClockHandler PARAM UPDATE EVT"); // Send message to app if (sInstance.EnqueueEvtHdrMsg(SEND_PARAM_UPDATE_EVT, pData) != SUCCESS) { diff --git a/src/platform/cc13x2_26x2/CHIPDevicePlatformConfig.h b/src/platform/cc13x2_26x2/CHIPDevicePlatformConfig.h index bddae508acea2b..26a1537fe9c178 100644 --- a/src/platform/cc13x2_26x2/CHIPDevicePlatformConfig.h +++ b/src/platform/cc13x2_26x2/CHIPDevicePlatformConfig.h @@ -39,7 +39,7 @@ // ========== CHIP Platform Configuration ========= -#define CHIP_DEVICE_CONFIG_CHIP_TASK_STACK_SIZE (5120) +#define CHIP_DEVICE_CONFIG_CHIP_TASK_STACK_SIZE (6144) #define BLEMANAGER_EVENT_HANDLER_STACK_SIZE (4096) #define BLEMANAGER_EVENT_HANDLER_PRIORITY (2) diff --git a/src/platform/cc13x2_26x2/FreeRTOSConfig.h b/src/platform/cc13x2_26x2/FreeRTOSConfig.h index 532b7767270d67..1d3798b6c8dcc3 100644 --- a/src/platform/cc13x2_26x2/FreeRTOSConfig.h +++ b/src/platform/cc13x2_26x2/FreeRTOSConfig.h @@ -106,7 +106,7 @@ #define configTIMER_TASK_PRIORITY (6) #define configTIMER_QUEUE_LENGTH (20) #define configTIMER_TASK_STACK_DEPTH (configMINIMAL_STACK_SIZE * 2) - +#define configIDLE_TASK_STACK_DEPTH (configMINIMAL_STACK_SIZE) #define configENABLE_BACKWARD_COMPATIBILITY 1 #if defined(__TI_COMPILER_VERSION__) || defined(__ti_version__) diff --git a/src/platform/cc13x2_26x2/ThreadStackManagerImpl.cpp b/src/platform/cc13x2_26x2/ThreadStackManagerImpl.cpp index efb645eaa0b3e6..ca5bfaacba426a 100644 --- a/src/platform/cc13x2_26x2/ThreadStackManagerImpl.cpp +++ b/src/platform/cc13x2_26x2/ThreadStackManagerImpl.cpp @@ -210,3 +210,13 @@ extern "C" void otSysProcessDrivers(otInstance * aInstance) { ThreadStackMgrImpl()._ProcMessage(aInstance); } + +/** + * Get a pointer to the OpenThread instance object. + * + * @return Pointer to the OpenThread instance object. + */ +extern "C" otInstance * OtInstance_get(void) +{ + return ThreadStackMgrImpl().OTInstance(); +} diff --git a/src/platform/cc13x2_26x2/ble_user_config.c b/src/platform/cc13x2_26x2/ble_user_config.c new file mode 100644 index 00000000000000..4cc4e2f12c1695 --- /dev/null +++ b/src/platform/cc13x2_26x2/ble_user_config.c @@ -0,0 +1,530 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2020 Texas Instruments Incorporated + * + * 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 user configurable variables for the BLE + * Application. + * + */ + +/******************************************************************************* + * INCLUDES + */ + +#include "ble_user_config.h" +#include "hal_types.h" +#ifndef FREERTOS +#include +#endif +#ifdef SYSCFG +#include "ti_ble_config.h" +#else +#include +#endif + +#if defined(AOA_SYSCFG) +#include "ti_aoa_config.h" +#endif + +#include "ble_overrides.h" +#include "ti_radio_config.h" + +#include + +#include "ecc/ECCROMCC26XX.h" + +#include +#include +#include +#include +#include + +#ifdef FREERTOS +#define Swi_restore SwiP_restore +#define Swi_disable SwiP_disable +#include +#else +#include +#endif +#include +#include + +#if !defined(DeviceFamily_CC26X1) +#include +#include +#else +#include +#endif + +/******************************************************************************* + * MACROS + */ + +/******************************************************************************* + * CONSTANTS + */ + +// Tx Power +#define NUM_TX_POWER_VALUES (RF_BLE_TX_POWER_TABLE_SIZE - 1) + +#ifndef SYSCFG +// Default Tx Power Index +#if defined(CC13X2P) +#define DEFAULT_TX_POWER HCI_EXT_TX_POWER_0_DBM +#else // !CC13X2 +#define DEFAULT_TX_POWER HCI_EXT_TX_POWER_0_DBM +#endif // CC13X2 +#endif // SYSCFG + +// Override NOP +#define OVERRIDE_NOP 0xC0000001 + +/******************************************************************************* + * TYPEDEFS + */ + +/******************************************************************************* + * LOCAL VARIABLES + */ + +/********************************************************************* + * LOCAL FUNCTIONS + */ + +void driverTable_fnSpinlock(void); + +/******************************************************************************* + * GLOBAL VARIABLES + */ + +// Tx Power Table +txPwrTbl_t appTxPwrTbl = { (txPwrVal_t *) RF_BLE_txPowerTable, + NUM_TX_POWER_VALUES, // max + DEFAULT_TX_POWER }; // default + +#if defined(CC13X2P) && defined(CC13X2P_2_LAUNCHXL) + +// Tx Power Backoff Values (txPwrBackoff1MPhy,txPwrBackoff2MPhy ,txPwrBackoffCoded) +const txPwrBackoffVal_t TxPowerBackoffTable[] = { + { HCI_EXT_TX_POWER_P2_20_DBM, HCI_EXT_TX_POWER_P2_20_DBM, HCI_EXT_TX_POWER_P2_20_DBM }, // max tx power for channel 0 + { HCI_EXT_TX_POWER_P2_20_DBM, HCI_EXT_TX_POWER_P2_20_DBM, HCI_EXT_TX_POWER_P2_20_DBM }, // max tx power for channel 1 + { HCI_EXT_TX_POWER_P2_20_DBM, HCI_EXT_TX_POWER_P2_20_DBM, HCI_EXT_TX_POWER_P2_20_DBM }, // max tx power for channel 2 + { HCI_EXT_TX_POWER_P2_20_DBM, HCI_EXT_TX_POWER_P2_20_DBM, HCI_EXT_TX_POWER_P2_20_DBM }, // max tx power for channel 3 + { HCI_EXT_TX_POWER_P2_20_DBM, HCI_EXT_TX_POWER_P2_20_DBM, HCI_EXT_TX_POWER_P2_20_DBM }, // max tx power for channel 4 + { HCI_EXT_TX_POWER_P2_20_DBM, HCI_EXT_TX_POWER_P2_20_DBM, HCI_EXT_TX_POWER_P2_20_DBM }, // max tx power for channel 5 + { HCI_EXT_TX_POWER_P2_20_DBM, HCI_EXT_TX_POWER_P2_20_DBM, HCI_EXT_TX_POWER_P2_20_DBM }, // max tx power for channel 6 + { HCI_EXT_TX_POWER_P2_20_DBM, HCI_EXT_TX_POWER_P2_20_DBM, HCI_EXT_TX_POWER_P2_20_DBM }, // max tx power for channel 7 + { HCI_EXT_TX_POWER_P2_20_DBM, HCI_EXT_TX_POWER_P2_20_DBM, HCI_EXT_TX_POWER_P2_20_DBM }, // max tx power for channel 8 + { HCI_EXT_TX_POWER_P2_20_DBM, HCI_EXT_TX_POWER_P2_20_DBM, HCI_EXT_TX_POWER_P2_20_DBM }, // max tx power for channel 9 + { HCI_EXT_TX_POWER_P2_20_DBM, HCI_EXT_TX_POWER_P2_20_DBM, HCI_EXT_TX_POWER_P2_20_DBM }, // max tx power for channel 10 + { HCI_EXT_TX_POWER_P2_20_DBM, HCI_EXT_TX_POWER_P2_20_DBM, HCI_EXT_TX_POWER_P2_20_DBM }, // max tx power for channel 11 + { HCI_EXT_TX_POWER_P2_20_DBM, HCI_EXT_TX_POWER_P2_20_DBM, HCI_EXT_TX_POWER_P2_20_DBM }, // max tx power for channel 12 + { HCI_EXT_TX_POWER_P2_20_DBM, HCI_EXT_TX_POWER_P2_20_DBM, HCI_EXT_TX_POWER_P2_20_DBM }, // max tx power for channel 13 + { HCI_EXT_TX_POWER_P2_20_DBM, HCI_EXT_TX_POWER_P2_20_DBM, HCI_EXT_TX_POWER_P2_20_DBM }, // max tx power for channel 14 + { HCI_EXT_TX_POWER_P2_20_DBM, HCI_EXT_TX_POWER_P2_20_DBM, HCI_EXT_TX_POWER_P2_20_DBM }, // max tx power for channel 15 + { HCI_EXT_TX_POWER_P2_20_DBM, HCI_EXT_TX_POWER_P2_20_DBM, HCI_EXT_TX_POWER_P2_20_DBM }, // max tx power for channel 16 + { HCI_EXT_TX_POWER_P2_20_DBM, HCI_EXT_TX_POWER_P2_20_DBM, HCI_EXT_TX_POWER_P2_20_DBM }, // max tx power for channel 17 + { HCI_EXT_TX_POWER_P2_20_DBM, HCI_EXT_TX_POWER_P2_20_DBM, HCI_EXT_TX_POWER_P2_20_DBM }, // max tx power for channel 18 + { HCI_EXT_TX_POWER_P2_20_DBM, HCI_EXT_TX_POWER_P2_20_DBM, HCI_EXT_TX_POWER_P2_20_DBM }, // max tx power for channel 19 + { HCI_EXT_TX_POWER_P2_20_DBM, HCI_EXT_TX_POWER_P2_20_DBM, HCI_EXT_TX_POWER_P2_20_DBM }, // max tx power for channel 20 + { HCI_EXT_TX_POWER_P2_20_DBM, HCI_EXT_TX_POWER_P2_20_DBM, HCI_EXT_TX_POWER_P2_20_DBM }, // max tx power for channel 21 + { HCI_EXT_TX_POWER_P2_20_DBM, HCI_EXT_TX_POWER_P2_20_DBM, HCI_EXT_TX_POWER_P2_20_DBM }, // max tx power for channel 22 + { HCI_EXT_TX_POWER_P2_20_DBM, HCI_EXT_TX_POWER_P2_20_DBM, HCI_EXT_TX_POWER_P2_20_DBM }, // max tx power for channel 23 + { HCI_EXT_TX_POWER_P2_20_DBM, HCI_EXT_TX_POWER_P2_20_DBM, HCI_EXT_TX_POWER_P2_20_DBM }, // max tx power for channel 24 + { HCI_EXT_TX_POWER_P2_20_DBM, HCI_EXT_TX_POWER_P2_20_DBM, HCI_EXT_TX_POWER_P2_20_DBM }, // max tx power for channel 25 + { HCI_EXT_TX_POWER_P2_20_DBM, HCI_EXT_TX_POWER_P2_20_DBM, HCI_EXT_TX_POWER_P2_20_DBM }, // max tx power for channel 26 + { HCI_EXT_TX_POWER_P2_20_DBM, HCI_EXT_TX_POWER_P2_20_DBM, HCI_EXT_TX_POWER_P2_20_DBM }, // max tx power for channel 27 + { HCI_EXT_TX_POWER_P2_20_DBM, HCI_EXT_TX_POWER_P2_20_DBM, HCI_EXT_TX_POWER_P2_20_DBM }, // max tx power for channel 28 + { HCI_EXT_TX_POWER_P2_20_DBM, HCI_EXT_TX_POWER_P2_20_DBM, HCI_EXT_TX_POWER_P2_20_DBM }, // max tx power for channel 29 + { HCI_EXT_TX_POWER_P2_20_DBM, HCI_EXT_TX_POWER_P2_20_DBM, HCI_EXT_TX_POWER_P2_20_DBM }, // max tx power for channel 30 + { HCI_EXT_TX_POWER_P2_20_DBM, HCI_EXT_TX_POWER_P2_20_DBM, HCI_EXT_TX_POWER_P2_20_DBM }, // max tx power for channel 31 + { HCI_EXT_TX_POWER_P2_20_DBM, HCI_EXT_TX_POWER_P2_20_DBM, HCI_EXT_TX_POWER_P2_20_DBM }, // max tx power for channel 32 + { HCI_EXT_TX_POWER_P2_20_DBM, HCI_EXT_TX_POWER_P2_20_DBM, HCI_EXT_TX_POWER_P2_20_DBM }, // max tx power for channel 33 + { HCI_EXT_TX_POWER_P2_20_DBM, HCI_EXT_TX_POWER_P2_17_DBM_P4_9_DBM, HCI_EXT_TX_POWER_P2_20_DBM }, // max tx power for channel 34 + { HCI_EXT_TX_POWER_P2_20_DBM, HCI_EXT_TX_POWER_P2_18_DBM_P4_10_DBM, HCI_EXT_TX_POWER_P2_20_DBM }, // max tx power for channel 35 + { HCI_EXT_TX_POWER_P2_19_DBM, HCI_EXT_TX_POWER_P2_18_DBM_P4_10_DBM, HCI_EXT_TX_POWER_P2_20_DBM }, // max tx power for channel 36 + { HCI_EXT_TX_POWER_P2_20_DBM, HCI_EXT_TX_POWER_P2_20_DBM, HCI_EXT_TX_POWER_P2_20_DBM }, // max tx power for channel 37 + { HCI_EXT_TX_POWER_P2_20_DBM, HCI_EXT_TX_POWER_P2_20_DBM, HCI_EXT_TX_POWER_P2_20_DBM }, // max tx power for channel 38 + { HCI_EXT_TX_POWER_P2_14_DBM_P4_6_DBM, HCI_EXT_TX_POWER_P2_20_DBM, HCI_EXT_TX_POWER_P2_20_DBM } +}; // max tx power for channel 39 + +txPwrBackoffTbl_t appTxPwrBackoffTbl = { TxPowerBackoffTable }; + +#endif // defined(CC13X2P) && defined(CC13X2P_2_LAUNCHXL) + +#if !defined(AOA_SYSCFG) +// Antenna board configurations (example for a 12-antenna board) +// Maximum number of antennas +#define ANTENNA_TABLE_SIZE 12 +// BitMask of all the relevant GPIOs which needed for the antennas +#define ANTENNA_IO_MASK BV(27) | BV(28) | BV(29) | BV(30) + +// Antenna GPIO configuration (should be adapted to the antenna board design) +antennaIOEntry_t antennaTbl[ANTENNA_TABLE_SIZE] = { + 0, // antenna 0 GPIO configuration (all GPIOs in ANTENNA_IO_MASK are LOW) + BV(28), // antenna 1 + BV(29), // antenna 2 + BV(28) | BV(29), // antenna 3 + BV(30), // antenna 4 + BV(28) | BV(30), // antenna 5 + BV(27), // antenna 6 + BV(27) | BV(28), // antenna 7 + BV(27) | BV(29), // antenna 8 + BV(27) | BV(28) | BV(29), // antenna 9 + BV(27) | BV(30), // antenna 10 + BV(27) | BV(28) | BV(30) // antenna 11 +}; + +#endif //! defined(AOA_SYSCFG) + +// Antenna properties passes to the stack +cteAntProp_t appCTEAntProp = { ANTENNA_IO_MASK, ANTENNA_TABLE_SIZE, antennaTbl }; + +#if !defined(DeviceFamily_CC26X1) +ECCParams_CurveParams eccParams_NISTP256 = { .curveType = ECCParams_CURVE_TYPE_SHORT_WEIERSTRASS_AN3, + .length = NISTP256_PARAM_SIZE_BYTES, + .prime = NISTP256_prime.byte, + .order = NISTP256_order.byte, + .a = NISTP256_a.byte, + .b = NISTP256_b.byte, + .generatorX = NISTP256_generator.x.byte, + .generatorY = NISTP256_generator.y.byte, + .cofactor = 1 }; +#else +ECCParams_CurveParams eccParams_NISTP256 = { .curveType = ECCParams_CURVE_TYPE_SHORT_WEIERSTRASS_AN3, + .length = ECC_NISTP256_PARAM_LENGTH_BYTES, + .prime = ECC_NISTP256_prime.byte, + .order = ECC_NISTP256_order.byte, + .a = ECC_NISTP256_a.byte, + .b = ECC_NISTP256_b.byte, + .generatorX = ECC_NISTP256_generatorX.byte, + .generatorY = ECC_NISTP256_generatorY.byte, + .cofactor = 1 }; +#endif + +#if defined(USE_COEX) +// 2 structures generated by the sysconfig RF for coexistence configuration +extern rfCoreHal_bleCoExConfig_t coexConfig; +extern RF_CoexOverride_BLEUseCases coexConfigBle; +// from coexConfig struct we will get the coex enable and coex type (3 or 1 wire) +// from coexConfigBle struct we will get the priority and rx request per use case: +// initiator, connected, Broadcaster and Observer. +coexUseCaseConfig_t coexSysConfig = { &coexConfig, &coexConfigBle }; +#endif + +#ifdef ICALL_JT +#include + +// RF Driver API Table +rfDrvTblPtr_t rfDriverTableBLE[] = { + (uint32) RF_open, + (uint32) driverTable_fnSpinlock, // RF_close +#ifdef RF_SINGLEMODE + (uint32) RF_postCmd, +#else // !RF_SINGLEMODE + (uint32) driverTable_fnSpinlock, // RF_postCmd +#endif // RF_SINGLEMODE + (uint32) driverTable_fnSpinlock, // RF_pendCmd +#ifdef RF_SINGLEMODE + (uint32) RF_runCmd, +#else // !RF_SINGLEMODE + (uint32) driverTable_fnSpinlock, // RF_runCmd +#endif // RF_SINGLEMODE + (uint32) RF_cancelCmd, + (uint32) RF_flushCmd, + (uint32) driverTable_fnSpinlock, // RF_yield + (uint32) RF_Params_init, + (uint32) RF_runImmediateCmd, + (uint32) RF_runDirectCmd, + (uint32) RF_ratCompare, + (uint32) driverTable_fnSpinlock, // RF_ratCapture + (uint32) RF_ratDisableChannel, + (uint32) RF_getCurrentTime, + (uint32) RF_getRssi, + (uint32) RF_getInfo, + (uint32) RF_getCmdOp, + (uint32) RF_control, + (uint32) driverTable_fnSpinlock, // RF_getTxPower + (uint32) RF_setTxPower, // RF_setTxPower + (uint32) driverTable_fnSpinlock, // RF_TxPowerTable_findPowerLevel + (uint32) driverTable_fnSpinlock, // RF_TxPowerTable_findValue +#ifndef RF_SINGLEMODE + (uint32) RF_scheduleCmd, + (uint32) RF_runScheduleCmd, + (uint32) driverTable_fnSpinlock, // RF_requestAccess +#endif // !RF_SINGLEMODE +}; + +cryptoDrvTblPtr_t cryptoDriverTableBLE[] = { (uint32) AESCCM_init, + (uint32) AESCCM_open, + (uint32) AESCCM_close, + (uint32) AESCCM_Params_init, + (uint32) AESCCM_Operation_init, + (uint32) AESCCM_oneStepEncrypt, + (uint32) AESCCM_oneStepDecrypt, + (uint32) AESECB_init, + (uint32) AESECB_open, + (uint32) AESECB_close, + (uint32) AESECB_Params_init, + (uint32) AESECB_Operation_init, + (uint32) AESECB_oneStepEncrypt, + (uint32) AESECB_oneStepDecrypt, + (uint32) CryptoKeyPlaintext_initKey, + (uint32) CryptoKeyPlaintext_initBlankKey }; + +// Swi APIs needed by BLE controller +rtosApiTblPtr_t rtosApiTable[] = { (uint32_t) Swi_disable, (uint32_t) Swi_restore }; + +// BLE Stack Configuration Structure +const stackSpecific_t bleStackConfig = { .maxNumConns = MAX_NUM_BLE_CONNS, + .maxNumPDUs = MAX_NUM_PDU, + .maxPduSize = 0, + .maxNumPSM = L2CAP_NUM_PSM, + .maxNumCoChannels = L2CAP_NUM_CO_CHANNELS, + .maxWhiteListElems = MAX_NUM_WL_ENTRIES, + .maxResolvListElems = CFG_MAX_NUM_RL_ENTRIES, + .pfnBMAlloc = &pfnBMAlloc, + .pfnBMFree = &pfnBMFree, + .rfDriverParams.powerUpDurationMargin = RF_POWER_UP_DURATION_MARGIN, + .rfDriverParams.inactivityTimeout = RF_INACTIVITY_TIMEOUT, + .rfDriverParams.powerUpDuration = RF_POWER_UP_DURATION, + .rfDriverParams.pErrCb = &(RF_ERR_CB), + .eccParams = &eccParams_NISTP256, + .fastStateUpdateCb = NULL, + .bleStackType = 0, +#ifdef CC2652RB_LAUNCHXL + .extStackSettings = EXTENDED_STACK_SETTINGS | CC2652RB_OVERRIDE_USED, +#else + .extStackSettings = EXTENDED_STACK_SETTINGS, +#endif + .maxNumCteBuffers = MAX_NUM_CTE_BUFS }; + +uint16_t bleUserCfg_maxPduSize = MAX_PDU_SIZE; + +#ifdef OSAL_SNV_EXTFLASH +const extflashDrvTblPtr_t extflashDriverTable[] = { (uint32) ExtFlash_open, (uint32) ExtFlash_close, (uint32) ExtFlash_read, + (uint32) ExtFlash_write, (uint32) ExtFlash_erase }; +#endif // OSAL_SNV_EXTFLASH + +// Table for Driver can be found in icall_user_config.c +// if a driver is not to be used, then the pointer shoul dbe set to NULL, +// for this example, this is done in ble_user_config.h +const drvTblPtr_t driverTable = { + .rfDrvTbl = rfDriverTableBLE, + .eccDrvTbl = eccDriverTable, + .cryptoDrvTbl = cryptoDriverTableBLE, + .trngDrvTbl = trngDriverTable, + .rtosApiTbl = rtosApiTable, + .nvintfStructPtr = &nvintfFncStruct, +#ifdef OSAL_SNV_EXTFLASH + .extflashDrvTbl = extflashDriverTable, +#endif // OSAL_SNV_EXTFLASH +}; + +const boardConfig_t boardConfig = { + .rfFeModeBias = RF_FE_MODE_AND_BIAS, + .rfRegTbl = (regOverride_t *) pOverrides_bleCommon, + .rfRegTbl1M = (regOverride_t *) pOverrides_ble1Mbps, +#if defined(BLE_V50_FEATURES) && (BLE_V50_FEATURES & (PHY_2MBPS_CFG | PHY_LR_CFG)) + // Currently, no overrides for 2M and Coded, so exclude from build. + .rfRegTbl2M = (regOverride_t *) pOverrides_ble2Mbps, + .rfRegTblCoded = (regOverride_t *) pOverrides_bleCoded, +#endif // PHY_2MBPS_CFG | PHY_LR_CFG + .txPwrTbl = &appTxPwrTbl, +#if defined(CC13X2P) +#if defined(CC13X2P_2_LAUNCHXL) + .txPwrBackoffTbl = &appTxPwrBackoffTbl, +#else + .txPwrBackoffTbl = NULL, +#endif // defined(CC13X2P_2_LAUNCHXL) + .rfRegOverrideTxStdTblptr = (regOverride_t *) pOverrides_bleTxStd, // Default PA + .rfRegOverrideTx20TblPtr = (regOverride_t *) pOverrides_bleTx20, // High power PA +#endif // CC13X2P +#if defined(RTLS_CTE) + .rfRegOverrideCtePtr = (regOverride_t *) (pOverrides_bleCommon + BLE_STACK_OVERRIDES_OFFSET + CTE_OVERRIDES_OFFSET), + .cteAntennaPropPtr = &appCTEAntProp, +#else + .rfRegOverrideCtePtr = NULL, + .cteAntennaPropPtr = NULL, +#endif + .privOverrideOffset = BLE_STACK_OVERRIDES_OFFSET + PRIVACY_OVERRIDE_OFFSET, +#if defined(USE_COEX) + .coexUseCaseConfigPtr = &coexSysConfig, +#else + .coexUseCaseConfigPtr = NULL, +#endif +}; + +#else /* !(ICALL_JT) */ + +// RF Driver API Table +rfDrvTblPtr_t rfDriverTable[] = { + (uint32) RF_open, + (uint32) driverTable_fnSpinlock, // RF_close +#ifdef RF_SINGLEMODE + (uint32) RF_postCmd, +#else // !RF_SINGLEMODE + (uint32) driverTable_fnSpinlock, // RF_postCmd +#endif // RF_SINGLEMODE + (uint32) driverTable_fnSpinlock, // RF_pendCmd +#ifdef RF_SINGLEMODE + (uint32) RF_runCmd, +#else // !RF_SINGLEMODE + (uint32) driverTable_fnSpinlock, // RF_runCmd +#endif // RF_SINGLEMODE + (uint32) RF_cancelCmd, + (uint32) RF_flushCmd, + (uint32) driverTable_fnSpinlock, // RF_yield + (uint32) RF_Params_init, + (uint32) RF_runImmediateCmd, + (uint32) RF_runDirectCmd, + (uint32) RF_ratCompare(uint32) driverTable_fnSpinlock, // RF_ratCapture + (uint32) driverTable_fnSpinlock, // RF_ratDisableChannel + (uint32) RF_getCurrentTime, + (uint32) RF_getRssi, + (uint32) RF_getInfo, + (uint32) RF_getCmdOp, + (uint32) RF_control, + (uint32) driverTable_fnSpinlock, // RF_getTxPower + (uint32) RF_setTxPower, // RF_setTxPower + (uint32) driverTable_fnSpinlock, // RF_TxPowerTable_findPowerLevel + (uint32) driverTable_fnSpinlock, // RF_TxPowerTable_findValue +#ifndef RF_SINGLEMODE + (uint32) RF_scheduleCmd, + (uint32) RF_runScheduleCmd, + (uint32) driverTable_fnSpinlock // RF_requestAccess +#endif // !RF_SINGLEMODE +}; + +// ECC Driver API Table +eccDrvTblPtr_t eccDriverTable[] = { (uint32) ECDH_init, + (uint32) ECDH_Params_init, + (uint32) ECDH_open, + (uint32) ECDH_close, + (uint32) ECDH_OperationGeneratePublicKey_init, + (uint32) ECDH_OperationComputeSharedSecret_init, + (uint32) ECDH_generatePublicKey, + (uint32) ECDH_computeSharedSecret }; + +// Crypto Driver API Table +cryptoDrvTblPtr_t cryptoDriverTable[] = { (uint32) AESCCM_init, + (uint32) AESCCM_open, + (uint32) AESCCM_close, + (uint32) AESCCM_Params_init, + (uint32) AESCCM_Operation_init, + (uint32) AESCCM_oneStepEncrypt, + (uint32) AESCCM_oneStepDecrypt, + (uint32) AESECB_init, + (uint32) AESECB_open, + (uint32) AESECB_close, + (uint32) AESECB_Params_init, + (uint32) AESECB_Operation_init, + (uint32) AESECB_oneStepEncrypt, + (uint32) AESECB_oneStepDecrypt, + (uint32) CryptoKeyPlaintext_initKey, + (uint32) CryptoKeyPlaintext_initBlankKey }; + +trngDrvTblPtr_t trngDriverTable[] = { (uint32) TRNG_init, (uint32) TRNG_open, (uint32) TRNG_generateEntropy, (uint32) TRNG_close }; + +#endif /* ICALL_JT */ + +/******************************************************************************* + * @fn RegisterAssertCback + * + * @brief This routine registers the Application's assert handler. + * + * input parameters + * + * @param appAssertHandler - Application's assert handler. + * + * output parameters + * + * @param None. + * + * @return None. + */ +void RegisterAssertCback(assertCback_t appAssertHandler) +{ + appAssertCback = appAssertHandler; + +#ifdef EXT_HAL_ASSERT + // also set the Assert callback pointer used by halAssertHandlerExt + // Note: Normally, this pointer will be intialized by the stack, but in the + // event HAL_ASSERT is used by the Application, we initialize it + // directly here. + halAssertCback = appAssertHandler; +#endif // EXT_HAL_ASSERT + + return; +} + +/******************************************************************************* + * @fn driverTable_fnSpinLock + * + * @brief This routine is used to trap calls to unpopulated indexes of + * driver function pointer tables. + * + * input parameters + * + * @param None. + * + * output parameters + * + * @param None. + * + * @return None. + */ +void driverTable_fnSpinlock(void) +{ + volatile uint8 i = 1; + + while (i) + ; +} + +/******************************************************************************* + * @fn DefaultAssertCback + * + * @brief This is the Application default assert callback, in the event + * none is registered. + * + * input parameters + * + * @param assertCause - Assert cause as defined in hal_assert.h. + * @param assertSubcause - Optional assert subcause (see hal_assert.h). + * + * output parameters + * + * @param None. + * + * @return None. + */ +void DefaultAssertCback(uint8 assertCause, uint8 assertSubcause1) +{ +#ifdef HAL_ASSERT_SPIN + driverTable_fnSpinlock(); +#endif // HAL_ASSERT_SPIN + + return; +} + +// Application Assert Callback Function Pointer +assertCback_t appAssertCback = DefaultAssertCback; + +/******************************************************************************* + */ diff --git a/src/platform/cc13x2_26x2/crypto/cc13x2_26x2-mbedtls-config.h b/src/platform/cc13x2_26x2/crypto/cc13x2_26x2-mbedtls-config.h index efca6840f5d25d..04e91bae54616b 100644 --- a/src/platform/cc13x2_26x2/crypto/cc13x2_26x2-mbedtls-config.h +++ b/src/platform/cc13x2_26x2/crypto/cc13x2_26x2-mbedtls-config.h @@ -39,10 +39,14 @@ /* Enable Hardware Acceleration */ -#define MBEDTLS_ECJPAKE_ALT #define MBEDTLS_AES_ALT -#define MBEDTLS_SHA256_ALT +#define MBEDTLS_ECDH_COMPUTE_SHARED_ALT +#define MBEDTLS_ECDH_GEN_PUBLIC_ALT +#define MBEDTLS_ECDSA_SIGN_ALT +#define MBEDTLS_ECDSA_VERIFY_ALT +#define MBEDTLS_ECJPAKE_ALT #define MBEDTLS_ENTROPY_HARDWARE_ALT +#define MBEDTLS_SHA256_ALT /** * Enable Crypto and Entropy modules diff --git a/src/platform/cc13x2_26x2/crypto/ecdh_alt.c b/src/platform/cc13x2_26x2/crypto/ecdh_alt.c new file mode 100644 index 00000000000000..a3074a9c8a2435 --- /dev/null +++ b/src/platform/cc13x2_26x2/crypto/ecdh_alt.c @@ -0,0 +1,314 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * Copyright (c) 2021 Texas Instruments Incorporated + * + * 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. + */ + +#if !defined(MBEDTLS_CONFIG_FILE) +#include "mbedtls/config.h" +#else +#include MBEDTLS_CONFIG_FILE +#endif + +#if defined MBEDTLS_ECDH_COMPUTE_SHARED_ALT || defined MBEDTLS_ECDH_GEN_PUBLIC_ALT + +#include + +#include +#include +#include +#include + +#include "ti_drivers_config.h" + +#include +#include +#include + +/* Parameter validation macros based on platform_util.h */ +#define ECDH_VALIDATE_RET(cond) MBEDTLS_INTERNAL_VALIDATE_RET(cond, MBEDTLS_ERR_ECP_BAD_INPUT_DATA) +#define ECDH_VALIDATE(cond) MBEDTLS_INTERNAL_VALIDATE(cond) + +#if defined MBEDTLS_ECDH_GEN_PUBLIC_ALT +/* + * Generate public key (restartable version) + */ +static int ecdh_gen_public_restartable(mbedtls_ecp_group * grp, mbedtls_mpi * d, mbedtls_ecp_point * Q, + int (*f_rng)(void *, unsigned char *, size_t), void * p_rng, + mbedtls_ecp_restart_ctx * rs_ctx) +{ + int ret = 0; + size_t plen = grp->nbits / 8U; + uint8_t * q_buf = (uint8_t *) mbedtls_calloc(1, (plen * 2U) + 1); + uint8_t * d_buf = (uint8_t *) mbedtls_calloc(1, plen); + CryptoKey myPrivateKey; + CryptoKey myPublicKey; + ECDH_Config config = { 0 }; + ECDH_Handle handle = NULL; + ECDH_OperationGeneratePublicKey operationGeneratePublicKey; + ECDHCC26X2_HWAttrs hwAttrs = { 0 }; + ECDHCC26X2_Object object = { 0 }; + + if (NULL == q_buf || NULL == d_buf) + { + ret = MBEDTLS_ERR_ECP_ALLOC_FAILED; + goto cleanup; + } + + hwAttrs.intPriority = (1 << 5); + + config.object = (void *) &object; + config.hwAttrs = (void *) &hwAttrs; + + handle = ECDH_construct(&config, NULL); + + if (NULL == handle) + { + ret = MBEDTLS_ERR_ECP_HW_ACCEL_FAILED; + goto cleanup; + } + + CryptoKeyPlaintext_initKey(&myPrivateKey, d_buf, plen); + CryptoKeyPlaintext_initKey(&myPublicKey, q_buf, (plen * 2U) + 1); + + if (0 != f_rng(p_rng, d_buf, plen)) + { + ret = MBEDTLS_ERR_ECP_RANDOM_FAILED; + goto cleanup; + } + + ECDH_OperationGeneratePublicKey_init(&operationGeneratePublicKey); + operationGeneratePublicKey.myPrivateKey = &myPrivateKey; + operationGeneratePublicKey.myPublicKey = &myPublicKey; + + /* Load the ROM curve params */ + switch (grp->id) + { + case MBEDTLS_ECP_DP_SECP224R1: + operationGeneratePublicKey.curve = &ECCParams_NISTP224; + break; + + case MBEDTLS_ECP_DP_SECP256R1: + operationGeneratePublicKey.curve = &ECCParams_NISTP256; + break; + + case MBEDTLS_ECP_DP_SECP384R1: + operationGeneratePublicKey.curve = &ECCParams_NISTP384; + break; + + case MBEDTLS_ECP_DP_SECP521R1: + operationGeneratePublicKey.curve = &ECCParams_NISTP521; + break; + + case MBEDTLS_ECP_DP_BP256R1: + operationGeneratePublicKey.curve = &ECCParams_BrainpoolP256R1; + break; + + case MBEDTLS_ECP_DP_BP384R1: + operationGeneratePublicKey.curve = &ECCParams_BrainpoolP384R1; + break; + + case MBEDTLS_ECP_DP_BP512R1: + operationGeneratePublicKey.curve = &ECCParams_BrainpoolP512R1; + break; + + case MBEDTLS_ECP_DP_CURVE25519: + operationGeneratePublicKey.curve = &ECCParams_Curve25519; + break; + + default: + /* Possible extension to load an arbitrary curve */ + ret = MBEDTLS_ERR_ECP_FEATURE_UNAVAILABLE; + goto cleanup; + } + + if (ECDH_STATUS_SUCCESS == ECDH_generatePublicKey(handle, &operationGeneratePublicKey)) + { + ret = 0; + } + else + { + ret = MBEDTLS_ERR_ECP_BAD_INPUT_DATA; + } + + MBEDTLS_MPI_CHK(mbedtls_mpi_read_binary(d, d_buf, plen)); + MBEDTLS_MPI_CHK(mbedtls_mpi_read_binary(&(Q->X), q_buf + 1, plen)); + MBEDTLS_MPI_CHK(mbedtls_mpi_read_binary(&(Q->Y), q_buf + 1 + plen, plen)); + +cleanup: + mbedtls_free(q_buf); + mbedtls_free(d_buf); + + if (NULL != handle) + { + ECDH_close(handle); + } + + return (ret); +} + +/* + * Generate public key + */ +int mbedtls_ecdh_gen_public(mbedtls_ecp_group * grp, mbedtls_mpi * d, mbedtls_ecp_point * Q, + int (*f_rng)(void *, unsigned char *, size_t), void * p_rng) +{ + ECDH_VALIDATE_RET(grp != NULL); + ECDH_VALIDATE_RET(d != NULL); + ECDH_VALIDATE_RET(Q != NULL); + ECDH_VALIDATE_RET(f_rng != NULL); + return (ecdh_gen_public_restartable(grp, d, Q, f_rng, p_rng, NULL)); +} +#endif /* MBEDTLS_ECDH_GEN_PUBLIC_ALT */ + +#if defined MBEDTLS_ECDH_COMPUTE_SHARED_ALT +/* + * Compute shared secret (SEC1 3.3.1) + */ +static int ecdh_compute_shared_restartable(mbedtls_ecp_group * grp, mbedtls_mpi * z, const mbedtls_ecp_point * Q, + const mbedtls_mpi * d, int (*f_rng)(void *, unsigned char *, size_t), void * p_rng, + mbedtls_ecp_restart_ctx * rs_ctx) +{ + int ret = 0; + size_t plen = grp->nbits / 8U; + uint8_t * q_buf = (uint8_t *) mbedtls_calloc(1, (plen * 2U) + 1); + uint8_t * s_buf = (uint8_t *) mbedtls_calloc(1, (plen * 2U) + 1); + uint8_t * d_buf = (uint8_t *) mbedtls_calloc(1, plen); + CryptoKey myPrivateKey; + CryptoKey theirPublicKey; + CryptoKey sharedSecret; + ECDH_Config config = { 0 }; + ECDH_Handle handle = NULL; + ECDH_OperationComputeSharedSecret operationComputeSharedSecret; + ECDHCC26X2_HWAttrs hwAttrs = { 0 }; + ECDHCC26X2_Object object = { 0 }; + + if (NULL == q_buf || NULL == s_buf || NULL == d_buf) + { + ret = MBEDTLS_ERR_ECP_ALLOC_FAILED; + goto cleanup; + } + + hwAttrs.intPriority = (1 << 5); + + config.object = (void *) &object; + config.hwAttrs = (void *) &hwAttrs; + + handle = ECDH_construct(&config, NULL); + + if (NULL == handle) + { + ret = MBEDTLS_ERR_ECP_HW_ACCEL_FAILED; + goto cleanup; + } + + CryptoKeyPlaintext_initKey(&sharedSecret, s_buf, (2U * plen) + 1); + + /* The driver consumes network byte order. Copy this number and reverse them again. */ + MBEDTLS_MPI_CHK(mbedtls_mpi_write_binary(d, d_buf, plen)); + CryptoKeyPlaintext_initKey(&myPrivateKey, d_buf, plen); + + /* The driver consumes an octet string in network byte order. Copy this + * point and reverse them again. */ + q_buf[0] = 0x04; + MBEDTLS_MPI_CHK(mbedtls_mpi_write_binary(&(Q->X), q_buf + 1, plen)); + MBEDTLS_MPI_CHK(mbedtls_mpi_write_binary(&(Q->Y), q_buf + 1 + plen, plen)); + CryptoKeyPlaintext_initKey(&theirPublicKey, q_buf, (2U * plen) + 1); + + ECDH_OperationComputeSharedSecret_init(&operationComputeSharedSecret); + operationComputeSharedSecret.myPrivateKey = &myPrivateKey; + operationComputeSharedSecret.theirPublicKey = &theirPublicKey; + operationComputeSharedSecret.sharedSecret = &sharedSecret; + + /* Load the ROM curve params */ + switch (grp->id) + { + case MBEDTLS_ECP_DP_SECP224R1: + operationComputeSharedSecret.curve = &ECCParams_NISTP224; + break; + + case MBEDTLS_ECP_DP_SECP256R1: + operationComputeSharedSecret.curve = &ECCParams_NISTP256; + break; + + case MBEDTLS_ECP_DP_SECP384R1: + operationComputeSharedSecret.curve = &ECCParams_NISTP384; + break; + + case MBEDTLS_ECP_DP_SECP521R1: + operationComputeSharedSecret.curve = &ECCParams_NISTP521; + break; + + case MBEDTLS_ECP_DP_BP256R1: + operationComputeSharedSecret.curve = &ECCParams_BrainpoolP256R1; + break; + + case MBEDTLS_ECP_DP_BP384R1: + operationComputeSharedSecret.curve = &ECCParams_BrainpoolP384R1; + break; + + case MBEDTLS_ECP_DP_BP512R1: + operationComputeSharedSecret.curve = &ECCParams_BrainpoolP512R1; + break; + + case MBEDTLS_ECP_DP_CURVE25519: + operationComputeSharedSecret.curve = &ECCParams_Curve25519; + break; + + default: + /* Possible extension to load an arbitrary curve */ + ret = MBEDTLS_ERR_ECP_FEATURE_UNAVAILABLE; + goto cleanup; + } + + if (ECDH_STATUS_SUCCESS == ECDH_computeSharedSecret(handle, &operationComputeSharedSecret)) + { + ret = 0; + } + else + { + ret = MBEDTLS_ERR_ECP_BAD_INPUT_DATA; + } + + MBEDTLS_MPI_CHK(mbedtls_mpi_read_binary(z, s_buf + 1, plen)); + +cleanup: + mbedtls_free(q_buf); + mbedtls_free(d_buf); + mbedtls_free(s_buf); + + if (NULL != handle) + { + ECDH_close(handle); + } + + return (ret); +} + +/* + * Compute shared secret (SEC1 3.3.1) + */ +int mbedtls_ecdh_compute_shared(mbedtls_ecp_group * grp, mbedtls_mpi * z, const mbedtls_ecp_point * Q, const mbedtls_mpi * d, + int (*f_rng)(void *, unsigned char *, size_t), void * p_rng) +{ + ECDH_VALIDATE_RET(grp != NULL); + ECDH_VALIDATE_RET(Q != NULL); + ECDH_VALIDATE_RET(d != NULL); + ECDH_VALIDATE_RET(z != NULL); + return (ecdh_compute_shared_restartable(grp, z, Q, d, f_rng, p_rng, NULL)); +} +#endif /* MBEDTLS_ECDH_COMPUTE_SHARED_ALT */ + +#endif /* MBEDTLS_ECDH_COMPUTE_SHARED_ALT || MBEDTLS_ECDH_GEN_PUBLIC_ALT */ diff --git a/src/platform/cc13x2_26x2/crypto/ecdsa_alt.c b/src/platform/cc13x2_26x2/crypto/ecdsa_alt.c new file mode 100755 index 00000000000000..18bb44fd1364e3 --- /dev/null +++ b/src/platform/cc13x2_26x2/crypto/ecdsa_alt.c @@ -0,0 +1,289 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * Copyright (c) 2021 Texas Instruments Incorporated + * + * 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. + */ + +#if !defined(MBEDTLS_CONFIG_FILE) +#include "mbedtls/config.h" +#else +#include MBEDTLS_CONFIG_FILE +#endif + +#if defined MBEDTLS_ECDSA_VERIFY_ALT || defined MBEDTLS_ECDSA_SIGN_ALT + +/* NOTE: The TI drivers consume these points and big numbers in network byte + * order. This is in contrast to the mbedtls_mpi structures which story + * these numbers and points in little endian byte order. This file uses + * the mpi functions to re-write the buffers into network byte order. + */ + +#include + +#include +#include +#include +#include + +#include "ti_drivers_config.h" + +#include +#include +#include + +#ifdef MBEDTLS_ECDSA_VERIFY_ALT + +/* + * Verify ECDSA signature of hashed message + */ +int mbedtls_ecdsa_verify(mbedtls_ecp_group * grp, const unsigned char * buf, size_t blen, const mbedtls_ecp_point * Q, + const mbedtls_mpi * r, const mbedtls_mpi * s) +{ + int ret = 0; + size_t plen = grp->nbits / 8U; + uint8_t * r_buf = (uint8_t *) mbedtls_calloc(1, plen); + uint8_t * s_buf = (uint8_t *) mbedtls_calloc(1, plen); + uint8_t * q_buf = (uint8_t *) mbedtls_calloc(1, (plen * 2U) + 1); + CryptoKey theirPublicKey; + ECDSA_Config config = { 0 }; + ECDSA_Handle handle = NULL; + ECDSA_OperationVerify operationVerify; + ECDSACC26X2_HWAttrs hwAttrs = { 0 }; + ECDSACC26X2_Object object = { 0 }; + + if (NULL == r_buf || NULL == s_buf || NULL == q_buf) + { + ret = MBEDTLS_ERR_ECP_ALLOC_FAILED; + goto cleanup; + } + + hwAttrs.intPriority = (1 << 5); + hwAttrs.trngIntPriority = (1 << 5); + + config.object = (void *) &object; + config.hwAttrs = (void *) &hwAttrs; + + handle = ECDSA_construct(&config, NULL); + + if (NULL == handle) + { + ret = MBEDTLS_ERR_ECP_HW_ACCEL_FAILED; + goto cleanup; + } + + /* The driver consumes an octet string in network byte order. Copy this + * point and reverse them again. */ + q_buf[0] = 0x04; + MBEDTLS_MPI_CHK(mbedtls_mpi_write_binary(&(Q->X), q_buf + 1, plen)); + MBEDTLS_MPI_CHK(mbedtls_mpi_write_binary(&(Q->Y), q_buf + 1 + plen, plen)); + CryptoKeyPlaintext_initKey(&theirPublicKey, q_buf, (2U * plen) + 1); + + /* The driver also consumes the r and s in network byte order. Copy these + * buffers and them reverse them again */ + MBEDTLS_MPI_CHK(mbedtls_mpi_write_binary(r, r_buf, plen)); + MBEDTLS_MPI_CHK(mbedtls_mpi_write_binary(s, s_buf, plen)); + + /* prepare the operation */ + ECDSA_OperationVerify_init(&operationVerify); + operationVerify.theirPublicKey = &theirPublicKey; + operationVerify.hash = buf; + operationVerify.r = r_buf; + operationVerify.s = s_buf; + + /* Load the ROM curve params */ + switch (grp->id) + { + case MBEDTLS_ECP_DP_SECP224R1: + operationVerify.curve = &ECCParams_NISTP224; + break; + + case MBEDTLS_ECP_DP_SECP256R1: + operationVerify.curve = &ECCParams_NISTP256; + break; + + case MBEDTLS_ECP_DP_SECP384R1: + operationVerify.curve = &ECCParams_NISTP384; + break; + + case MBEDTLS_ECP_DP_SECP521R1: + operationVerify.curve = &ECCParams_NISTP521; + break; + + case MBEDTLS_ECP_DP_BP256R1: + operationVerify.curve = &ECCParams_BrainpoolP256R1; + break; + + case MBEDTLS_ECP_DP_BP384R1: + operationVerify.curve = &ECCParams_BrainpoolP384R1; + break; + + case MBEDTLS_ECP_DP_BP512R1: + operationVerify.curve = &ECCParams_BrainpoolP512R1; + break; + + case MBEDTLS_ECP_DP_CURVE25519: + operationVerify.curve = &ECCParams_Curve25519; + break; + + default: + /* Possible extension to load an arbitrary curve */ + ret = MBEDTLS_ERR_ECP_FEATURE_UNAVAILABLE; + goto cleanup; + } + + if (ECDSA_STATUS_SUCCESS == ECDSA_verify(handle, &operationVerify)) + { + ret = 0; + } + else + { + ret = MBEDTLS_ERR_ECP_VERIFY_FAILED; + } + +cleanup: + mbedtls_free(r_buf); + mbedtls_free(s_buf); + mbedtls_free(q_buf); + + if (NULL != handle) + { + ECDSA_close(handle); + } + + return ret; +} + +#endif /* MBEDTLS_ECDSA_VERIFY_ALT */ + +#ifdef MBEDTLS_ECDSA_SIGN_ALT + +/* + * Compute ECDSA signature of a hashed message + */ +int mbedtls_ecdsa_sign(mbedtls_ecp_group * grp, mbedtls_mpi * r, mbedtls_mpi * s, const mbedtls_mpi * d, const unsigned char * buf, + size_t blen, int (*f_rng)(void *, unsigned char *, size_t), void * p_rng) +{ + int ret = 0; + size_t plen = grp->nbits / 8U; + uint8_t * r_buf = (uint8_t *) mbedtls_calloc(1, plen); + uint8_t * s_buf = (uint8_t *) mbedtls_calloc(1, plen); + uint8_t * d_buf = (uint8_t *) mbedtls_calloc(1, plen); + CryptoKey myPrivateKey; + ECDSA_Config config = { 0 }; + ECDSA_Handle handle = NULL; + ECDSA_OperationSign operationSign; + ECDSACC26X2_HWAttrs hwAttrs = { 0 }; + ECDSACC26X2_Object object = { 0 }; + + if (NULL == r_buf || NULL == s_buf || NULL == d_buf) + { + ret = MBEDTLS_ERR_ECP_ALLOC_FAILED; + goto cleanup; + } + + hwAttrs.intPriority = (1 << 5); + hwAttrs.trngIntPriority = (1 << 5); + + config.object = (void *) &object; + config.hwAttrs = (void *) &hwAttrs; + + handle = ECDSA_construct(&config, NULL); + + if (NULL == handle) + { + ret = MBEDTLS_ERR_ECP_HW_ACCEL_FAILED; + goto cleanup; + } + + /* The driver consumes numbers in network byte order */ + MBEDTLS_MPI_CHK(mbedtls_mpi_write_binary(d, d_buf, plen)); + + CryptoKeyPlaintext_initKey(&myPrivateKey, d_buf, plen); + ECDSA_OperationSign_init(&operationSign); + operationSign.myPrivateKey = &myPrivateKey; + operationSign.hash = buf; + operationSign.r = r_buf; + operationSign.s = s_buf; + + /* Load the ROM curve params */ + switch (grp->id) + { + case MBEDTLS_ECP_DP_SECP224R1: + operationSign.curve = &ECCParams_NISTP224; + break; + + case MBEDTLS_ECP_DP_SECP256R1: + operationSign.curve = &ECCParams_NISTP256; + break; + + case MBEDTLS_ECP_DP_SECP384R1: + operationSign.curve = &ECCParams_NISTP384; + break; + + case MBEDTLS_ECP_DP_SECP521R1: + operationSign.curve = &ECCParams_NISTP521; + break; + + case MBEDTLS_ECP_DP_BP256R1: + operationSign.curve = &ECCParams_BrainpoolP256R1; + break; + + case MBEDTLS_ECP_DP_BP384R1: + operationSign.curve = &ECCParams_BrainpoolP384R1; + break; + + case MBEDTLS_ECP_DP_BP512R1: + operationSign.curve = &ECCParams_BrainpoolP512R1; + break; + + case MBEDTLS_ECP_DP_CURVE25519: + operationSign.curve = &ECCParams_Curve25519; + break; + + default: + /* Possible extension to load an arbitrary curve */ + ret = MBEDTLS_ERR_ECP_FEATURE_UNAVAILABLE; + goto cleanup; + } + + if (ECDSA_STATUS_SUCCESS == ECDSA_sign(handle, &operationSign)) + { + ret = 0; + } + else + { + ret = MBEDTLS_ERR_ECP_VERIFY_FAILED; + } + + /* The driver produces r and s in network byte order. copy into mbedtls mpi + * format. This incurs an extra byte reversal when written to ASN1. */ + MBEDTLS_MPI_CHK(mbedtls_mpi_read_binary(r, r_buf, plen)); + MBEDTLS_MPI_CHK(mbedtls_mpi_read_binary(s, s_buf, plen)); + +cleanup: + mbedtls_free(r_buf); + mbedtls_free(s_buf); + mbedtls_free(d_buf); + + if (NULL != handle) + { + ECDSA_close(handle); + } + + return ret; +} +#endif /* MBEDTLS_ECDSA_SIGN_ALT */ + +#endif /* defined MBEDTLS_ECDSA_VERIFY_ALT || defined MBEDTLS_ECDSA_SIGN_ALT */ diff --git a/src/platform/cc13x2_26x2/crypto/sha256_alt.c b/src/platform/cc13x2_26x2/crypto/sha256_alt.c index 8dabab6f88dff3..0ef01f48fe34ba 100644 --- a/src/platform/cc13x2_26x2/crypto/sha256_alt.c +++ b/src/platform/cc13x2_26x2/crypto/sha256_alt.c @@ -136,6 +136,8 @@ void mbedtls_sha256_clone(mbedtls_sha256_context * dst, const mbedtls_sha256_con dst->object.bytesInBuffer = src->object.bytesInBuffer; dst->object.bytesProcessed = src->object.bytesProcessed; memcpy(dst->object.buffer, src->object.buffer, sizeof(dst->object.buffer)); + // copy the digest to support cloning after finalization has happened + memcpy(dst->object.digest, src->object.digest, sizeof(dst->object.digest)); } int mbedtls_sha256_finish_ret(mbedtls_sha256_context * ctx, unsigned char output[32]) diff --git a/third_party/ti_simplelink_sdk/BUILD.gn b/third_party/ti_simplelink_sdk/BUILD.gn index 73e9b3e965603e..f968324d78170f 100644 --- a/third_party/ti_simplelink_sdk/BUILD.gn +++ b/third_party/ti_simplelink_sdk/BUILD.gn @@ -48,6 +48,8 @@ mbedtls_target("mbedtls") { # Hardware acceleration sources = [ "${chip_root}/src/platform/cc13x2_26x2/crypto/aes_alt.c", + "${chip_root}/src/platform/cc13x2_26x2/crypto/ecdh_alt.c", + "${chip_root}/src/platform/cc13x2_26x2/crypto/ecdsa_alt.c", "${chip_root}/src/platform/cc13x2_26x2/crypto/ecjpake_alt.c", "${chip_root}/src/platform/cc13x2_26x2/crypto/sha256_alt.c", ] diff --git a/third_party/ti_simplelink_sdk/ti_simplelink_sdk.gni b/third_party/ti_simplelink_sdk/ti_simplelink_sdk.gni index aebec3c96940f2..538bae5ee02413 100644 --- a/third_party/ti_simplelink_sdk/ti_simplelink_sdk.gni +++ b/third_party/ti_simplelink_sdk/ti_simplelink_sdk.gni @@ -87,6 +87,8 @@ template("ti_sysconfig") { "gcc", "--board", "/ti/boards/" + ti_simplelink_board, + "--rtos", + "freertos", ] foreach(source, sources) { @@ -316,6 +318,8 @@ template("ti_simplelink_sdk") { "${ti_simplelink_sdk_root}/source/ti/", "${ti_simplelink_sdk_root}/source/ti/dmm/", "${ti_simplelink_sdk_root}/source/ti/dmm/apps/", + "${ti_simplelink_sdk_root}/source/ti/dmm/apps/common/thread/", + "${ti_simplelink_sdk_root}/source/ti/dmm/apps/common/thread/source/activity/", "${ti_simplelink_sdk_root}/source/ti/common/nv", "${ti_simplelink_sdk_root}/source/ti/devices/cc13x2x7_cc26x2x7", @@ -374,7 +378,7 @@ template("ti_simplelink_sdk") { if (ti_simplelink_device_family == "cc13x2x7_26x2x7") { libs += [ - "${ti_simplelink_sdk_root}/source/ti/dmm/library/freertos/gcc/bin/dmmlib_cc26x2.a", + "${ti_simplelink_sdk_root}/source/ti/dmm/lib/gcc/m4f/libdmmlib_freertos.a", "${ti_simplelink_sdk_root}/source/ti/ble5stack/libraries/cc26x2r1/OneLib.a", "${ti_simplelink_sdk_root}/source/ti/ble5stack/libraries/cc26x2r1/StackWrapper.a", "${ti_simplelink_sdk_root}/source/ti/ble5stack/libraries/cc26x2r1/ble_r2.symbols", @@ -391,8 +395,10 @@ template("ti_simplelink_sdk") { source_set("${sdk_target_name}_dmm") { defines = [] - include_dirs = [] - + include_dirs = [ + "${chip_root}/third_party/openthread/repo/include/", + "${chip_root}/src/", + ] configs -= [ "${build_root}/config/compiler:warnings_default" ] # removed for # -Wshadow @@ -409,7 +415,6 @@ template("ti_simplelink_sdk") { "${ti_simplelink_sdk_root}/source/ti/ble5stack/common/cc26xx/rcosc/rcosc_calibration.c", "${ti_simplelink_sdk_root}/source/ti/ble5stack/host/gatt_uuid.c", "${ti_simplelink_sdk_root}/source/ti/ble5stack/host/gattservapp_util.c", - "${ti_simplelink_sdk_root}/source/ti/ble5stack/icall/app/ble_user_config.c", "${ti_simplelink_sdk_root}/source/ti/ble5stack/icall/app/icall_api_lite.c", "${ti_simplelink_sdk_root}/source/ti/ble5stack/icall/src/icall_cc2650.c", "${ti_simplelink_sdk_root}/source/ti/ble5stack/icall/src/icall_user_config.c", @@ -418,11 +423,12 @@ template("ti_simplelink_sdk") { "${ti_simplelink_sdk_root}/source/ti/ble5stack/rom/agama_r1/rom_init.c", "${ti_simplelink_sdk_root}/source/ti/dmm/apps/common/ble_remote_display/stack/osal_icall_ble.c", "${ti_simplelink_sdk_root}/source/ti/dmm/apps/common/freertos/icall_FreeRTOS.c", - "${ti_simplelink_sdk_root}/source/ti/dmm/apps/common/freertos/itm/itm.c", "${ti_simplelink_sdk_root}/source/ti/dmm/apps/common/freertos/util.c", + "${ti_simplelink_sdk_root}/source/ti/dmm/apps/common/thread/source/activity/dmm_thread_activity.c", "${ti_simplelink_sdk_root}/source/ti/dmm/dmm_priority_ble_thread.c", # Move this into the SDK + "${chip_root}/src/platform/cc13x2_26x2/ble_user_config.c", "${chip_root}/src/platform/cc13x2_26x2/chipOBleProfile.c", ] From c36fa99f3bb9f705c9688392de5ef70d734aaa7b Mon Sep 17 00:00:00 2001 From: JasonLiuZhuoCheng Date: Tue, 30 Nov 2021 01:04:06 -0500 Subject: [PATCH 25/42] Show preview complex data type (#12008) * fix byte[] displaying and enable user to specify byte[] value * use encodeToByteArray and decodeToString * change variable naming * enable ui to see preview on complex data type --- .../clusterclient/clusterinteraction/ClusterDetailFragment.kt | 2 +- .../CHIPTool/app/src/main/res/layout/cluster_callback_item.xml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/clusterinteraction/ClusterDetailFragment.kt b/src/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/clusterinteraction/ClusterDetailFragment.kt index 5e6f45f0afc717..7371cce20365b9 100644 --- a/src/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/clusterinteraction/ClusterDetailFragment.kt +++ b/src/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/clusterinteraction/ClusterDetailFragment.kt @@ -241,7 +241,7 @@ class ClusterDetailFragment : Fragment() { } else { it!!.javaClass.toString().split('$').last() } - attributeCallbackItem.clusterCallbackDataTv.text = callbackClassName + attributeCallbackItem.clusterCallbackDataTv.text = objectString attributeCallbackItem.clusterCallbackDataTv.setOnClickListener { AlertDialog.Builder(requireContext()) .setTitle(callbackClassName) diff --git a/src/android/CHIPTool/app/src/main/res/layout/cluster_callback_item.xml b/src/android/CHIPTool/app/src/main/res/layout/cluster_callback_item.xml index 91e8edfb4fa09c..36b010f0abe6ed 100644 --- a/src/android/CHIPTool/app/src/main/res/layout/cluster_callback_item.xml +++ b/src/android/CHIPTool/app/src/main/res/layout/cluster_callback_item.xml @@ -23,6 +23,8 @@ android:layout_height="wrap_content" android:padding="16dp" android:singleLine="false" + android:maxLines="4" + android:ellipsize="end" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toStartOf="@id/clusterCallbackTypeTv" app:layout_constraintStart_toEndOf="@id/clusterCallbackNameTv" From 83dd8b5ab4a4d8b9d6519261fe2a7e81260dc86a Mon Sep 17 00:00:00 2001 From: Justin Wood Date: Mon, 29 Nov 2021 22:05:17 -0800 Subject: [PATCH 26/42] Update .wordlist.txt --- .github/.wordlist.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/.wordlist.txt b/.github/.wordlist.txt index 11ff1b84cd8831..07fe32993db502 100644 --- a/.github/.wordlist.txt +++ b/.github/.wordlist.txt @@ -4,6 +4,11 @@ aarch abcdef abfb ABI +AES +DMM +ECDH +ECDSA +SHA ABIs ables accessor From ea87cc6cd6a1021e6adde40c76b488810a386604 Mon Sep 17 00:00:00 2001 From: Evgeny Margolis Date: Mon, 29 Nov 2021 22:08:00 -0800 Subject: [PATCH 27/42] ACLs: Added SessionType and CATs Parameters to SecureSession and PairingSession Classes (#12027) --- src/credentials/CHIPCert.cpp | 26 ++++++-- src/credentials/CHIPCert.h | 24 ++++++- src/credentials/tests/TestChipCert.cpp | 64 +++++++++---------- src/lib/core/DataModelTypes.h | 1 + src/lib/core/NodeId.h | 7 +- src/protocols/secure_channel/CASESession.cpp | 26 +++++++- src/protocols/secure_channel/CASESession.h | 1 + src/protocols/secure_channel/PASESession.cpp | 5 +- .../secure_channel/tests/TestCASESession.cpp | 5 ++ .../secure_channel/tests/TestPASESession.cpp | 7 +- src/transport/PairingSession.h | 17 ++++- src/transport/SecureSession.h | 30 +++++++-- src/transport/SecureSessionTable.h | 9 ++- src/transport/SessionManager.cpp | 3 +- src/transport/tests/TestPeerConnections.cpp | 48 ++++++++++---- 15 files changed, 201 insertions(+), 72 deletions(-) diff --git a/src/credentials/CHIPCert.cpp b/src/credentials/CHIPCert.cpp index 5bb47aea3aba84..c6acf9d1e9f49f 100644 --- a/src/credentials/CHIPCert.cpp +++ b/src/credentials/CHIPCert.cpp @@ -883,7 +883,19 @@ CHIP_ERROR ExtractFabricIdFromCert(const ChipCertificateData & cert, FabricId * return CHIP_ERROR_INVALID_ARGUMENT; } -CHIP_ERROR ExtractCATsFromOpCert(const ChipCertificateData & opcert, uint32_t * cats, uint8_t catsSize) +CHIP_ERROR ExtractCATsFromOpCert(const ByteSpan & opcert, CATValues & cats) +{ + ChipCertificateSet certSet; + ChipCertificateData certData; + + ReturnErrorOnFailure(certSet.Init(&certData, 1)); + + ReturnErrorOnFailure(certSet.LoadCert(opcert, BitFlags())); + + return ExtractCATsFromOpCert(certData, cats); +} + +CHIP_ERROR ExtractCATsFromOpCert(const ChipCertificateData & opcert, CATValues & cats) { uint8_t catCount = 0; uint8_t certType; @@ -897,13 +909,17 @@ CHIP_ERROR ExtractCATsFromOpCert(const ChipCertificateData & opcert, uint32_t * const auto & rdn = subjectDN.rdn[i]; if (rdn.mAttrOID == ASN1::kOID_AttributeType_ChipCASEAuthenticatedTag) { - ReturnErrorCodeIf(catCount == catsSize, CHIP_ERROR_BUFFER_TOO_SMALL); - cats[catCount++] = static_cast(rdn.mChipVal); + // This error should never happen in practice because valid NOC cannot have more + // than kMaxSubjectCATAttributeCount CATs in its subject. The check that it is + // valid NOC was done above. + ReturnErrorCodeIf(catCount == cats.size(), CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(CanCastTo(rdn.mChipVal), CHIP_ERROR_INVALID_ARGUMENT); + cats.val[catCount++] = static_cast(rdn.mChipVal); } } - for (uint8_t i = catCount; i < catsSize; ++i) + for (uint8_t i = catCount; i < cats.size(); ++i) { - cats[i] = 0; + cats.val[i] = kUndefinedCAT; } return CHIP_NO_ERROR; diff --git a/src/credentials/CHIPCert.h b/src/credentials/CHIPCert.h index b957e60283b638..6a5ed262a8a1a4 100644 --- a/src/credentials/CHIPCert.h +++ b/src/credentials/CHIPCert.h @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include @@ -56,6 +57,15 @@ static constexpr uint32_t kMaxCHIPCertDecodeBufLength = kMaxDERCertLength - Cryp // Muximum number of CASE Authenticated Tags (CAT) in the CHIP certificate subject. static constexpr size_t kMaxSubjectCATAttributeCount = CHIP_CONFIG_CERT_MAX_RDN_ATTRIBUTES - 2; +static constexpr CASEAuthTag kUndefinedCAT = 0; + +struct CATValues +{ + CASEAuthTag val[kMaxSubjectCATAttributeCount]; + + size_t size() const { return ArraySize(val); } +}; +static constexpr CATValues kUndefinedCATs = { { Credentials::kUndefinedCAT } }; /** Data Element Tags for the CHIP Certificate */ @@ -799,16 +809,26 @@ CHIP_ERROR ExtractFabricIdFromCert(const ChipCertificateData & cert, FabricId * */ CHIP_ERROR ExtractNodeIdFabricIdFromOpCert(const ChipCertificateData & opcert, NodeId * nodeId, FabricId * fabricId); +/** + * Extract CASE Authenticated Tags from an operational certificate in ByteSpan TLV-encoded form. + * + * All values in the 'cats' struct will be set either to a valid CAT value or zero (undefined) value. + * + * @return CHIP_ERROR_INVALID_ARGUMENT if the passed-in cert is not NOC. + * @return CHIP_ERROR_BUFFER_TOO_SMALL if there are too many CATs in the NOC + */ +CHIP_ERROR ExtractCATsFromOpCert(const ByteSpan & opcert, CATValues & cats); + /** * Extract CASE Authenticated Tags from an operational certificate that has already been * parsed. * - * All values in the 'cats' array will be set either to a valid CAT value or zero (undefined) value. + * All values in the 'cats' struct will be set either to a valid CAT value or to the kUndefinedCAT value. * * @return CHIP_ERROR_INVALID_ARGUMENT if the passed-in cert is not NOC. * @return CHIP_ERROR_BUFFER_TOO_SMALL if the passed-in CATs array is too small. */ -CHIP_ERROR ExtractCATsFromOpCert(const ChipCertificateData & opcert, uint32_t * cats, uint8_t catsSize); +CHIP_ERROR ExtractCATsFromOpCert(const ChipCertificateData & opcert, CATValues & cats); /** * Extract Node ID and Fabric ID from an operational certificate in ByteSpan TLV-encoded diff --git a/src/credentials/tests/TestChipCert.cpp b/src/credentials/tests/TestChipCert.cpp index 034db14064336c..5a2fd8009a3b73 100644 --- a/src/credentials/tests/TestChipCert.cpp +++ b/src/credentials/tests/TestChipCert.cpp @@ -1113,70 +1113,68 @@ static void TestChipCert_ExtractCATsFromOpCert(nlTestSuite * inSuite, void * inC struct TestCase { uint8_t Cert; - uint32_t ExpectedCAT[kMaxSubjectCATAttributeCount]; + CATValues ExpectedCATs; }; // clang-format off static constexpr TestCase sTestCases[] = { // Cert CATs - // ============================================================= - { TestCert::kNode01_01, { 0, 0, 0 } }, - { TestCert::kNode01_02, { 0, 0, 0 } }, - { TestCert::kNode02_01, { 0, 0, 0 } }, - { TestCert::kNode02_02, { 0, 0, 0 } }, - { TestCert::kNode02_03, { 0xABCD0001, 0, 0 } }, - { TestCert::kNode02_04, { 0xABCE1002, 0xABCD0003, 0 } }, - { TestCert::kNode02_05, { 0xABCD0010, 0xABCE1008, 0 } }, - { TestCert::kNode02_06, { 0, 0, 0 } }, - { TestCert::kNode02_07, { 0, 0, 0 } }, - { TestCert::kNode02_08, { 0xABCF00A0, 0xABCD0020, 0xABCE0100 } }, + // ============================================================================ + { TestCert::kNode01_01, { { kUndefinedCAT, kUndefinedCAT, kUndefinedCAT } } }, + { TestCert::kNode01_02, { { kUndefinedCAT, kUndefinedCAT, kUndefinedCAT } } }, + { TestCert::kNode02_01, { { kUndefinedCAT, kUndefinedCAT, kUndefinedCAT } } }, + { TestCert::kNode02_02, { { kUndefinedCAT, kUndefinedCAT, kUndefinedCAT } } }, + { TestCert::kNode02_03, { { 0xABCD0001, kUndefinedCAT, kUndefinedCAT } } }, + { TestCert::kNode02_04, { { 0xABCE1002, 0xABCD0003, kUndefinedCAT } } }, + { TestCert::kNode02_05, { { 0xABCD0010, 0xABCE1008, kUndefinedCAT } } }, + { TestCert::kNode02_06, { { kUndefinedCAT, kUndefinedCAT, kUndefinedCAT } } }, + { TestCert::kNode02_07, { { kUndefinedCAT, kUndefinedCAT, kUndefinedCAT } } }, + { TestCert::kNode02_08, { { 0xABCF00A0, 0xABCD0020, 0xABCE0100 } } }, }; // clang-format on // Test extraction from the raw ByteSpan form. - ChipCertificateSet certSet; for (auto & testCase : sTestCases) { - CHIP_ERROR err = certSet.Init(1); - NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); - - err = LoadTestCert(certSet, testCase.Cert, sNullLoadFlag, sNullDecodeFlag); + ByteSpan cert; + CHIP_ERROR err = GetTestCert(testCase.Cert, sNullLoadFlag, cert); NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); - uint32_t cats[kMaxSubjectCATAttributeCount]; - err = ExtractCATsFromOpCert(certSet.GetCertSet()[0], cats, ArraySize(cats)); + CATValues cats; + err = ExtractCATsFromOpCert(cert, cats); NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); - NL_TEST_ASSERT(inSuite, memcmp(cats, testCase.ExpectedCAT, sizeof(cats)) == 0); - - certSet.Release(); + NL_TEST_ASSERT(inSuite, memcmp(&cats, &testCase.ExpectedCATs, sizeof(cats)) == 0); } - // Error case: trying to extract CAT from Root Cert. + // Test extraction from the parsed form. + ChipCertificateSet certSet; + for (auto & testCase : sTestCases) { CHIP_ERROR err = certSet.Init(1); NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); - err = LoadTestCert(certSet, TestCert::kRoot01, sNullLoadFlag, sNullDecodeFlag); + err = LoadTestCert(certSet, testCase.Cert, sNullLoadFlag, sNullDecodeFlag); NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); - uint32_t cats[kMaxSubjectCATAttributeCount]; - err = ExtractCATsFromOpCert(certSet.GetCertSet()[0], cats, ArraySize(cats)); - NL_TEST_ASSERT(inSuite, err == CHIP_ERROR_INVALID_ARGUMENT); + CATValues cats; + err = ExtractCATsFromOpCert(certSet.GetCertSet()[0], cats); + NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); + NL_TEST_ASSERT(inSuite, memcmp(&cats, &testCase.ExpectedCATs, sizeof(cats)) == 0); certSet.Release(); } - // Error case: CAT array is too small. + // Error case: trying to extract CAT from Root Cert. { CHIP_ERROR err = certSet.Init(1); NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); - err = LoadTestCert(certSet, TestCert::kNode02_08, sNullLoadFlag, sNullDecodeFlag); + err = LoadTestCert(certSet, TestCert::kRoot01, sNullLoadFlag, sNullDecodeFlag); NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); - uint32_t cats[kMaxSubjectCATAttributeCount - 1]; - err = ExtractCATsFromOpCert(certSet.GetCertSet()[0], cats, ArraySize(cats)); - NL_TEST_ASSERT(inSuite, err == CHIP_ERROR_BUFFER_TOO_SMALL); + CATValues cats; + err = ExtractCATsFromOpCert(certSet.GetCertSet()[0], cats); + NL_TEST_ASSERT(inSuite, err == CHIP_ERROR_INVALID_ARGUMENT); certSet.Release(); } @@ -1276,7 +1274,7 @@ static const nlTest sTests[] = { NL_TEST_DEF("Test CHIP Verify Generated Cert Chain", TestChipCert_VerifyGeneratedCerts), NL_TEST_DEF("Test CHIP Verify Generated Cert Chain No ICA", TestChipCert_VerifyGeneratedCertsNoICA), NL_TEST_DEF("Test extracting PeerId from node certificate", TestChipCert_ExtractPeerId), - NL_TEST_DEF("Test extracting CAST Authenticated Tags from node certificate", TestChipCert_ExtractCATsFromOpCert), + NL_TEST_DEF("Test extracting CASE Authenticated Tags from node certificate", TestChipCert_ExtractCATsFromOpCert), NL_TEST_DEF("Test extracting PublicKey and SKID from chip certificate", TestChipCert_ExtractPublicKeyAndSKID), NL_TEST_SENTINEL() }; diff --git a/src/lib/core/DataModelTypes.h b/src/lib/core/DataModelTypes.h index ef5f98d742f77e..7b4b8e3e2f6e2a 100644 --- a/src/lib/core/DataModelTypes.h +++ b/src/lib/core/DataModelTypes.h @@ -28,6 +28,7 @@ namespace chip { typedef uint8_t ActionId; typedef uint32_t AttributeId; +typedef uint32_t CASEAuthTag; typedef uint32_t ClusterId; typedef uint8_t ClusterStatus; typedef uint32_t CommandId; diff --git a/src/lib/core/NodeId.h b/src/lib/core/NodeId.h index 07e79b01378fb0..f6f62b2b1fa01f 100644 --- a/src/lib/core/NodeId.h +++ b/src/lib/core/NodeId.h @@ -40,11 +40,8 @@ constexpr NodeId kMinTemporaryLocalId = 0xFFFF'FFFE'0000'0000ULL; constexpr NodeId kMaxTemporaryLocalId = 0xFFFF'FFFE'FFFF'FFFEULL; constexpr NodeId kPlaceholderNodeId = 0xFFFF'FFFE'FFFF'FFFFULL; -constexpr NodeId kMinCASEAuthTag1 = 0xFFFF'FFFD'0000'0000ULL; -constexpr NodeId kMaxCASEAuthTag1 = 0xFFFF'FFFD'FFFF'FFFFULL; - -constexpr NodeId kMinCASEAuthTag2 = 0xFFFF'FFFC'0000'0000ULL; -constexpr NodeId kMaxCASEAuthTag2 = 0xFFFF'FFFC'FFFF'FFFFULL; +constexpr NodeId kMinCASEAuthTag = 0xFFFF'FFFD'0000'0000ULL; +constexpr NodeId kMaxCASEAuthTag = 0xFFFF'FFFD'FFFF'FFFFULL; constexpr NodeId kMinPAKEKeyId = 0xFFFF'FFFB'0000'0000ULL; constexpr NodeId kMaxPAKEKeyId = 0xFFFF'FFFB'FFFF'FFFFULL; diff --git a/src/protocols/secure_channel/CASESession.cpp b/src/protocols/secure_channel/CASESession.cpp index 14be8805152995..e4722ea380ada6 100644 --- a/src/protocols/secure_channel/CASESession.cpp +++ b/src/protocols/secure_channel/CASESession.cpp @@ -1,3 +1,4 @@ + /* * * Copyright (c) 2021 Project CHIP Authors @@ -91,6 +92,7 @@ static constexpr ExchangeContext::Timeout kSigma_Response_Timeout = System::Cloc CASESession::CASESession() { + SetSecureSessionType(Transport::SecureSession::Type::kCASE); mTrustedRootId = CertificateKeyId(); } @@ -174,8 +176,12 @@ CHIP_ERROR CASESession::ToSerializable(CASESessionSerializable & serializable) serializable.mMessageDigestLen = LittleEndian::HostSwap16(static_cast(sizeof(mMessageDigest))); serializable.mVersion = kCASESessionVersion; serializable.mPeerNodeId = LittleEndian::HostSwap64(peerNodeId); - serializable.mLocalSessionId = LittleEndian::HostSwap16(GetLocalSessionId()); - serializable.mPeerSessionId = LittleEndian::HostSwap16(GetPeerSessionId()); + for (size_t i = 0; i < serializable.mPeerCATs.size(); i++) + { + serializable.mPeerCATs.val[i] = LittleEndian::HostSwap32(GetPeerCATs().val[i]); + } + serializable.mLocalSessionId = LittleEndian::HostSwap16(GetLocalSessionId()); + serializable.mPeerSessionId = LittleEndian::HostSwap16(GetPeerSessionId()); memcpy(serializable.mResumptionId, mResumptionId, sizeof(mResumptionId)); memcpy(serializable.mSharedSecret, mSharedSecret, mSharedSecret.Length()); @@ -198,6 +204,12 @@ CHIP_ERROR CASESession::FromSerializable(const CASESessionSerializable & seriali memcpy(mMessageDigest, serializable.mMessageDigest, length); SetPeerNodeId(LittleEndian::HostSwap64(serializable.mPeerNodeId)); + Credentials::CATValues peerCATs; + for (size_t i = 0; i < serializable.mPeerCATs.size(); i++) + { + peerCATs.val[i] = LittleEndian::HostSwap32(serializable.mPeerCATs.val[i]); + } + SetPeerCATs(peerCATs); SetLocalSessionId(LittleEndian::HostSwap16(serializable.mLocalSessionId)); SetPeerSessionId(LittleEndian::HostSwap16(serializable.mPeerSessionId)); @@ -863,6 +875,11 @@ CHIP_ERROR CASESession::HandleSigma2(System::PacketBufferHandle && msg) SuccessOrExit(err = decryptedDataTlvReader.Next(TLV::kTLVType_ByteString, TLV::ContextTag(kTag_TBEData_ResumptionID))); SuccessOrExit(err = decryptedDataTlvReader.GetBytes(mResumptionId, static_cast(sizeof(mResumptionId)))); + // Retrieve peer CASE Authenticated Tags (CATs) from peer's NOC. + Credentials::CATValues peerCATs; + SuccessOrExit(err = ExtractCATsFromOpCert(responderNOC, peerCATs)); + SetPeerCATs(peerCATs); + exit: if (err != CHIP_NO_ERROR) { @@ -1120,6 +1137,11 @@ CHIP_ERROR CASESession::HandleSigma3(System::PacketBufferHandle && msg) SuccessOrExit(err = mCommissioningHash.Finish(messageDigestSpan)); + // Retrieve peer CASE Authenticated Tags (CATs) from peer's NOC. + Credentials::CATValues peerCATs; + SuccessOrExit(err = ExtractCATsFromOpCert(initiatorNOC, peerCATs)); + SetPeerCATs(peerCATs); + SendStatusReport(mExchangeCtxt, kProtocolCodeSuccess); // TODO: Set timestamp on the new session, to allow selecting a least-recently-used session for eviction diff --git a/src/protocols/secure_channel/CASESession.h b/src/protocols/secure_channel/CASESession.h index 71cda76e5eabd7..860f28b9d28a51 100644 --- a/src/protocols/secure_channel/CASESession.h +++ b/src/protocols/secure_channel/CASESession.h @@ -68,6 +68,7 @@ struct CASESessionSerializable uint16_t mMessageDigestLen; uint8_t mMessageDigest[Crypto::kSHA256_Hash_Length]; NodeId mPeerNodeId; + Credentials::CATValues mPeerCATs; uint16_t mLocalSessionId; uint16_t mPeerSessionId; uint8_t mResumptionId[kCASEResumptionIDSize]; diff --git a/src/protocols/secure_channel/PASESession.cpp b/src/protocols/secure_channel/PASESession.cpp index bf777b51ad4711..10340d0ad29ed6 100644 --- a/src/protocols/secure_channel/PASESession.cpp +++ b/src/protocols/secure_channel/PASESession.cpp @@ -70,7 +70,10 @@ using PBKDF2_sha256_crypto = PBKDF2_sha256HSM; using PBKDF2_sha256_crypto = PBKDF2_sha256; #endif -PASESession::PASESession() {} +PASESession::PASESession() +{ + SetSecureSessionType(Transport::SecureSession::Type::kPASE); +} PASESession::~PASESession() { diff --git a/src/protocols/secure_channel/tests/TestCASESession.cpp b/src/protocols/secure_channel/tests/TestCASESession.cpp index 8de873cc2340b8..c925a3ebf64491 100644 --- a/src/protocols/secure_channel/tests/TestCASESession.cpp +++ b/src/protocols/secure_channel/tests/TestCASESession.cpp @@ -153,6 +153,11 @@ void CASE_SecurePairingWaitTest(nlTestSuite * inSuite, void * inContext) TestCASESessionIPK pairing; FabricTable fabrics; + NL_TEST_ASSERT(inSuite, pairing.GetSecureSessionType() == SecureSession::Type::kCASE); + Credentials::CATValues peerCATs; + peerCATs = pairing.GetPeerCATs(); + NL_TEST_ASSERT(inSuite, memcmp(&peerCATs, &kUndefinedCATs, sizeof(Credentials::CATValues)) == 0); + NL_TEST_ASSERT(inSuite, pairing.ListenForSessionEstablishment(0, nullptr, nullptr) == CHIP_ERROR_INVALID_ARGUMENT); NL_TEST_ASSERT(inSuite, pairing.ListenForSessionEstablishment(0, nullptr, &delegate) == CHIP_ERROR_INVALID_ARGUMENT); NL_TEST_ASSERT(inSuite, pairing.ListenForSessionEstablishment(0, &fabrics, &delegate) == CHIP_NO_ERROR); diff --git a/src/protocols/secure_channel/tests/TestPASESession.cpp b/src/protocols/secure_channel/tests/TestPASESession.cpp index 3d21abefeaaf40..ea1409047d6387 100644 --- a/src/protocols/secure_channel/tests/TestPASESession.cpp +++ b/src/protocols/secure_channel/tests/TestPASESession.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2020-2021 Project CHIP Authors * All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -101,6 +101,11 @@ void SecurePairingWaitTest(nlTestSuite * inSuite, void * inContext) TestSecurePairingDelegate delegate; PASESession pairing; + NL_TEST_ASSERT(inSuite, pairing.GetSecureSessionType() == SecureSession::Type::kPASE); + Credentials::CATValues peerCATs; + peerCATs = pairing.GetPeerCATs(); + NL_TEST_ASSERT(inSuite, memcmp(&peerCATs, &Credentials::kUndefinedCATs, sizeof(Credentials::CATValues)) == 0); + gLoopback.Reset(); NL_TEST_ASSERT(inSuite, pairing.WaitForPairing(1234, 500, ByteSpan(nullptr, 0), 0, &delegate) == CHIP_ERROR_INVALID_ARGUMENT); diff --git a/src/transport/PairingSession.h b/src/transport/PairingSession.h index c6cce25ddc720f..fa47f093313454 100644 --- a/src/transport/PairingSession.h +++ b/src/transport/PairingSession.h @@ -30,6 +30,7 @@ #include #include #include +#include namespace chip { @@ -39,11 +40,15 @@ class DLL_EXPORT PairingSession PairingSession() {} virtual ~PairingSession() {} + Transport::SecureSession::Type GetSecureSessionType() const { return mSecureSessionType; } + // TODO: the session should know which peer we are trying to connect to at start // mPeerNodeId should be const and assigned at the construction, such that GetPeerNodeId will never return kUndefinedNodeId, and // SetPeerNodeId is not necessary. NodeId GetPeerNodeId() const { return mPeerNodeId; } + Credentials::CATValues GetPeerCATs() const { return mPeerCATs; } + // TODO: the local key id should be allocateed at start // mLocalSessionId should be const and assigned at the construction, such that GetLocalSessionId will always return a valid key // id , and SetLocalSessionId is not necessary. @@ -98,7 +103,9 @@ class DLL_EXPORT PairingSession virtual const char * GetR2ISessionInfo() const = 0; protected: + void SetSecureSessionType(Transport::SecureSession::Type secureSessionType) { mSecureSessionType = secureSessionType; } void SetPeerNodeId(NodeId peerNodeId) { mPeerNodeId = peerNodeId; } + void SetPeerCATs(Credentials::CATValues peerCATs) { mPeerCATs = peerCATs; } void SetPeerSessionId(uint16_t id) { mPeerSessionId.SetValue(id); } void SetLocalSessionId(uint16_t id) { mLocalSessionId = id; } void SetPeerAddress(const Transport::PeerAddress & address) { mPeerAddress = address; } @@ -157,14 +164,18 @@ class DLL_EXPORT PairingSession // TODO: remove Clear, we should create a new instance instead reset the old instance. void Clear() { - mPeerNodeId = kUndefinedNodeId; - mPeerAddress = Transport::PeerAddress::Uninitialized(); + mSecureSessionType = Transport::SecureSession::Type::kUndefined; + mPeerNodeId = kUndefinedNodeId; + mPeerCATs = Credentials::kUndefinedCATs; + mPeerAddress = Transport::PeerAddress::Uninitialized(); mPeerSessionId.ClearValue(); mLocalSessionId = kInvalidKeyId; } private: - NodeId mPeerNodeId = kUndefinedNodeId; + Transport::SecureSession::Type mSecureSessionType = Transport::SecureSession::Type::kUndefined; + NodeId mPeerNodeId = kUndefinedNodeId; + Credentials::CATValues mPeerCATs = Credentials::kUndefinedCATs; // TODO: the local key id should be allocateed at start // then we can remove kInvalidKeyId diff --git a/src/transport/SecureSession.h b/src/transport/SecureSession.h index 733f1a9ded6bcd..3627d4da7d81a5 100644 --- a/src/transport/SecureSession.h +++ b/src/transport/SecureSession.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2020-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. @@ -22,6 +22,7 @@ #pragma once #include +#include #include #include #include @@ -38,8 +39,10 @@ static constexpr uint32_t kUndefinedMessageIndex = UINT32_MAX; * Defines state of a peer connection at a transport layer. * * Information contained within the state: + * - SecureSessionType represents CASE or PASE session * - PeerAddress represents how to talk to the peer * - PeerNodeId is the unique ID of the peer + * - PeerCATs represents CASE Authenticated Tags * - SendMessageIndex is an ever increasing index for sending messages * - LastActivityTime is a monotonic timestamp of when this connection was * last used. Inactive connections can expire. @@ -50,10 +53,23 @@ static constexpr uint32_t kUndefinedMessageIndex = UINT32_MAX; class SecureSession { public: - SecureSession(uint16_t localSessionId, NodeId peerNodeId, uint16_t peerSessionId, FabricIndex fabric, - const ReliableMessageProtocolConfig & config, System::Clock::Timestamp currentTime) : - mPeerNodeId(peerNodeId), - mLocalSessionId(localSessionId), mPeerSessionId(peerSessionId), mFabric(fabric), mMRPConfig(config) + /** + * @brief + * Defines SecureSession Type. Currently supported types are PASE and CASE. + */ + enum class Type : uint8_t + { + kUndefined = 0, + kPASE = 1, + kCASE = 2, + }; + + SecureSession(Type secureSessionType, uint16_t localSessionId, NodeId peerNodeId, Credentials::CATValues peerCATs, + uint16_t peerSessionId, FabricIndex fabric, const ReliableMessageProtocolConfig & config, + System::Clock::Timestamp currentTime) : + mSecureSessionType(secureSessionType), + mPeerNodeId(peerNodeId), mPeerCATs(peerCATs), mLocalSessionId(localSessionId), mPeerSessionId(peerSessionId), + mFabric(fabric), mMRPConfig(config) { SetLastActivityTime(currentTime); } @@ -67,7 +83,9 @@ class SecureSession PeerAddress & GetPeerAddress() { return mPeerAddress; } void SetPeerAddress(const PeerAddress & address) { mPeerAddress = address; } + Type GetSecureSessionType() const { return mSecureSessionType; } NodeId GetPeerNodeId() const { return mPeerNodeId; } + Credentials::CATValues GetPeerCATs() const { return mPeerCATs; } void SetMRPConfig(const ReliableMessageProtocolConfig & config) { mMRPConfig = config; } @@ -97,7 +115,9 @@ class SecureSession SessionMessageCounter & GetSessionMessageCounter() { return mSessionMessageCounter; } private: + const Type mSecureSessionType; const NodeId mPeerNodeId; + const Credentials::CATValues mPeerCATs; const uint16_t mLocalSessionId; const uint16_t mPeerSessionId; const FabricIndex mFabric; diff --git a/src/transport/SecureSessionTable.h b/src/transport/SecureSessionTable.h index 85a709bc81b027..27b3ad673dbeb9 100644 --- a/src/transport/SecureSessionTable.h +++ b/src/transport/SecureSessionTable.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2020-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. @@ -44,8 +44,10 @@ class SecureSessionTable /** * Allocates a new secure session out of the internal resource pool. * + * @param sessionType secure session type * @param localSessionId represents the encryption key ID assigned by local node * @param peerNodeId represents peer Node's ID + * @param peerCATs represents peer CASE Authenticated Tags * @param peerSessionId represents the encryption key ID assigned by peer node * @param fabric represents fabric ID for the session * @@ -55,10 +57,11 @@ class SecureSessionTable * has been reached (with CHIP_ERROR_NO_MEMORY). */ CHECK_RETURN_VALUE - SecureSession * CreateNewSecureSession(uint16_t localSessionId, NodeId peerNodeId, uint16_t peerSessionId, FabricIndex fabric, + SecureSession * CreateNewSecureSession(SecureSession::Type secureSessionType, uint16_t localSessionId, NodeId peerNodeId, + Credentials::CATValues peerCATs, uint16_t peerSessionId, FabricIndex fabric, const ReliableMessageProtocolConfig & config) { - return mEntries.CreateObject(localSessionId, peerNodeId, peerSessionId, fabric, config, + return mEntries.CreateObject(secureSessionType, localSessionId, peerNodeId, peerCATs, peerSessionId, fabric, config, mTimeSource.GetMonotonicTimestamp()); } diff --git a/src/transport/SessionManager.cpp b/src/transport/SessionManager.cpp index 65d3545bb7e7c5..549214193861a7 100644 --- a/src/transport/SessionManager.cpp +++ b/src/transport/SessionManager.cpp @@ -294,7 +294,8 @@ CHIP_ERROR SessionManager::NewPairing(const Optional & p ChipLogDetail(Inet, "New secure session created for device 0x" ChipLogFormatX64 ", key %d!!", ChipLogValueX64(peerNodeId), peerSessionId); - session = mSecureSessions.CreateNewSecureSession(localSessionId, peerNodeId, peerSessionId, fabric, pairing->GetMRPConfig()); + session = mSecureSessions.CreateNewSecureSession(pairing->GetSecureSessionType(), localSessionId, peerNodeId, + pairing->GetPeerCATs(), peerSessionId, fabric, pairing->GetMRPConfig()); ReturnErrorCodeIf(session == nullptr, CHIP_ERROR_NO_MEMORY); if (peerAddr.HasValue() && peerAddr.Value().GetIPAddress() != Inet::IPAddress::Any) diff --git a/src/transport/tests/TestPeerConnections.cpp b/src/transport/tests/TestPeerConnections.cpp index d8e3203be482e4..bee5e9cdfb7497 100644 --- a/src/transport/tests/TestPeerConnections.cpp +++ b/src/transport/tests/TestPeerConnections.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2020-2021 Project CHIP Authors * All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -52,24 +52,43 @@ const NodeId kPeer1NodeId = 123; const NodeId kPeer2NodeId = 6; const NodeId kPeer3NodeId = 81; +const SecureSession::Type kPeer1SessionType = SecureSession::Type::kCASE; +const SecureSession::Type kPeer2SessionType = SecureSession::Type::kCASE; +const SecureSession::Type kPeer3SessionType = SecureSession::Type::kPASE; + +const Credentials::CATValues kPeer1CATs = { { 0xABCD0001, 0xABCE0100, 0xABCD0020 } }; +const Credentials::CATValues kPeer2CATs = { { 0xABCD0012, Credentials::kUndefinedCAT, Credentials::kUndefinedCAT } }; +const Credentials::CATValues kPeer3CATs = Credentials::kUndefinedCATs; + void TestBasicFunctionality(nlTestSuite * inSuite, void * inContext) { SecureSession * statePtr; SecureSessionTable<2, Time::Source::kTest> connections; connections.GetTimeSource().SetMonotonicTimestamp(100_ms64); + Credentials::CATValues peerCATs; // Node ID 1, peer key 1, local key 2 - statePtr = connections.CreateNewSecureSession(2, kPeer1NodeId, 1, 0 /* fabricIndex */, gDefaultMRPConfig); + statePtr = connections.CreateNewSecureSession(kPeer1SessionType, 2, kPeer1NodeId, kPeer1CATs, 1, 0 /* fabricIndex */, + gDefaultMRPConfig); NL_TEST_ASSERT(inSuite, statePtr != nullptr); + NL_TEST_ASSERT(inSuite, statePtr->GetSecureSessionType() == kPeer1SessionType); + NL_TEST_ASSERT(inSuite, statePtr->GetPeerNodeId() == kPeer1NodeId); + peerCATs = statePtr->GetPeerCATs(); + NL_TEST_ASSERT(inSuite, memcmp(&peerCATs, &kPeer1CATs, sizeof(Credentials::CATValues)) == 0); // Node ID 2, peer key 3, local key 4 - statePtr = connections.CreateNewSecureSession(4, kPeer2NodeId, 3, 0 /* fabricIndex */, gDefaultMRPConfig); + statePtr = connections.CreateNewSecureSession(kPeer2SessionType, 4, kPeer2NodeId, kPeer2CATs, 3, 0 /* fabricIndex */, + gDefaultMRPConfig); NL_TEST_ASSERT(inSuite, statePtr != nullptr); + NL_TEST_ASSERT(inSuite, statePtr->GetSecureSessionType() == kPeer2SessionType); NL_TEST_ASSERT(inSuite, statePtr->GetPeerNodeId() == kPeer2NodeId); NL_TEST_ASSERT(inSuite, statePtr->GetLastActivityTime() == 100_ms64); + peerCATs = statePtr->GetPeerCATs(); + NL_TEST_ASSERT(inSuite, memcmp(&peerCATs, &kPeer2CATs, sizeof(Credentials::CATValues)) == 0); // Insufficient space for new connections. Object is max size 2 - statePtr = connections.CreateNewSecureSession(6, kPeer3NodeId, 5, 0 /* fabricIndex */, gDefaultMRPConfig); + statePtr = connections.CreateNewSecureSession(kPeer3SessionType, 6, kPeer3NodeId, kPeer3CATs, 5, 0 /* fabricIndex */, + gDefaultMRPConfig); NL_TEST_ASSERT(inSuite, statePtr == nullptr); } @@ -79,14 +98,16 @@ void TestFindByKeyId(nlTestSuite * inSuite, void * inContext) SecureSessionTable<2, Time::Source::kTest> connections; // Node ID 1, peer key 1, local key 2 - statePtr = connections.CreateNewSecureSession(2, kPeer1NodeId, 1, 0 /* fabricIndex */, gDefaultMRPConfig); + statePtr = connections.CreateNewSecureSession(kPeer1SessionType, 2, kPeer1NodeId, kPeer1CATs, 1, 0 /* fabricIndex */, + gDefaultMRPConfig); NL_TEST_ASSERT(inSuite, statePtr != nullptr); NL_TEST_ASSERT(inSuite, !connections.FindSecureSessionByLocalKey(1)); NL_TEST_ASSERT(inSuite, connections.FindSecureSessionByLocalKey(2)); // Node ID 2, peer key 3, local key 4 - statePtr = connections.CreateNewSecureSession(4, kPeer2NodeId, 3, 0 /* fabricIndex */, gDefaultMRPConfig); + statePtr = connections.CreateNewSecureSession(kPeer2SessionType, 4, kPeer2NodeId, kPeer2CATs, 3, 0 /* fabricIndex */, + gDefaultMRPConfig); NL_TEST_ASSERT(inSuite, statePtr != nullptr); NL_TEST_ASSERT(inSuite, !connections.FindSecureSessionByLocalKey(3)); @@ -109,19 +130,22 @@ void TestExpireConnections(nlTestSuite * inSuite, void * inContext) connections.GetTimeSource().SetMonotonicTimestamp(100_ms64); // Node ID 1, peer key 1, local key 2 - statePtr = connections.CreateNewSecureSession(2, kPeer1NodeId, 1, 0 /* fabricIndex */, gDefaultMRPConfig); + statePtr = connections.CreateNewSecureSession(kPeer1SessionType, 2, kPeer1NodeId, kPeer1CATs, 1, 0 /* fabricIndex */, + gDefaultMRPConfig); NL_TEST_ASSERT(inSuite, statePtr != nullptr); statePtr->SetPeerAddress(kPeer1Addr); connections.GetTimeSource().SetMonotonicTimestamp(200_ms64); // Node ID 2, peer key 3, local key 4 - statePtr = connections.CreateNewSecureSession(4, kPeer2NodeId, 3, 0 /* fabricIndex */, gDefaultMRPConfig); + statePtr = connections.CreateNewSecureSession(kPeer2SessionType, 4, kPeer2NodeId, kPeer2CATs, 3, 0 /* fabricIndex */, + gDefaultMRPConfig); NL_TEST_ASSERT(inSuite, statePtr != nullptr); statePtr->SetPeerAddress(kPeer2Addr); // cannot add before expiry connections.GetTimeSource().SetMonotonicTimestamp(300_ms64); - statePtr = connections.CreateNewSecureSession(6, kPeer3NodeId, 5, 0 /* fabricIndex */, gDefaultMRPConfig); + statePtr = connections.CreateNewSecureSession(kPeer3SessionType, 6, kPeer3NodeId, kPeer3CATs, 5, 0 /* fabricIndex */, + gDefaultMRPConfig); NL_TEST_ASSERT(inSuite, statePtr == nullptr); // at time 300, this expires ip addr 1 @@ -138,7 +162,8 @@ void TestExpireConnections(nlTestSuite * inSuite, void * inContext) // now that the connections were expired, we can add peer3 connections.GetTimeSource().SetMonotonicTimestamp(300_ms64); // Node ID 3, peer key 5, local key 6 - statePtr = connections.CreateNewSecureSession(6, kPeer3NodeId, 5, 0 /* fabricIndex */, gDefaultMRPConfig); + statePtr = connections.CreateNewSecureSession(kPeer3SessionType, 6, kPeer3NodeId, kPeer3CATs, 5, 0 /* fabricIndex */, + gDefaultMRPConfig); NL_TEST_ASSERT(inSuite, statePtr != nullptr); statePtr->SetPeerAddress(kPeer3Addr); @@ -169,7 +194,8 @@ void TestExpireConnections(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT(inSuite, !connections.FindSecureSessionByLocalKey(6)); // Node ID 1, peer key 1, local key 2 - statePtr = connections.CreateNewSecureSession(2, kPeer1NodeId, 1, 0 /* fabricIndex */, gDefaultMRPConfig); + statePtr = connections.CreateNewSecureSession(kPeer1SessionType, 2, kPeer1NodeId, kPeer1CATs, 1, 0 /* fabricIndex */, + gDefaultMRPConfig); NL_TEST_ASSERT(inSuite, statePtr != nullptr); NL_TEST_ASSERT(inSuite, connections.FindSecureSessionByLocalKey(2)); NL_TEST_ASSERT(inSuite, connections.FindSecureSessionByLocalKey(4)); From e1c501db3ef44264cf54ec8283d45243c5ccc157 Mon Sep 17 00:00:00 2001 From: C Freeman Date: Tue, 30 Nov 2021 01:31:25 -0500 Subject: [PATCH 28/42] Fix short code on dnssd advertising and chip-tool (#12319) * Fix short code on dnssd advertising and chip-tool The short discriminator is the UPPER four bits of the discriminator. * Update src/controller/SetUpCodePairer.cpp Co-authored-by: Tennessee Carmel-Veilleux * Update src/app/server/Dnssd.cpp Co-authored-by: Tennessee Carmel-Veilleux Co-authored-by: Justin Wood Co-authored-by: Tennessee Carmel-Veilleux --- src/app/server/Dnssd.cpp | 2 +- src/controller/SetUpCodePairer.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/app/server/Dnssd.cpp b/src/app/server/Dnssd.cpp index a9c1c6b78d006a..f4faaa79536840 100644 --- a/src/app/server/Dnssd.cpp +++ b/src/app/server/Dnssd.cpp @@ -320,7 +320,7 @@ CHIP_ERROR DnssdServer::Advertise(bool commissionableNode, chip::Dnssd::Commissi ChipLogError(Discovery, "Setup discriminator not known. Using a default."); value = 840; } - advertiseParameters.SetShortDiscriminator(static_cast(value & 0xFF)).SetLongDiscriminator(value); + advertiseParameters.SetShortDiscriminator(static_cast((value >> 8) & 0x0F)).SetLongDiscriminator(value); if (DeviceLayer::ConfigurationMgr().IsCommissionableDeviceTypeEnabled() && DeviceLayer::ConfigurationMgr().GetDeviceTypeId(value) == CHIP_NO_ERROR) diff --git a/src/controller/SetUpCodePairer.cpp b/src/controller/SetUpCodePairer.cpp index f4b7ac3ae6cfba..6763e7aa946075 100644 --- a/src/controller/SetUpCodePairer.cpp +++ b/src/controller/SetUpCodePairer.cpp @@ -64,7 +64,8 @@ CHIP_ERROR SetUpCodePairer::Connect(RendezvousInformationFlag rendezvousInformat if (searchOverAll || rendezvousInformation == RendezvousInformationFlag::kOnNetwork) { - if (CHIP_NO_ERROR == (err = StartDiscoverOverIP(discriminator, isShort))) + if (CHIP_NO_ERROR == + (err = StartDiscoverOverIP(isShort ? static_cast((discriminator >> 8) & 0x0F) : discriminator, isShort))) { isRunning = true; } From 2278e6ba290575e479aba344b03a5928b9fa98df Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Tue, 30 Nov 2021 01:40:08 -0500 Subject: [PATCH 29/42] Update ZAP to version that generates min/max information. (#12325) * Update ZAP to version that generates min/max information. The XML updates are based on examining the all-clusters app codegen and removing spurious min-max constraints that just restate the value range of the type (e.g. setting max to 0xFFFF for an int16u). A few attributes were made nullable in the process to remove an unnecessary constraint like max="0xFFFE" when the spec says range is all but the attribute is nullable. * Make generatedAttributes (and generatedDefaults, minMaxDefaults) constexpr. This should ensure that it does not accidentally end up in .data instead of .rodata. The main fix here is adding the constexpr constructor for EmberAfDefaultOrMinMaxAttributeValue that takes a EmberAfAttributeMinMaxValue*, which lets us remove the non-constexpr reinterpret_cast (coming from the C-style cast) to uint8_t* in ZAP_MIN_MAX_DEFAULTS_INDEX. The other fixes are just fixing long-standing const-correctness issues; this allows us to remove the implicit const_cast from ZAP_LONG_DEFAULTS_INDEX. --- examples/bridge-app/esp32/main/main.cpp | 2 +- examples/bridge-app/linux/main.cpp | 2 +- .../clusters/level-control/level-control.cpp | 10 +- src/app/util/af-types.h | 11 +- src/app/util/af.h | 2 +- src/app/util/attribute-storage.cpp | 21 +- src/app/util/util.cpp | 2 +- .../templates/app/endpoint_config.zapt | 4 +- .../chip/general-commissioning-cluster.xml | 2 +- ...pump-configuration-and-control-cluster.xml | 6 +- .../zcl/data-model/silabs/general.xml | 12 +- .../zcl/data-model/silabs/ha.xml | 10 +- .../java/zap-generated/CHIPClusters-JNI.cpp | 116 +++--- .../zap-generated/CHIPClustersRead-JNI.cpp | 34 +- .../java/zap-generated/CHIPReadCallbacks.cpp | 365 ++++++++++++++++++ .../java/zap-generated/CHIPReadCallbacks.h | 144 +++++++ .../chip/devicecontroller/ChipClusters.java | 100 +++-- .../devicecontroller/ClusterReadMapping.java | 23 +- .../devicecontroller/ClusterWriteMapping.java | 20 +- .../python/chip/clusters/CHIPClusters.py | 2 +- .../python/chip/clusters/Objects.py | 24 +- .../CHIP/zap-generated/CHIPClustersObjc.h | 13 +- .../CHIP/zap-generated/CHIPClustersObjc.mm | 166 +++++--- .../CHIP/zap-generated/CHIPTestClustersObjc.h | 3 +- .../zap-generated/CHIPTestClustersObjc.mm | 5 +- .../Framework/CHIPTests/CHIPClustersTests.m | 60 +-- third_party/zap/repo | 2 +- .../zap-generated/endpoint_config.h | 234 +++++++---- .../zap-generated/attributes/Accessors.cpp | 188 +++++++-- .../zap-generated/attributes/Accessors.h | 24 +- .../zap-generated/cluster-objects.h | 36 +- .../zap-generated/endpoint_config.h | 46 ++- .../zap-generated/cluster/Commands.h | 68 ++-- .../chip-tool/zap-generated/test/Commands.h | 11 +- .../zap-generated/CHIPClusters.cpp | 24 +- .../zap-generated/CHIPClusters.h | 4 +- .../zap-generated/endpoint_config.h | 4 +- .../zap-generated/tests/CHIPClustersTest.cpp | 8 +- .../zap-generated/tests/CHIPClustersTest.h | 4 +- .../zap-generated/endpoint_config.h | 73 ++-- .../lock-app/zap-generated/endpoint_config.h | 4 +- .../zap-generated/endpoint_config.h | 4 +- .../zap-generated/endpoint_config.h | 4 +- .../app1/zap-generated/endpoint_config.h | 25 +- .../app2/zap-generated/endpoint_config.h | 18 +- .../pump-app/zap-generated/endpoint_config.h | 33 +- .../zap-generated/endpoint_config.h | 4 +- .../zap-generated/endpoint_config.h | 4 +- .../zap-generated/endpoint_config.h | 59 ++- .../tv-app/zap-generated/endpoint_config.h | 46 ++- .../zap-generated/endpoint_config.h | 150 ++++--- .../zap-generated/endpoint_config.h | 39 +- 52 files changed, 1641 insertions(+), 634 deletions(-) diff --git a/examples/bridge-app/esp32/main/main.cpp b/examples/bridge-app/esp32/main/main.cpp index 81f195230085cd..cf5b5fe88ba5f8 100644 --- a/examples/bridge-app/esp32/main/main.cpp +++ b/examples/bridge-app/esp32/main/main.cpp @@ -334,7 +334,7 @@ void HandleDeviceStatusChanged(Device * dev, Device::Changed_t itemChangedMask) uint8_t buffer[kFixedLabelAttributeArraySize]; EmberAfAttributeMetadata am = { .attributeId = ZCL_LABEL_LIST_ATTRIBUTE_ID, .size = kFixedLabelAttributeArraySize, - .defaultValue = nullptr }; + .defaultValue = static_cast(0) }; EncodeFixedLabel("room", dev->GetLocation(), buffer, sizeof(buffer), &am); diff --git a/examples/bridge-app/linux/main.cpp b/examples/bridge-app/linux/main.cpp index 3f8ca3fceb3398..16b2a54da783d7 100644 --- a/examples/bridge-app/linux/main.cpp +++ b/examples/bridge-app/linux/main.cpp @@ -280,7 +280,7 @@ void HandleDeviceStatusChanged(Device * dev, Device::Changed_t itemChangedMask) uint8_t buffer[kFixedLabelAttributeArraySize]; EmberAfAttributeMetadata am = { .attributeId = ZCL_LABEL_LIST_ATTRIBUTE_ID, .size = kFixedLabelAttributeArraySize, - .defaultValue = nullptr }; + .defaultValue = static_cast(0) }; EncodeFixedLabel("room", dev->GetLocation(), buffer, sizeof(buffer), &am); diff --git a/src/app/clusters/level-control/level-control.cpp b/src/app/clusters/level-control/level-control.cpp index e7c5bf07c9035b..7e0b574bc994f7 100644 --- a/src/app/clusters/level-control/level-control.cpp +++ b/src/app/clusters/level-control/level-control.cpp @@ -700,9 +700,9 @@ static void moveHandler(CommandId commandId, uint8_t moveMode, uint8_t rate, uin // Otherwise, move as fast as possible if (rate == 0xFF) { - uint8_t defaultMoveRate; - status = Attributes::DefaultMoveRate::Get(endpoint, &defaultMoveRate); - if (status != EMBER_ZCL_STATUS_SUCCESS) + app::DataModel::Nullable defaultMoveRate; + status = Attributes::DefaultMoveRate::Get(endpoint, defaultMoveRate); + if (status != EMBER_ZCL_STATUS_SUCCESS || defaultMoveRate.IsNull()) { emberAfLevelControlClusterPrintln("ERR: reading default move rate %x", status); state->eventDurationMs = FASTEST_TRANSITION_TIME_MS; @@ -710,12 +710,12 @@ static void moveHandler(CommandId commandId, uint8_t moveMode, uint8_t rate, uin else { // nonsensical case, means "don't move", so we're done - if (defaultMoveRate == 0) + if (defaultMoveRate.Value() == 0) { status = EMBER_ZCL_STATUS_SUCCESS; goto send_default_response; } - state->eventDurationMs = MILLISECOND_TICKS_PER_SECOND / defaultMoveRate; + state->eventDurationMs = MILLISECOND_TICKS_PER_SECOND / defaultMoveRate.Value(); } } else diff --git a/src/app/util/af-types.h b/src/app/util/af-types.h index 3f521173e79eef..73d9f646c12577 100644 --- a/src/app/util/af-types.h +++ b/src/app/util/af-types.h @@ -101,7 +101,7 @@ typedef void (*EmberAfGenericClusterFunction)(void); */ union EmberAfDefaultAttributeValue { - constexpr EmberAfDefaultAttributeValue(uint8_t * ptr) : ptrToDefaultValue(ptr) {} + constexpr EmberAfDefaultAttributeValue(const uint8_t * ptr) : ptrToDefaultValue(ptr) {} constexpr EmberAfDefaultAttributeValue(uint16_t val) : defaultValue(val) {} /** @@ -109,7 +109,7 @@ union EmberAfDefaultAttributeValue * If size is more than 2 bytes, and this value is NULL, * then the default value is all zeroes. */ - uint8_t * ptrToDefaultValue; + const uint8_t * ptrToDefaultValue; /** * Actual default value if the attribute size is 2 bytes or less. @@ -144,15 +144,16 @@ typedef struct */ union EmberAfDefaultOrMinMaxAttributeValue { - constexpr EmberAfDefaultOrMinMaxAttributeValue(uint8_t * ptr) : ptrToDefaultValue(ptr) {} + constexpr EmberAfDefaultOrMinMaxAttributeValue(const uint8_t * ptr) : ptrToDefaultValue(ptr) {} constexpr EmberAfDefaultOrMinMaxAttributeValue(uint16_t val) : defaultValue(val) {} + constexpr EmberAfDefaultOrMinMaxAttributeValue(const EmberAfAttributeMinMaxValue * ptr) : ptrToMinMaxValue(ptr) {} /** * Points to data if size is more than 2 bytes. * If size is more than 2 bytes, and this value is NULL, * then the default value is all zeroes. */ - uint8_t * ptrToDefaultValue; + const uint8_t * ptrToDefaultValue; /** * Actual default value if the attribute size is 2 bytes or less. */ @@ -161,7 +162,7 @@ union EmberAfDefaultOrMinMaxAttributeValue * Points to the min max attribute value structure, if min/max is * supported for this attribute. */ - EmberAfAttributeMinMaxValue * ptrToMinMaxValue; + const EmberAfAttributeMinMaxValue * ptrToMinMaxValue; }; // Attribute masks modify how attributes are used by the framework diff --git a/src/app/util/af.h b/src/app/util/af.h index 2a9824fffb7a4d..a0a743c9c0cee2 100644 --- a/src/app/util/af.h +++ b/src/app/util/af.h @@ -732,7 +732,7 @@ uint8_t emberAfGetLastSequenceNumber(void); * greater than 4 is being compared * 1, if val2 is smaller. */ -int8_t emberAfCompareValues(uint8_t * val1, uint8_t * val2, uint16_t len, bool signedNumber); +int8_t emberAfCompareValues(const uint8_t * val1, const uint8_t * val2, uint16_t len, bool signedNumber); /** * @brief populates the passed EUI64 with the local EUI64 MAC address. diff --git a/src/app/util/attribute-storage.cpp b/src/app/util/attribute-storage.cpp index b542a224d31771..7cdd712a33ec12 100644 --- a/src/app/util/attribute-storage.cpp +++ b/src/app/util/attribute-storage.cpp @@ -68,6 +68,8 @@ EmberAfDefinedEndpoint emAfEndpoints[MAX_ENDPOINT_COUNT]; uint8_t attributeData[ACTUAL_ATTRIBUTE_SIZE]; +namespace { + #if (!defined(ATTRIBUTE_SINGLETONS_SIZE)) || (ATTRIBUTE_SINGLETONS_SIZE == 0) #define ACTUAL_SINGLETONS_SIZE 1 #else @@ -80,25 +82,25 @@ uint16_t emberEndpointCount = 0; // If we have attributes that are more than 2 bytes, then // we need this data block for the defaults #if (defined(GENERATED_DEFAULTS) && GENERATED_DEFAULTS_COUNT) -const uint8_t generatedDefaults[] = GENERATED_DEFAULTS; +constexpr const uint8_t generatedDefaults[] = GENERATED_DEFAULTS; #endif // GENERATED_DEFAULTS #if (defined(GENERATED_MIN_MAX_DEFAULTS) && GENERATED_MIN_MAX_DEFAULT_COUNT) -const EmberAfAttributeMinMaxValue minMaxDefaults[] = GENERATED_MIN_MAX_DEFAULTS; +constexpr const EmberAfAttributeMinMaxValue minMaxDefaults[] = GENERATED_MIN_MAX_DEFAULTS; #endif // GENERATED_MIN_MAX_DEFAULTS #ifdef GENERATED_FUNCTION_ARRAYS GENERATED_FUNCTION_ARRAYS #endif -const EmberAfAttributeMetadata generatedAttributes[] = GENERATED_ATTRIBUTES; -const EmberAfCluster generatedClusters[] = GENERATED_CLUSTERS; -const EmberAfEndpointType generatedEmberAfEndpointTypes[] = GENERATED_ENDPOINT_TYPES; +constexpr const EmberAfAttributeMetadata generatedAttributes[] = GENERATED_ATTRIBUTES; +constexpr const EmberAfCluster generatedClusters[] = GENERATED_CLUSTERS; +constexpr const EmberAfEndpointType generatedEmberAfEndpointTypes[] = GENERATED_ENDPOINT_TYPES; -const EmberAfManufacturerCodeEntry clusterManufacturerCodes[] = GENERATED_CLUSTER_MANUFACTURER_CODES; -const uint16_t clusterManufacturerCodeCount = GENERATED_CLUSTER_MANUFACTURER_CODE_COUNT; -const EmberAfManufacturerCodeEntry attributeManufacturerCodes[] = GENERATED_ATTRIBUTE_MANUFACTURER_CODES; -const uint16_t attributeManufacturerCodeCount = GENERATED_ATTRIBUTE_MANUFACTURER_CODE_COUNT; +constexpr const EmberAfManufacturerCodeEntry clusterManufacturerCodes[] = GENERATED_CLUSTER_MANUFACTURER_CODES; +constexpr const uint16_t clusterManufacturerCodeCount = GENERATED_CLUSTER_MANUFACTURER_CODE_COUNT; +constexpr const EmberAfManufacturerCodeEntry attributeManufacturerCodes[] = GENERATED_ATTRIBUTE_MANUFACTURER_CODES; +constexpr const uint16_t attributeManufacturerCodeCount = GENERATED_ATTRIBUTE_MANUFACTURER_CODE_COUNT; #if !defined(EMBER_SCRIPTED_TEST) #define endpointNumber(x) fixedEndpoints[x] @@ -109,7 +111,6 @@ const uint16_t attributeManufacturerCodeCount = GENERATED_ATTR #define endpointNetworkIndex(x) fixedNetworks[x] #endif -namespace { app::AttributeAccessInterface * gAttributeAccessOverrides = nullptr; } // anonymous namespace diff --git a/src/app/util/util.cpp b/src/app/util/util.cpp index b7b3eba24c6370..06dd3f17f1d3d1 100644 --- a/src/app/util/util.cpp +++ b/src/app/util/util.cpp @@ -899,7 +899,7 @@ void emberAfCopyLongString(uint8_t * dest, const uint8_t * src, size_t size) // You can pass in val1 as NULL, which will assume that it is // pointing to an array of all zeroes. This is used so that // default value of NULL is treated as all zeroes. -int8_t emberAfCompareValues(uint8_t * val1, uint8_t * val2, uint16_t len, bool signedNumber) +int8_t emberAfCompareValues(const uint8_t * val1, const uint8_t * val2, uint16_t len, bool signedNumber) { uint8_t i, j, k; if (signedNumber) diff --git a/src/app/zap-templates/templates/app/endpoint_config.zapt b/src/app/zap-templates/templates/app/endpoint_config.zapt index aecf3b6beb3760..ed461482774e51 100644 --- a/src/app/zap-templates/templates/app/endpoint_config.zapt +++ b/src/app/zap-templates/templates/app/endpoint_config.zapt @@ -19,8 +19,8 @@ #define GENERATED_DEFAULTS_COUNT ({{endpoint_attribute_long_defaults_count}}) #define ZAP_TYPE(type) ZCL_ ## type ## _ATTRIBUTE_TYPE -#define ZAP_LONG_DEFAULTS_INDEX(index) {(uint8_t*)(&generatedDefaults[index])} -#define ZAP_MIN_MAX_DEFAULTS_INDEX(index) {(uint8_t*)(&minMaxDefault[index])} +#define ZAP_LONG_DEFAULTS_INDEX(index) { &generatedDefaults[index] } +#define ZAP_MIN_MAX_DEFAULTS_INDEX(index) { &minMaxDefaults[index] } #define ZAP_EMPTY_DEFAULT() {(uint16_t) 0} #define ZAP_SIMPLE_DEFAULT(x) {(uint16_t) x} diff --git a/src/app/zap-templates/zcl/data-model/chip/general-commissioning-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/general-commissioning-cluster.xml index 0957d69b704b3a..b57c7b0e2dccac 100644 --- a/src/app/zap-templates/zcl/data-model/chip/general-commissioning-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/general-commissioning-cluster.xml @@ -39,7 +39,7 @@ limitations under the License. 0x0030 GENERAL_COMMISSIONING_CLUSTER This cluster is used to set, remove and update fabric information on a commissionee. - Breadcrumb + Breadcrumb BasicCommissioningInfoList RegulatoryConfig LocationCapability diff --git a/src/app/zap-templates/zcl/data-model/chip/pump-configuration-and-control-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/pump-configuration-and-control-cluster.xml index 49b8eba20042ac..7adb0526d4da62 100644 --- a/src/app/zap-templates/zcl/data-model/chip/pump-configuration-and-control-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/pump-configuration-and-control-cluster.xml @@ -42,9 +42,9 @@ limitations under the License. EffectiveControlMode Capacity Speed - LifetimeRunningHours - Power - LifetimeEnergyConsumed + LifetimeRunningHours + Power + LifetimeEnergyConsumed OperationMode ControlMode AlarmMask diff --git a/src/app/zap-templates/zcl/data-model/silabs/general.xml b/src/app/zap-templates/zcl/data-model/silabs/general.xml index a450ab952afc09..c645bb2ac60628 100644 --- a/src/app/zap-templates/zcl/data-model/silabs/general.xml +++ b/src/app/zap-templates/zcl/data-model/silabs/general.xml @@ -400,13 +400,13 @@ limitations under the License. min frequency max frequency - on off transition time - on level - on transition time - off transition time - default move rate + on off transition time + on level + on transition time + off transition time + default move rate options - start up current level + start up current level Command description for MoveToLevel diff --git a/src/app/zap-templates/zcl/data-model/silabs/ha.xml b/src/app/zap-templates/zcl/data-model/silabs/ha.xml index 7c62eab8335073..96f836b1534510 100644 --- a/src/app/zap-templates/zcl/data-model/silabs/ha.xml +++ b/src/app/zap-templates/zcl/data-model/silabs/ha.xml @@ -222,7 +222,7 @@ limitations under the License. color mode - color control options + color control options number of primaries @@ -270,22 +270,22 @@ limitations under the License. color point r y - color point r intensity + color point r intensity color point g x color point g y - color point g intensity + color point g intensity color point b x color point b y - color point b intensity + color point b intensity couple color temp to level min-mireds - start up color temperature mireds + start up color temperature mireds Move to specified hue. diff --git a/src/controller/java/zap-generated/CHIPClusters-JNI.cpp b/src/controller/java/zap-generated/CHIPClusters-JNI.cpp index fd633a08d910ba..bfa2721834f9bc 100644 --- a/src/controller/java/zap-generated/CHIPClusters-JNI.cpp +++ b/src/controller/java/zap-generated/CHIPClusters-JNI.cpp @@ -14857,7 +14857,12 @@ JNI_METHOD(void, LevelControlCluster, writeOnLevelAttribute) using TypeInfo = chip::app::Clusters::LevelControl::Attributes::OnLevel::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + uint8_t valueValue; + if (value != nullptr) + { + valueValue = chip::JniReferences::GetInstance().IntegerToPrimitive(value); + } + cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -14949,7 +14954,12 @@ JNI_METHOD(void, LevelControlCluster, writeOnTransitionTimeAttribute) using TypeInfo = chip::app::Clusters::LevelControl::Attributes::OnTransitionTime::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + uint16_t valueValue; + if (value != nullptr) + { + valueValue = chip::JniReferences::GetInstance().IntegerToPrimitive(value); + } + cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -15042,7 +15052,12 @@ JNI_METHOD(void, LevelControlCluster, writeOffTransitionTimeAttribute) using TypeInfo = chip::app::Clusters::LevelControl::Attributes::OffTransitionTime::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + uint16_t valueValue; + if (value != nullptr) + { + valueValue = chip::JniReferences::GetInstance().IntegerToPrimitive(value); + } + cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -15135,7 +15150,12 @@ JNI_METHOD(void, LevelControlCluster, writeDefaultMoveRateAttribute) using TypeInfo = chip::app::Clusters::LevelControl::Attributes::DefaultMoveRate::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + uint8_t valueValue; + if (value != nullptr) + { + valueValue = chip::JniReferences::GetInstance().IntegerToPrimitive(value); + } + cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -21498,7 +21518,12 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, writeLifetimeRunningHoursAt using TypeInfo = chip::app::Clusters::PumpConfigurationAndControl::Attributes::LifetimeRunningHours::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(value)); + uint32_t valueValue; + if (value != nullptr) + { + valueValue = chip::JniReferences::GetInstance().LongToPrimitive(value); + } + cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -21583,44 +21608,6 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, reportLifetimeRunningHoursA onReport.release(); } - -JNI_METHOD(void, PumpConfigurationAndControlCluster, writePowerAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) -{ - chip::DeviceLayer::StackLock lock; - using TypeInfo = chip::app::Clusters::PumpConfigurationAndControl::Attributes::Power::TypeInfo; - TypeInfo::Type cppValue; - - cppValue = static_cast(chip::JniReferences::GetInstance().LongToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - PumpConfigurationAndControlCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribePowerAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { @@ -21676,6 +21663,49 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, reportPowerAttribute) onReport.release(); } + +JNI_METHOD(void, PumpConfigurationAndControlCluster, writeLifetimeEnergyConsumedAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo; + TypeInfo::Type cppValue; + + uint32_t valueValue; + if (value != nullptr) + { + valueValue = chip::JniReferences::GetInstance().LongToPrimitive(value); + } + cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + PumpConfigurationAndControlCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + onSuccess.release(); + onFailure.release(); +} JNI_METHOD(void, PumpConfigurationAndControlCluster, subscribeLifetimeEnergyConsumedAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { diff --git a/src/controller/java/zap-generated/CHIPClustersRead-JNI.cpp b/src/controller/java/zap-generated/CHIPClustersRead-JNI.cpp index bdfc5352879140..dbe1f03f36ecc1 100644 --- a/src/controller/java/zap-generated/CHIPClustersRead-JNI.cpp +++ b/src/controller/java/zap-generated/CHIPClustersRead-JNI.cpp @@ -7059,8 +7059,9 @@ JNI_METHOD(void, LevelControlCluster, readOnLevelAttribute)(JNIEnv * env, jobjec { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::LevelControl::Attributes::OnLevel::TypeInfo; - std::unique_ptr onSuccess( - chip::Platform::New(callback, false), chip::Platform::Delete); + std::unique_ptr onSuccess( + chip::Platform::New(callback, false), + chip::Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); @@ -7093,8 +7094,10 @@ JNI_METHOD(void, LevelControlCluster, readOnTransitionTimeAttribute)(JNIEnv * en { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::LevelControl::Attributes::OnTransitionTime::TypeInfo; - std::unique_ptr onSuccess( - chip::Platform::New(callback, false), chip::Platform::Delete); + std::unique_ptr + onSuccess(chip::Platform::New(callback, false), + chip::Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); @@ -7128,8 +7131,10 @@ JNI_METHOD(void, LevelControlCluster, readOffTransitionTimeAttribute) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::LevelControl::Attributes::OffTransitionTime::TypeInfo; - std::unique_ptr onSuccess( - chip::Platform::New(callback, false), chip::Platform::Delete); + std::unique_ptr + onSuccess(chip::Platform::New(callback, false), + chip::Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); @@ -7162,8 +7167,9 @@ JNI_METHOD(void, LevelControlCluster, readDefaultMoveRateAttribute)(JNIEnv * env { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::LevelControl::Attributes::DefaultMoveRate::TypeInfo; - std::unique_ptr onSuccess( - chip::Platform::New(callback, false), chip::Platform::Delete); + std::unique_ptr + onSuccess(chip::Platform::New(callback, false), + chip::Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); @@ -10041,8 +10047,10 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, readLifetimeRunningHoursAtt { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::PumpConfigurationAndControl::Attributes::LifetimeRunningHours::TypeInfo; - std::unique_ptr onSuccess( - chip::Platform::New(callback, false), chip::Platform::Delete); + std::unique_ptr + onSuccess(chip::Platform::New(callback, false), + chip::Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); @@ -10114,8 +10122,10 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, readLifetimeEnergyConsumedA { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo; - std::unique_ptr onSuccess( - chip::Platform::New(callback, false), chip::Platform::Delete); + std::unique_ptr + onSuccess(chip::Platform::New(callback, false), + chip::Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp index 91224b9f9a213f..1757b07ab7d603 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp @@ -2901,6 +2901,247 @@ void CHIPIlluminanceMeasurementLightSensorTypeAttributeCallback::CallbackFn(void env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } +CHIPLevelControlOnLevelAttributeCallback::CHIPLevelControlOnLevelAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPLevelControlOnLevelAttributeCallback::~CHIPLevelControlOnLevelAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPLevelControlOnLevelAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPLevelControlOnTransitionTimeAttributeCallback::CHIPLevelControlOnTransitionTimeAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPLevelControlOnTransitionTimeAttributeCallback::~CHIPLevelControlOnTransitionTimeAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPLevelControlOnTransitionTimeAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPLevelControlOffTransitionTimeAttributeCallback::CHIPLevelControlOffTransitionTimeAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPLevelControlOffTransitionTimeAttributeCallback::~CHIPLevelControlOffTransitionTimeAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPLevelControlOffTransitionTimeAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPLevelControlDefaultMoveRateAttributeCallback::CHIPLevelControlDefaultMoveRateAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPLevelControlDefaultMoveRateAttributeCallback::~CHIPLevelControlDefaultMoveRateAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPLevelControlDefaultMoveRateAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + CHIPMediaInputMediaInputListAttributeCallback::CHIPMediaInputMediaInputListAttributeCallback(jobject javaCallback, bool keepAlive) : chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { @@ -3597,6 +3838,130 @@ void CHIPPowerSourceActiveBatteryFaultsAttributeCallback::CallbackFn(void * cont env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } +CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback:: + CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback:: + ~CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback:: + CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback:: + ~CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + CHIPSoftwareDiagnosticsThreadMetricsAttributeCallback::CHIPSoftwareDiagnosticsThreadMetricsAttributeCallback(jobject javaCallback, bool keepAlive) : chip::Callback::Callback(CallbackFn, this), diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.h b/src/controller/java/zap-generated/CHIPReadCallbacks.h index 32cf00fb2cda1f..42c1b6fd3fb3f2 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.h +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.h @@ -818,6 +818,102 @@ class CHIPIlluminanceMeasurementLightSensorTypeAttributeCallback bool keepAlive; }; +class CHIPLevelControlOnLevelAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPLevelControlOnLevelAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPLevelControlOnLevelAttributeCallback(); + + static void maybeDestroy(CHIPLevelControlOnLevelAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::Nullable & value); + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPLevelControlOnTransitionTimeAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPLevelControlOnTransitionTimeAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPLevelControlOnTransitionTimeAttributeCallback(); + + static void maybeDestroy(CHIPLevelControlOnTransitionTimeAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::Nullable & value); + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPLevelControlOffTransitionTimeAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPLevelControlOffTransitionTimeAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPLevelControlOffTransitionTimeAttributeCallback(); + + static void maybeDestroy(CHIPLevelControlOffTransitionTimeAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::Nullable & value); + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPLevelControlDefaultMoveRateAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPLevelControlDefaultMoveRateAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPLevelControlDefaultMoveRateAttributeCallback(); + + static void maybeDestroy(CHIPLevelControlDefaultMoveRateAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::Nullable & value); + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + class CHIPMediaInputMediaInputListAttributeCallback : public chip::Callback::Callback { @@ -969,6 +1065,54 @@ class CHIPPowerSourceActiveBatteryFaultsAttributeCallback bool keepAlive; }; +class CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback(); + + static void maybeDestroy(CHIPPumpConfigurationAndControlLifetimeRunningHoursAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::Nullable & value); + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback(); + + static void maybeDestroy(CHIPPumpConfigurationAndControlLifetimeEnergyConsumedAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::Nullable & value); + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + class CHIPSoftwareDiagnosticsThreadMetricsAttributeCallback : public chip::Callback::Callback { diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java index 8071305635fa7a..d7d62617896d00 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java @@ -6408,6 +6408,30 @@ private native void stop( private native void stopWithOnOff(long chipClusterPtr, DefaultClusterCallback Callback); + public interface OnLevelAttributeCallback { + void onSuccess(@Nullable Integer value); + + void onError(Exception ex); + } + + public interface OnTransitionTimeAttributeCallback { + void onSuccess(@Nullable Integer value); + + void onError(Exception ex); + } + + public interface OffTransitionTimeAttributeCallback { + void onSuccess(@Nullable Integer value); + + void onError(Exception ex); + } + + public interface DefaultMoveRateAttributeCallback { + void onSuccess(@Nullable Integer value); + + void onError(Exception ex); + } + public void readCurrentLevelAttribute(IntegerAttributeCallback callback) { readCurrentLevelAttribute(chipClusterPtr, callback); } @@ -6533,11 +6557,11 @@ public void reportOnOffTransitionTimeAttribute(IntegerAttributeCallback callback reportOnOffTransitionTimeAttribute(chipClusterPtr, callback); } - public void readOnLevelAttribute(IntegerAttributeCallback callback) { + public void readOnLevelAttribute(OnLevelAttributeCallback callback) { readOnLevelAttribute(chipClusterPtr, callback); } - public void writeOnLevelAttribute(DefaultClusterCallback callback, Integer value) { + public void writeOnLevelAttribute(DefaultClusterCallback callback, @Nullable Integer value) { writeOnLevelAttribute(chipClusterPtr, callback, value); } @@ -6550,11 +6574,12 @@ public void reportOnLevelAttribute(IntegerAttributeCallback callback) { reportOnLevelAttribute(chipClusterPtr, callback); } - public void readOnTransitionTimeAttribute(IntegerAttributeCallback callback) { + public void readOnTransitionTimeAttribute(OnTransitionTimeAttributeCallback callback) { readOnTransitionTimeAttribute(chipClusterPtr, callback); } - public void writeOnTransitionTimeAttribute(DefaultClusterCallback callback, Integer value) { + public void writeOnTransitionTimeAttribute( + DefaultClusterCallback callback, @Nullable Integer value) { writeOnTransitionTimeAttribute(chipClusterPtr, callback, value); } @@ -6567,11 +6592,12 @@ public void reportOnTransitionTimeAttribute(IntegerAttributeCallback callback) { reportOnTransitionTimeAttribute(chipClusterPtr, callback); } - public void readOffTransitionTimeAttribute(IntegerAttributeCallback callback) { + public void readOffTransitionTimeAttribute(OffTransitionTimeAttributeCallback callback) { readOffTransitionTimeAttribute(chipClusterPtr, callback); } - public void writeOffTransitionTimeAttribute(DefaultClusterCallback callback, Integer value) { + public void writeOffTransitionTimeAttribute( + DefaultClusterCallback callback, @Nullable Integer value) { writeOffTransitionTimeAttribute(chipClusterPtr, callback, value); } @@ -6584,11 +6610,12 @@ public void reportOffTransitionTimeAttribute(IntegerAttributeCallback callback) reportOffTransitionTimeAttribute(chipClusterPtr, callback); } - public void readDefaultMoveRateAttribute(IntegerAttributeCallback callback) { + public void readDefaultMoveRateAttribute(DefaultMoveRateAttributeCallback callback) { readDefaultMoveRateAttribute(chipClusterPtr, callback); } - public void writeDefaultMoveRateAttribute(DefaultClusterCallback callback, Integer value) { + public void writeDefaultMoveRateAttribute( + DefaultClusterCallback callback, @Nullable Integer value) { writeDefaultMoveRateAttribute(chipClusterPtr, callback, value); } @@ -6719,10 +6746,10 @@ private native void reportOnOffTransitionTimeAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void readOnLevelAttribute( - long chipClusterPtr, IntegerAttributeCallback callback); + long chipClusterPtr, OnLevelAttributeCallback callback); private native void writeOnLevelAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, DefaultClusterCallback callback, @Nullable Integer value); private native void subscribeOnLevelAttribute( long chipClusterPtr, DefaultClusterCallback callback, int minInterval, int maxInterval); @@ -6731,10 +6758,10 @@ private native void reportOnLevelAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void readOnTransitionTimeAttribute( - long chipClusterPtr, IntegerAttributeCallback callback); + long chipClusterPtr, OnTransitionTimeAttributeCallback callback); private native void writeOnTransitionTimeAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, DefaultClusterCallback callback, @Nullable Integer value); private native void subscribeOnTransitionTimeAttribute( long chipClusterPtr, DefaultClusterCallback callback, int minInterval, int maxInterval); @@ -6743,10 +6770,10 @@ private native void reportOnTransitionTimeAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void readOffTransitionTimeAttribute( - long chipClusterPtr, IntegerAttributeCallback callback); + long chipClusterPtr, OffTransitionTimeAttributeCallback callback); private native void writeOffTransitionTimeAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, DefaultClusterCallback callback, @Nullable Integer value); private native void subscribeOffTransitionTimeAttribute( long chipClusterPtr, DefaultClusterCallback callback, int minInterval, int maxInterval); @@ -6755,10 +6782,10 @@ private native void reportOffTransitionTimeAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void readDefaultMoveRateAttribute( - long chipClusterPtr, IntegerAttributeCallback callback); + long chipClusterPtr, DefaultMoveRateAttributeCallback callback); private native void writeDefaultMoveRateAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Integer value); + long chipClusterPtr, DefaultClusterCallback callback, @Nullable Integer value); private native void subscribeDefaultMoveRateAttribute( long chipClusterPtr, DefaultClusterCallback callback, int minInterval, int maxInterval); @@ -9013,6 +9040,18 @@ public static long clusterId() { @Override public native long initWithDevice(long devicePtr, int endpointId); + public interface LifetimeRunningHoursAttributeCallback { + void onSuccess(@Nullable Long value); + + void onError(Exception ex); + } + + public interface LifetimeEnergyConsumedAttributeCallback { + void onSuccess(@Nullable Long value); + + void onError(Exception ex); + } + public void readMaxPressureAttribute(IntegerAttributeCallback callback) { readMaxPressureAttribute(chipClusterPtr, callback); } @@ -9247,11 +9286,12 @@ public void reportSpeedAttribute(IntegerAttributeCallback callback) { reportSpeedAttribute(chipClusterPtr, callback); } - public void readLifetimeRunningHoursAttribute(LongAttributeCallback callback) { + public void readLifetimeRunningHoursAttribute(LifetimeRunningHoursAttributeCallback callback) { readLifetimeRunningHoursAttribute(chipClusterPtr, callback); } - public void writeLifetimeRunningHoursAttribute(DefaultClusterCallback callback, Long value) { + public void writeLifetimeRunningHoursAttribute( + DefaultClusterCallback callback, @Nullable Long value) { writeLifetimeRunningHoursAttribute(chipClusterPtr, callback, value); } @@ -9268,10 +9308,6 @@ public void readPowerAttribute(LongAttributeCallback callback) { readPowerAttribute(chipClusterPtr, callback); } - public void writePowerAttribute(DefaultClusterCallback callback, Long value) { - writePowerAttribute(chipClusterPtr, callback, value); - } - public void subscribePowerAttribute( DefaultClusterCallback callback, int minInterval, int maxInterval) { subscribePowerAttribute(chipClusterPtr, callback, minInterval, maxInterval); @@ -9281,10 +9317,16 @@ public void reportPowerAttribute(LongAttributeCallback callback) { reportPowerAttribute(chipClusterPtr, callback); } - public void readLifetimeEnergyConsumedAttribute(LongAttributeCallback callback) { + public void readLifetimeEnergyConsumedAttribute( + LifetimeEnergyConsumedAttributeCallback callback) { readLifetimeEnergyConsumedAttribute(chipClusterPtr, callback); } + public void writeLifetimeEnergyConsumedAttribute( + DefaultClusterCallback callback, @Nullable Long value) { + writeLifetimeEnergyConsumedAttribute(chipClusterPtr, callback, value); + } + public void subscribeLifetimeEnergyConsumedAttribute( DefaultClusterCallback callback, int minInterval, int maxInterval) { subscribeLifetimeEnergyConsumedAttribute(chipClusterPtr, callback, minInterval, maxInterval); @@ -9529,10 +9571,10 @@ private native void reportSpeedAttribute( long chipClusterPtr, IntegerAttributeCallback callback); private native void readLifetimeRunningHoursAttribute( - long chipClusterPtr, LongAttributeCallback callback); + long chipClusterPtr, LifetimeRunningHoursAttributeCallback callback); private native void writeLifetimeRunningHoursAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Long value); + long chipClusterPtr, DefaultClusterCallback callback, @Nullable Long value); private native void subscribeLifetimeRunningHoursAttribute( long chipClusterPtr, DefaultClusterCallback callback, int minInterval, int maxInterval); @@ -9542,16 +9584,16 @@ private native void reportLifetimeRunningHoursAttribute( private native void readPowerAttribute(long chipClusterPtr, LongAttributeCallback callback); - private native void writePowerAttribute( - long chipClusterPtr, DefaultClusterCallback callback, Long value); - private native void subscribePowerAttribute( long chipClusterPtr, DefaultClusterCallback callback, int minInterval, int maxInterval); private native void reportPowerAttribute(long chipClusterPtr, LongAttributeCallback callback); private native void readLifetimeEnergyConsumedAttribute( - long chipClusterPtr, LongAttributeCallback callback); + long chipClusterPtr, LifetimeEnergyConsumedAttributeCallback callback); + + private native void writeLifetimeEnergyConsumedAttribute( + long chipClusterPtr, DefaultClusterCallback callback, @Nullable Long value); private native void subscribeLifetimeEnergyConsumedAttribute( long chipClusterPtr, DefaultClusterCallback callback, int minInterval, int maxInterval); diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java index 29253fdf7f55a6..6fd0677571103f 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java @@ -2632,7 +2632,8 @@ public Map> getReadAttributeMap() { new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.LevelControlCluster) cluster) - .readOnLevelAttribute((ChipClusters.IntegerAttributeCallback) callback); + .readOnLevelAttribute( + (ChipClusters.LevelControlCluster.OnLevelAttributeCallback) callback); }, () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), readLevelControlOnLevelCommandParams); @@ -2644,7 +2645,9 @@ public Map> getReadAttributeMap() { new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.LevelControlCluster) cluster) - .readOnTransitionTimeAttribute((ChipClusters.IntegerAttributeCallback) callback); + .readOnTransitionTimeAttribute( + (ChipClusters.LevelControlCluster.OnTransitionTimeAttributeCallback) + callback); }, () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), readLevelControlOnTransitionTimeCommandParams); @@ -2656,7 +2659,9 @@ public Map> getReadAttributeMap() { new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.LevelControlCluster) cluster) - .readOffTransitionTimeAttribute((ChipClusters.IntegerAttributeCallback) callback); + .readOffTransitionTimeAttribute( + (ChipClusters.LevelControlCluster.OffTransitionTimeAttributeCallback) + callback); }, () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), readLevelControlOffTransitionTimeCommandParams); @@ -2669,7 +2674,8 @@ public Map> getReadAttributeMap() { new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.LevelControlCluster) cluster) - .readDefaultMoveRateAttribute((ChipClusters.IntegerAttributeCallback) callback); + .readDefaultMoveRateAttribute( + (ChipClusters.LevelControlCluster.DefaultMoveRateAttributeCallback) callback); }, () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), readLevelControlDefaultMoveRateCommandParams); @@ -3739,7 +3745,10 @@ public Map> getReadAttributeMap() { new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.PumpConfigurationAndControlCluster) cluster) - .readLifetimeRunningHoursAttribute((ChipClusters.LongAttributeCallback) callback); + .readLifetimeRunningHoursAttribute( + (ChipClusters.PumpConfigurationAndControlCluster + .LifetimeRunningHoursAttributeCallback) + callback); }, () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), readPumpConfigurationAndControlLifetimeRunningHoursCommandParams); @@ -3766,7 +3775,9 @@ public Map> getReadAttributeMap() { (cluster, callback, commandArguments) -> { ((ChipClusters.PumpConfigurationAndControlCluster) cluster) .readLifetimeEnergyConsumedAttribute( - (ChipClusters.LongAttributeCallback) callback); + (ChipClusters.PumpConfigurationAndControlCluster + .LifetimeEnergyConsumedAttributeCallback) + callback); }, () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), readPumpConfigurationAndControlLifetimeEnergyConsumedCommandParams); diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterWriteMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterWriteMapping.java index 6bdafa664badf4..4955c3f1e16f10 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterWriteMapping.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterWriteMapping.java @@ -723,23 +723,25 @@ public Map> getWriteAttributeMap() { writePumpConfigurationAndControlInteractionInfo.put( "writeLifetimeRunningHoursAttribute", writePumpConfigurationAndControlLifetimeRunningHoursAttributeInteractionInfo); - Map writePumpConfigurationAndControlPowerCommandParams = - new LinkedHashMap(); - CommandParameterInfo pumpConfigurationAndControlpowerCommandParameterInfo = + Map + writePumpConfigurationAndControlLifetimeEnergyConsumedCommandParams = + new LinkedHashMap(); + CommandParameterInfo pumpConfigurationAndControllifetimeEnergyConsumedCommandParameterInfo = new CommandParameterInfo("value", long.class); - writePumpConfigurationAndControlPowerCommandParams.put( - "value", pumpConfigurationAndControlpowerCommandParameterInfo); - InteractionInfo writePumpConfigurationAndControlPowerAttributeInteractionInfo = + writePumpConfigurationAndControlLifetimeEnergyConsumedCommandParams.put( + "value", pumpConfigurationAndControllifetimeEnergyConsumedCommandParameterInfo); + InteractionInfo writePumpConfigurationAndControlLifetimeEnergyConsumedAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.PumpConfigurationAndControlCluster) cluster) - .writePowerAttribute( + .writeLifetimeEnergyConsumedAttribute( (DefaultClusterCallback) callback, (Long) commandArguments.get("value")); }, () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), - writePumpConfigurationAndControlPowerCommandParams); + writePumpConfigurationAndControlLifetimeEnergyConsumedCommandParams); writePumpConfigurationAndControlInteractionInfo.put( - "writePowerAttribute", writePumpConfigurationAndControlPowerAttributeInteractionInfo); + "writeLifetimeEnergyConsumedAttribute", + writePumpConfigurationAndControlLifetimeEnergyConsumedAttributeInteractionInfo); Map writePumpConfigurationAndControlOperationModeCommandParams = new LinkedHashMap(); CommandParameterInfo pumpConfigurationAndControloperationModeCommandParameterInfo = diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index 7061df2e9d6e38..f23de9067db3fd 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -3242,13 +3242,13 @@ class ChipClusters: "attributeId": 0x00000016, "type": "int", "reportable": True, - "writable": True, }, 0x00000017: { "attributeName": "LifetimeEnergyConsumed", "attributeId": 0x00000017, "type": "int", "reportable": True, + "writable": True, }, 0x00000020: { "attributeName": "OperationMode", diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index be946a135b6d61..027fbb3ef8b594 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -2769,9 +2769,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Optional[uint]' = None + value: 'typing.Union[None, Nullable, uint]' = None @dataclass class OnTransitionTime(ClusterAttributeDescriptor): @@ -2785,9 +2785,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Optional[uint]' = None + value: 'typing.Union[None, Nullable, uint]' = None @dataclass class OffTransitionTime(ClusterAttributeDescriptor): @@ -2801,9 +2801,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Optional[uint]' = None + value: 'typing.Union[None, Nullable, uint]' = None @dataclass class DefaultMoveRate(ClusterAttributeDescriptor): @@ -2817,9 +2817,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Optional[uint]' = None + value: 'typing.Union[None, Nullable, uint]' = None @dataclass class StartUpCurrentLevel(ClusterAttributeDescriptor): @@ -14030,9 +14030,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Optional[uint]' = None + value: 'typing.Union[None, Nullable, uint]' = None @dataclass class Power(ClusterAttributeDescriptor): @@ -14062,9 +14062,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Optional[uint]' = None + value: 'typing.Union[None, Nullable, uint]' = None @dataclass class OperationMode(ClusterAttributeDescriptor): diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h index 8575601940f36f..6417bfa862a6c0 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h @@ -1987,7 +1987,7 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeOnLevelWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeOnLevelWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeOnLevelWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; - (void)subscribeAttributeOnLevelWithMinInterval:(uint16_t)minInterval maxInterval:(uint16_t)maxInterval responseHandler:(ResponseHandler)responseHandler; @@ -1995,7 +1995,7 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeOnTransitionTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeOnTransitionTimeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeOnTransitionTimeWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; - (void)subscribeAttributeOnTransitionTimeWithMinInterval:(uint16_t)minInterval maxInterval:(uint16_t)maxInterval responseHandler:(ResponseHandler)responseHandler; @@ -2004,7 +2004,7 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeOffTransitionTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeOffTransitionTimeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeOffTransitionTimeWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; - (void)subscribeAttributeOffTransitionTimeWithMinInterval:(uint16_t)minInterval maxInterval:(uint16_t)maxInterval responseHandler:(ResponseHandler)responseHandler; @@ -2013,7 +2013,7 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeDefaultMoveRateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeDefaultMoveRateWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeDefaultMoveRateWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; - (void)subscribeAttributeDefaultMoveRateWithMinInterval:(uint16_t)minInterval maxInterval:(uint16_t)maxInterval responseHandler:(ResponseHandler)responseHandler; @@ -2849,7 +2849,7 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeLifetimeRunningHoursWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nonnull)value +- (void)writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; - (void)subscribeAttributeLifetimeRunningHoursWithMinInterval:(uint16_t)minInterval maxInterval:(uint16_t)maxInterval @@ -2858,7 +2858,6 @@ NS_ASSUME_NONNULL_BEGIN NSError * _Nullable error))responseHandler; - (void)readAttributePowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributePowerWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)subscribeAttributePowerWithMinInterval:(uint16_t)minInterval maxInterval:(uint16_t)maxInterval responseHandler:(ResponseHandler)responseHandler; @@ -2866,6 +2865,8 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeLifetimeEnergyConsumedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable)value + completionHandler:(StatusCompletion)completionHandler; - (void)subscribeAttributeLifetimeEnergyConsumedWithMinInterval:(uint16_t)minInterval maxInterval:(uint16_t)maxInterval responseHandler:(ResponseHandler)responseHandler; diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm index 76fd6d24667d38..94410333b0ac6d 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm @@ -9966,20 +9966,20 @@ new CHIPInt16uAttributeCallbackBridge( - (void)readAttributeOnLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge( + new CHIPNullableInt8uAttributeCallbackBridge( self.callbackQueue, ^(NSError * _Nullable error, id _Nullable value) { completionHandler(value, error); }, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = LevelControl::Attributes::OnLevel::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeOnLevelWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeOnLevelWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( self.callbackQueue, @@ -9990,7 +9990,12 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = LevelControl::Attributes::OnLevel::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); @@ -10001,14 +10006,15 @@ - (void)subscribeAttributeOnLevelWithMinInterval:(uint16_t)minInterval maxInterval:(uint16_t)maxInterval responseHandler:(ResponseHandler)responseHandler { - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { - return self.cppCluster.SubscribeAttributeOnLevel(success, failure, minInterval, maxInterval); - }); + new CHIPNullableInt8uAttributeCallbackBridge( + self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.SubscribeAttributeOnLevel(success, failure, minInterval, maxInterval); + }); } - (void)reportAttributeOnLevelWithResponseHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))responseHandler { - new CHIPInt8uAttributeCallbackBridge( + new CHIPNullableInt8uAttributeCallbackBridge( self.callbackQueue, ^(NSError * _Nullable error, id _Nullable value) { responseHandler(value, error); @@ -10022,20 +10028,20 @@ new CHIPInt8uAttributeCallbackBridge( - (void)readAttributeOnTransitionTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge( + new CHIPNullableInt16uAttributeCallbackBridge( self.callbackQueue, ^(NSError * _Nullable error, id _Nullable value) { completionHandler(value, error); }, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = LevelControl::Attributes::OnTransitionTime::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeOnTransitionTimeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeOnTransitionTimeWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( self.callbackQueue, @@ -10046,7 +10052,12 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = LevelControl::Attributes::OnTransitionTime::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedShortValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); @@ -10057,15 +10068,16 @@ - (void)subscribeAttributeOnTransitionTimeWithMinInterval:(uint16_t)minInterval maxInterval:(uint16_t)maxInterval responseHandler:(ResponseHandler)responseHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { - return self.cppCluster.SubscribeAttributeOnTransitionTime(success, failure, minInterval, maxInterval); - }); + new CHIPNullableInt16uAttributeCallbackBridge( + self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.SubscribeAttributeOnTransitionTime(success, failure, minInterval, maxInterval); + }); } - (void)reportAttributeOnTransitionTimeWithResponseHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))responseHandler { - new CHIPInt16uAttributeCallbackBridge( + new CHIPNullableInt16uAttributeCallbackBridge( self.callbackQueue, ^(NSError * _Nullable error, id _Nullable value) { responseHandler(value, error); @@ -10079,20 +10091,20 @@ new CHIPInt16uAttributeCallbackBridge( - (void)readAttributeOffTransitionTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge( + new CHIPNullableInt16uAttributeCallbackBridge( self.callbackQueue, ^(NSError * _Nullable error, id _Nullable value) { completionHandler(value, error); }, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = LevelControl::Attributes::OffTransitionTime::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeOffTransitionTimeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeOffTransitionTimeWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( self.callbackQueue, @@ -10103,7 +10115,12 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = LevelControl::Attributes::OffTransitionTime::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedShortValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); @@ -10114,15 +10131,16 @@ - (void)subscribeAttributeOffTransitionTimeWithMinInterval:(uint16_t)minInterval maxInterval:(uint16_t)maxInterval responseHandler:(ResponseHandler)responseHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { - return self.cppCluster.SubscribeAttributeOffTransitionTime(success, failure, minInterval, maxInterval); - }); + new CHIPNullableInt16uAttributeCallbackBridge( + self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.SubscribeAttributeOffTransitionTime(success, failure, minInterval, maxInterval); + }); } - (void)reportAttributeOffTransitionTimeWithResponseHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))responseHandler { - new CHIPInt16uAttributeCallbackBridge( + new CHIPNullableInt16uAttributeCallbackBridge( self.callbackQueue, ^(NSError * _Nullable error, id _Nullable value) { responseHandler(value, error); @@ -10136,20 +10154,20 @@ new CHIPInt16uAttributeCallbackBridge( - (void)readAttributeDefaultMoveRateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge( + new CHIPNullableInt8uAttributeCallbackBridge( self.callbackQueue, ^(NSError * _Nullable error, id _Nullable value) { completionHandler(value, error); }, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = LevelControl::Attributes::DefaultMoveRate::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeDefaultMoveRateWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeDefaultMoveRateWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( self.callbackQueue, @@ -10160,7 +10178,12 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = LevelControl::Attributes::DefaultMoveRate::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); @@ -10171,15 +10194,16 @@ - (void)subscribeAttributeDefaultMoveRateWithMinInterval:(uint16_t)minInterval maxInterval:(uint16_t)maxInterval responseHandler:(ResponseHandler)responseHandler { - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { - return self.cppCluster.SubscribeAttributeDefaultMoveRate(success, failure, minInterval, maxInterval); - }); + new CHIPNullableInt8uAttributeCallbackBridge( + self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.SubscribeAttributeDefaultMoveRate(success, failure, minInterval, maxInterval); + }); } - (void)reportAttributeDefaultMoveRateWithResponseHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))responseHandler { - new CHIPInt8uAttributeCallbackBridge( + new CHIPNullableInt8uAttributeCallbackBridge( self.callbackQueue, ^(NSError * _Nullable error, id _Nullable value) { responseHandler(value, error); @@ -14350,20 +14374,21 @@ new CHIPInt16uAttributeCallbackBridge( - (void)readAttributeLifetimeRunningHoursWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt32uAttributeCallbackBridge( + new CHIPNullableInt32uAttributeCallbackBridge( self.callbackQueue, ^(NSError * _Nullable error, id _Nullable value) { completionHandler(value, error); }, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeRunningHours::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable)value + completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( self.callbackQueue, @@ -14374,7 +14399,12 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeRunningHours::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedIntValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); @@ -14385,15 +14415,16 @@ - (void)subscribeAttributeLifetimeRunningHoursWithMinInterval:(uint16_t)minInter maxInterval:(uint16_t)maxInterval responseHandler:(ResponseHandler)responseHandler { - new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { - return self.cppCluster.SubscribeAttributeLifetimeRunningHours(success, failure, minInterval, maxInterval); - }); + new CHIPNullableInt32uAttributeCallbackBridge( + self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.SubscribeAttributeLifetimeRunningHours(success, failure, minInterval, maxInterval); + }); } - (void)reportAttributeLifetimeRunningHoursWithResponseHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))responseHandler { - new CHIPInt32uAttributeCallbackBridge( + new CHIPNullableInt32uAttributeCallbackBridge( self.callbackQueue, ^(NSError * _Nullable error, id _Nullable value) { responseHandler(value, error); @@ -14419,24 +14450,6 @@ new CHIPInt32uAttributeCallbackBridge( }); } -- (void)writeAttributePowerWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(NSError * _Nullable error, id _Nullable ignored) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PumpConfigurationAndControl::Attributes::Power::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - - (void)subscribeAttributePowerWithMinInterval:(uint16_t)minInterval maxInterval:(uint16_t)maxInterval responseHandler:(ResponseHandler)responseHandler @@ -14462,32 +14475,57 @@ new CHIPInt32uAttributeCallbackBridge( - (void)readAttributeLifetimeEnergyConsumedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt32uAttributeCallbackBridge( + new CHIPNullableInt32uAttributeCallbackBridge( self.callbackQueue, ^(NSError * _Nullable error, id _Nullable value) { completionHandler(value, error); }, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } +- (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable)value + completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(NSError * _Nullable error, id _Nullable ignored) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedIntValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)subscribeAttributeLifetimeEnergyConsumedWithMinInterval:(uint16_t)minInterval maxInterval:(uint16_t)maxInterval responseHandler:(ResponseHandler)responseHandler { - new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { - return self.cppCluster.SubscribeAttributeLifetimeEnergyConsumed(success, failure, minInterval, maxInterval); - }); + new CHIPNullableInt32uAttributeCallbackBridge( + self.callbackQueue, responseHandler, ^(Cancelable * success, Cancelable * failure) { + return self.cppCluster.SubscribeAttributeLifetimeEnergyConsumed(success, failure, minInterval, maxInterval); + }); } - (void)reportAttributeLifetimeEnergyConsumedWithResponseHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))responseHandler { - new CHIPInt32uAttributeCallbackBridge( + new CHIPNullableInt32uAttributeCallbackBridge( self.callbackQueue, ^(NSError * _Nullable error, id _Nullable value) { responseHandler(value, error); diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h index f29c0c17149317..ebe087b2c9d817 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h @@ -675,8 +675,7 @@ NS_ASSUME_NONNULL_BEGIN completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeCapacityWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeSpeedWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributePowerWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeAlarmMaskWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm index 195c6bc4f5e12c..2c80bed99ef98b 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm @@ -5662,8 +5662,7 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributePowerWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( self.callbackQueue, @@ -5672,7 +5671,7 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::Power::TypeInfo; TypeInfo::Type cppValue; cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); diff --git a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m index 398b677475125b..2fe0c92aca9fd1 100644 --- a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m +++ b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m @@ -9950,6 +9950,7 @@ - (void)testSendClusterTest_TC_LVL_3_1_000010_ReadAttribute { id actualValue = value; + XCTAssertFalse(actualValue == nil); XCTAssertEqual([actualValue unsignedCharValue], 20); } @@ -30058,7 +30059,7 @@ - (void)testSendClusterColorControlWriteAttributeColorControlOptionsWithValue CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - NSNumber * _Nonnull value = @(0x00); + NSNumber * _Nonnull value = @(0); [cluster writeAttributeColorControlOptionsWithValue:value completionHandler:^(NSError * _Nullable err) { NSLog(@"ColorControl ColorControlOptions Error: %@", err); @@ -30597,7 +30598,7 @@ - (void)testSendClusterColorControlWriteAttributeColorPointRIntensityWithValue CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - NSNumber * _Nonnull value = @(0x00); + NSNumber * _Nonnull value = @(0); [cluster writeAttributeColorPointRIntensityWithValue:value completionHandler:^(NSError * _Nullable err) { NSLog(@"ColorControl ColorPointRIntensity Error: %@", err); @@ -30711,7 +30712,7 @@ - (void)testSendClusterColorControlWriteAttributeColorPointGIntensityWithValue CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - NSNumber * _Nonnull value = @(0x00); + NSNumber * _Nonnull value = @(0); [cluster writeAttributeColorPointGIntensityWithValue:value completionHandler:^(NSError * _Nullable err) { NSLog(@"ColorControl ColorPointGIntensity Error: %@", err); @@ -30825,7 +30826,7 @@ - (void)testSendClusterColorControlWriteAttributeColorPointBIntensityWithValue CHIPColorControl * cluster = [[CHIPColorControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - NSNumber * _Nonnull value = @(0x00); + NSNumber * _Nonnull value = @(0); [cluster writeAttributeColorPointBIntensityWithValue:value completionHandler:^(NSError * _Nullable err) { NSLog(@"ColorControl ColorPointBIntensity Error: %@", err); @@ -31945,7 +31946,7 @@ - (void)testSendClusterGeneralCommissioningWriteAttributeBreadcrumbWithValue CHIPGeneralCommissioning * cluster = [[CHIPGeneralCommissioning alloc] initWithDevice:device endpoint:0 queue:queue]; XCTAssertNotNil(cluster); - NSNumber * _Nonnull value = @(0x0000000000000000); + NSNumber * _Nonnull value = @(0); [cluster writeAttributeBreadcrumbWithValue:value completionHandler:^(NSError * _Nullable err) { NSLog(@"GeneralCommissioning Breadcrumb Error: %@", err); @@ -32660,7 +32661,7 @@ - (void)testSendClusterLevelControlWriteAttributeOnOffTransitionTimeWithValue CHIPLevelControl * cluster = [[CHIPLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - NSNumber * _Nonnull value = @(0x0000); + NSNumber * _Nonnull value = @(0); [cluster writeAttributeOnOffTransitionTimeWithValue:value completionHandler:^(NSError * _Nullable err) { NSLog(@"LevelControl OnOffTransitionTime Error: %@", err); @@ -32697,7 +32698,7 @@ - (void)testSendClusterLevelControlWriteAttributeOnLevelWithValue CHIPLevelControl * cluster = [[CHIPLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - NSNumber * _Nonnull value = @(0x00); + NSNumber * _Nullable value = @(0); [cluster writeAttributeOnLevelWithValue:value completionHandler:^(NSError * _Nullable err) { NSLog(@"LevelControl OnLevel Error: %@", err); @@ -32735,7 +32736,7 @@ - (void)testSendClusterLevelControlWriteAttributeOnTransitionTimeWithValue CHIPLevelControl * cluster = [[CHIPLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - NSNumber * _Nonnull value = @(0x0000); + NSNumber * _Nullable value = @(0); [cluster writeAttributeOnTransitionTimeWithValue:value completionHandler:^(NSError * _Nullable err) { NSLog(@"LevelControl OnTransitionTime Error: %@", err); @@ -32773,7 +32774,7 @@ - (void)testSendClusterLevelControlWriteAttributeOffTransitionTimeWithValue CHIPLevelControl * cluster = [[CHIPLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - NSNumber * _Nonnull value = @(0x0000); + NSNumber * _Nullable value = @(0); [cluster writeAttributeOffTransitionTimeWithValue:value completionHandler:^(NSError * _Nullable err) { NSLog(@"LevelControl OffTransitionTime Error: %@", err); @@ -32811,7 +32812,7 @@ - (void)testSendClusterLevelControlWriteAttributeDefaultMoveRateWithValue CHIPLevelControl * cluster = [[CHIPLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - NSNumber * _Nonnull value = @(0x00); + NSNumber * _Nullable value = @(0); [cluster writeAttributeDefaultMoveRateWithValue:value completionHandler:^(NSError * _Nullable err) { NSLog(@"LevelControl DefaultMoveRate Error: %@", err); @@ -32849,7 +32850,7 @@ - (void)testSendClusterLevelControlWriteAttributeStartUpCurrentLevelWithValue CHIPLevelControl * cluster = [[CHIPLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - NSNumber * _Nonnull value = @(0x01); + NSNumber * _Nonnull value = @(0); [cluster writeAttributeStartUpCurrentLevelWithValue:value completionHandler:^(NSError * _Nullable err) { NSLog(@"LevelControl StartUpCurrentLevel Error: %@", err); @@ -34536,7 +34537,7 @@ - (void)testSendClusterPumpConfigurationAndControlWriteAttributeLifetimeRunningH queue:queue]; XCTAssertNotNil(cluster); - NSNumber * _Nonnull value = @(0x000000); + NSNumber * _Nullable value = @(0); [cluster writeAttributeLifetimeRunningHoursWithValue:value completionHandler:^(NSError * _Nullable err) { NSLog(@"PumpConfigurationAndControl LifetimeRunningHours Error: %@", err); @@ -34567,9 +34568,10 @@ - (void)testSendClusterPumpConfigurationAndControlReadAttributePowerWithCompleti [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterPumpConfigurationAndControlWriteAttributePowerWithValue +- (void)testSendClusterPumpConfigurationAndControlReadAttributeLifetimeEnergyConsumedWithCompletionHandler { - XCTestExpectation * expectation = [self expectationWithDescription:@"PumpConfigurationAndControlWriteAttributePowerWithValue"]; + XCTestExpectation * expectation = + [self expectationWithDescription:@"PumpConfigurationAndControlReadAttributeLifetimeEnergyConsumedWithCompletionHandler"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); @@ -34578,20 +34580,19 @@ - (void)testSendClusterPumpConfigurationAndControlWriteAttributePowerWithValue queue:queue]; XCTAssertNotNil(cluster); - NSNumber * _Nonnull value = @(0x000000); - [cluster writeAttributePowerWithValue:value - completionHandler:^(NSError * _Nullable err) { - NSLog(@"PumpConfigurationAndControl Power Error: %@", err); - XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + [cluster readAttributeLifetimeEnergyConsumedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"PumpConfigurationAndControl LifetimeEnergyConsumed Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterPumpConfigurationAndControlReadAttributeLifetimeEnergyConsumedWithCompletionHandler + +- (void)testSendClusterPumpConfigurationAndControlWriteAttributeLifetimeEnergyConsumedWithValue { XCTestExpectation * expectation = - [self expectationWithDescription:@"PumpConfigurationAndControlReadAttributeLifetimeEnergyConsumedWithCompletionHandler"]; + [self expectationWithDescription:@"PumpConfigurationAndControlWriteAttributeLifetimeEnergyConsumedWithValue"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); @@ -34600,15 +34601,16 @@ - (void)testSendClusterPumpConfigurationAndControlReadAttributeLifetimeEnergyCon queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeLifetimeEnergyConsumedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"PumpConfigurationAndControl LifetimeEnergyConsumed Error: %@", err); - XCTAssertEqual(err.code, 0); - [expectation fulfill]; - }]; + NSNumber * _Nullable value = @(0); + [cluster writeAttributeLifetimeEnergyConsumedWithValue:value + completionHandler:^(NSError * _Nullable err) { + NSLog(@"PumpConfigurationAndControl LifetimeEnergyConsumed Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } - - (void)testSendClusterPumpConfigurationAndControlReadAttributeOperationModeWithCompletionHandler { XCTestExpectation * expectation = diff --git a/third_party/zap/repo b/third_party/zap/repo index 8f0369046dbd06..adc0cd644a3f4c 160000 --- a/third_party/zap/repo +++ b/third_party/zap/repo @@ -1 +1 @@ -Subproject commit 8f0369046dbd06d2eff09a12e244373ca01119d8 +Subproject commit adc0cd644a3f4c71fd9edd7cdd271485d4af95fb diff --git a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h index 646c53780b80dc..e5159ecc6e8a47 100644 --- a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h +++ b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h @@ -1226,11 +1226,11 @@ #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ { \ - (uint8_t *) (&generatedDefaults[index]) \ + &generatedDefaults[index] \ } #define ZAP_MIN_MAX_DEFAULTS_INDEX(index) \ { \ - (uint8_t *) (&minMaxDefault[index]) \ + &minMaxDefaults[index] \ } #define ZAP_EMPTY_DEFAULT() \ { \ @@ -1242,9 +1242,58 @@ } // This is an array of EmberAfAttributeMinMaxValue structures. -#define GENERATED_MIN_MAX_DEFAULT_COUNT 0 +#define GENERATED_MIN_MAX_DEFAULT_COUNT 27 #define GENERATED_MIN_MAX_DEFAULTS \ { \ + \ + /* Endpoint: 0, Cluster: Identify (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFE }, /* identify time */ \ + \ + /* Endpoint: 1, Cluster: Identify (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFE }, /* identify time */ \ + \ + /* Endpoint: 1, Cluster: On/off Switch Configuration (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x2 }, /* switch actions */ \ + \ + /* Endpoint: 1, Cluster: Level Control (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x3 }, /* options */ \ + \ + /* Endpoint: 1, Cluster: Binary Input (Basic) (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x1 }, /* out of service */ \ + \ + /* Endpoint: 1, Cluster: Window Covering (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xF }, /* Mode */ \ + \ + /* Endpoint: 1, Cluster: Pump Configuration and Control (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFE }, /* OperationMode */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFE }, /* ControlMode */ \ + \ + /* Endpoint: 1, Cluster: Thermostat (server) */ \ + { (uint16_t) 0x2BC, (uint16_t) 0x954D, (uint16_t) 0x7FFF }, /* min heat setpoint limit */ \ + { (uint16_t) 0xBB8, (uint16_t) 0x954D, (uint16_t) 0x7FFF }, /* max heat setpoint limit */ \ + { (uint16_t) 0x640, (uint16_t) 0x954D, (uint16_t) 0x7FFF }, /* min cool setpoint limit */ \ + { (uint16_t) 0xC80, (uint16_t) 0x954D, (uint16_t) 0x7FFF }, /* max cool setpoint limit */ \ + { (uint16_t) 0x19, (uint16_t) 0xA, (uint16_t) 0x19 }, /* min setpoint dead band */ \ + { (uint16_t) 0x4, (uint16_t) 0x0, (uint16_t) 0x5 }, /* control sequence of operation */ \ + { (uint16_t) 0x1, (uint16_t) 0x0, (uint16_t) 0x7 }, /* system mode */ \ + \ + /* Endpoint: 1, Cluster: Thermostat User Interface Configuration (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x1 }, /* temperature display mode */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x5 }, /* keypad lockout */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x1 }, /* schedule programming visibility */ \ + \ + /* Endpoint: 1, Cluster: Color Control (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* white point x */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* white point y */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* color point r x */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* color point r y */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* color point g x */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* color point g y */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* color point b x */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* color point b y */ \ + { \ + (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF \ + } /* start up color temperature mireds */ \ } #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask @@ -1254,9 +1303,10 @@ { \ \ /* Endpoint: 0, Cluster: Identify (server) */ \ - { 0x0000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x0000) }, /* identify time */ \ - { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x0) }, /* identify type */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ + { 0x0000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(0) }, /* identify time */ \ + { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x0) }, /* identify type */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Descriptor (server) */ \ { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ @@ -1455,9 +1505,10 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Identify (server) */ \ - { 0x0000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x0000) }, /* identify time */ \ - { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x0) }, /* identify type */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ + { 0x0000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(1) }, /* identify time */ \ + { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x0) }, /* identify type */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Groups (server) */ \ { 0x0000, ZAP_TYPE(BITMAP8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* name support */ \ @@ -1481,33 +1532,40 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: On/off Switch Configuration (server) */ \ - { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* switch type */ \ - { 0x0010, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* switch actions */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* switch type */ \ + { 0x0010, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(2) }, /* switch actions */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Level Control (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current level */ \ - { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* remaining time */ \ - { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* min level */ \ - { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xFF) }, /* max level */ \ - { 0x0004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current frequency */ \ - { 0x0005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* min frequency */ \ - { 0x0006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* max frequency */ \ - { 0x000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* options */ \ + { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current level */ \ + { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* remaining time */ \ + { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* min level */ \ + { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xFF) }, /* max level */ \ + { 0x0004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current frequency */ \ + { 0x0005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* min frequency */ \ + { 0x0006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* max frequency */ \ + { 0x000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(3) }, /* options */ \ { 0x0010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_SIMPLE_DEFAULT(0x0000) }, /* on off transition time */ \ - { 0x0011, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0xFE) }, /* on level */ \ - { 0x0012, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* on transition time */ \ - { 0x0013, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* off transition time */ \ - { 0x0014, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* default move rate */ \ - { 0x4000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* start up current level */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + ZAP_SIMPLE_DEFAULT(0x0000) }, /* on off transition time */ \ + { 0x0011, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(0xFE) }, /* on level */ \ + { 0x0012, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_EMPTY_DEFAULT() }, /* on transition time */ \ + { 0x0013, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_EMPTY_DEFAULT() }, /* off transition time */ \ + { 0x0014, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_EMPTY_DEFAULT() }, /* default move rate */ \ + { 0x4000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* start up current level */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Binary Input (Basic) (server) */ \ - { 0x0051, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* out of service */ \ - { 0x0055, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* present value */ \ - { 0x006F, ZAP_TYPE(BITMAP8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* status flags */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0051, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(4) }, /* out of service */ \ + { 0x0055, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* present value */ \ + { 0x006F, ZAP_TYPE(BITMAP8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* status flags */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Descriptor (server) */ \ { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ @@ -1600,10 +1658,11 @@ { 0x0011, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xFFFF) }, /* InstalledClosedLimitLift */ \ { 0x0012, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* InstalledOpenLimitTilt */ \ { 0x0013, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xFFFF) }, /* InstalledClosedLimitTilt */ \ - { 0x0017, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* Mode */ \ - { 0x001A, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* SafetyStatus */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1413) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ + { 0x0017, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(5) }, /* Mode */ \ + { 0x001A, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* SafetyStatus */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1413) }, /* FeatureMap */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Barrier Control (server) */ \ { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* barrier moving state */ \ @@ -1631,15 +1690,18 @@ { 0x0012, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* EffectiveControlMode */ \ { 0x0013, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* Capacity */ \ { 0x0014, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* Speed */ \ - { 0x0015, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_LONG_DEFAULTS_INDEX(1417) }, /* LifetimeRunningHours */ \ - { 0x0016, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1420) }, /* Power */ \ - { 0x0017, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1423) }, /* LifetimeEnergyConsumed */ \ - { 0x0020, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* OperationMode */ \ - { 0x0021, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* ControlMode */ \ - { 0x0022, ZAP_TYPE(BITMAP16), 2, 0, ZAP_EMPTY_DEFAULT() }, /* AlarmMask */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1427) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0015, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_LONG_DEFAULTS_INDEX(1417) }, /* LifetimeRunningHours */ \ + { 0x0016, ZAP_TYPE(INT24U), 3, 0, ZAP_LONG_DEFAULTS_INDEX(1420) }, /* Power */ \ + { 0x0017, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_LONG_DEFAULTS_INDEX(1423) }, /* LifetimeEnergyConsumed */ \ + { 0x0020, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(6) }, /* OperationMode */ \ + { 0x0021, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(7) }, /* ControlMode */ \ + { 0x0022, ZAP_TYPE(BITMAP16), 2, 0, ZAP_EMPTY_DEFAULT() }, /* AlarmMask */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1427) }, /* FeatureMap */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Thermostat (server) */ \ { 0x0000, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* local temperature */ \ @@ -1651,29 +1713,33 @@ ZAP_SIMPLE_DEFAULT(0x0A28) }, /* occupied cooling setpoint */ \ { 0x0012, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_SIMPLE_DEFAULT(0x07D0) }, /* occupied heating setpoint */ \ - { 0x0015, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_SIMPLE_DEFAULT(0x02BC) }, /* min heat setpoint limit */ \ - { 0x0016, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_SIMPLE_DEFAULT(0x0BB8) }, /* max heat setpoint limit */ \ - { 0x0017, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_SIMPLE_DEFAULT(0x0640) }, /* min cool setpoint limit */ \ - { 0x0018, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_SIMPLE_DEFAULT(0x0C80) }, /* max cool setpoint limit */ \ - { 0x0019, ZAP_TYPE(INT8S), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x19) }, /* min setpoint dead band */ \ - { 0x001B, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_SIMPLE_DEFAULT(0x04) }, /* control sequence of operation */ \ - { 0x001C, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x01) }, /* system mode */ \ - { 0x0020, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* start of week */ \ + { 0x0015, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(8) }, /* min heat setpoint limit */ \ + { 0x0016, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(9) }, /* max heat setpoint limit */ \ + { 0x0017, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(10) }, /* min cool setpoint limit */ \ + { 0x0018, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(11) }, /* max cool setpoint limit */ \ + { 0x0019, ZAP_TYPE(INT8S), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(12) }, /* min setpoint dead band */ \ + { 0x001B, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(13) }, /* control sequence of operation */ \ + { 0x001C, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(14) }, /* system mode */ \ + { 0x0020, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* start of week */ \ { 0x0021, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(7) }, /* number of weekly transitions */ \ { 0x0022, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(4) }, /* number of daily transitions */ \ { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1431) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Thermostat User Interface Configuration (server) */ \ - { 0x0000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* temperature display mode */ \ - { 0x0001, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* keypad lockout */ \ - { 0x0002, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* schedule programming visibility */ \ + { 0x0000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(15) }, /* temperature display mode */ \ + { 0x0001, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(16) }, /* keypad lockout */ \ + { 0x0002, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(17) }, /* schedule programming visibility */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Color Control (server) */ \ @@ -1706,30 +1772,38 @@ { 0x0028, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* primary 6 x */ \ { 0x0029, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* primary 6 y */ \ { 0x002A, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* primary 6 intensity */ \ - { 0x0030, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* white point x */ \ - { 0x0031, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* white point y */ \ - { 0x0032, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* color point r x */ \ - { 0x0033, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* color point r y */ \ - { 0x0034, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* color point r intensity */ \ - { 0x0036, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* color point g x */ \ - { 0x0037, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* color point g y */ \ - { 0x0038, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* color point g intensity */ \ - { 0x003A, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* color point b x */ \ - { 0x003B, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* color point b y */ \ - { 0x003C, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* color point b intensity */ \ - { 0x4000, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* enhanced current hue */ \ - { 0x4001, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x01) }, /* enhanced color mode */ \ - { 0x4002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* color loop active */ \ - { 0x4003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* color loop direction */ \ - { 0x4004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0019) }, /* color loop time */ \ - { 0x4005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x2300) }, /* color loop start enhanced hue */ \ + { 0x0030, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(18) }, /* white point x */ \ + { 0x0031, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(19) }, /* white point y */ \ + { 0x0032, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(20) }, /* color point r x */ \ + { 0x0033, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(21) }, /* color point r y */ \ + { 0x0034, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* color point r intensity */ \ + { 0x0036, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(22) }, /* color point g x */ \ + { 0x0037, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(23) }, /* color point g y */ \ + { 0x0038, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* color point g intensity */ \ + { 0x003A, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(24) }, /* color point b x */ \ + { 0x003B, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(25) }, /* color point b y */ \ + { 0x003C, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* color point b intensity */ \ + { 0x4000, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* enhanced current hue */ \ + { 0x4001, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x01) }, /* enhanced color mode */ \ + { 0x4002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* color loop active */ \ + { 0x4003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* color loop direction */ \ + { 0x4004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0019) }, /* color loop time */ \ + { 0x4005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x2300) }, /* color loop start enhanced hue */ \ { 0x4006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* color loop stored enhanced hue */ \ { 0x400A, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* color capabilities */ \ { 0x400B, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* color temp physical min */ \ { 0x400C, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xFEFF) }, /* color temp physical max */ \ { 0x400D, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* couple color temp to level min-mireds */ \ - { 0x4010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* start up color temperature mireds */ \ + { 0x4010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(26) }, /* start up color temperature mireds */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Illuminance Measurement (server) */ \ diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp index 04e6867ce8887d..9772199aaed0e8 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp @@ -2742,22 +2742,25 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) namespace OnLevel { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::LevelControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (NumericAttributeTraits::IsNullValue(temp)) { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + value.SetNull(); + } + else + { + value.SetNonNull() = NumericAttributeTraits::StorageToWorking(temp); } - *value = NumericAttributeTraits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } @@ -2767,26 +2770,47 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) return emberAfWriteServerAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + NumericAttributeTraits::StorageType value; + NumericAttributeTraits::SetNull(value); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(value); + return emberAfWriteServerAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + } // namespace OnLevel namespace OnTransitionTime { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::LevelControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (NumericAttributeTraits::IsNullValue(temp)) { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + value.SetNull(); + } + else + { + value.SetNonNull() = NumericAttributeTraits::StorageToWorking(temp); } - *value = NumericAttributeTraits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } @@ -2796,26 +2820,47 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) return emberAfWriteServerAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + NumericAttributeTraits::StorageType value; + NumericAttributeTraits::SetNull(value); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(value); + return emberAfWriteServerAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + } // namespace OnTransitionTime namespace OffTransitionTime { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::LevelControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (NumericAttributeTraits::IsNullValue(temp)) { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + value.SetNull(); + } + else + { + value.SetNonNull() = NumericAttributeTraits::StorageToWorking(temp); } - *value = NumericAttributeTraits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } @@ -2825,26 +2870,47 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) return emberAfWriteServerAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + NumericAttributeTraits::StorageType value; + NumericAttributeTraits::SetNull(value); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(value); + return emberAfWriteServerAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + } // namespace OffTransitionTime namespace DefaultMoveRate { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::LevelControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (NumericAttributeTraits::IsNullValue(temp)) { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + value.SetNull(); + } + else + { + value.SetNonNull() = NumericAttributeTraits::StorageToWorking(temp); } - *value = NumericAttributeTraits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } @@ -2854,6 +2920,24 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) return emberAfWriteServerAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + NumericAttributeTraits::StorageType value; + NumericAttributeTraits::SetNull(value); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(value); + return emberAfWriteServerAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + } // namespace DefaultMoveRate namespace StartUpCurrentLevel { @@ -11969,23 +12053,26 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) namespace LifetimeRunningHours { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { NumericAttributeTraits>::StorageType temp; uint8_t * readable = NumericAttributeTraits>::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits>::CanRepresentValue(/* isNullable = */ false, temp)) + if (NumericAttributeTraits>::IsNullValue(temp)) { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + value.SetNull(); + } + else + { + value.SetNonNull() = NumericAttributeTraits>::StorageToWorking(temp); } - *value = NumericAttributeTraits>::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits>::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits>::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } @@ -11996,6 +12083,25 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) ZCL_INT24U_ATTRIBUTE_TYPE); } +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + NumericAttributeTraits>::StorageType value; + NumericAttributeTraits>::SetNull(value); + uint8_t * writable = NumericAttributeTraits>::ToAttributeStoreRepresentation(value); + return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, + ZCL_INT24U_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + } // namespace LifetimeRunningHours namespace Power { @@ -12031,23 +12137,26 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) namespace LifetimeEnergyConsumed { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { NumericAttributeTraits::StorageType temp; uint8_t * readable = NumericAttributeTraits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, temp)) + if (NumericAttributeTraits::IsNullValue(temp)) { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + value.SetNull(); + } + else + { + value.SetNonNull() = NumericAttributeTraits::StorageToWorking(temp); } - *value = NumericAttributeTraits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ false, value)) + if (!NumericAttributeTraits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } @@ -12058,6 +12167,25 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) ZCL_INT32U_ATTRIBUTE_TYPE); } +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + NumericAttributeTraits::StorageType value; + NumericAttributeTraits::SetNull(value); + uint8_t * writable = NumericAttributeTraits::ToAttributeStoreRepresentation(value); + return emberAfWriteServerAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, + ZCL_INT32U_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + } // namespace LifetimeEnergyConsumed namespace OperationMode { diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h index 60ab0babe3e6c2..9b8091df3095b4 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h @@ -533,23 +533,31 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); } // namespace OnOffTransitionTime namespace OnLevel { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // int8u +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value); } // namespace OnLevel namespace OnTransitionTime { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value); // int16u +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16u EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value); } // namespace OnTransitionTime namespace OffTransitionTime { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value); // int16u +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16u EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value); } // namespace OffTransitionTime namespace DefaultMoveRate { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // int8u +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value); } // namespace DefaultMoveRate namespace StartUpCurrentLevel { @@ -2246,8 +2254,10 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); } // namespace Speed namespace LifetimeRunningHours { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // int24u +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int24u EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value); } // namespace LifetimeRunningHours namespace Power { @@ -2256,8 +2266,10 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); } // namespace Power namespace LifetimeEnergyConsumed { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // int32u +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int32u EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const DataModel::Nullable & value); } // namespace LifetimeEnergyConsumed namespace OperationMode { diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h index 903b348781c138..7855833487e92e 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h @@ -3237,9 +3237,9 @@ struct TypeInfo namespace OnLevel { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = DataModel::Nullable; + using DecodableType = DataModel::Nullable; + using DecodableArgType = const DataModel::Nullable &; static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::OnLevel::Id; } @@ -3248,9 +3248,9 @@ struct TypeInfo namespace OnTransitionTime { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = DataModel::Nullable; + using DecodableType = DataModel::Nullable; + using DecodableArgType = const DataModel::Nullable &; static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::OnTransitionTime::Id; } @@ -3259,9 +3259,9 @@ struct TypeInfo namespace OffTransitionTime { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = DataModel::Nullable; + using DecodableType = DataModel::Nullable; + using DecodableArgType = const DataModel::Nullable &; static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::OffTransitionTime::Id; } @@ -3270,9 +3270,9 @@ struct TypeInfo namespace DefaultMoveRate { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = DataModel::Nullable; + using DecodableType = DataModel::Nullable; + using DecodableArgType = const DataModel::Nullable &; static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::DefaultMoveRate::Id; } @@ -16703,9 +16703,9 @@ struct TypeInfo namespace LifetimeRunningHours { struct TypeInfo { - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; + using Type = DataModel::Nullable; + using DecodableType = DataModel::Nullable; + using DecodableArgType = const DataModel::Nullable &; static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::LifetimeRunningHours::Id; } @@ -16725,9 +16725,9 @@ struct TypeInfo namespace LifetimeEnergyConsumed { struct TypeInfo { - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; + using Type = DataModel::Nullable; + using DecodableType = DataModel::Nullable; + using DecodableArgType = const DataModel::Nullable &; static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::LifetimeEnergyConsumed::Id; } diff --git a/zzz_generated/bridge-app/zap-generated/endpoint_config.h b/zzz_generated/bridge-app/zap-generated/endpoint_config.h index e508a81491d907..a2cb01c6bcfe46 100644 --- a/zzz_generated/bridge-app/zap-generated/endpoint_config.h +++ b/zzz_generated/bridge-app/zap-generated/endpoint_config.h @@ -558,11 +558,11 @@ #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ { \ - (uint8_t *) (&generatedDefaults[index]) \ + &generatedDefaults[index] \ } #define ZAP_MIN_MAX_DEFAULTS_INDEX(index) \ { \ - (uint8_t *) (&minMaxDefault[index]) \ + &minMaxDefaults[index] \ } #define ZAP_EMPTY_DEFAULT() \ { \ @@ -574,9 +574,14 @@ } // This is an array of EmberAfAttributeMinMaxValue structures. -#define GENERATED_MIN_MAX_DEFAULT_COUNT 0 +#define GENERATED_MIN_MAX_DEFAULT_COUNT 1 #define GENERATED_MIN_MAX_DEFAULTS \ { \ + \ + /* Endpoint: 1, Cluster: Level Control (server) */ \ + { \ + (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x3 \ + } /* options */ \ } #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask @@ -754,22 +759,27 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Level Control (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current level */ \ - { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* remaining time */ \ - { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* min level */ \ - { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xFF) }, /* max level */ \ - { 0x0004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current frequency */ \ - { 0x0005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* min frequency */ \ - { 0x0006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* max frequency */ \ - { 0x000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* options */ \ + { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current level */ \ + { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* remaining time */ \ + { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* min level */ \ + { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xFF) }, /* max level */ \ + { 0x0004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current frequency */ \ + { 0x0005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* min frequency */ \ + { 0x0006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* max frequency */ \ + { 0x000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(0) }, /* options */ \ { 0x0010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_SIMPLE_DEFAULT(0x0000) }, /* on off transition time */ \ - { 0x0011, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0xFE) }, /* on level */ \ - { 0x0012, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* on transition time */ \ - { 0x0013, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* off transition time */ \ - { 0x0014, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* default move rate */ \ - { 0x4000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* start up current level */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + ZAP_SIMPLE_DEFAULT(0x0000) }, /* on off transition time */ \ + { 0x0011, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(0xFE) }, /* on level */ \ + { 0x0012, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_EMPTY_DEFAULT() }, /* on transition time */ \ + { 0x0013, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_EMPTY_DEFAULT() }, /* off transition time */ \ + { 0x0014, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_EMPTY_DEFAULT() }, /* default move rate */ \ + { 0x4000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* start up current level */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Descriptor (server) */ \ { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index a59989c300a72a..56e9902f9c99f5 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -32597,39 +32597,6 @@ class ReadPumpConfigurationAndControlPower : public ModelCommand new chip::Callback::Callback(OnDefaultFailureResponse, this); }; -class WritePumpConfigurationAndControlPower : public ModelCommand -{ -public: - WritePumpConfigurationAndControlPower() : ModelCommand("write") - { - AddArgument("attr-name", "power"); - AddArgument("attr-value", 0, UINT32_MAX, &mValue); - ModelCommand::AddArguments(); - } - - ~WritePumpConfigurationAndControlPower() - { - delete onSuccessCallback; - delete onFailureCallback; - } - - CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0200) command (0x01) on endpoint %" PRIu8, endpointId); - - chip::Controller::PumpConfigurationAndControlCluster cluster; - cluster.Associate(device, endpointId); - return cluster.WriteAttributePower(onSuccessCallback->Cancel(), onFailureCallback->Cancel(), mValue); - } - -private: - chip::Callback::Callback * onSuccessCallback = - new chip::Callback::Callback(OnDefaultSuccessResponse, this); - chip::Callback::Callback * onFailureCallback = - new chip::Callback::Callback(OnDefaultFailureResponse, this); - uint32_t mValue; -}; - class ReportPumpConfigurationAndControlPower : public ModelCommand { public: @@ -32716,6 +32683,39 @@ class ReadPumpConfigurationAndControlLifetimeEnergyConsumed : public ModelComman new chip::Callback::Callback(OnDefaultFailureResponse, this); }; +class WritePumpConfigurationAndControlLifetimeEnergyConsumed : public ModelCommand +{ +public: + WritePumpConfigurationAndControlLifetimeEnergyConsumed() : ModelCommand("write") + { + AddArgument("attr-name", "lifetime-energy-consumed"); + AddArgument("attr-value", 0, UINT32_MAX, &mValue); + ModelCommand::AddArguments(); + } + + ~WritePumpConfigurationAndControlLifetimeEnergyConsumed() + { + delete onSuccessCallback; + delete onFailureCallback; + } + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0200) command (0x01) on endpoint %" PRIu8, endpointId); + + chip::Controller::PumpConfigurationAndControlCluster cluster; + cluster.Associate(device, endpointId); + return cluster.WriteAttributeLifetimeEnergyConsumed(onSuccessCallback->Cancel(), onFailureCallback->Cancel(), mValue); + } + +private: + chip::Callback::Callback * onSuccessCallback = + new chip::Callback::Callback(OnDefaultSuccessResponse, this); + chip::Callback::Callback * onFailureCallback = + new chip::Callback::Callback(OnDefaultFailureResponse, this); + uint32_t mValue; +}; + class ReportPumpConfigurationAndControlLifetimeEnergyConsumed : public ModelCommand { public: @@ -54126,9 +54126,9 @@ void registerClusterPumpConfigurationAndControl(Commands & commands) make_unique(), // make_unique(), // make_unique(), // - make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index c862884a3ef01f..c729eea617ae69 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -15324,7 +15324,7 @@ class Test_TC_LVL_3_1 : public TestCommand (static_cast(context))->OnFailureResponse_10(chip::to_underlying(status)); } - static void OnSuccessCallback_10(void * context, uint8_t defaultMoveRate) + static void OnSuccessCallback_10(void * context, const chip::app::DataModel::Nullable & defaultMoveRate) { (static_cast(context))->OnSuccessResponse_10(defaultMoveRate); } @@ -15502,8 +15502,8 @@ class Test_TC_LVL_3_1 : public TestCommand chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevice, endpoint); - uint8_t defaultMoveRateArgument; - defaultMoveRateArgument = 20; + chip::app::DataModel::Nullable defaultMoveRateArgument; + defaultMoveRateArgument.SetNonNull() = 20; return cluster.WriteAttribute( defaultMoveRateArgument, this, OnSuccessCallback_9, OnFailureCallback_9); @@ -15525,9 +15525,10 @@ class Test_TC_LVL_3_1 : public TestCommand void OnFailureResponse_10(uint8_t status) { ThrowFailureResponse(); } - void OnSuccessResponse_10(uint8_t defaultMoveRate) + void OnSuccessResponse_10(const chip::app::DataModel::Nullable & defaultMoveRate) { - VerifyOrReturn(CheckValue("defaultMoveRate", defaultMoveRate, 20)); + VerifyOrReturn(CheckValueNonNull("defaultMoveRate", defaultMoveRate)); + VerifyOrReturn(CheckValue("defaultMoveRate.Value()", defaultMoveRate.Value(), 20)); NextTest(); } diff --git a/zzz_generated/controller-clusters/zap-generated/CHIPClusters.cpp b/zzz_generated/controller-clusters/zap-generated/CHIPClusters.cpp index 2267654cf7012e..a63531d430b837 100644 --- a/zzz_generated/controller-clusters/zap-generated/CHIPClusters.cpp +++ b/zzz_generated/controller-clusters/zap-generated/CHIPClusters.cpp @@ -14057,17 +14057,6 @@ CHIP_ERROR PumpConfigurationAndControlCluster::ReadAttributePower(Callback::Canc BasicAttributeFilter); } -CHIP_ERROR PumpConfigurationAndControlCluster::WriteAttributePower(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint32_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, PumpConfigurationAndControl::Attributes::Power::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} - CHIP_ERROR PumpConfigurationAndControlCluster::SubscribeAttributePower(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t minInterval, uint16_t maxInterval) @@ -14096,6 +14085,19 @@ CHIP_ERROR PumpConfigurationAndControlCluster::ReadAttributeLifetimeEnergyConsum BasicAttributeFilter); } +CHIP_ERROR PumpConfigurationAndControlCluster::WriteAttributeLifetimeEnergyConsumed(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + uint32_t value) +{ + app::WriteClientHandle handle; + ReturnErrorOnFailure( + app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); + ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( + chip::app::AttributePathParams(mEndpoint, mClusterId, PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::Id), + value)); + return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); +} + CHIP_ERROR PumpConfigurationAndControlCluster::SubscribeAttributeLifetimeEnergyConsumed(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t minInterval, uint16_t maxInterval) diff --git a/zzz_generated/controller-clusters/zap-generated/CHIPClusters.h b/zzz_generated/controller-clusters/zap-generated/CHIPClusters.h index 3f0f292d4c6295..2c23c3386ab8dd 100644 --- a/zzz_generated/controller-clusters/zap-generated/CHIPClusters.h +++ b/zzz_generated/controller-clusters/zap-generated/CHIPClusters.h @@ -1944,8 +1944,8 @@ class DLL_EXPORT PumpConfigurationAndControlCluster : public ClusterBase CHIP_ERROR ReadAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); CHIP_ERROR WriteAttributeLifetimeRunningHours(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint32_t value); - CHIP_ERROR WriteAttributePower(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint32_t value); + CHIP_ERROR WriteAttributeLifetimeEnergyConsumed(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint32_t value); CHIP_ERROR WriteAttributeOperationMode(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint8_t value); CHIP_ERROR WriteAttributeControlMode(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, diff --git a/zzz_generated/controller-clusters/zap-generated/endpoint_config.h b/zzz_generated/controller-clusters/zap-generated/endpoint_config.h index 50cb612f860727..f64db749d28538 100644 --- a/zzz_generated/controller-clusters/zap-generated/endpoint_config.h +++ b/zzz_generated/controller-clusters/zap-generated/endpoint_config.h @@ -90,11 +90,11 @@ #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ { \ - (uint8_t *) (&generatedDefaults[index]) \ + &generatedDefaults[index] \ } #define ZAP_MIN_MAX_DEFAULTS_INDEX(index) \ { \ - (uint8_t *) (&minMaxDefault[index]) \ + &minMaxDefaults[index] \ } #define ZAP_EMPTY_DEFAULT() \ { \ diff --git a/zzz_generated/controller-clusters/zap-generated/tests/CHIPClustersTest.cpp b/zzz_generated/controller-clusters/zap-generated/tests/CHIPClustersTest.cpp index 727069746b1a15..e62284967bc6d7 100644 --- a/zzz_generated/controller-clusters/zap-generated/tests/CHIPClustersTest.cpp +++ b/zzz_generated/controller-clusters/zap-generated/tests/CHIPClustersTest.cpp @@ -2381,16 +2381,14 @@ CHIP_ERROR PumpConfigurationAndControlClusterTest::WriteAttributeSpeed(Callback: chip::app::AttributePathParams(mEndpoint, mClusterId, PumpConfigurationAndControl::Attributes::Speed::Id), value)); return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); } -CHIP_ERROR PumpConfigurationAndControlClusterTest::WriteAttributeLifetimeEnergyConsumed(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint32_t value) +CHIP_ERROR PumpConfigurationAndControlClusterTest::WriteAttributePower(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint32_t value) { app::WriteClientHandle handle; ReturnErrorOnFailure( app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::Id), - value)); + chip::app::AttributePathParams(mEndpoint, mClusterId, PumpConfigurationAndControl::Attributes::Power::Id), value)); return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); } CHIP_ERROR PumpConfigurationAndControlClusterTest::WriteAttributeAlarmMask(Callback::Cancelable * onSuccessCallback, diff --git a/zzz_generated/controller-clusters/zap-generated/tests/CHIPClustersTest.h b/zzz_generated/controller-clusters/zap-generated/tests/CHIPClustersTest.h index bb6096ca8f7124..250ac262652dc4 100644 --- a/zzz_generated/controller-clusters/zap-generated/tests/CHIPClustersTest.h +++ b/zzz_generated/controller-clusters/zap-generated/tests/CHIPClustersTest.h @@ -816,8 +816,8 @@ class DLL_EXPORT PumpConfigurationAndControlClusterTest : public PumpConfigurati int16_t value); CHIP_ERROR WriteAttributeSpeed(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t value); - CHIP_ERROR WriteAttributeLifetimeEnergyConsumed(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint32_t value); + CHIP_ERROR WriteAttributePower(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint32_t value); CHIP_ERROR WriteAttributeAlarmMask(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t value); CHIP_ERROR WriteAttributeFeatureMap(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, diff --git a/zzz_generated/lighting-app/zap-generated/endpoint_config.h b/zzz_generated/lighting-app/zap-generated/endpoint_config.h index dbb525890ac48f..eac66699b844ef 100644 --- a/zzz_generated/lighting-app/zap-generated/endpoint_config.h +++ b/zzz_generated/lighting-app/zap-generated/endpoint_config.h @@ -522,11 +522,11 @@ #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ { \ - (uint8_t *) (&generatedDefaults[index]) \ + &generatedDefaults[index] \ } #define ZAP_MIN_MAX_DEFAULTS_INDEX(index) \ { \ - (uint8_t *) (&minMaxDefault[index]) \ + &minMaxDefaults[index] \ } #define ZAP_EMPTY_DEFAULT() \ { \ @@ -538,9 +538,23 @@ } // This is an array of EmberAfAttributeMinMaxValue structures. -#define GENERATED_MIN_MAX_DEFAULT_COUNT 0 +#define GENERATED_MIN_MAX_DEFAULT_COUNT 4 #define GENERATED_MIN_MAX_DEFAULTS \ { \ + \ + /* Endpoint: 1, Cluster: Identify (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFE }, /* identify time */ \ + \ + /* Endpoint: 1, Cluster: Level Control (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x3 }, /* options */ \ + \ + /* Endpoint: 1, Cluster: Color Control (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* start up color temperature mireds */ \ + \ + /* Endpoint: 2, Cluster: On/off Switch Configuration (server) */ \ + { \ + (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x2 \ + } /* switch actions */ \ } #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask @@ -722,9 +736,10 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Identify (server) */ \ - { 0x0000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x0000) }, /* identify time */ \ - { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x0) }, /* identify type */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ + { 0x0000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(0) }, /* identify time */ \ + { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x0) }, /* identify type */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: On/Off (server) */ \ { 0x0000, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* OnOff */ \ @@ -736,22 +751,27 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Level Control (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current level */ \ - { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* remaining time */ \ - { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* min level */ \ - { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xFF) }, /* max level */ \ - { 0x0004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current frequency */ \ - { 0x0005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* min frequency */ \ - { 0x0006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* max frequency */ \ - { 0x000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* options */ \ + { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current level */ \ + { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* remaining time */ \ + { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* min level */ \ + { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xFF) }, /* max level */ \ + { 0x0004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current frequency */ \ + { 0x0005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* min frequency */ \ + { 0x0006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* max frequency */ \ + { 0x000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(1) }, /* options */ \ { 0x0010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_SIMPLE_DEFAULT(0x0000) }, /* on off transition time */ \ - { 0x0011, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0xFE) }, /* on level */ \ - { 0x0012, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* on transition time */ \ - { 0x0013, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* off transition time */ \ - { 0x0014, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* default move rate */ \ - { 0x4000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* start up current level */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + ZAP_SIMPLE_DEFAULT(0x0000) }, /* on off transition time */ \ + { 0x0011, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(0xFE) }, /* on level */ \ + { 0x0012, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_EMPTY_DEFAULT() }, /* on transition time */ \ + { 0x0013, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_EMPTY_DEFAULT() }, /* off transition time */ \ + { 0x0014, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_EMPTY_DEFAULT() }, /* default move rate */ \ + { 0x4000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* start up current level */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Descriptor (server) */ \ { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ @@ -781,8 +801,8 @@ { 0x400B, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* color temp physical min */ \ { 0x400C, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xFEFF) }, /* color temp physical max */ \ { 0x400D, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* couple color temp to level min-mireds */ \ - { 0x4010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* start up color temperature mireds */ \ + { 0x4010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(2) }, /* start up color temperature mireds */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Occupancy Sensing (server) */ \ @@ -795,9 +815,10 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 2, Cluster: On/off Switch Configuration (server) */ \ - { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* switch type */ \ - { 0x0010, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* switch actions */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* switch type */ \ + { 0x0010, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(3) }, /* switch actions */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ } // This is an array of EmberAfCluster structures. diff --git a/zzz_generated/lock-app/zap-generated/endpoint_config.h b/zzz_generated/lock-app/zap-generated/endpoint_config.h index 87a9f0a262ad2c..352e54a5242791 100644 --- a/zzz_generated/lock-app/zap-generated/endpoint_config.h +++ b/zzz_generated/lock-app/zap-generated/endpoint_config.h @@ -522,11 +522,11 @@ #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ { \ - (uint8_t *) (&generatedDefaults[index]) \ + &generatedDefaults[index] \ } #define ZAP_MIN_MAX_DEFAULTS_INDEX(index) \ { \ - (uint8_t *) (&minMaxDefault[index]) \ + &minMaxDefaults[index] \ } #define ZAP_EMPTY_DEFAULT() \ { \ diff --git a/zzz_generated/ota-provider-app/zap-generated/endpoint_config.h b/zzz_generated/ota-provider-app/zap-generated/endpoint_config.h index 184edefd92d5d6..71dabda397a4e2 100644 --- a/zzz_generated/ota-provider-app/zap-generated/endpoint_config.h +++ b/zzz_generated/ota-provider-app/zap-generated/endpoint_config.h @@ -98,11 +98,11 @@ #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ { \ - (uint8_t *) (&generatedDefaults[index]) \ + &generatedDefaults[index] \ } #define ZAP_MIN_MAX_DEFAULTS_INDEX(index) \ { \ - (uint8_t *) (&minMaxDefault[index]) \ + &minMaxDefaults[index] \ } #define ZAP_EMPTY_DEFAULT() \ { \ diff --git a/zzz_generated/ota-requestor-app/zap-generated/endpoint_config.h b/zzz_generated/ota-requestor-app/zap-generated/endpoint_config.h index 49644a8adc5d98..c5aff2e4eb6783 100644 --- a/zzz_generated/ota-requestor-app/zap-generated/endpoint_config.h +++ b/zzz_generated/ota-requestor-app/zap-generated/endpoint_config.h @@ -98,11 +98,11 @@ #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ { \ - (uint8_t *) (&generatedDefaults[index]) \ + &generatedDefaults[index] \ } #define ZAP_MIN_MAX_DEFAULTS_INDEX(index) \ { \ - (uint8_t *) (&minMaxDefault[index]) \ + &minMaxDefaults[index] \ } #define ZAP_EMPTY_DEFAULT() \ { \ diff --git a/zzz_generated/placeholder/app1/zap-generated/endpoint_config.h b/zzz_generated/placeholder/app1/zap-generated/endpoint_config.h index 15f4a0ff026eda..9c108eead6c1bb 100644 --- a/zzz_generated/placeholder/app1/zap-generated/endpoint_config.h +++ b/zzz_generated/placeholder/app1/zap-generated/endpoint_config.h @@ -144,11 +144,11 @@ #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ { \ - (uint8_t *) (&generatedDefaults[index]) \ + &generatedDefaults[index] \ } #define ZAP_MIN_MAX_DEFAULTS_INDEX(index) \ { \ - (uint8_t *) (&minMaxDefault[index]) \ + &minMaxDefaults[index] \ } #define ZAP_EMPTY_DEFAULT() \ { \ @@ -160,9 +160,17 @@ } // This is an array of EmberAfAttributeMinMaxValue structures. -#define GENERATED_MIN_MAX_DEFAULT_COUNT 0 +#define GENERATED_MIN_MAX_DEFAULT_COUNT 2 #define GENERATED_MIN_MAX_DEFAULTS \ { \ + \ + /* Endpoint: 1, Cluster: Identify (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFE }, /* identify time */ \ + \ + /* Endpoint: 1, Cluster: Color Control (server) */ \ + { \ + (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF \ + } /* start up color temperature mireds */ \ } #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask @@ -210,9 +218,10 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Identify (server) */ \ - { 0x0000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x0) }, /* identify time */ \ - { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x0) }, /* identify type */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ + { 0x0000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(0) }, /* identify time */ \ + { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x0) }, /* identify type */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Groups (server) */ \ { 0x0000, ZAP_TYPE(BITMAP8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* name support */ \ @@ -255,8 +264,8 @@ { 0x0004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x607D) }, /* current y */ \ { 0x000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* color control options */ \ { 0x400D, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* couple color temp to level min-mireds */ \ - { 0x4010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* start up color temperature mireds */ \ + { 0x4010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(1) }, /* start up color temperature mireds */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ } diff --git a/zzz_generated/placeholder/app2/zap-generated/endpoint_config.h b/zzz_generated/placeholder/app2/zap-generated/endpoint_config.h index 0d92b359ab4303..2bc2d8587f0dc2 100644 --- a/zzz_generated/placeholder/app2/zap-generated/endpoint_config.h +++ b/zzz_generated/placeholder/app2/zap-generated/endpoint_config.h @@ -144,11 +144,11 @@ #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ { \ - (uint8_t *) (&generatedDefaults[index]) \ + &generatedDefaults[index] \ } #define ZAP_MIN_MAX_DEFAULTS_INDEX(index) \ { \ - (uint8_t *) (&minMaxDefault[index]) \ + &minMaxDefaults[index] \ } #define ZAP_EMPTY_DEFAULT() \ { \ @@ -160,9 +160,14 @@ } // This is an array of EmberAfAttributeMinMaxValue structures. -#define GENERATED_MIN_MAX_DEFAULT_COUNT 0 +#define GENERATED_MIN_MAX_DEFAULT_COUNT 1 #define GENERATED_MIN_MAX_DEFAULTS \ { \ + \ + /* Endpoint: 1, Cluster: Identify (server) */ \ + { \ + (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFE \ + } /* identify time */ \ } #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask @@ -210,9 +215,10 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Identify (server) */ \ - { 0x0000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x0) }, /* identify time */ \ - { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x0) }, /* identify type */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ + { 0x0000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(0) }, /* identify time */ \ + { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x0) }, /* identify type */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Groups (server) */ \ { 0x0000, ZAP_TYPE(BITMAP8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* name support */ \ diff --git a/zzz_generated/pump-app/zap-generated/endpoint_config.h b/zzz_generated/pump-app/zap-generated/endpoint_config.h index 4fe5f355c91b23..52c1de77aefafe 100644 --- a/zzz_generated/pump-app/zap-generated/endpoint_config.h +++ b/zzz_generated/pump-app/zap-generated/endpoint_config.h @@ -540,11 +540,11 @@ #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ { \ - (uint8_t *) (&generatedDefaults[index]) \ + &generatedDefaults[index] \ } #define ZAP_MIN_MAX_DEFAULTS_INDEX(index) \ { \ - (uint8_t *) (&minMaxDefault[index]) \ + &minMaxDefaults[index] \ } #define ZAP_EMPTY_DEFAULT() \ { \ @@ -556,9 +556,15 @@ } // This is an array of EmberAfAttributeMinMaxValue structures. -#define GENERATED_MIN_MAX_DEFAULT_COUNT 0 +#define GENERATED_MIN_MAX_DEFAULT_COUNT 2 #define GENERATED_MIN_MAX_DEFAULTS \ { \ + \ + /* Endpoint: 1, Cluster: Pump Configuration and Control (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFE }, /* OperationMode */ \ + { \ + (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFE \ + } /* ControlMode */ \ } #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask @@ -764,15 +770,18 @@ { 0x0012, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* EffectiveControlMode */ \ { 0x0013, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* Capacity */ \ { 0x0014, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* Speed */ \ - { 0x0015, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_LONG_DEFAULTS_INDEX(595) }, /* LifetimeRunningHours */ \ - { 0x0016, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(598) }, /* Power */ \ - { 0x0017, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(601) }, /* LifetimeEnergyConsumed */ \ - { 0x0020, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* OperationMode */ \ - { 0x0021, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* ControlMode */ \ - { 0x0022, ZAP_TYPE(BITMAP16), 2, 0, ZAP_EMPTY_DEFAULT() }, /* AlarmMask */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(605) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0015, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_LONG_DEFAULTS_INDEX(595) }, /* LifetimeRunningHours */ \ + { 0x0016, ZAP_TYPE(INT24U), 3, 0, ZAP_LONG_DEFAULTS_INDEX(598) }, /* Power */ \ + { 0x0017, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_LONG_DEFAULTS_INDEX(601) }, /* LifetimeEnergyConsumed */ \ + { 0x0020, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(0) }, /* OperationMode */ \ + { 0x0021, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(1) }, /* ControlMode */ \ + { 0x0022, ZAP_TYPE(BITMAP16), 2, 0, ZAP_EMPTY_DEFAULT() }, /* AlarmMask */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(605) }, /* FeatureMap */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Temperature Measurement (client) */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ diff --git a/zzz_generated/pump-controller-app/zap-generated/endpoint_config.h b/zzz_generated/pump-controller-app/zap-generated/endpoint_config.h index 7243731f95b495..953f763645f888 100644 --- a/zzz_generated/pump-controller-app/zap-generated/endpoint_config.h +++ b/zzz_generated/pump-controller-app/zap-generated/endpoint_config.h @@ -512,11 +512,11 @@ #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ { \ - (uint8_t *) (&generatedDefaults[index]) \ + &generatedDefaults[index] \ } #define ZAP_MIN_MAX_DEFAULTS_INDEX(index) \ { \ - (uint8_t *) (&minMaxDefault[index]) \ + &minMaxDefaults[index] \ } #define ZAP_EMPTY_DEFAULT() \ { \ diff --git a/zzz_generated/temperature-measurement-app/zap-generated/endpoint_config.h b/zzz_generated/temperature-measurement-app/zap-generated/endpoint_config.h index f125fbface4894..788acee2fcfb0b 100644 --- a/zzz_generated/temperature-measurement-app/zap-generated/endpoint_config.h +++ b/zzz_generated/temperature-measurement-app/zap-generated/endpoint_config.h @@ -244,11 +244,11 @@ #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ { \ - (uint8_t *) (&generatedDefaults[index]) \ + &generatedDefaults[index] \ } #define ZAP_MIN_MAX_DEFAULTS_INDEX(index) \ { \ - (uint8_t *) (&minMaxDefault[index]) \ + &minMaxDefaults[index] \ } #define ZAP_EMPTY_DEFAULT() \ { \ diff --git a/zzz_generated/thermostat/zap-generated/endpoint_config.h b/zzz_generated/thermostat/zap-generated/endpoint_config.h index 23c3f6cd7fa1e2..f22e8f60fda957 100644 --- a/zzz_generated/thermostat/zap-generated/endpoint_config.h +++ b/zzz_generated/thermostat/zap-generated/endpoint_config.h @@ -606,11 +606,11 @@ #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ { \ - (uint8_t *) (&generatedDefaults[index]) \ + &generatedDefaults[index] \ } #define ZAP_MIN_MAX_DEFAULTS_INDEX(index) \ { \ - (uint8_t *) (&minMaxDefault[index]) \ + &minMaxDefaults[index] \ } #define ZAP_EMPTY_DEFAULT() \ { \ @@ -622,9 +622,26 @@ } // This is an array of EmberAfAttributeMinMaxValue structures. -#define GENERATED_MIN_MAX_DEFAULT_COUNT 0 +#define GENERATED_MIN_MAX_DEFAULT_COUNT 9 #define GENERATED_MIN_MAX_DEFAULTS \ { \ + \ + /* Endpoint: 0, Cluster: Identify (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFE }, /* identify time */ \ + \ + /* Endpoint: 1, Cluster: Identify (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFE }, /* identify time */ \ + \ + /* Endpoint: 1, Cluster: Thermostat (server) */ \ + { (uint16_t) 0x2BC, (uint16_t) 0x954D, (uint16_t) 0x7FFF }, /* min heat setpoint limit */ \ + { (uint16_t) 0xBB8, (uint16_t) 0x954D, (uint16_t) 0x7FFF }, /* max heat setpoint limit */ \ + { (uint16_t) 0x640, (uint16_t) 0x954D, (uint16_t) 0x7FFF }, /* min cool setpoint limit */ \ + { (uint16_t) 0xC80, (uint16_t) 0x954D, (uint16_t) 0x7FFF }, /* max cool setpoint limit */ \ + { (uint16_t) 0x19, (uint16_t) 0xA, (uint16_t) 0x19 }, /* min setpoint dead band */ \ + { (uint16_t) 0x4, (uint16_t) 0x0, (uint16_t) 0x5 }, /* control sequence of operation */ \ + { \ + (uint16_t) 0x1, (uint16_t) 0x0, (uint16_t) 0x7 \ + } /* system mode */ \ } #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask @@ -634,8 +651,9 @@ { \ \ /* Endpoint: 0, Cluster: Identify (server) */ \ - { 0x0000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x0000) }, /* identify time */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ + { 0x0000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(0) }, /* identify time */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Descriptor (server) */ \ { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ @@ -826,9 +844,10 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Identify (server) */ \ - { 0x0000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x0000) }, /* identify time */ \ - { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x0) }, /* identify type */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ + { 0x0000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(1) }, /* identify time */ \ + { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x0) }, /* identify type */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Groups (server) */ \ { 0x0000, ZAP_TYPE(BITMAP8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* name support */ \ @@ -868,15 +887,21 @@ ZAP_SIMPLE_DEFAULT(0x0A28) }, /* occupied cooling setpoint */ \ { 0x0012, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_SIMPLE_DEFAULT(0x07D0) }, /* occupied heating setpoint */ \ - { 0x0015, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(700) }, /* min heat setpoint limit */ \ - { 0x0016, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(3000) }, /* max heat setpoint limit */ \ - { 0x0017, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(1600) }, /* min cool setpoint limit */ \ - { 0x0018, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(3200) }, /* max cool setpoint limit */ \ - { 0x0019, ZAP_TYPE(INT8S), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x19) }, /* min setpoint dead band */ \ - { 0x001B, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_SIMPLE_DEFAULT(0x04) }, /* control sequence of operation */ \ - { 0x001C, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x01) }, /* system mode */ \ - { 0x0020, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* start of week */ \ + { 0x0015, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(2) }, /* min heat setpoint limit */ \ + { 0x0016, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(3) }, /* max heat setpoint limit */ \ + { 0x0017, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(4) }, /* min cool setpoint limit */ \ + { 0x0018, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(5) }, /* max cool setpoint limit */ \ + { 0x0019, ZAP_TYPE(INT8S), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(6) }, /* min setpoint dead band */ \ + { 0x001B, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(7) }, /* control sequence of operation */ \ + { 0x001C, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(8) }, /* system mode */ \ + { 0x0020, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* start of week */ \ { 0x0021, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(7) }, /* number of weekly transitions */ \ { 0x0022, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(4) }, /* number of daily transitions */ \ { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1124) }, /* FeatureMap */ \ diff --git a/zzz_generated/tv-app/zap-generated/endpoint_config.h b/zzz_generated/tv-app/zap-generated/endpoint_config.h index c873086e9b26e2..e72102dd5107c0 100644 --- a/zzz_generated/tv-app/zap-generated/endpoint_config.h +++ b/zzz_generated/tv-app/zap-generated/endpoint_config.h @@ -1010,11 +1010,11 @@ #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ { \ - (uint8_t *) (&generatedDefaults[index]) \ + &generatedDefaults[index] \ } #define ZAP_MIN_MAX_DEFAULTS_INDEX(index) \ { \ - (uint8_t *) (&minMaxDefault[index]) \ + &minMaxDefaults[index] \ } #define ZAP_EMPTY_DEFAULT() \ { \ @@ -1026,9 +1026,14 @@ } // This is an array of EmberAfAttributeMinMaxValue structures. -#define GENERATED_MIN_MAX_DEFAULT_COUNT 0 +#define GENERATED_MIN_MAX_DEFAULT_COUNT 1 #define GENERATED_MIN_MAX_DEFAULTS \ { \ + \ + /* Endpoint: 2, Cluster: Level Control (server) */ \ + { \ + (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x3 \ + } /* options */ \ } #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask @@ -1287,22 +1292,27 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* ClusterRevision */ \ \ /* Endpoint: 2, Cluster: Level Control (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current level */ \ - { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* remaining time */ \ - { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* min level */ \ - { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xFF) }, /* max level */ \ - { 0x0004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current frequency */ \ - { 0x0005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* min frequency */ \ - { 0x0006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* max frequency */ \ - { 0x000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* options */ \ + { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current level */ \ + { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* remaining time */ \ + { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* min level */ \ + { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xFF) }, /* max level */ \ + { 0x0004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current frequency */ \ + { 0x0005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* min frequency */ \ + { 0x0006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* max frequency */ \ + { 0x000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(0) }, /* options */ \ { 0x0010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_SIMPLE_DEFAULT(0x0000) }, /* on off transition time */ \ - { 0x0011, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0xFE) }, /* on level */ \ - { 0x0012, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* on transition time */ \ - { 0x0013, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* off transition time */ \ - { 0x0014, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* default move rate */ \ - { 0x4000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* start up current level */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + ZAP_SIMPLE_DEFAULT(0x0000) }, /* on off transition time */ \ + { 0x0011, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(0xFE) }, /* on level */ \ + { 0x0012, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_EMPTY_DEFAULT() }, /* on transition time */ \ + { 0x0013, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_EMPTY_DEFAULT() }, /* off transition time */ \ + { 0x0014, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_EMPTY_DEFAULT() }, /* default move rate */ \ + { 0x4000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* start up current level */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 2, Cluster: Descriptor (server) */ \ { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ diff --git a/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h b/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h index 8094d61eef64e7..df8eea42a2c944 100644 --- a/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h +++ b/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h @@ -1020,11 +1020,11 @@ #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ { \ - (uint8_t *) (&generatedDefaults[index]) \ + &generatedDefaults[index] \ } #define ZAP_MIN_MAX_DEFAULTS_INDEX(index) \ { \ - (uint8_t *) (&minMaxDefault[index]) \ + &minMaxDefaults[index] \ } #define ZAP_EMPTY_DEFAULT() \ { \ @@ -1036,9 +1036,38 @@ } // This is an array of EmberAfAttributeMinMaxValue structures. -#define GENERATED_MIN_MAX_DEFAULT_COUNT 0 +#define GENERATED_MIN_MAX_DEFAULT_COUNT 15 #define GENERATED_MIN_MAX_DEFAULTS \ { \ + \ + /* Endpoint: 1, Cluster: Identify (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFE }, /* identify time */ \ + \ + /* Endpoint: 1, Cluster: Level Control (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x3 }, /* options */ \ + \ + /* Endpoint: 1, Cluster: Binary Input (Basic) (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x1 }, /* out of service */ \ + \ + /* Endpoint: 1, Cluster: Window Covering (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xF }, /* Mode */ \ + \ + /* Endpoint: 1, Cluster: Thermostat (server) */ \ + { (uint16_t) 0x4, (uint16_t) 0x0, (uint16_t) 0x5 }, /* control sequence of operation */ \ + { (uint16_t) 0x1, (uint16_t) 0x0, (uint16_t) 0x7 }, /* system mode */ \ + \ + /* Endpoint: 1, Cluster: Color Control (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* white point x */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* white point y */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* color point r x */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* color point r y */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* color point g x */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* color point g y */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* color point b x */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* color point b y */ \ + { \ + (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF \ + } /* start up color temperature mireds */ \ } #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask @@ -1239,8 +1268,9 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Identify (server) */ \ - { 0x0000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x0000) }, /* identify time */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ + { 0x0000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(0) }, /* identify time */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Groups (server) */ \ { 0x0000, ZAP_TYPE(BITMAP8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* name support */ \ @@ -1264,28 +1294,34 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Level Control (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current level */ \ - { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* remaining time */ \ - { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* min level */ \ - { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xFF) }, /* max level */ \ - { 0x0004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current frequency */ \ - { 0x0005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* min frequency */ \ - { 0x0006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* max frequency */ \ - { 0x000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* options */ \ + { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current level */ \ + { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* remaining time */ \ + { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* min level */ \ + { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xFF) }, /* max level */ \ + { 0x0004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current frequency */ \ + { 0x0005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* min frequency */ \ + { 0x0006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* max frequency */ \ + { 0x000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(1) }, /* options */ \ { 0x0010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_SIMPLE_DEFAULT(0x0000) }, /* on off transition time */ \ - { 0x0011, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0xFE) }, /* on level */ \ - { 0x0012, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* on transition time */ \ - { 0x0013, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* off transition time */ \ - { 0x0014, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* default move rate */ \ - { 0x4000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* start up current level */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + ZAP_SIMPLE_DEFAULT(0x0000) }, /* on off transition time */ \ + { 0x0011, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(0xFE) }, /* on level */ \ + { 0x0012, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_EMPTY_DEFAULT() }, /* on transition time */ \ + { 0x0013, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_EMPTY_DEFAULT() }, /* off transition time */ \ + { 0x0014, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_EMPTY_DEFAULT() }, /* default move rate */ \ + { 0x4000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* start up current level */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Binary Input (Basic) (server) */ \ - { 0x0051, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* out of service */ \ - { 0x0055, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* present value */ \ - { 0x006F, ZAP_TYPE(BITMAP8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* status flags */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0x0051, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(2) }, /* out of service */ \ + { 0x0055, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* present value */ \ + { 0x006F, ZAP_TYPE(BITMAP8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* status flags */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Descriptor (server) */ \ { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ @@ -1345,9 +1381,10 @@ { 0x0011, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xFFFF) }, /* InstalledClosedLimitLift */ \ { 0x0012, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* InstalledOpenLimitTilt */ \ { 0x0013, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xFFFF) }, /* InstalledClosedLimitTilt */ \ - { 0x0017, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* Mode */ \ - { 0x001A, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* SafetyStatus */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0x0017, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(3) }, /* Mode */ \ + { 0x001A, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* SafetyStatus */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Barrier Control (server) */ \ { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* barrier moving state */ \ @@ -1362,10 +1399,11 @@ ZAP_SIMPLE_DEFAULT(0x0A28) }, /* occupied cooling setpoint */ \ { 0x0012, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_SIMPLE_DEFAULT(0x07D0) }, /* occupied heating setpoint */ \ - { 0x001B, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_SIMPLE_DEFAULT(0x04) }, /* control sequence of operation */ \ - { 0x001C, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x01) }, /* system mode */ \ - { 0x0020, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* start of week */ \ + { 0x001B, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(4) }, /* control sequence of operation */ \ + { 0x001C, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(5) }, /* system mode */ \ + { 0x0020, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* start of week */ \ { 0x0021, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(7) }, /* number of weekly transitions */ \ { 0x0022, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(4) }, /* number of daily transitions */ \ { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1382) }, /* FeatureMap */ \ @@ -1401,28 +1439,36 @@ { 0x0028, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* primary 6 x */ \ { 0x0029, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* primary 6 y */ \ { 0x002A, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* primary 6 intensity */ \ - { 0x0030, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* white point x */ \ - { 0x0031, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* white point y */ \ - { 0x0032, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* color point r x */ \ - { 0x0033, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* color point r y */ \ - { 0x0034, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* color point r intensity */ \ - { 0x0036, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* color point g x */ \ - { 0x0037, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* color point g y */ \ - { 0x0038, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* color point g intensity */ \ - { 0x003A, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* color point b x */ \ - { 0x003B, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* color point b y */ \ - { 0x003C, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* color point b intensity */ \ - { 0x4000, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* enhanced current hue */ \ - { 0x4001, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x01) }, /* enhanced color mode */ \ - { 0x4002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* color loop active */ \ - { 0x4003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* color loop direction */ \ - { 0x4004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0019) }, /* color loop time */ \ - { 0x400A, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* color capabilities */ \ - { 0x400B, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* color temp physical min */ \ - { 0x400C, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xFEFF) }, /* color temp physical max */ \ + { 0x0030, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(6) }, /* white point x */ \ + { 0x0031, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(7) }, /* white point y */ \ + { 0x0032, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(8) }, /* color point r x */ \ + { 0x0033, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(9) }, /* color point r y */ \ + { 0x0034, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* color point r intensity */ \ + { 0x0036, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(10) }, /* color point g x */ \ + { 0x0037, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(11) }, /* color point g y */ \ + { 0x0038, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* color point g intensity */ \ + { 0x003A, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(12) }, /* color point b x */ \ + { 0x003B, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(13) }, /* color point b y */ \ + { 0x003C, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* color point b intensity */ \ + { 0x4000, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* enhanced current hue */ \ + { 0x4001, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x01) }, /* enhanced color mode */ \ + { 0x4002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* color loop active */ \ + { 0x4003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* color loop direction */ \ + { 0x4004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0019) }, /* color loop time */ \ + { 0x400A, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* color capabilities */ \ + { 0x400B, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* color temp physical min */ \ + { 0x400C, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xFEFF) }, /* color temp physical max */ \ { 0x400D, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* couple color temp to level min-mireds */ \ - { 0x4010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* start up color temperature mireds */ \ + { 0x4010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(14) }, /* start up color temperature mireds */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Temperature Measurement (server) */ \ diff --git a/zzz_generated/window-app/zap-generated/endpoint_config.h b/zzz_generated/window-app/zap-generated/endpoint_config.h index 7493e0332b4668..e9f7f5edefae04 100644 --- a/zzz_generated/window-app/zap-generated/endpoint_config.h +++ b/zzz_generated/window-app/zap-generated/endpoint_config.h @@ -560,11 +560,11 @@ #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ { \ - (uint8_t *) (&generatedDefaults[index]) \ + &generatedDefaults[index] \ } #define ZAP_MIN_MAX_DEFAULTS_INDEX(index) \ { \ - (uint8_t *) (&minMaxDefault[index]) \ + &minMaxDefaults[index] \ } #define ZAP_EMPTY_DEFAULT() \ { \ @@ -576,9 +576,17 @@ } // This is an array of EmberAfAttributeMinMaxValue structures. -#define GENERATED_MIN_MAX_DEFAULT_COUNT 0 +#define GENERATED_MIN_MAX_DEFAULT_COUNT 3 #define GENERATED_MIN_MAX_DEFAULTS \ { \ + \ + /* Endpoint: 1, Cluster: Identify (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFE }, /* identify time */ \ + \ + /* Endpoint: 1, Cluster: Window Covering (server) */ \ + { (uint16_t) 0x14, (uint16_t) 0x0, (uint16_t) 0xF }, /* Mode */ \ + \ + /* Endpoint: 2, Cluster: Window Covering (server) */ { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xF } /* Mode */ \ } #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask @@ -764,9 +772,10 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Identify (server) */ \ - { 0x0000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x0000) }, /* identify time */ \ - { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x0) }, /* identify type */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ + { 0x0000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(0) }, /* identify time */ \ + { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x0) }, /* identify type */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Descriptor (server) */ \ { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ @@ -792,10 +801,11 @@ { 0x0011, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xFFFF) }, /* InstalledClosedLimitLift */ \ { 0x0012, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* InstalledOpenLimitTilt */ \ { 0x0013, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xFFFF) }, /* InstalledClosedLimitTilt */ \ - { 0x0017, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x14) }, /* Mode */ \ - { 0x001A, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* SafetyStatus */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(615) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ + { 0x0017, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(1) }, /* Mode */ \ + { 0x001A, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* SafetyStatus */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(615) }, /* FeatureMap */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ \ /* Endpoint: 2, Cluster: Descriptor (server) */ \ { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ @@ -821,10 +831,11 @@ { 0x0011, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xFFFF) }, /* InstalledClosedLimitLift */ \ { 0x0012, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* InstalledOpenLimitTilt */ \ { 0x0013, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xFFFF) }, /* InstalledClosedLimitTilt */ \ - { 0x0017, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* Mode */ \ - { 0x001A, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* SafetyStatus */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(619) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ + { 0x0017, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(2) }, /* Mode */ \ + { 0x001A, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* SafetyStatus */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(619) }, /* FeatureMap */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ } // This is an array of EmberAfCluster structures. From 39584290dca5ad14bfa04bd648646d682213630b Mon Sep 17 00:00:00 2001 From: Kamil Kasperczyk <66371704+kkasperczyk-no@users.noreply.github.com> Date: Tue, 30 Nov 2021 10:10:41 +0100 Subject: [PATCH 30/42] Added automatic node resolve after first transmission failure. (#12263) * Data advertised in the DNS-SD records such as IP address or CRA/CRI values may change in time and it may result in communication failures. * DNS-SD records are cached, so in case of device IP address change and trying to resolve address again the cached value is used instead of the new one. * Added argument that allows to bypass reading DNS-SD services data from cache and force resolving node data. * Added SessionRecoveryDelegate that can be used to notify about the first message transmission failure. * Added CHIPDeviceController implementation of SessionRecoveryDelegate to trigger resolving node data again if communication failure appeared. --- .../chip-tool/commands/discover/Commands.h | 3 +- src/app/CASESessionManager.cpp | 3 +- src/controller/CHIPDeviceController.cpp | 8 +++++ src/controller/CHIPDeviceController.h | 4 +++ .../TestCommissionableNodeController.cpp | 5 ++- src/lib/core/CHIPConfig.h | 9 ++++++ src/lib/dnssd/Discovery_ImplPlatform.cpp | 16 ++++++---- src/lib/dnssd/Discovery_ImplPlatform.h | 2 +- src/lib/dnssd/Resolver.h | 12 ++++++- src/lib/dnssd/Resolver_ImplMinimalMdns.cpp | 4 +-- src/lib/dnssd/Resolver_ImplNone.cpp | 2 +- src/lib/shell/commands/Dns.cpp | 2 +- src/messaging/ReliableMessageMgr.cpp | 12 +++++++ src/transport/SessionDelegate.h | 15 +++++++++ src/transport/SessionManager.cpp | 32 +++++++++++++++++++ src/transport/SessionManager.h | 7 ++++ 16 files changed, 121 insertions(+), 15 deletions(-) diff --git a/examples/chip-tool/commands/discover/Commands.h b/examples/chip-tool/commands/discover/Commands.h index 5f74b42ca82037..e09a837d6f1810 100644 --- a/examples/chip-tool/commands/discover/Commands.h +++ b/examples/chip-tool/commands/discover/Commands.h @@ -36,7 +36,8 @@ class Resolve : public DiscoverCommand, public chip::Dnssd::ResolverDelegate chip::Dnssd::Resolver::Instance().SetResolverDelegate(this); ChipLogProgress(chipTool, "Dnssd: Searching for NodeId: %" PRIx64 " FabricId: %" PRIx64 " ...", remoteId, fabricId); return chip::Dnssd::Resolver::Instance().ResolveNodeId(chip::PeerId().SetNodeId(remoteId).SetCompressedFabricId(fabricId), - chip::Inet::IPAddressType::kAny); + chip::Inet::IPAddressType::kAny, + chip::Dnssd::Resolver::CacheBypass::On); } void OnNodeIdResolved(const chip::Dnssd::ResolvedNodeData & nodeData) override diff --git a/src/app/CASESessionManager.cpp b/src/app/CASESessionManager.cpp index b14542272e3414..f5c76239b2a04c 100644 --- a/src/app/CASESessionManager.cpp +++ b/src/app/CASESessionManager.cpp @@ -69,7 +69,8 @@ void CASESessionManager::ReleaseSession(NodeId nodeId) CHIP_ERROR CASESessionManager::ResolveDeviceAddress(NodeId nodeId) { - return Dnssd::Resolver::Instance().ResolveNodeId(GetFabricInfo()->GetPeerIdForNode(nodeId), Inet::IPAddressType::kAny); + return Dnssd::Resolver::Instance().ResolveNodeId(GetFabricInfo()->GetPeerIdForNode(nodeId), Inet::IPAddressType::kAny, + Dnssd::Resolver::CacheBypass::On); } void CASESessionManager::OnNodeIdResolved(const Dnssd::ResolvedNodeData & nodeData) diff --git a/src/controller/CHIPDeviceController.cpp b/src/controller/CHIPDeviceController.cpp index fd35d846fe2ec0..c5331f37b53324 100644 --- a/src/controller/CHIPDeviceController.cpp +++ b/src/controller/CHIPDeviceController.cpp @@ -269,6 +269,13 @@ void DeviceController::OnSessionReleased(SessionHandle session) mCASESessionManager->OnSessionReleased(session); } +void DeviceController::OnFirstMessageDeliveryFailed(const SessionHandle & session) +{ + VerifyOrReturn(mState == State::Initialized, + ChipLogError(Controller, "OnFirstMessageDeliveryFailed was called in incorrect state")); + UpdateDevice(session.GetPeerNodeId()); +} + CHIP_ERROR DeviceController::InitializePairedDeviceList() { CHIP_ERROR err = CHIP_NO_ERROR; @@ -543,6 +550,7 @@ CHIP_ERROR DeviceCommissioner::Init(CommissionerInitParams params) params.systemState->SessionMgr()->RegisterCreationDelegate(*this); params.systemState->SessionMgr()->RegisterReleaseDelegate(*this); + params.systemState->SessionMgr()->RegisterRecoveryDelegate(*this); uint16_t nextKeyID = 0; uint16_t size = sizeof(nextKeyID); diff --git a/src/controller/CHIPDeviceController.h b/src/controller/CHIPDeviceController.h index c3c12300e42b03..598cce01f6362a 100644 --- a/src/controller/CHIPDeviceController.h +++ b/src/controller/CHIPDeviceController.h @@ -188,6 +188,7 @@ typedef void (*OnOpenCommissioningWindow)(void * context, NodeId deviceId, CHIP_ * relevant information when the application tries to communicate with the device */ class DLL_EXPORT DeviceController : public SessionReleaseDelegate, + public SessionRecoveryDelegate, #if CHIP_DEVICE_CONFIG_ENABLE_DNSSD public AbstractDnssdDiscoveryController, #endif @@ -379,6 +380,9 @@ class DLL_EXPORT DeviceController : public SessionReleaseDelegate, //////////// SessionReleaseDelegate Implementation /////////////// void OnSessionReleased(SessionHandle session) override; + //////////// SessionRecoveryDelegate Implementation /////////////// + void OnFirstMessageDeliveryFailed(const SessionHandle & session) override; + #if CHIP_DEVICE_CONFIG_ENABLE_DNSSD //////////// ResolverDelegate Implementation /////////////// void OnNodeIdResolved(const chip::Dnssd::ResolvedNodeData & nodeData) override; diff --git a/src/controller/tests/TestCommissionableNodeController.cpp b/src/controller/tests/TestCommissionableNodeController.cpp index 1a9fbd8f7dbac8..c1101eca7ebb97 100644 --- a/src/controller/tests/TestCommissionableNodeController.cpp +++ b/src/controller/tests/TestCommissionableNodeController.cpp @@ -34,7 +34,10 @@ class MockResolver : public Resolver CHIP_ERROR Init(chip::Inet::InetLayer * inetLayer) override { return InitStatus; } void Shutdown() override {} void SetResolverDelegate(ResolverDelegate *) override {} - CHIP_ERROR ResolveNodeId(const PeerId & peerId, Inet::IPAddressType type) override { return ResolveNodeIdStatus; } + CHIP_ERROR ResolveNodeId(const PeerId & peerId, Inet::IPAddressType type, Resolver::CacheBypass dnssdCacheBypass) override + { + return ResolveNodeIdStatus; + } CHIP_ERROR FindCommissioners(DiscoveryFilter filter = DiscoveryFilter()) override { return FindCommissionersStatus; } CHIP_ERROR FindCommissionableNodes(DiscoveryFilter filter = DiscoveryFilter()) override { return CHIP_ERROR_NOT_IMPLEMENTED; } diff --git a/src/lib/core/CHIPConfig.h b/src/lib/core/CHIPConfig.h index 0f78b4c2eef9ae..3d13987061d868 100644 --- a/src/lib/core/CHIPConfig.h +++ b/src/lib/core/CHIPConfig.h @@ -2702,6 +2702,15 @@ extern const char CHIP_NON_PRODUCTION_MARKER[]; #define CHIP_CONFIG_MAX_SESSION_RELEASE_DELEGATES 2 #endif +/** + * @def CHIP_CONFIG_MAX_SESSION_RECOVERY_DELEGATES + * + * @brief Defines the max number of SessionRecoveryDelegate + */ +#ifndef CHIP_CONFIG_MAX_SESSION_RECOVERY_DELEGATES +#define CHIP_CONFIG_MAX_SESSION_RECOVERY_DELEGATES 3 +#endif + /** * @} */ diff --git a/src/lib/dnssd/Discovery_ImplPlatform.cpp b/src/lib/dnssd/Discovery_ImplPlatform.cpp index c6f55c85dc6777..ea94fed4763e47 100644 --- a/src/lib/dnssd/Discovery_ImplPlatform.cpp +++ b/src/lib/dnssd/Discovery_ImplPlatform.cpp @@ -459,17 +459,21 @@ CHIP_ERROR DiscoveryImplPlatform::FinalizeServiceUpdate() return ChipDnssdFinalizeServiceUpdate(); } -CHIP_ERROR DiscoveryImplPlatform::ResolveNodeId(const PeerId & peerId, Inet::IPAddressType type) +CHIP_ERROR DiscoveryImplPlatform::ResolveNodeId(const PeerId & peerId, Inet::IPAddressType type, + Resolver::CacheBypass dnssdCacheBypass) { ReturnErrorOnFailure(InitImpl()); #if CHIP_CONFIG_MDNS_CACHE_SIZE > 0 - /* see if the entry is cached and use it.... */ - ResolvedNodeData nodeData; - if (sDnssdCache.Lookup(peerId, nodeData) == CHIP_NO_ERROR) + if (dnssdCacheBypass == Resolver::CacheBypass::Off) { - mResolverDelegate->OnNodeIdResolved(nodeData); - return CHIP_NO_ERROR; + /* see if the entry is cached and use it.... */ + ResolvedNodeData nodeData; + if (sDnssdCache.Lookup(peerId, nodeData) == CHIP_NO_ERROR) + { + mResolverDelegate->OnNodeIdResolved(nodeData); + return CHIP_NO_ERROR; + } } #endif diff --git a/src/lib/dnssd/Discovery_ImplPlatform.h b/src/lib/dnssd/Discovery_ImplPlatform.h index 076052ab042bc2..5ac1753493d6ca 100644 --- a/src/lib/dnssd/Discovery_ImplPlatform.h +++ b/src/lib/dnssd/Discovery_ImplPlatform.h @@ -49,7 +49,7 @@ class DiscoveryImplPlatform : public ServiceAdvertiser, public Resolver // Members that implement Resolver interface. void SetResolverDelegate(ResolverDelegate * delegate) override { mResolverDelegate = delegate; } - CHIP_ERROR ResolveNodeId(const PeerId & peerId, Inet::IPAddressType type) override; + CHIP_ERROR ResolveNodeId(const PeerId & peerId, Inet::IPAddressType type, Resolver::CacheBypass dnssdCacheBypass) override; CHIP_ERROR FindCommissionableNodes(DiscoveryFilter filter = DiscoveryFilter()) override; CHIP_ERROR FindCommissioners(DiscoveryFilter filter = DiscoveryFilter()) override; diff --git a/src/lib/dnssd/Resolver.h b/src/lib/dnssd/Resolver.h index d44c55b9a6fc1b..6512ada84f34f0 100644 --- a/src/lib/dnssd/Resolver.h +++ b/src/lib/dnssd/Resolver.h @@ -252,6 +252,12 @@ class ResolverDelegate class Resolver { public: + enum class CacheBypass + { + On, + Off + }; + virtual ~Resolver() {} /** @@ -276,11 +282,15 @@ class Resolver /** * Requests resolution of the given operational node service. * + * If `dnssdCacheBypass` is set to `On` it forces resolution of the given node and bypass option + * of using DNS-SD cache. + * * When the operation succeeds or fails, and a resolver delegate has been registered, * the result of the operation is passed to the delegate's `OnNodeIdResolved` or * `OnNodeIdResolutionFailed` method, respectively. */ - virtual CHIP_ERROR ResolveNodeId(const PeerId & peerId, Inet::IPAddressType type) = 0; + virtual CHIP_ERROR ResolveNodeId(const PeerId & peerId, Inet::IPAddressType type, + Resolver::CacheBypass dnssdCacheBypass = CacheBypass::Off) = 0; /** * Finds all commissionable nodes matching the given filter. diff --git a/src/lib/dnssd/Resolver_ImplMinimalMdns.cpp b/src/lib/dnssd/Resolver_ImplMinimalMdns.cpp index 739894d3a55e5f..da09d23722fe82 100644 --- a/src/lib/dnssd/Resolver_ImplMinimalMdns.cpp +++ b/src/lib/dnssd/Resolver_ImplMinimalMdns.cpp @@ -345,7 +345,7 @@ class MinMdnsResolver : public Resolver, public MdnsPacketDelegate CHIP_ERROR Init(chip::Inet::InetLayer * inetLayer) override; void Shutdown() override; void SetResolverDelegate(ResolverDelegate * delegate) override { mDelegate = delegate; } - CHIP_ERROR ResolveNodeId(const PeerId & peerId, Inet::IPAddressType type) override; + CHIP_ERROR ResolveNodeId(const PeerId & peerId, Inet::IPAddressType type, Resolver::CacheBypass dnssdCacheBypass) override; CHIP_ERROR FindCommissionableNodes(DiscoveryFilter filter = DiscoveryFilter()) override; CHIP_ERROR FindCommissioners(DiscoveryFilter filter = DiscoveryFilter()) override; @@ -500,7 +500,7 @@ CHIP_ERROR MinMdnsResolver::BrowseNodes(DiscoveryType type, DiscoveryFilter filt return SendQuery(qname, mdns::Minimal::QType::ANY); } -CHIP_ERROR MinMdnsResolver::ResolveNodeId(const PeerId & peerId, Inet::IPAddressType type) +CHIP_ERROR MinMdnsResolver::ResolveNodeId(const PeerId & peerId, Inet::IPAddressType type, Resolver::CacheBypass dnssdCacheBypass) { mDiscoveryType = DiscoveryType::kOperational; mActiveResolves.MarkPending(peerId); diff --git a/src/lib/dnssd/Resolver_ImplNone.cpp b/src/lib/dnssd/Resolver_ImplNone.cpp index fc1f0870859ae2..c3c28ac8d138b2 100644 --- a/src/lib/dnssd/Resolver_ImplNone.cpp +++ b/src/lib/dnssd/Resolver_ImplNone.cpp @@ -30,7 +30,7 @@ class NoneResolver : public Resolver void Shutdown() override {} void SetResolverDelegate(ResolverDelegate *) override {} - CHIP_ERROR ResolveNodeId(const PeerId & peerId, Inet::IPAddressType type) override + CHIP_ERROR ResolveNodeId(const PeerId & peerId, Inet::IPAddressType type, Resolver::CacheBypass dnssdCacheBypass) override { ChipLogError(Discovery, "Failed to resolve node ID: dnssd resolving not available"); return CHIP_ERROR_NOT_IMPLEMENTED; diff --git a/src/lib/shell/commands/Dns.cpp b/src/lib/shell/commands/Dns.cpp index 5512b5258f76be..8f8bb31ffeb50d 100644 --- a/src/lib/shell/commands/Dns.cpp +++ b/src/lib/shell/commands/Dns.cpp @@ -124,7 +124,7 @@ CHIP_ERROR ResolveHandler(int argc, char ** argv) peerId.SetCompressedFabricId(strtoull(argv[0], NULL, 10)); peerId.SetNodeId(strtoull(argv[1], NULL, 10)); - return Dnssd::Resolver::Instance().ResolveNodeId(peerId, Inet::IPAddressType::kAny); + return Dnssd::Resolver::Instance().ResolveNodeId(peerId, Inet::IPAddressType::kAny, Dnssd::Resolver::CacheBypass::On); } bool ParseSubType(int argc, char ** argv, Dnssd::DiscoveryFilter & filter) diff --git a/src/messaging/ReliableMessageMgr.cpp b/src/messaging/ReliableMessageMgr.cpp index a156f7d489b07b..8594d080bdadda 100644 --- a/src/messaging/ReliableMessageMgr.cpp +++ b/src/messaging/ReliableMessageMgr.cpp @@ -31,6 +31,7 @@ #include #include #include +#include #include #include @@ -353,6 +354,17 @@ CHIP_ERROR ReliableMessageMgr::SendFromRetransTable(RetransTableEntry * entry) if (err == CHIP_NO_ERROR) { + const ExchangeManager * exchangeMgr = entry->ec->GetExchangeMgr(); + // TODO: investigate why in ReliableMessageMgr::CheckResendApplicationMessageWithPeerExchange unit test released exchange + // context with mExchangeMgr==nullptr is used. + if (exchangeMgr) + { + // After the first failure notify session manager to refresh device data + if (entry->sendCount == 0) + { + exchangeMgr->GetSessionManager()->RefreshSessionOperationalData(entry->ec->GetSessionHandle()); + } + } // Update the counters entry->sendCount++; } diff --git a/src/transport/SessionDelegate.h b/src/transport/SessionDelegate.h index 893b063071ba53..aacb6e7824245b 100644 --- a/src/transport/SessionDelegate.h +++ b/src/transport/SessionDelegate.h @@ -48,4 +48,19 @@ class DLL_EXPORT SessionReleaseDelegate virtual void OnSessionReleased(SessionHandle session) = 0; }; +class DLL_EXPORT SessionRecoveryDelegate +{ +public: + virtual ~SessionRecoveryDelegate() {} + + /** + * @brief + * Called when the first message delivery in a session failed, + * so actions aiming to recover connection can be performed. + * + * @param session The handle to the secure session + */ + virtual void OnFirstMessageDeliveryFailed(const SessionHandle & session) = 0; +}; + } // namespace chip diff --git a/src/transport/SessionManager.cpp b/src/transport/SessionManager.cpp index 549214193861a7..e2f4ac7d843f1e 100644 --- a/src/transport/SessionManager.cpp +++ b/src/transport/SessionManager.cpp @@ -364,6 +364,38 @@ void SessionManager::OnMessageReceived(const PeerAddress & peerAddress, System:: } } +void SessionManager::RegisterRecoveryDelegate(SessionRecoveryDelegate & cb) +{ +#ifndef NDEBUG + mSessionRecoveryDelegates.ForEachActiveObject([&](std::reference_wrapper * i) { + VerifyOrDie(std::addressof(cb) != std::addressof(i->get())); + return true; + }); +#endif + std::reference_wrapper * slot = mSessionRecoveryDelegates.CreateObject(cb); + VerifyOrDie(slot != nullptr); +} + +void SessionManager::UnregisterRecoveryDelegate(SessionRecoveryDelegate & cb) +{ + mSessionRecoveryDelegates.ForEachActiveObject([&](std::reference_wrapper * i) { + if (std::addressof(cb) == std::addressof(i->get())) + { + mSessionRecoveryDelegates.ReleaseObject(i); + return false; + } + return true; + }); +} + +void SessionManager::RefreshSessionOperationalData(const SessionHandle & sessionHandle) +{ + mSessionRecoveryDelegates.ForEachActiveObject([&](std::reference_wrapper * cb) { + cb->get().OnFirstMessageDeliveryFailed(sessionHandle); + return true; + }); +} + void SessionManager::MessageDispatch(const PacketHeader & packetHeader, const Transport::PeerAddress & peerAddress, System::PacketBufferHandle && msg) { diff --git a/src/transport/SessionManager.h b/src/transport/SessionManager.h index 7112542593c784..3cd472ff49f6be 100644 --- a/src/transport/SessionManager.h +++ b/src/transport/SessionManager.h @@ -198,6 +198,10 @@ class DLL_EXPORT SessionManager : public TransportMgrDelegate }); } + void RegisterRecoveryDelegate(SessionRecoveryDelegate & cb); + void UnregisterRecoveryDelegate(SessionRecoveryDelegate & cb); + void RefreshSessionOperationalData(const SessionHandle & sessionHandle); + /** * @brief * Establish a new pairing with a peer node @@ -291,6 +295,9 @@ class DLL_EXPORT SessionManager : public TransportMgrDelegate BitMapObjectPool, CHIP_CONFIG_MAX_SESSION_RELEASE_DELEGATES> mSessionReleaseDelegates; + BitMapObjectPool, CHIP_CONFIG_MAX_SESSION_RECOVERY_DELEGATES> + mSessionRecoveryDelegates; + TransportMgrBase * mTransportMgr = nullptr; Transport::MessageCounterManagerInterface * mMessageCounterManager = nullptr; From a9ffa783d72fc917a61e186169ddc68031c3dcfc Mon Sep 17 00:00:00 2001 From: Austin Hsieh <77706079+austinh0@users.noreply.github.com> Date: Tue, 30 Nov 2021 01:34:21 -0800 Subject: [PATCH 31/42] Prevent ByteArray and UtfString from being prematurely cleaned up (#12346) --- .../java/templates/partials/decode_value.zapt | 6 +- .../zap-generated/CHIPInvokeCallbacks.cpp | 96 ++++++++++++------- .../java/zap-generated/CHIPReadCallbacks.cpp | 6 +- 3 files changed, 72 insertions(+), 36 deletions(-) diff --git a/src/controller/java/templates/partials/decode_value.zapt b/src/controller/java/templates/partials/decode_value.zapt index dbb89f2b03ad23..dc53a3937eb26b 100644 --- a/src/controller/java/templates/partials/decode_value.zapt +++ b/src/controller/java/templates/partials/decode_value.zapt @@ -16,9 +16,11 @@ if ({{source}}.Value().IsNull()) { {{else if isStruct}} {{asSymbol label}} = nullptr; /* Struct - conversion from this type to Java is not properly implemented yet */ {{else if (isOctetString type)}} -{{target}} = chip::ByteArray(env, {{>item}}).jniValue(); +chip::ByteArray {{target}}ByteArray(env, {{>item}}); +{{target}} = {{target}}ByteArray.jniValue(); {{else if (isCharString type)}} -{{target}} = chip::UtfString(env, {{>item}}).jniValue(); +chip::UtfString {{target}}UtfString(env, {{>item}}); +{{target}} = {{target}}UtfString.jniValue(); {{else}} std::string {{target}}ClassName = "java/lang/{{asJavaBasicTypeForZclType type true}}"; std::string {{target}}CtorSignature = "({{asJniSignature type false}})V"; diff --git a/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp b/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp index 9ddca31bdd1c13..dac582580e1311 100644 --- a/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp @@ -83,7 +83,8 @@ void CHIPAccountLoginClusterGetSetupPINResponseCallback::CallbackFn( jobject setupPIN; - setupPIN = chip::UtfString(env, dataResponse.setupPIN).jniValue(); + chip::UtfString setupPINUtfString(env, dataResponse.setupPIN); + setupPIN = setupPINUtfString.jniValue(); env->CallVoidMethod(javaCallbackRef, javaMethod, setupPIN); } @@ -149,7 +150,8 @@ void CHIPApplicationLauncherClusterLaunchAppResponseCallback::CallbackFn( statusClassName.c_str(), statusCtorSignature.c_str(), dataResponse.status, status); jobject data; - data = chip::UtfString(env, dataResponse.data).jniValue(); + chip::UtfString dataUtfString(env, dataResponse.data); + data = dataUtfString.jniValue(); env->CallVoidMethod(javaCallbackRef, javaMethod, status, data); } @@ -209,7 +211,8 @@ void CHIPContentLauncherClusterLaunchContentResponseCallback::CallbackFn( jobject data; - data = chip::UtfString(env, dataResponse.data).jniValue(); + chip::UtfString dataUtfString(env, dataResponse.data); + data = dataUtfString.jniValue(); jobject contentLaunchStatus; std::string contentLaunchStatusClassName = "java/lang/Integer"; @@ -275,7 +278,8 @@ void CHIPContentLauncherClusterLaunchURLResponseCallback::CallbackFn( jobject data; - data = chip::UtfString(env, dataResponse.data).jniValue(); + chip::UtfString dataUtfString(env, dataResponse.data); + data = dataUtfString.jniValue(); jobject contentLaunchStatus; std::string contentLaunchStatusClassName = "java/lang/Integer"; @@ -347,7 +351,8 @@ void CHIPDiagnosticLogsClusterRetrieveLogsResponseCallback::CallbackFn( statusClassName.c_str(), statusCtorSignature.c_str(), dataResponse.status, status); jobject content; - content = chip::ByteArray(env, dataResponse.content).jniValue(); + chip::ByteArray contentByteArray(env, dataResponse.content); + content = contentByteArray.jniValue(); jobject timeStamp; std::string timeStampClassName = "java/lang/Long"; @@ -970,7 +975,8 @@ void CHIPDoorLockClusterGetLogRecordResponseCallback::CallbackFn( dataResponse.userId, userId); jobject pin; - pin = chip::ByteArray(env, dataResponse.pin).jniValue(); + chip::ByteArray pinByteArray(env, dataResponse.pin); + pin = pinByteArray.jniValue(); env->CallVoidMethod(javaCallbackRef, javaMethod, logEntryId, timestamp, eventType, source, eventIdOrAlarmCode, userId, pin); } @@ -1046,7 +1052,8 @@ void CHIPDoorLockClusterGetPinResponseCallback::CallbackFn( userTypeClassName.c_str(), userTypeCtorSignature.c_str(), dataResponse.userType, userType); jobject pin; - pin = chip::ByteArray(env, dataResponse.pin).jniValue(); + chip::ByteArray pinByteArray(env, dataResponse.pin); + pin = pinByteArray.jniValue(); env->CallVoidMethod(javaCallbackRef, javaMethod, userId, userStatus, userType, pin); } @@ -1122,7 +1129,8 @@ void CHIPDoorLockClusterGetRfidResponseCallback::CallbackFn( userTypeClassName.c_str(), userTypeCtorSignature.c_str(), dataResponse.userType, userType); jobject rfid; - rfid = chip::ByteArray(env, dataResponse.rfid).jniValue(); + chip::ByteArray rfidByteArray(env, dataResponse.rfid); + rfid = rfidByteArray.jniValue(); env->CallVoidMethod(javaCallbackRef, javaMethod, userId, userStatus, userType, rfid); } @@ -1994,7 +2002,8 @@ void CHIPGeneralCommissioningClusterArmFailSafeResponseCallback::CallbackFn( errorCodeClassName.c_str(), errorCodeCtorSignature.c_str(), dataResponse.errorCode, errorCode); jobject debugText; - debugText = chip::UtfString(env, dataResponse.debugText).jniValue(); + chip::UtfString debugTextUtfString(env, dataResponse.debugText); + debugText = debugTextUtfString.jniValue(); env->CallVoidMethod(javaCallbackRef, javaMethod, errorCode, debugText); } @@ -2062,7 +2071,8 @@ void CHIPGeneralCommissioningClusterCommissioningCompleteResponseCallback::Callb errorCodeClassName.c_str(), errorCodeCtorSignature.c_str(), dataResponse.errorCode, errorCode); jobject debugText; - debugText = chip::UtfString(env, dataResponse.debugText).jniValue(); + chip::UtfString debugTextUtfString(env, dataResponse.debugText); + debugText = debugTextUtfString.jniValue(); env->CallVoidMethod(javaCallbackRef, javaMethod, errorCode, debugText); } @@ -2130,7 +2140,8 @@ void CHIPGeneralCommissioningClusterSetRegulatoryConfigResponseCallback::Callbac errorCodeClassName.c_str(), errorCodeCtorSignature.c_str(), dataResponse.errorCode, errorCode); jobject debugText; - debugText = chip::UtfString(env, dataResponse.debugText).jniValue(); + chip::UtfString debugTextUtfString(env, dataResponse.debugText); + debugText = debugTextUtfString.jniValue(); env->CallVoidMethod(javaCallbackRef, javaMethod, errorCode, debugText); } @@ -2398,7 +2409,8 @@ void CHIPGroupsClusterViewGroupResponseCallback::CallbackFn( dataResponse.groupId, groupId); jobject groupName; - groupName = chip::UtfString(env, dataResponse.groupName).jniValue(); + chip::UtfString groupNameUtfString(env, dataResponse.groupName); + groupName = groupNameUtfString.jniValue(); env->CallVoidMethod(javaCallbackRef, javaMethod, status, groupId, groupName); } @@ -3271,7 +3283,8 @@ void CHIPNetworkCommissioningClusterAddThreadNetworkResponseCallback::CallbackFn dataResponse.errorCode, errorCode); jobject debugText; - debugText = chip::UtfString(env, dataResponse.debugText).jniValue(); + chip::UtfString debugTextUtfString(env, dataResponse.debugText); + debugText = debugTextUtfString.jniValue(); env->CallVoidMethod(javaCallbackRef, javaMethod, errorCode, debugText); } @@ -3337,7 +3350,8 @@ void CHIPNetworkCommissioningClusterAddWiFiNetworkResponseCallback::CallbackFn( dataResponse.errorCode, errorCode); jobject debugText; - debugText = chip::UtfString(env, dataResponse.debugText).jniValue(); + chip::UtfString debugTextUtfString(env, dataResponse.debugText); + debugText = debugTextUtfString.jniValue(); env->CallVoidMethod(javaCallbackRef, javaMethod, errorCode, debugText); } @@ -3403,7 +3417,8 @@ void CHIPNetworkCommissioningClusterDisableNetworkResponseCallback::CallbackFn( dataResponse.errorCode, errorCode); jobject debugText; - debugText = chip::UtfString(env, dataResponse.debugText).jniValue(); + chip::UtfString debugTextUtfString(env, dataResponse.debugText); + debugText = debugTextUtfString.jniValue(); env->CallVoidMethod(javaCallbackRef, javaMethod, errorCode, debugText); } @@ -3469,7 +3484,8 @@ void CHIPNetworkCommissioningClusterEnableNetworkResponseCallback::CallbackFn( dataResponse.errorCode, errorCode); jobject debugText; - debugText = chip::UtfString(env, dataResponse.debugText).jniValue(); + chip::UtfString debugTextUtfString(env, dataResponse.debugText); + debugText = debugTextUtfString.jniValue(); env->CallVoidMethod(javaCallbackRef, javaMethod, errorCode, debugText); } @@ -3535,7 +3551,8 @@ void CHIPNetworkCommissioningClusterRemoveNetworkResponseCallback::CallbackFn( dataResponse.errorCode, errorCode); jobject debugText; - debugText = chip::UtfString(env, dataResponse.debugText).jniValue(); + chip::UtfString debugTextUtfString(env, dataResponse.debugText); + debugText = debugTextUtfString.jniValue(); env->CallVoidMethod(javaCallbackRef, javaMethod, errorCode, debugText); } @@ -3601,7 +3618,8 @@ void CHIPNetworkCommissioningClusterScanNetworksResponseCallback::CallbackFn( dataResponse.errorCode, errorCode); jobject debugText; - debugText = chip::UtfString(env, dataResponse.debugText).jniValue(); + chip::UtfString debugTextUtfString(env, dataResponse.debugText); + debugText = debugTextUtfString.jniValue(); jobject wifiScanResults; wifiScanResults = nullptr; /* Array - Conversion from this type to Java is not properly implemented yet */ @@ -3675,7 +3693,8 @@ void CHIPNetworkCommissioningClusterUpdateThreadNetworkResponseCallback::Callbac dataResponse.errorCode, errorCode); jobject debugText; - debugText = chip::UtfString(env, dataResponse.debugText).jniValue(); + chip::UtfString debugTextUtfString(env, dataResponse.debugText); + debugText = debugTextUtfString.jniValue(); env->CallVoidMethod(javaCallbackRef, javaMethod, errorCode, debugText); } @@ -3743,7 +3762,8 @@ void CHIPNetworkCommissioningClusterUpdateWiFiNetworkResponseCallback::CallbackF dataResponse.errorCode, errorCode); jobject debugText; - debugText = chip::UtfString(env, dataResponse.debugText).jniValue(); + chip::UtfString debugTextUtfString(env, dataResponse.debugText); + debugText = debugTextUtfString.jniValue(); env->CallVoidMethod(javaCallbackRef, javaMethod, errorCode, debugText); } @@ -3905,7 +3925,8 @@ void CHIPOtaSoftwareUpdateProviderClusterQueryImageResponseCallback::CallbackFn( else { - imageURI = chip::UtfString(env, dataResponse.imageURI.Value()).jniValue(); + chip::UtfString imageURIUtfString(env, dataResponse.imageURI.Value()); + imageURI = imageURIUtfString.jniValue(); chip::JniReferences::GetInstance().CreateOptional(imageURI, imageURI); } jobject softwareVersion; @@ -3931,7 +3952,8 @@ void CHIPOtaSoftwareUpdateProviderClusterQueryImageResponseCallback::CallbackFn( else { - softwareVersionString = chip::UtfString(env, dataResponse.softwareVersionString.Value()).jniValue(); + chip::UtfString softwareVersionStringUtfString(env, dataResponse.softwareVersionString.Value()); + softwareVersionString = softwareVersionStringUtfString.jniValue(); chip::JniReferences::GetInstance().CreateOptional(softwareVersionString, softwareVersionString); } jobject updateToken; @@ -3942,7 +3964,8 @@ void CHIPOtaSoftwareUpdateProviderClusterQueryImageResponseCallback::CallbackFn( else { - updateToken = chip::ByteArray(env, dataResponse.updateToken.Value()).jniValue(); + chip::ByteArray updateTokenByteArray(env, dataResponse.updateToken.Value()); + updateToken = updateTokenByteArray.jniValue(); chip::JniReferences::GetInstance().CreateOptional(updateToken, updateToken); } jobject userConsentNeeded; @@ -3968,7 +3991,8 @@ void CHIPOtaSoftwareUpdateProviderClusterQueryImageResponseCallback::CallbackFn( else { - metadataForRequestor = chip::ByteArray(env, dataResponse.metadataForRequestor.Value()).jniValue(); + chip::ByteArray metadataForRequestorByteArray(env, dataResponse.metadataForRequestor.Value()); + metadataForRequestor = metadataForRequestorByteArray.jniValue(); chip::JniReferences::GetInstance().CreateOptional(metadataForRequestor, metadataForRequestor); } @@ -4030,10 +4054,12 @@ void CHIPOperationalCredentialsClusterAttestationResponseCallback::CallbackFn( jobject AttestationElements; - AttestationElements = chip::ByteArray(env, dataResponse.attestationElements).jniValue(); + chip::ByteArray AttestationElementsByteArray(env, dataResponse.attestationElements); + AttestationElements = AttestationElementsByteArray.jniValue(); jobject Signature; - Signature = chip::ByteArray(env, dataResponse.signature).jniValue(); + chip::ByteArray SignatureByteArray(env, dataResponse.signature); + Signature = SignatureByteArray.jniValue(); env->CallVoidMethod(javaCallbackRef, javaMethod, AttestationElements, Signature); } @@ -4094,7 +4120,8 @@ void CHIPOperationalCredentialsClusterCertificateChainResponseCallback::Callback jobject Certificate; - Certificate = chip::ByteArray(env, dataResponse.certificate).jniValue(); + chip::ByteArray CertificateByteArray(env, dataResponse.certificate); + Certificate = CertificateByteArray.jniValue(); env->CallVoidMethod(javaCallbackRef, javaMethod, Certificate); } @@ -4165,7 +4192,8 @@ void CHIPOperationalCredentialsClusterNOCResponseCallback::CallbackFn( dataResponse.fabricIndex, FabricIndex); jobject DebugText; - DebugText = chip::UtfString(env, dataResponse.debugText).jniValue(); + chip::UtfString DebugTextUtfString(env, dataResponse.debugText); + DebugText = DebugTextUtfString.jniValue(); env->CallVoidMethod(javaCallbackRef, javaMethod, StatusCode, FabricIndex, DebugText); } @@ -4224,10 +4252,12 @@ void CHIPOperationalCredentialsClusterOpCSRResponseCallback::CallbackFn( jobject NOCSRElements; - NOCSRElements = chip::ByteArray(env, dataResponse.NOCSRElements).jniValue(); + chip::ByteArray NOCSRElementsByteArray(env, dataResponse.NOCSRElements); + NOCSRElements = NOCSRElementsByteArray.jniValue(); jobject AttestationSignature; - AttestationSignature = chip::ByteArray(env, dataResponse.attestationSignature).jniValue(); + chip::ByteArray AttestationSignatureByteArray(env, dataResponse.attestationSignature); + AttestationSignature = AttestationSignatureByteArray.jniValue(); env->CallVoidMethod(javaCallbackRef, javaMethod, NOCSRElements, AttestationSignature); } @@ -4680,7 +4710,8 @@ void CHIPScenesClusterViewSceneResponseCallback::CallbackFn( transitionTimeClassName.c_str(), transitionTimeCtorSignature.c_str(), dataResponse.transitionTime, transitionTime); jobject sceneName; - sceneName = chip::UtfString(env, dataResponse.sceneName).jniValue(); + chip::UtfString sceneNameUtfString(env, dataResponse.sceneName); + sceneName = sceneNameUtfString.jniValue(); jobject extensionFieldSets; extensionFieldSets = nullptr; /* Array - Conversion from this type to Java is not properly implemented yet */ @@ -4813,7 +4844,8 @@ void CHIPTargetNavigatorClusterNavigateTargetResponseCallback::CallbackFn( statusClassName.c_str(), statusCtorSignature.c_str(), dataResponse.status, status); jobject data; - data = chip::UtfString(env, dataResponse.data).jniValue(); + chip::UtfString dataUtfString(env, dataResponse.data); + data = dataUtfString.jniValue(); env->CallVoidMethod(javaCallbackRef, javaMethod, status, data); } diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp index 1757b07ab7d603..86610544197f0d 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp @@ -5953,7 +5953,8 @@ void CHIPTestClusterNullableOctetStringAttributeCallback::CallbackFn(void * cont jobject javaValue; - javaValue = chip::ByteArray(env, value.Value()).jniValue(); + chip::ByteArray javaValueByteArray(env, value.Value()); + javaValue = javaValueByteArray.jniValue(); env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } @@ -6011,7 +6012,8 @@ void CHIPTestClusterNullableCharStringAttributeCallback::CallbackFn(void * conte jobject javaValue; - javaValue = chip::UtfString(env, value.Value()).jniValue(); + chip::UtfString javaValueUtfString(env, value.Value()); + javaValue = javaValueUtfString.jniValue(); env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } From 94da0bdd419d86dd2f02ed45096dee210ba8c550 Mon Sep 17 00:00:00 2001 From: Vivien Nicolas Date: Tue, 30 Nov 2021 14:49:18 +0100 Subject: [PATCH 32/42] [chip-tool] Get the commissioner to be an optional argument for chip related commands instead of a dedicated command that stores the current commissioner on disk (#12259) --- examples/chip-tool/BUILD.gn | 2 - .../commands/clusters/ModelCommand.cpp | 3 +- .../chip-tool/commands/common/CHIPCommand.cpp | 111 ++++++++++++++---- .../chip-tool/commands/common/CHIPCommand.h | 18 ++- .../chip-tool/commands/discover/Commands.h | 4 +- .../commands/discover/DiscoverCommand.cpp | 2 +- .../DiscoverCommissionablesCommand.cpp | 4 +- .../chip-tool/commands/pairing/Commands.h | 2 - .../pairing/ConfigureFabricCommand.cpp | 25 ---- .../commands/pairing/ConfigureFabricCommand.h | 33 ------ .../commands/pairing/PairingCommand.cpp | 30 ++--- .../commands/reporting/ReportingCommand.cpp | 3 +- .../chip-tool/commands/tests/TestCommand.cpp | 2 +- .../chip-tool/config/PersistentStorage.cpp | 80 ++++--------- examples/chip-tool/config/PersistentStorage.h | 24 +--- 15 files changed, 152 insertions(+), 191 deletions(-) delete mode 100644 examples/chip-tool/commands/pairing/ConfigureFabricCommand.cpp delete mode 100644 examples/chip-tool/commands/pairing/ConfigureFabricCommand.h diff --git a/examples/chip-tool/BUILD.gn b/examples/chip-tool/BUILD.gn index cfbffd3fcceadd..88f4b2eb3bcb8c 100644 --- a/examples/chip-tool/BUILD.gn +++ b/examples/chip-tool/BUILD.gn @@ -39,8 +39,6 @@ executable("chip-tool") { # TODO - enable CommissionedListCommand once DNS Cache is implemented # "commands/pairing/CommissionedListCommand.cpp", # "commands/pairing/CommissionedListCommand.h", - "commands/pairing/ConfigureFabricCommand.cpp", - "commands/pairing/ConfigureFabricCommand.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 30816eb6cceaf8..79a3089679fdf4 100644 --- a/examples/chip-tool/commands/clusters/ModelCommand.cpp +++ b/examples/chip-tool/commands/clusters/ModelCommand.cpp @@ -27,7 +27,8 @@ CHIP_ERROR ModelCommand::RunCommand() { ChipLogProgress(chipTool, "Sending command to node 0x%" PRIx64, mNodeId); - CHIP_ERROR err = mController.GetConnectedDevice(mNodeId, &mOnDeviceConnectedCallback, &mOnDeviceConnectionFailureCallback); + CHIP_ERROR err = + CurrentCommissioner().GetConnectedDevice(mNodeId, &mOnDeviceConnectedCallback, &mOnDeviceConnectionFailureCallback); VerifyOrExit(err == CHIP_NO_ERROR, ChipLogError(chipTool, "Failed in initiating connection to the device: %" PRIu64 ", error %" CHIP_ERROR_FORMAT, mNodeId, err.Format())); diff --git a/examples/chip-tool/commands/common/CHIPCommand.cpp b/examples/chip-tool/commands/common/CHIPCommand.cpp index 7f39cab591b99b..f45a88bcaec6a8 100644 --- a/examples/chip-tool/commands/common/CHIPCommand.cpp +++ b/examples/chip-tool/commands/common/CHIPCommand.cpp @@ -29,6 +29,14 @@ using DeviceControllerFactory = chip::Controller::DeviceControllerFactory; +constexpr const char kCommissionerAlpha[] = "alpha"; +constexpr const char kCommissionerBeta[] = "beta"; +constexpr const char kCommissionerGamma[] = "gamma"; + +constexpr chip::FabricId kCommissionerAlphaFabricId = 1; +constexpr chip::FabricId kCommissionerBetaFabricId = 2; +constexpr chip::FabricId kCommissionerGammaFabricId = 3; + CHIP_ERROR CHIPCommand::Run() { #if CHIP_DEVICE_LAYER_TARGET_LINUX && CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE @@ -36,10 +44,80 @@ CHIP_ERROR CHIPCommand::Run() ReturnLogErrorOnFailure(chip::DeviceLayer::Internal::BLEMgrImpl().ConfigureBle(0, true)); #endif - ReturnLogErrorOnFailure(mStorage.Init()); - ReturnLogErrorOnFailure(mOpCredsIssuer.Initialize(mStorage)); - ReturnLogErrorOnFailure(mFabricStorage.Initialize(&mStorage)); + ReturnLogErrorOnFailure(mDefaultStorage.Init()); + ReturnLogErrorOnFailure(mFabricStorage.Initialize(&mDefaultStorage)); + + chip::Controller::FactoryInitParams factoryInitParams; + factoryInitParams.fabricStorage = &mFabricStorage; + factoryInitParams.listenPort = static_cast(mDefaultStorage.GetListenPort() + CurrentCommissionerIndex()); + ReturnLogErrorOnFailure(DeviceControllerFactory::GetInstance().Init(factoryInitParams)); + + ReturnLogErrorOnFailure(InitializeCommissioner(CurrentCommissionerName(), CurrentCommissionerIndex())); + + chip::DeviceLayer::PlatformMgr().ScheduleWork(RunQueuedCommand, reinterpret_cast(this)); + ReturnLogErrorOnFailure(StartWaiting(GetWaitDuration())); + + Shutdown(); + + // + // We can call DeviceController::Shutdown() safely without grabbing the stack lock + // since the CHIP thread and event queue have been stopped, preventing any thread + // races. + // + ReturnLogErrorOnFailure(ShutdownCommissioner(CurrentCommissionerName())); + + return CHIP_NO_ERROR; +} + +std::string CHIPCommand::CurrentCommissionerName() +{ + std::string name = mCommissionerName.HasValue() ? mCommissionerName.Value() : kCommissionerAlpha; + if (name.compare(kCommissionerAlpha) != 0 && name.compare(kCommissionerBeta) != 0 && name.compare(kCommissionerGamma) != 0) + { + ChipLogError(chipTool, "Unknown commissioner name: %s. Supported names are [%s, %s, %s]", name.c_str(), kCommissionerAlpha, + kCommissionerBeta, kCommissionerGamma); + chipDie(); + } + + return name; +} + +uint16_t CHIPCommand::CurrentCommissionerIndex() +{ + uint16_t index = 0; + + std::string name = CurrentCommissionerName(); + if (name.compare(kCommissionerAlpha) == 0) + { + index = kCommissionerAlphaFabricId; + } + else if (name.compare(kCommissionerBeta) == 0) + { + index = kCommissionerBetaFabricId; + } + else if (name.compare(kCommissionerGamma) == 0) + { + index = kCommissionerGammaFabricId; + } + + VerifyOrDieWithMsg(index != 0, chipTool, "Unknown commissioner name: %s. Supported names are [%s, %s, %s]", name.c_str(), + kCommissionerAlpha, kCommissionerBeta, kCommissionerGamma); + return index; +} +chip::Controller::DeviceCommissioner & CHIPCommand::CurrentCommissioner() +{ + auto item = mCommissioners.find(CurrentCommissionerName()); + return *item->second.get(); +} + +CHIP_ERROR CHIPCommand::ShutdownCommissioner(std::string key) +{ + return mCommissioners[key].get()->Shutdown(); +} + +CHIP_ERROR CHIPCommand::InitializeCommissioner(std::string key, chip::FabricId fabricId) +{ chip::Platform::ScopedMemoryBuffer noc; chip::Platform::ScopedMemoryBuffer icac; chip::Platform::ScopedMemoryBuffer rcac; @@ -64,15 +142,14 @@ CHIP_ERROR CHIPCommand::Run() // TODO - OpCreds should only be generated for pairing command // store the credentials in persistent storage, and // generate when not available in the storage. - ReturnLogErrorOnFailure(mOpCredsIssuer.GenerateNOCChainAfterValidation(mStorage.GetLocalNodeId(), mStorage.GetFabricId(), + ReturnLogErrorOnFailure(mCommissionerStorage.Init(key.c_str())); + ReturnLogErrorOnFailure(mOpCredsIssuer.Initialize(mCommissionerStorage)); + ReturnLogErrorOnFailure(mOpCredsIssuer.GenerateNOCChainAfterValidation(mCommissionerStorage.GetLocalNodeId(), fabricId, ephemeralKey.Pubkey(), rcacSpan, icacSpan, nocSpan)); - chip::Controller::FactoryInitParams factoryInitParams; - factoryInitParams.fabricStorage = &mFabricStorage; - factoryInitParams.listenPort = mStorage.GetListenPort(); - + std::unique_ptr commissioner = std::make_unique(); chip::Controller::SetupParams commissionerParams; - commissionerParams.storageDelegate = &mStorage; + commissionerParams.storageDelegate = &mCommissionerStorage; commissionerParams.operationalCredentialsDelegate = &mOpCredsIssuer; commissionerParams.ephemeralKeypair = &ephemeralKey; commissionerParams.controllerRCAC = rcacSpan; @@ -80,20 +157,8 @@ CHIP_ERROR CHIPCommand::Run() commissionerParams.controllerNOC = nocSpan; commissionerParams.controllerVendorId = chip::VendorId::TestVendor1; - ReturnLogErrorOnFailure(DeviceControllerFactory::GetInstance().Init(factoryInitParams)); - ReturnLogErrorOnFailure(DeviceControllerFactory::GetInstance().SetupCommissioner(commissionerParams, mController)); - - chip::DeviceLayer::PlatformMgr().ScheduleWork(RunQueuedCommand, reinterpret_cast(this)); - ReturnLogErrorOnFailure(StartWaiting(GetWaitDuration())); - - Shutdown(); - - // - // We can call DeviceController::Shutdown() safely without grabbing the stack lock - // since the CHIP thread and event queue have been stopped, preventing any thread - // races. - // - ReturnLogErrorOnFailure(mController.Shutdown()); + ReturnLogErrorOnFailure(DeviceControllerFactory::GetInstance().SetupCommissioner(commissionerParams, *(commissioner.get()))); + mCommissioners[key] = std::move(commissioner); return CHIP_NO_ERROR; } diff --git a/examples/chip-tool/commands/common/CHIPCommand.h b/examples/chip-tool/commands/common/CHIPCommand.h index 51f3aab0994948..30bee6805141a9 100644 --- a/examples/chip-tool/commands/common/CHIPCommand.h +++ b/examples/chip-tool/commands/common/CHIPCommand.h @@ -35,7 +35,7 @@ class CHIPCommand : public Command using NodeId = ::chip::NodeId; using PeerAddress = ::chip::Transport::PeerAddress; - CHIPCommand(const char * commandName) : Command(commandName) {} + CHIPCommand(const char * commandName) : Command(commandName) { AddArgument("commissioner-name", &mCommissionerName); } /////////// Command Interface ///////// CHIP_ERROR Run() override; @@ -62,11 +62,23 @@ class CHIPCommand : public Command // loop has been stopped. virtual void Shutdown() {} - ChipDeviceCommissioner mController; - PersistentStorage mStorage; + PersistentStorage mDefaultStorage; + PersistentStorage mCommissionerStorage; chip::SimpleFabricStorage mFabricStorage; + // This method returns the commissioner instance to be used for running the command. + // The default commissioner instance name is "alpha", but it can be overriden by passing + // --identity "instance name" when running a command. + ChipDeviceCommissioner & CurrentCommissioner(); + private: + CHIP_ERROR InitializeCommissioner(std::string key, chip::FabricId fabricId); + CHIP_ERROR ShutdownCommissioner(std::string key); + std::string CurrentCommissionerName(); + uint16_t CurrentCommissionerIndex(); + std::map> mCommissioners; + chip::Optional mCommissionerName; + static void RunQueuedCommand(intptr_t commandArg); CHIP_ERROR mCommandExitStatus = CHIP_ERROR_INTERNAL; diff --git a/examples/chip-tool/commands/discover/Commands.h b/examples/chip-tool/commands/discover/Commands.h index e09a837d6f1810..c68ae26615b4ee 100644 --- a/examples/chip-tool/commands/discover/Commands.h +++ b/examples/chip-tool/commands/discover/Commands.h @@ -83,8 +83,8 @@ class Update : public DiscoverCommand CHIP_ERROR RunCommand(NodeId remoteId, uint64_t fabricId) override { ChipLogProgress(chipTool, "Mdns: Updating NodeId: %" PRIx64 " Compressed FabricId: %" PRIx64 " ...", remoteId, - mController.GetCompressedFabricId()); - return mController.UpdateDevice(remoteId); + CurrentCommissioner().GetCompressedFabricId()); + return CurrentCommissioner().UpdateDevice(remoteId); } /////////// DeviceAddressUpdateDelegate Interface ///////// diff --git a/examples/chip-tool/commands/discover/DiscoverCommand.cpp b/examples/chip-tool/commands/discover/DiscoverCommand.cpp index 0ac9dd6e557603..1cf6f87a4b8427 100644 --- a/examples/chip-tool/commands/discover/DiscoverCommand.cpp +++ b/examples/chip-tool/commands/discover/DiscoverCommand.cpp @@ -20,6 +20,6 @@ CHIP_ERROR DiscoverCommand::RunCommand() { - mController.RegisterDeviceAddressUpdateDelegate(this); + CurrentCommissioner().RegisterDeviceAddressUpdateDelegate(this); return RunCommand(mNodeId, mFabricId); } diff --git a/examples/chip-tool/commands/discover/DiscoverCommissionablesCommand.cpp b/examples/chip-tool/commands/discover/DiscoverCommissionablesCommand.cpp index 653bc23caef3e8..88f41cc2b8125f 100644 --- a/examples/chip-tool/commands/discover/DiscoverCommissionablesCommand.cpp +++ b/examples/chip-tool/commands/discover/DiscoverCommissionablesCommand.cpp @@ -23,9 +23,9 @@ using namespace ::chip; CHIP_ERROR DiscoverCommissionablesCommand::RunCommand() { - mController.RegisterDeviceDiscoveryDelegate(this); + CurrentCommissioner().RegisterDeviceDiscoveryDelegate(this); Dnssd::DiscoveryFilter filter(Dnssd::DiscoveryFilterType::kNone, (uint64_t) 0); - return mController.DiscoverCommissionableNodes(filter); + return CurrentCommissioner().DiscoverCommissionableNodes(filter); } void DiscoverCommissionablesCommand::OnDiscoveredDevice(const chip::Dnssd::DiscoveredNodeData & nodeData) diff --git a/examples/chip-tool/commands/pairing/Commands.h b/examples/chip-tool/commands/pairing/Commands.h index de72e392167703..b6040efc34ed52 100644 --- a/examples/chip-tool/commands/pairing/Commands.h +++ b/examples/chip-tool/commands/pairing/Commands.h @@ -19,7 +19,6 @@ #pragma once #include "CommissionedListCommand.h" -#include "ConfigureFabricCommand.h" #include "PairingCommand.h" #include @@ -189,7 +188,6 @@ void registerCommandsPairing(Commands & commands) make_unique(), // TODO - enable CommissionedListCommand once DNS Cache is implemented // make_unique(), - make_unique(), make_unique(), }; diff --git a/examples/chip-tool/commands/pairing/ConfigureFabricCommand.cpp b/examples/chip-tool/commands/pairing/ConfigureFabricCommand.cpp deleted file mode 100644 index cf486f802d41ca..00000000000000 --- a/examples/chip-tool/commands/pairing/ConfigureFabricCommand.cpp +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (c) 2021 Project CHIP Authors - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#include "ConfigureFabricCommand.h" - -CHIP_ERROR ConfigureFabricCommand::Run() -{ - ReturnLogErrorOnFailure(mStorage.Init()); - return mStorage.SetFabric(mFabricName); -} diff --git a/examples/chip-tool/commands/pairing/ConfigureFabricCommand.h b/examples/chip-tool/commands/pairing/ConfigureFabricCommand.h deleted file mode 100644 index 043b2bddcc08fa..00000000000000 --- a/examples/chip-tool/commands/pairing/ConfigureFabricCommand.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2021 Project CHIP Authors - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#pragma once - -#include "../../config/PersistentStorage.h" -#include "../common/Command.h" - -class ConfigureFabricCommand : public Command -{ -public: - ConfigureFabricCommand() : Command("configure-fabric") { AddArgument("name", &mFabricName); } - CHIP_ERROR Run() override; - -private: - PersistentStorage mStorage; - char * mFabricName; -}; diff --git a/examples/chip-tool/commands/pairing/PairingCommand.cpp b/examples/chip-tool/commands/pairing/PairingCommand.cpp index 55ef8f23e6b8c9..0d9524f2c84bd1 100644 --- a/examples/chip-tool/commands/pairing/PairingCommand.cpp +++ b/examples/chip-tool/commands/pairing/PairingCommand.cpp @@ -42,8 +42,8 @@ CHIP_ERROR PairingCommand::RunCommand() // callbacks we don't expect and then weird things happen. if (mPairingMode != PairingMode::OpenCommissioningWindow) { - mController.RegisterDeviceAddressUpdateDelegate(this); - mController.RegisterPairingDelegate(this); + CurrentCommissioner().RegisterDeviceAddressUpdateDelegate(this); + CurrentCommissioner().RegisterPairingDelegate(this); } err = RunInternal(mNodeId); @@ -83,7 +83,7 @@ CHIP_ERROR PairingCommand::RunInternal(NodeId remoteId) err = Pair(remoteId, PeerAddress::UDP(mRemoteAddr.address, mRemotePort)); break; case PairingMode::OpenCommissioningWindow: - err = mController.GetConnectedDevice(remoteId, &mOnDeviceConnectedCallback, &mOnDeviceConnectionFailureCallback); + err = CurrentCommissioner().GetConnectedDevice(remoteId, &mOnDeviceConnectedCallback, &mOnDeviceConnectionFailureCallback); if (err != CHIP_NO_ERROR) { ChipLogError(chipTool, "Failed in initiating connection to the device: %" PRIu64 ", error %" CHIP_ERROR_FORMAT, @@ -110,12 +110,12 @@ void PairingCommand::OnDeviceConnectionFailureFn(void * context, NodeId deviceId CHIP_ERROR PairingCommand::PairWithQRCode(NodeId remoteId) { - return mController.PairDevice(remoteId, mOnboardingPayload); + return CurrentCommissioner().PairDevice(remoteId, mOnboardingPayload); } CHIP_ERROR PairingCommand::PairWithManualCode(NodeId remoteId) { - return mController.PairDevice(remoteId, mOnboardingPayload); + return CurrentCommissioner().PairDevice(remoteId, mOnboardingPayload); } CHIP_ERROR PairingCommand::Pair(NodeId remoteId, PeerAddress address) @@ -123,7 +123,7 @@ CHIP_ERROR PairingCommand::Pair(NodeId remoteId, PeerAddress address) RendezvousParameters params = RendezvousParameters().SetSetupPINCode(mSetupPINCode).SetDiscriminator(mDiscriminator).SetPeerAddress(address); - return mController.PairDevice(remoteId, params); + return CurrentCommissioner().PairDevice(remoteId, params); } CHIP_ERROR PairingCommand::PairWithMdns(NodeId remoteId) @@ -151,13 +151,13 @@ CHIP_ERROR PairingCommand::PairWithMdns(NodeId remoteId) break; } - mController.RegisterDeviceDiscoveryDelegate(this); - return mController.DiscoverCommissionableNodes(filter); + CurrentCommissioner().RegisterDeviceDiscoveryDelegate(this); + return CurrentCommissioner().DiscoverCommissionableNodes(filter); } CHIP_ERROR PairingCommand::Unpair(NodeId remoteId) { - CHIP_ERROR err = mController.UnpairDevice(remoteId); + CHIP_ERROR err = CurrentCommissioner().UnpairDevice(remoteId); SetCommandExitStatus(err); return err; } @@ -176,8 +176,8 @@ void PairingCommand::OnOpenCommissioningWindowResponse(void * context, NodeId re CHIP_ERROR PairingCommand::OpenCommissioningWindow() { - return mController.OpenCommissioningWindowWithCallback(mNodeId, mTimeout, mIteration, mDiscriminator, - mCommissioningWindowOption, &mOnOpenCommissioningWindowCallback); + return CurrentCommissioner().OpenCommissioningWindowWithCallback( + mNodeId, mTimeout, mIteration, mDiscriminator, mCommissioningWindowOption, &mOnOpenCommissioningWindowCallback); } void PairingCommand::OnStatusUpdate(DevicePairingDelegate::Status status) @@ -252,7 +252,7 @@ CHIP_ERROR PairingCommand::SetupNetwork() break; case PairingNetworkType::WiFi: case PairingNetworkType::Thread: - err = mController.GetDeviceBeingCommissioned(mNodeId, &mDevice); + err = CurrentCommissioner().GetDeviceBeingCommissioned(mNodeId, &mDevice); VerifyOrExit(err == CHIP_NO_ERROR, ChipLogError(chipTool, "Setup failure! No pairing for device: %" PRIu64, mNodeId)); mCluster.Associate(mDevice, mEndpointId); @@ -418,8 +418,8 @@ void PairingCommand::OnEnableNetworkResponse(void * context, uint8_t errorCode, CHIP_ERROR PairingCommand::UpdateNetworkAddress() { ChipLogProgress(chipTool, "Mdns: Updating NodeId: %" PRIx64 " Compressed FabricId: %" PRIx64 " ...", mNodeId, - mController.GetCompressedFabricId()); - return mController.UpdateDevice(mNodeId); + CurrentCommissioner().GetCompressedFabricId()); + return CurrentCommissioner().UpdateDevice(mNodeId); } void PairingCommand::OnAddressUpdateComplete(NodeId nodeId, CHIP_ERROR err) @@ -443,7 +443,7 @@ void PairingCommand::OnDiscoveredDevice(const chip::Dnssd::DiscoveredNodeData & ChipLogProgress(chipTool, "Discovered Device: %s:%u", buf, port); // Stop Mdns discovery. Is it the right method ? - mController.RegisterDeviceDiscoveryDelegate(nullptr); + CurrentCommissioner().RegisterDeviceDiscoveryDelegate(nullptr); Inet::InterfaceId interfaceId = nodeData.ipAddress[0].IsIPv6LinkLocal() ? nodeData.interfaceId[0] : Inet::InterfaceId::Null(); PeerAddress peerAddress = PeerAddress::UDP(nodeData.ipAddress[0], port, interfaceId); diff --git a/examples/chip-tool/commands/reporting/ReportingCommand.cpp b/examples/chip-tool/commands/reporting/ReportingCommand.cpp index 8ff30256a42be8..7e627f4ba2a1b3 100644 --- a/examples/chip-tool/commands/reporting/ReportingCommand.cpp +++ b/examples/chip-tool/commands/reporting/ReportingCommand.cpp @@ -26,7 +26,8 @@ using namespace ::chip; CHIP_ERROR ReportingCommand::RunCommand() { - CHIP_ERROR err = mController.GetConnectedDevice(mNodeId, &mOnDeviceConnectedCallback, &mOnDeviceConnectionFailureCallback); + CHIP_ERROR err = + CurrentCommissioner().GetConnectedDevice(mNodeId, &mOnDeviceConnectedCallback, &mOnDeviceConnectionFailureCallback); VerifyOrExit( err == CHIP_NO_ERROR, ChipLogError(chipTool, "Failed in initiating connection to the device: %" PRIu64 ", error %s", mNodeId, ErrorStr(err))); diff --git a/examples/chip-tool/commands/tests/TestCommand.cpp b/examples/chip-tool/commands/tests/TestCommand.cpp index 62a86e3e8eea03..be7dc5d6d312ad 100644 --- a/examples/chip-tool/commands/tests/TestCommand.cpp +++ b/examples/chip-tool/commands/tests/TestCommand.cpp @@ -20,7 +20,7 @@ CHIP_ERROR TestCommand::RunCommand() { - return mController.GetConnectedDevice(mNodeId, &mOnDeviceConnectedCallback, &mOnDeviceConnectionFailureCallback); + return CurrentCommissioner().GetConnectedDevice(mNodeId, &mOnDeviceConnectedCallback, &mOnDeviceConnectionFailureCallback); } void TestCommand::OnDeviceConnectedFn(void * context, chip::OperationalDeviceProxy * device) diff --git a/examples/chip-tool/config/PersistentStorage.cpp b/examples/chip-tool/config/PersistentStorage.cpp index 6fdde413fbab61..20444da6d59b02 100644 --- a/examples/chip-tool/config/PersistentStorage.cpp +++ b/examples/chip-tool/config/PersistentStorage.cpp @@ -32,17 +32,21 @@ using namespace ::chip; using namespace ::chip::Controller; using namespace ::chip::Logging; -constexpr const char kFilename[] = "/tmp/chip_tool_config.ini"; constexpr const char kDefaultSectionName[] = "Default"; constexpr const char kPortKey[] = "ListenPort"; constexpr const char kLoggingKey[] = "LoggingLevel"; constexpr const char kLocalNodeIdKey[] = "LocalNodeId"; -constexpr const char kFabricIdKey[] = "LocalFabricId"; -constexpr const FabricId kFabricAlpha = 1; -constexpr const FabricId kFabricBeta = 2; -constexpr const FabricId kFabricGamma = 3; constexpr LogCategory kDefaultLoggingLevel = kLogCategory_Detail; +std::string GetFilename(const char * name) +{ + if (name == nullptr) + { + return "/tmp/chip_tool_config.ini"; + } + return "/tmp/chip_tool_config." + std::string(name) + ".ini"; +} + namespace { std::string StringToBase64(const std::string & value) @@ -74,22 +78,22 @@ std::string Base64ToString(const std::string & b64Value) } // namespace -CHIP_ERROR PersistentStorage::Init() +CHIP_ERROR PersistentStorage::Init(const char * name) { CHIP_ERROR err = CHIP_NO_ERROR; std::ifstream ifs; - ifs.open(kFilename, std::ifstream::in); + ifs.open(GetFilename(name), std::ifstream::in); if (!ifs.good()) { - CommitConfig(); - ifs.open(kFilename, std::ifstream::in); + CommitConfig(name); + ifs.open(GetFilename(name), std::ifstream::in); } VerifyOrExit(ifs.is_open(), err = CHIP_ERROR_OPEN_FAILED); + mName = name; mConfig.parse(ifs); ifs.close(); - exit: return err; } @@ -125,7 +129,7 @@ CHIP_ERROR PersistentStorage::SyncSetKeyValue(const char * key, const void * val section[key] = StringToBase64(std::string(static_cast(value), size)); mConfig.sections[kDefaultSectionName] = section; - return CommitConfig(); + return CommitConfig(mName); } CHIP_ERROR PersistentStorage::SyncDeleteKeyValue(const char * key) @@ -134,16 +138,15 @@ CHIP_ERROR PersistentStorage::SyncDeleteKeyValue(const char * key) section.erase(key); mConfig.sections[kDefaultSectionName] = section; - return CommitConfig(); + return CommitConfig(mName); } -CHIP_ERROR PersistentStorage::CommitConfig() +CHIP_ERROR PersistentStorage::CommitConfig(const char * name) { CHIP_ERROR err = CHIP_NO_ERROR; std::ofstream ofs; - std::string tmpPath = kFilename; - tmpPath.append(".tmp"); + std::string tmpPath = GetFilename(name) + ".tmp"; ofs.open(tmpPath, std::ofstream::out | std::ofstream::trunc); VerifyOrExit(ofs.good(), err = CHIP_ERROR_WRITE_FAILED); @@ -151,7 +154,7 @@ CHIP_ERROR PersistentStorage::CommitConfig() ofs.close(); VerifyOrExit(ofs.good(), err = CHIP_ERROR_WRITE_FAILED); - VerifyOrExit(rename(tmpPath.c_str(), kFilename) == 0, err = CHIP_ERROR_WRITE_FAILED); + VerifyOrExit(rename(tmpPath.c_str(), GetFilename(name).c_str()) == 0, err = CHIP_ERROR_WRITE_FAILED); exit: return err; @@ -161,10 +164,9 @@ uint16_t PersistentStorage::GetListenPort() { CHIP_ERROR err = CHIP_NO_ERROR; - // By default chip-tool listens on CHIP_PORT + N. This is done in order to avoid + // By default chip-tool listens on CHIP_PORT + 1. This is done in order to avoid // having 2 servers listening on CHIP_PORT when one runs an accessory server locally. - FabricId N = GetFabricId(); - uint16_t chipListenPort = static_cast(CHIP_PORT + N); + uint16_t chipListenPort = static_cast(CHIP_PORT + 1); char value[6]; uint16_t size = static_cast(sizeof(value)); @@ -234,43 +236,3 @@ CHIP_ERROR PersistentStorage::SetLocalNodeId(NodeId value) uint64_t nodeId = Encoding::LittleEndian::HostSwap64(value); return SyncSetKeyValue(kLocalNodeIdKey, &nodeId, sizeof(nodeId)); } - -FabricId PersistentStorage::GetFabricId() -{ - CHIP_ERROR err = CHIP_NO_ERROR; - - uint64_t fabricId; - uint16_t size = static_cast(sizeof(fabricId)); - err = SyncGetKeyValue(kFabricIdKey, &fabricId, size); - if (err == CHIP_NO_ERROR) - { - return static_cast(Encoding::LittleEndian::HostSwap64(fabricId)); - } - - return kFabricAlpha; -} - -CHIP_ERROR PersistentStorage::SetFabric(const char * fabricName) -{ - uint64_t fabricId = kFabricAlpha; - - if (strcasecmp(fabricName, "alpha") == 0) - { - fabricId = kFabricAlpha; - } - else if (strcasecmp(fabricName, "beta") == 0) - { - fabricId = kFabricBeta; - } - else if (strcasecmp(fabricName, "gamma") == 0) - { - fabricId = kFabricGamma; - } - else - { - return CHIP_ERROR_INVALID_ARGUMENT; - } - - fabricId = Encoding::LittleEndian::HostSwap64(fabricId); - return SyncSetKeyValue(kFabricIdKey, &fabricId, sizeof(fabricId)); -} diff --git a/examples/chip-tool/config/PersistentStorage.h b/examples/chip-tool/config/PersistentStorage.h index 10f4bb1ad76d5d..fd06571c1b6b61 100644 --- a/examples/chip-tool/config/PersistentStorage.h +++ b/examples/chip-tool/config/PersistentStorage.h @@ -26,7 +26,7 @@ class PersistentStorage : public chip::PersistentStorageDelegate { public: - CHIP_ERROR Init(); + CHIP_ERROR Init(const char * name = nullptr); /////////// PersistentStorageDelegate Interface ///////// CHIP_ERROR SyncGetKeyValue(const char * key, void * buffer, uint16_t & size) override; @@ -42,26 +42,8 @@ class PersistentStorage : public chip::PersistentStorageDelegate // Store local node id. CHIP_ERROR SetLocalNodeId(chip::NodeId nodeId); - /** - * @brief - * Configure the fabric used for pairing and sending commands. - * - * @param[in] fabricName The name of the fabric. It must be one of the following strings: - * - alpha - * - beta - * - gamma - * - * @return CHIP_ERROR CHIP_NO_ERROR on success, or corresponding error code. - */ - CHIP_ERROR SetFabric(const char * fabricName); - - /** - * @brief - * Return the stored fabric id, or the one for the "alpha" fabric if nothing is stored. - */ - chip::FabricId GetFabricId(); - private: - CHIP_ERROR CommitConfig(); + CHIP_ERROR CommitConfig(const char * name); inipp::Ini mConfig; + const char * mName; }; From 9b60863977aeff80390c9580f16cc2b1ddf30d3b Mon Sep 17 00:00:00 2001 From: Dieter Van der Meulen <87530904+dvdm-qorvo@users.noreply.github.com> Date: Tue, 30 Nov 2021 14:54:35 +0100 Subject: [PATCH 33/42] Moved IO dependency from Qorvo's glue code to Qorvo's SW stack library (#12356) --- examples/lighting-app/qpg/src/AppTask.cpp | 14 +++++----- .../lighting-app/qpg/src/LightingManager.cpp | 6 ++-- examples/lock-app/qpg/include/AppConfig.h | 2 +- examples/lock-app/qpg/src/AppTask.cpp | 28 +++++++++---------- third_party/qpg_sdk/BUILD.gn | 2 +- third_party/qpg_sdk/qpg_sdk.gni | 1 + third_party/qpg_sdk/repo | 2 +- 7 files changed, 28 insertions(+), 27 deletions(-) diff --git a/examples/lighting-app/qpg/src/AppTask.cpp b/examples/lighting-app/qpg/src/AppTask.cpp index f422ee32a7f17b..ab74cdd415d5b2 100644 --- a/examples/lighting-app/qpg/src/AppTask.cpp +++ b/examples/lighting-app/qpg/src/AppTask.cpp @@ -16,7 +16,7 @@ * limitations under the License. */ -#include "qvCHIP.h" +#include "qvIO.h" #include "AppConfig.h" #include "AppEvent.h" @@ -107,7 +107,7 @@ CHIP_ERROR AppTask::Init() LightingMgr().SetCallbacks(ActionInitiated, ActionCompleted); // Subscribe with our button callback to the qvCHIP button handler. - qvCHIP_SetBtnCallback(ButtonEventHandler); + qvIO_SetBtnCallback(ButtonEventHandler); // Init ZCL Data Model chip::Server::GetInstance().Init(); @@ -178,15 +178,15 @@ void AppTask::AppTaskMain(void * pvParameter) { if (sIsThreadProvisioned && sIsThreadEnabled) { - qvCHIP_LedBlink(SYSTEM_STATE_LED, 950, 50); + qvIO_LedBlink(SYSTEM_STATE_LED, 950, 50); } else if (sHaveBLEConnections) { - qvCHIP_LedBlink(SYSTEM_STATE_LED, 100, 100); + qvIO_LedBlink(SYSTEM_STATE_LED, 100, 100); } else { - qvCHIP_LedBlink(SYSTEM_STATE_LED, 50, 950); + qvIO_LedBlink(SYSTEM_STATE_LED, 50, 950); } } } @@ -301,9 +301,9 @@ void AppTask::FunctionTimerEventHandler(AppEvent * aEvent) // Turn off all LEDs before starting blink to make sure blink is // co-ordinated. - qvCHIP_LedSet(SYSTEM_STATE_LED, false); + qvIO_LedSet(SYSTEM_STATE_LED, false); - qvCHIP_LedBlink(SYSTEM_STATE_LED, 500, 500); + qvIO_LedBlink(SYSTEM_STATE_LED, 500, 500); } else if (sAppTask.mFunctionTimerActive && sAppTask.mFunction == kFunction_FactoryReset) { diff --git a/examples/lighting-app/qpg/src/LightingManager.cpp b/examples/lighting-app/qpg/src/LightingManager.cpp index bb9dbf58157d91..3f53f9a02f2644 100644 --- a/examples/lighting-app/qpg/src/LightingManager.cpp +++ b/examples/lighting-app/qpg/src/LightingManager.cpp @@ -18,7 +18,7 @@ */ #include "LightingManager.h" -#include "qvCHIP.h" +#include "qvIO.h" #include // initialization values for Blue in XY color space @@ -211,6 +211,6 @@ void LightingManager::Set(bool aOn) void LightingManager::UpdateLight() { ChipLogProgress(NotSpecified, "UpdateLight: %d L:%d R:%d G:%d B:%d", mState, mLevel, mRGB.r, mRGB.g, mRGB.b); - qvCHIP_PWMSetColor(mRGB.r, mRGB.g, mRGB.b); - qvCHIP_PWMColorOnOff(mState == kState_On); + qvIO_PWMSetColor(mRGB.r, mRGB.g, mRGB.b); + qvIO_PWMColorOnOff(mState == kState_On); } diff --git a/examples/lock-app/qpg/include/AppConfig.h b/examples/lock-app/qpg/include/AppConfig.h index 24429e873e6ac3..f49455c7a18846 100644 --- a/examples/lock-app/qpg/include/AppConfig.h +++ b/examples/lock-app/qpg/include/AppConfig.h @@ -25,7 +25,7 @@ #define APP_FUNCTION_BUTTON BTN_SW5 #define SYSTEM_STATE_LED LED_GREEN -#define LOCK_STATE_LED LED_RED +#define LOCK_STATE_LED LED_WHITE // Time it takes in ms for the simulated actuator to move from one // state to another. diff --git a/examples/lock-app/qpg/src/AppTask.cpp b/examples/lock-app/qpg/src/AppTask.cpp index 95434ff2df70bf..9f01c2961ae7bd 100644 --- a/examples/lock-app/qpg/src/AppTask.cpp +++ b/examples/lock-app/qpg/src/AppTask.cpp @@ -16,7 +16,7 @@ * limitations under the License. */ -#include "qvCHIP.h" +#include "qvIO.h" #include "AppConfig.h" #include "AppEvent.h" @@ -106,9 +106,9 @@ CHIP_ERROR AppTask::Init() BoltLockMgr().SetCallbacks(ActionInitiated, ActionCompleted); // Subscribe with our button callback to the qvCHIP button handler. - qvCHIP_SetBtnCallback(ButtonEventHandler); + qvIO_SetBtnCallback(ButtonEventHandler); - qvCHIP_LedSet(LOCK_STATE_LED, !BoltLockMgr().IsUnlocked()); + qvIO_LedSet(LOCK_STATE_LED, !BoltLockMgr().IsUnlocked()); // Init ZCL Data Model chip::Server::GetInstance().Init(); @@ -175,15 +175,15 @@ void AppTask::AppTaskMain(void * pvParameter) { if (sIsThreadProvisioned && sIsThreadEnabled) { - qvCHIP_LedBlink(SYSTEM_STATE_LED, 950, 50); + qvIO_LedBlink(SYSTEM_STATE_LED, 950, 50); } else if (sHaveBLEConnections) { - qvCHIP_LedBlink(SYSTEM_STATE_LED, 100, 100); + qvIO_LedBlink(SYSTEM_STATE_LED, 100, 100); } else { - qvCHIP_LedBlink(SYSTEM_STATE_LED, 50, 950); + qvIO_LedBlink(SYSTEM_STATE_LED, 50, 950); } } } @@ -293,11 +293,11 @@ void AppTask::FunctionTimerEventHandler(AppEvent * aEvent) // Turn off all LEDs before starting blink to make sure blink is // co-ordinated. - qvCHIP_LedSet(SYSTEM_STATE_LED, false); - qvCHIP_LedSet(LOCK_STATE_LED, false); + qvIO_LedSet(SYSTEM_STATE_LED, false); + qvIO_LedSet(LOCK_STATE_LED, false); - qvCHIP_LedBlink(SYSTEM_STATE_LED, 500, 500); - qvCHIP_LedBlink(LOCK_STATE_LED, 500, 500); + qvIO_LedBlink(SYSTEM_STATE_LED, 500, 500); + qvIO_LedBlink(LOCK_STATE_LED, 500, 500); } else if (sAppTask.mFunctionTimerActive && sAppTask.mFunction == kFunction_FactoryReset) { @@ -375,7 +375,7 @@ void AppTask::FunctionHandler(AppEvent * aEvent) else if (sAppTask.mFunctionTimerActive && sAppTask.mFunction == kFunction_FactoryReset) { // Set lock status LED back to show state of lock. - qvCHIP_LedSet(LOCK_STATE_LED, !BoltLockMgr().IsUnlocked()); + qvIO_LedSet(LOCK_STATE_LED, !BoltLockMgr().IsUnlocked()); sAppTask.CancelTimer(); @@ -428,7 +428,7 @@ void AppTask::ActionInitiated(BoltLockManager::Action_t aAction, int32_t aActor) sAppTask.mSyncClusterToButtonAction = true; } - qvCHIP_LedBlink(LOCK_STATE_LED, 50, 50); + qvIO_LedBlink(LOCK_STATE_LED, 50, 50); } void AppTask::ActionCompleted(BoltLockManager::Action_t aAction) @@ -440,13 +440,13 @@ void AppTask::ActionCompleted(BoltLockManager::Action_t aAction) { ChipLogProgress(NotSpecified, "Lock Action has been completed"); - qvCHIP_LedSet(LOCK_STATE_LED, true); + qvIO_LedSet(LOCK_STATE_LED, true); } else if (aAction == BoltLockManager::UNLOCK_ACTION) { ChipLogProgress(NotSpecified, "Unlock Action has been completed"); - qvCHIP_LedSet(LOCK_STATE_LED, false); + qvIO_LedSet(LOCK_STATE_LED, false); } if (sAppTask.mSyncClusterToButtonAction) diff --git a/third_party/qpg_sdk/BUILD.gn b/third_party/qpg_sdk/BUILD.gn index 1de010bfe1364b..e282c6255c2945 100755 --- a/third_party/qpg_sdk/BUILD.gn +++ b/third_party/qpg_sdk/BUILD.gn @@ -33,7 +33,7 @@ group("qpg_sdk") { config("qpg_freertos_config") { include_dirs = [ - "${chip_root}/third_party/qpg_sdk/repo/qpg6100/comps/gpFreeRTOS/config", + "${qpg_sdk_root}/${qpg_target_ic}/comps/gpFreeRTOS/config", "${chip_root}/third_party/qpg_sdk/repo/qpg6100/comps/lwip", "${freertos_root}/repo/portable/GCC/ARM_CM3", ] diff --git a/third_party/qpg_sdk/qpg_sdk.gni b/third_party/qpg_sdk/qpg_sdk.gni index 2e4527c004209b..3c980f3b0c106e 100644 --- a/third_party/qpg_sdk/qpg_sdk.gni +++ b/third_party/qpg_sdk/qpg_sdk.gni @@ -58,6 +58,7 @@ template("qpg_sdk") { include_dirs += [ "${qpg_sdk_root}/${qpg_target_ic}/comps/qvCHIP/inc", + "${qpg_sdk_root}/${qpg_target_ic}/comps/qvIO/inc", "${qpg_sdk_root}/${qpg_target_ic}/comps/gpFreeRTOS/config", "${qpg_sdk_root}/${qpg_target_ic}/comps/libmbedtls", "${mbedtls_root}/repo/include", diff --git a/third_party/qpg_sdk/repo b/third_party/qpg_sdk/repo index 184c57602e94c7..49640d787ffde9 160000 --- a/third_party/qpg_sdk/repo +++ b/third_party/qpg_sdk/repo @@ -1 +1 @@ -Subproject commit 184c57602e94c71ff5bda6f2e2811b1e95773800 +Subproject commit 49640d787ffde9b5d3f1e46bdce8596018a0e32a From 17b9743a6f3c9e2d9f7f7cc9c39c20f72bcc01ec Mon Sep 17 00:00:00 2001 From: "Hui.Li-TCL" Date: Tue, 30 Nov 2021 22:00:00 +0800 Subject: [PATCH 34/42] move ChipAppServer to a android service (#12313) * move ChipAppServer to a android service * Restyled by google-java-format * Restyled by google-java-format Co-authored-by: Restyled.io --- .../App/app/src/main/AndroidManifest.xml | 6 +- .../chiptvserver/ChipTvServerApplication.java | 23 +++++++ .../tcl/chip/chiptvserver/MainActivity.java | 34 ----------- .../chiptvserver/service/MatterServant.java | 55 +++++++++++++++++ .../service/MatterServantService.java | 61 +++++++++++++++++++ 5 files changed, 144 insertions(+), 35 deletions(-) create mode 100644 examples/tv-app/android/App/app/src/main/java/com/tcl/chip/chiptvserver/ChipTvServerApplication.java create mode 100644 examples/tv-app/android/App/app/src/main/java/com/tcl/chip/chiptvserver/service/MatterServant.java create mode 100644 examples/tv-app/android/App/app/src/main/java/com/tcl/chip/chiptvserver/service/MatterServantService.java diff --git a/examples/tv-app/android/App/app/src/main/AndroidManifest.xml b/examples/tv-app/android/App/app/src/main/AndroidManifest.xml index 383830aaf0b8b9..a51122c976037d 100644 --- a/examples/tv-app/android/App/app/src/main/AndroidManifest.xml +++ b/examples/tv-app/android/App/app/src/main/AndroidManifest.xml @@ -9,6 +9,7 @@ + - + + \ No newline at end of file diff --git a/examples/tv-app/android/App/app/src/main/java/com/tcl/chip/chiptvserver/ChipTvServerApplication.java b/examples/tv-app/android/App/app/src/main/java/com/tcl/chip/chiptvserver/ChipTvServerApplication.java new file mode 100644 index 00000000000000..79a13d9a0cdf18 --- /dev/null +++ b/examples/tv-app/android/App/app/src/main/java/com/tcl/chip/chiptvserver/ChipTvServerApplication.java @@ -0,0 +1,23 @@ +package com.tcl.chip.chiptvserver; + +import android.app.Application; +import android.content.Intent; +import android.os.Build; +import com.tcl.chip.chiptvserver.service.MatterServantService; + +public class ChipTvServerApplication extends Application { + @Override + public void onCreate() { + super.onCreate(); + startMatterServantService(); + } + + private void startMatterServantService() { + Intent intent = new Intent(this, MatterServantService.class); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { + getApplicationContext().startForegroundService(intent); + } else { + startService(intent); + } + } +} diff --git a/examples/tv-app/android/App/app/src/main/java/com/tcl/chip/chiptvserver/MainActivity.java b/examples/tv-app/android/App/app/src/main/java/com/tcl/chip/chiptvserver/MainActivity.java index 41014fe7f100ea..7475aa4e7e8e85 100644 --- a/examples/tv-app/android/App/app/src/main/java/com/tcl/chip/chiptvserver/MainActivity.java +++ b/examples/tv-app/android/App/app/src/main/java/com/tcl/chip/chiptvserver/MainActivity.java @@ -5,24 +5,9 @@ import android.widget.ImageView; import android.widget.TextView; import androidx.appcompat.app.AppCompatActivity; -import chip.appserver.ChipAppServer; -import chip.platform.AndroidBleManager; -import chip.platform.AndroidChipPlatform; -import chip.platform.ChipMdnsCallbackImpl; -import chip.platform.NsdManagerServiceResolver; -import chip.platform.PreferencesConfigurationManager; -import chip.platform.PreferencesKeyValueStoreManager; import chip.setuppayload.DiscoveryCapability; import chip.setuppayload.SetupPayload; import chip.setuppayload.SetupPayloadParser; -import com.tcl.chip.tvapp.ContentLaunchManagerStub; -import com.tcl.chip.tvapp.KeypadInputManagerStub; -import com.tcl.chip.tvapp.LowPowerManagerStub; -import com.tcl.chip.tvapp.MediaInputManagerStub; -import com.tcl.chip.tvapp.MediaPlaybackManagerStub; -import com.tcl.chip.tvapp.TvApp; -import com.tcl.chip.tvapp.TvChannelManagerStub; -import com.tcl.chip.tvapp.WakeOnLanManagerStub; import java.util.HashSet; public class MainActivity extends AppCompatActivity { @@ -38,22 +23,6 @@ protected void onCreate(Bundle savedInstanceState) { mQrCodeImg = findViewById(R.id.qrCodeImg); mQrCodeTxt = findViewById(R.id.qrCodeTxt); mManualPairingCodeTxt = findViewById(R.id.manualPairingCodeTxt); - TvApp tvApp = new TvApp(); - tvApp.setKeypadInputManager(new KeypadInputManagerStub()); - tvApp.setWakeOnLanManager(new WakeOnLanManagerStub()); - tvApp.setMediaInputManager(new MediaInputManagerStub()); - tvApp.setContentLaunchManager(new ContentLaunchManagerStub()); - tvApp.setLowPowerManager(new LowPowerManagerStub()); - tvApp.setMediaPlaybackManager(new MediaPlaybackManagerStub()); - tvApp.setTvChannelManager(new TvChannelManagerStub()); - - AndroidChipPlatform chipPlatform = - new AndroidChipPlatform( - new AndroidBleManager(), - new PreferencesKeyValueStoreManager(this), - new PreferencesConfigurationManager(this), - new NsdManagerServiceResolver(this), - new ChipMdnsCallbackImpl()); // TODO: Get these parameters from PreferencesConfigurationManager HashSet discoveryCapabilities = new HashSet<>(); @@ -78,8 +47,5 @@ protected void onCreate(Bundle savedInstanceState) { } catch (SetupPayloadParser.SetupPayloadException e) { e.printStackTrace(); } - - ChipAppServer chipAppServer = new ChipAppServer(); - chipAppServer.startApp(); } } diff --git a/examples/tv-app/android/App/app/src/main/java/com/tcl/chip/chiptvserver/service/MatterServant.java b/examples/tv-app/android/App/app/src/main/java/com/tcl/chip/chiptvserver/service/MatterServant.java new file mode 100644 index 00000000000000..aa1cf46ec00903 --- /dev/null +++ b/examples/tv-app/android/App/app/src/main/java/com/tcl/chip/chiptvserver/service/MatterServant.java @@ -0,0 +1,55 @@ +package com.tcl.chip.chiptvserver.service; + +import android.content.Context; +import androidx.annotation.NonNull; +import chip.appserver.ChipAppServer; +import chip.platform.AndroidBleManager; +import chip.platform.AndroidChipPlatform; +import chip.platform.ChipMdnsCallbackImpl; +import chip.platform.NsdManagerServiceResolver; +import chip.platform.PreferencesConfigurationManager; +import chip.platform.PreferencesKeyValueStoreManager; +import com.tcl.chip.tvapp.ContentLaunchManagerStub; +import com.tcl.chip.tvapp.KeypadInputManagerStub; +import com.tcl.chip.tvapp.LowPowerManagerStub; +import com.tcl.chip.tvapp.MediaInputManagerStub; +import com.tcl.chip.tvapp.MediaPlaybackManagerStub; +import com.tcl.chip.tvapp.TvApp; +import com.tcl.chip.tvapp.TvChannelManagerStub; +import com.tcl.chip.tvapp.WakeOnLanManagerStub; + +public class MatterServant { + + private MatterServant() {} + + private static class SingletonHolder { + static MatterServant instance = new MatterServant(); + } + + public static MatterServant get() { + return SingletonHolder.instance; + } + + public void init(@NonNull Context context) { + TvApp tvApp = new TvApp(); + tvApp.setKeypadInputManager(new KeypadInputManagerStub()); + tvApp.setWakeOnLanManager(new WakeOnLanManagerStub()); + tvApp.setMediaInputManager(new MediaInputManagerStub()); + tvApp.setContentLaunchManager(new ContentLaunchManagerStub()); + tvApp.setLowPowerManager(new LowPowerManagerStub()); + tvApp.setMediaPlaybackManager(new MediaPlaybackManagerStub()); + tvApp.setTvChannelManager(new TvChannelManagerStub()); + + Context applicationContext = context.getApplicationContext(); + AndroidChipPlatform chipPlatform = + new AndroidChipPlatform( + new AndroidBleManager(), + new PreferencesKeyValueStoreManager(applicationContext), + new PreferencesConfigurationManager(applicationContext), + new NsdManagerServiceResolver(applicationContext), + new ChipMdnsCallbackImpl()); + + ChipAppServer chipAppServer = new ChipAppServer(); + chipAppServer.startApp(); + } +} diff --git a/examples/tv-app/android/App/app/src/main/java/com/tcl/chip/chiptvserver/service/MatterServantService.java b/examples/tv-app/android/App/app/src/main/java/com/tcl/chip/chiptvserver/service/MatterServantService.java new file mode 100644 index 00000000000000..a65ebffa505aa2 --- /dev/null +++ b/examples/tv-app/android/App/app/src/main/java/com/tcl/chip/chiptvserver/service/MatterServantService.java @@ -0,0 +1,61 @@ +package com.tcl.chip.chiptvserver.service; + +import android.app.Notification; +import android.app.NotificationChannel; +import android.app.NotificationManager; +import android.app.PendingIntent; +import android.app.Service; +import android.content.Intent; +import android.os.Build; +import android.os.IBinder; +import androidx.annotation.Nullable; +import androidx.core.app.NotificationCompat; +import com.tcl.chip.chiptvserver.MainActivity; +import com.tcl.chip.chiptvserver.R; + +public class MatterServantService extends Service { + private static final String CHANNEL_ID = "Matter"; + + @Override + public void onCreate() { + super.onCreate(); + MatterServant.get().init(this.getApplicationContext()); + } + + @Nullable + @Override + public IBinder onBind(Intent intent) { + return null; + } + + @Override + public int onStartCommand(Intent intent, int flags, int startId) { + createNotificationChannel(); + Intent notificationIntent = new Intent(this, MainActivity.class); + PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, notificationIntent, 0); + Notification notification = + new NotificationCompat.Builder(this, CHANNEL_ID) + .setContentTitle("MatterServant Service") + .setContentText("MatterServant is running") + .setSmallIcon(R.mipmap.ic_launcher) + .setContentIntent(pendingIntent) + .build(); + startForeground(1, notification); + return super.onStartCommand(intent, flags, startId); + } + + private void createNotificationChannel() { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { + NotificationChannel serviceChannel = + new NotificationChannel( + CHANNEL_ID, "Matter Servant", NotificationManager.IMPORTANCE_DEFAULT); + NotificationManager manager = getSystemService(NotificationManager.class); + manager.createNotificationChannel(serviceChannel); + } + } + + @Override + public void onDestroy() { + super.onDestroy(); + } +} From 7e9945433fa42ed8b301921a7998e8ea3130c3c6 Mon Sep 17 00:00:00 2001 From: Evgeny Margolis Date: Tue, 30 Nov 2021 06:01:44 -0800 Subject: [PATCH 35/42] Using TLV::EstimateStructOverhead() to Estimate Encoded CD TLV Struct Size (#12329) * Using TLV::EstimateStructOverhead() to Estimate Encoded CD TLV Struct Size * Update src/credentials/CertificationDeclaration.h Co-authored-by: Tennessee Carmel-Veilleux Co-authored-by: Tennessee Carmel-Veilleux --- src/credentials/CertificationDeclaration.h | 23 ++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/src/credentials/CertificationDeclaration.h b/src/credentials/CertificationDeclaration.h index e627b9cba93fd0..755e1a5d50f870 100644 --- a/src/credentials/CertificationDeclaration.h +++ b/src/credentials/CertificationDeclaration.h @@ -36,14 +36,21 @@ namespace Credentials { static constexpr uint32_t kMaxProductIdsCountPerCD = 100; static constexpr uint32_t kCertificateIdLength = 19; - -// TODO: share code with EstimateTLVStructOverhead to estimate TLV structure size. -static constexpr uint32_t kCertificationElements_TLVEncodedMaxLength = (1 + 1) + // Length of header and end of outer TLV structure. - (3 + kCertificateIdLength) + // Encoded length of CertificateId string. - (1 + sizeof(uint16_t)) * kMaxProductIdsCountPerCD + 3 + // Max encoding length of an array of 100 uint16_t elements. - (2 + sizeof(uint8_t)) * 2 + // Encoding length of two uint8_t element. - (2 + sizeof(uint16_t)) * 7; // Max total encoding length of seven uint16_t elements. - +static constexpr uint32_t kCertificationElements_TLVEncodedMaxLength = + TLV::EstimateStructOverhead(sizeof(uint16_t), // FormatVersion + sizeof(uint16_t), // VendorId + // ProductIds. Formally, the following extression should be used here: + // ( TLV::EstimateStructOverhead(sizeof(uint16_t)) * kMaxProductIdsCountPerCD ), + // Because exact structure of the elements of this array is known, more accurate estimate is used. + (1 + sizeof(uint16_t)) * kMaxProductIdsCountPerCD, + sizeof(uint32_t), // DeviceTypeId + kCertificateIdLength, // CertificateId + sizeof(uint8_t), // SecurityLevel + sizeof(uint16_t), // SecurityInformation + sizeof(uint16_t), // VersionNumber + sizeof(uint8_t), // CertificationType + sizeof(uint16_t), // DACOriginVendorId + sizeof(uint16_t)); // DACOriginProductId static constexpr uint32_t kMaxCMSSignedCDMessage = 183 + kCertificationElements_TLVEncodedMaxLength; struct CertificationElements From 42d842cf01c6f91c30c401908347b11fe6a7f360 Mon Sep 17 00:00:00 2001 From: Sergei Lissianoi <54454955+selissia@users.noreply.github.com> Date: Tue, 30 Nov 2021 11:29:27 -0500 Subject: [PATCH 36/42] OTA Requestor Refactoring -- Part 1 (#12119) * Introduce ota-requestor.h containing Requestor API declarations * Split OTA Requestor class declarations into multiple headers * Restyled by whitespace * Restyled by clang-format * Clean up comments and function names * Misc API format changes based on PR comments * Restyled by clang-format * First take at moving the core Requestor logic out of the Linux example * Further OTA Requestor refactoring -- moving logic out of Linux example app * Further changes for OTA Rerquestor refactoring * More OTA Requestor refactoring changes * Refactoring OTA Requestor. Code compiles and links with this commit * Further OTA Requestor refactoring. Requestor and chip-tool build successfully. The top-level build fails for all-cluster app. * OTA Refactor:Only build clusters/ota-requestor in the context of Requestor app Update .gn files so that clusters/ota-requestor is not built for all example apps (this is different from the rest of the clusters). Instead, explicitly specify clusters/ota-requestor sources in the OTA-Requestor example app * OTA-Requestor: Initialize mOtaStartDelayMs * Restyled by whitespace * Restyled by clang-format * Restyled by gn * Push submodule pointers * Clean up an extra statement introduced by mistake * Remove ExampleOTARequestor.cpp/h as they are replaced by the OTARequestor.cpp/h * Add OTA Requestor README * OTARequestor refactoring. With this the image transfer scenario works on Linux: rm -r /tmp/chip_* ./out/debug/chip-ota-provider-app -f /tmp/ota.txt ./out/chip-tool pairing onnetwork 1 20202021 ./out/debug/chip-ota-requestor-app -u 5560 -d 42 -i ::1 ./out/chip-tool pairing onnetwork-long 2 20202021 42 ./out/chip-tool otasoftwareupdaterequestor announce-ota-provider 1 0 0 2 0 * Requestor refactoring: Enable automatic ImageQuery in Test Mode * OTA Requestor refactoring -- add LinuxOTARequestorDriver.cpp, comments * Requestor refactor: Rename and clean up files * Restyled by whitespace * Restyled by clang-format * Restyled by gn * Restyled by prettier-markdown * OTA Requestor changes * Remove unused variable Co-authored-by: Restyled.io --- .github/.wordlist.txt | 8 + examples/ota-requestor-app/linux/BUILD.gn | 5 +- .../linux/LinuxOTAImageProcessor.h | 45 ++ .../linux/LinuxOTARequestorDriver.cpp | 34 ++ .../linux/LinuxOTARequestorDriver.h | 38 ++ examples/ota-requestor-app/linux/main.cpp | 200 ++------- .../ota-requestor-common/BUILD.gn | 8 +- .../ExampleOTARequestor.cpp | 118 ------ .../ExampleOTARequestor.h | 59 --- .../clusters/ota-requestor}/BDXDownloader.cpp | 0 .../clusters/ota-requestor}/BDXDownloader.h | 0 .../ota-requestor/ClusterInterface.cpp | 52 +++ .../{ota-downloader.h => OTADownloader.h} | 19 +- ...-image-processor.h => OTAImageProcessor.h} | 8 +- .../clusters/ota-requestor/OTARequestor.cpp | 389 ++++++++++++++++++ src/app/clusters/ota-requestor/OTARequestor.h | 96 +++++ ...equestor-driver.h => OTARequestorDriver.h} | 3 + ...or-interface.h => OTARequestorInterface.h} | 29 +- src/app/clusters/ota-requestor/README.md | 50 +++ .../clusters/ota-requestor/ota-requestor.h | 49 --- 20 files changed, 809 insertions(+), 401 deletions(-) create mode 100644 examples/ota-requestor-app/linux/LinuxOTAImageProcessor.h create mode 100644 examples/ota-requestor-app/linux/LinuxOTARequestorDriver.cpp create mode 100644 examples/ota-requestor-app/linux/LinuxOTARequestorDriver.h delete mode 100644 examples/ota-requestor-app/ota-requestor-common/ExampleOTARequestor.cpp delete mode 100644 examples/ota-requestor-app/ota-requestor-common/ExampleOTARequestor.h rename {examples/ota-requestor-app/ota-requestor-common => src/app/clusters/ota-requestor}/BDXDownloader.cpp (100%) rename {examples/ota-requestor-app/ota-requestor-common => src/app/clusters/ota-requestor}/BDXDownloader.h (100%) create mode 100644 src/app/clusters/ota-requestor/ClusterInterface.cpp rename src/app/clusters/ota-requestor/{ota-downloader.h => OTADownloader.h} (78%) rename src/app/clusters/ota-requestor/{ota-image-processor.h => OTAImageProcessor.h} (88%) create mode 100644 src/app/clusters/ota-requestor/OTARequestor.cpp create mode 100644 src/app/clusters/ota-requestor/OTARequestor.h rename src/app/clusters/ota-requestor/{ota-requestor-driver.h => OTARequestorDriver.h} (96%) rename src/app/clusters/ota-requestor/{ota-requestor-interface.h => OTARequestorInterface.h} (58%) create mode 100644 src/app/clusters/ota-requestor/README.md delete mode 100644 src/app/clusters/ota-requestor/ota-requestor.h diff --git a/.github/.wordlist.txt b/.github/.wordlist.txt index 07fe32993db502..ac58409264db79 100644 --- a/.github/.wordlist.txt +++ b/.github/.wordlist.txt @@ -549,6 +549,7 @@ lightin LightingColor LightingState LinkSoftwareAndDocumentationPack +LinuxOTARequestorDriver LocalConfigDisabled localhost localstatedir @@ -701,9 +702,13 @@ optionsMask optionsOverride orgs OTA +OTADownloader +OTAImageProcessorDriver OTAProviderIpAddress OTAProviderNodeId OTAProviderSerialPort +OTARequestor +OTARequestorDriver OTARequesterImpl OTARequestorSerialPort OTBR @@ -860,7 +865,10 @@ SERIALDEVICE SerialNumber ServiceId SetDns +SetImageProcessorDelegate +SetOtaRequestorDriver SetpointRaiseLower +SetRequestorInstance SetUpPINCode SetupQRCode sexualized diff --git a/examples/ota-requestor-app/linux/BUILD.gn b/examples/ota-requestor-app/linux/BUILD.gn index 2d698377703640..aa54192e4333d7 100644 --- a/examples/ota-requestor-app/linux/BUILD.gn +++ b/examples/ota-requestor-app/linux/BUILD.gn @@ -16,7 +16,10 @@ import("//build_overrides/build.gni") import("//build_overrides/chip.gni") executable("chip-ota-requestor-app") { - sources = [ "main.cpp" ] + sources = [ + "LinuxOTARequestorDriver.cpp", + "main.cpp", + ] deps = [ "${chip_root}/examples/ota-requestor-app/ota-requestor-common", diff --git a/examples/ota-requestor-app/linux/LinuxOTAImageProcessor.h b/examples/ota-requestor-app/linux/LinuxOTAImageProcessor.h new file mode 100644 index 00000000000000..2a5a41ad2de52f --- /dev/null +++ b/examples/ota-requestor-app/linux/LinuxOTAImageProcessor.h @@ -0,0 +1,45 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* This file contains the decalarions for the Linux implementation of the + * the OTAImageProcessorDriver interface class + */ + +#include "app/clusters/ota-requestor/OTAImageProcessor.h" + +class LinuxOTAImageProcessor : public OTAImageProcessorDriver +{ + + // Virtuial functions from OTAImageProcessorDriver -- start + // Open file, find block of space in persistent memory, or allocate a buffer, etc. + CHIP_ERROR PrepareDownload() { return CHIP_NO_ERROR; } + + // Must not be a blocking call to support cases that require IO to elements such as // external peripherals/radios + CHIP_ERROR ProcessBlock(chip::ByteSpan & data) { return CHIP_NO_ERROR; } + + // Close file, close persistent storage, etc + CHIP_ERROR Finalize() { return CHIP_NO_ERROR; } + + chip::Optional PercentComplete() { return chip::Optional(0); } + + // Clean up the download which could mean erasing everything that was written, + // releasing buffers, etc. + CHIP_ERROR Abort() { return CHIP_NO_ERROR; } + + // Virtuial functions from OTAImageProcessorDriver -- end +}; diff --git a/examples/ota-requestor-app/linux/LinuxOTARequestorDriver.cpp b/examples/ota-requestor-app/linux/LinuxOTARequestorDriver.cpp new file mode 100644 index 00000000000000..fb971ffbdb58a6 --- /dev/null +++ b/examples/ota-requestor-app/linux/LinuxOTARequestorDriver.cpp @@ -0,0 +1,34 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* This file contains the Linux implementation of the OTAImageProcessorDriver + * interface class + */ + +#include "LinuxOTARequestorDriver.h" + +// A call into the application logic to give it a chance to allow or stop the Requestor +// from proceeding with actual image download. Returning TRUE will allow the download +// to proceed, returning FALSE will abort the download process. +bool LinuxOTARequestorDriver::CheckImageDownloadAllowed() +{ + return true; +} + +// Notify the application that the download is complete and the image can be applied +void LinuxOTARequestorDriver::ImageDownloadComplete() {} diff --git a/examples/ota-requestor-app/linux/LinuxOTARequestorDriver.h b/examples/ota-requestor-app/linux/LinuxOTARequestorDriver.h new file mode 100644 index 00000000000000..c219aa5c679f05 --- /dev/null +++ b/examples/ota-requestor-app/linux/LinuxOTARequestorDriver.h @@ -0,0 +1,38 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* This file contains the decalarions for the Linux implementation of the + * the OTARequestorDriver interface class + */ +#include "app/clusters/ota-requestor/OTARequestorDriver.h" + +class LinuxOTARequestorDriver : public OTARequestorDriver +{ + + // Virtual functions from OTARequestorDriver -- start + + // A call into the application logic to give it a chance to allow or stop the Requestor + // from proceeding with actual image download. Returning TRUE will allow the download + // to proceed, returning FALSE will abort the download process. + bool CheckImageDownloadAllowed(); + + // Notify the application that the download is complete and the image can be applied + void ImageDownloadComplete(); + + // Virtual functions from OTARequestorDriver -- end +}; diff --git a/examples/ota-requestor-app/linux/main.cpp b/examples/ota-requestor-app/linux/main.cpp index 08dd38e3d21a64..e4aa27ee85ddf4 100644 --- a/examples/ota-requestor-app/linux/main.cpp +++ b/examples/ota-requestor-app/linux/main.cpp @@ -16,23 +16,17 @@ * limitations under the License. */ -#include -#include #include #include -#include -#include -#include #include -#include #include #include #include -#include -#include -#include "BDXDownloader.h" -#include "ExampleOTARequestor.h" +#include "LinuxOTAImageProcessor.h" +#include "LinuxOTARequestorDriver.h" +#include "app/clusters/ota-requestor/OTADownloader.h" +#include "app/clusters/ota-requestor/OTARequestor.h" using chip::ByteSpan; using chip::CharSpan; @@ -45,7 +39,6 @@ using chip::OnDeviceConnectionFailure; using chip::PeerId; using chip::Server; using chip::VendorId; -using chip::bdx::TransferSession; using chip::Callback::Callback; using chip::Inet::IPAddress; using chip::System::Layer; @@ -54,17 +47,8 @@ using namespace chip::ArgParser; using namespace chip::Messaging; 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, chip::OperationalDeviceProxy * 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 -ExchangeContext * exchangeCtx = nullptr; -BdxDownloader bdxDownloader; -Callback mOnConnectedCallback(OnConnected, nullptr); -Callback mOnConnectionFailureCallback(OnConnectionFailure, nullptr); +void OnStartDelayTimerHandler(Layer * systemLayer, void * appState); constexpr uint16_t kOptionProviderNodeId = 'n'; constexpr uint16_t kOptionProviderFabricIndex = 'f'; @@ -113,90 +97,6 @@ HelpOptions helpOptions("ota-requestor-app", "Usage: ota-requestor-app [options] OptionSet * allOptions[] = { &cmdLineOptions, &helpOptions, nullptr }; -void OnQueryImageResponse(void * context, const QueryImageResponse::DecodableType & response) -{ - ChipLogDetail(SoftwareUpdate, "QueryImageResponse responded with action %" PRIu8, response.status); - - TransferSession::TransferInitData initOptions; - initOptions.TransferCtlFlags = chip::bdx::TransferControlFlags::kReceiverDrive; - initOptions.MaxBlockSize = 1024; - char testFileDes[9] = { "test.txt" }; - initOptions.FileDesLength = static_cast(strlen(testFileDes)); - initOptions.FileDesignator = reinterpret_cast(testFileDes); - - chip::OperationalDeviceProxy * operationalDeviceProxy = Server::GetInstance().GetOperationalDeviceProxy(); - if (operationalDeviceProxy != nullptr) - { - chip::Messaging::ExchangeManager * exchangeMgr = operationalDeviceProxy->GetExchangeManager(); - chip::Optional session = operationalDeviceProxy->GetSecureSession(); - if (exchangeMgr != nullptr && session.HasValue()) - { - exchangeCtx = exchangeMgr->NewContext(session.Value(), &bdxDownloader); - } - - if (exchangeCtx == nullptr) - { - ChipLogError(BDX, "unable to allocate ec: exchangeMgr=%p sessionExists? %u", exchangeMgr, session.HasValue()); - return; - } - } - - bdxDownloader.SetInitialExchange(exchangeCtx); - - // This will kick of a timer which will regularly check for updates to the bdx::TransferSession state machine. - bdxDownloader.InitiateTransfer(&chip::DeviceLayer::SystemLayer(), chip::bdx::TransferRole::kReceiver, initOptions, - chip::System::Clock::Seconds16(20)); -} - -void OnQueryImageFailure(void * context, EmberAfStatus status) -{ - ChipLogDetail(SoftwareUpdate, "QueryImage failure response %" PRIu8, status); -} - -void OnConnected(void * context, chip::OperationalDeviceProxy * deviceProxy) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - chip::Controller::OtaSoftwareUpdateProviderCluster cluster; - constexpr EndpointId kOtaProviderEndpoint = 0; - - // These QueryImage params have been chosen arbitrarily - constexpr VendorId kExampleVendorId = VendorId::Common; - constexpr uint16_t kExampleProductId = 77; - constexpr uint16_t kExampleHWVersion = 3; - constexpr uint16_t kExampleSoftwareVersion = 0; - constexpr EmberAfOTADownloadProtocol kExampleProtocolsSupported[] = { EMBER_ZCL_OTA_DOWNLOAD_PROTOCOL_BDX_SYNCHRONOUS }; - const char locationBuf[] = { 'U', 'S' }; - CharSpan exampleLocation(locationBuf); - constexpr bool kExampleClientCanConsent = false; - ByteSpan metadata; - - err = cluster.Associate(deviceProxy, kOtaProviderEndpoint); - if (err != CHIP_NO_ERROR) - { - ChipLogError(SoftwareUpdate, "Associate() failed: %" CHIP_ERROR_FORMAT, err.Format()); - return; - } - QueryImage::Type args; - args.vendorId = kExampleVendorId; - args.productId = kExampleProductId; - args.softwareVersion = kExampleSoftwareVersion; - args.protocolsSupported = kExampleProtocolsSupported; - args.hardwareVersion.Emplace(kExampleHWVersion); - args.location.Emplace(exampleLocation); - args.requestorCanConsent.Emplace(kExampleClientCanConsent); - args.metadataForProvider.Emplace(metadata); - err = cluster.InvokeCommand(args, /* context = */ nullptr, OnQueryImageResponse, OnQueryImageFailure); - if (err != CHIP_NO_ERROR) - { - ChipLogError(SoftwareUpdate, "QueryImage() failed: %" CHIP_ERROR_FORMAT, err.Format()); - } -} - -void OnConnectionFailure(void * context, NodeId deviceId, CHIP_ERROR error) -{ - 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) { bool retval = true; @@ -252,54 +152,6 @@ bool HandleOptions(const char * aProgram, OptionSet * aOptions, int aIdentifier, return (retval); } -void SendQueryImageCommand(chip::NodeId peerNodeId = providerNodeId, chip::FabricIndex peerFabricIndex = providerFabricIndex) -{ - Server * server = &(Server::GetInstance()); - chip::FabricInfo * fabric = server->GetFabricTable().FindFabricWithIndex(peerFabricIndex); - if (fabric == nullptr) - { - ChipLogError(SoftwareUpdate, "Did not find fabric for index %d", peerFabricIndex); - return; - } - - chip::DeviceProxyInitParams initParams = { - .sessionManager = &(server->GetSecureSessionManager()), - .exchangeMgr = &(server->GetExchangeManager()), - .idAllocator = &(server->GetSessionIDAllocator()), - .fabricInfo = fabric, - // TODO: Determine where this should be instantiated - .imDelegate = chip::Platform::New(), - }; - - chip::OperationalDeviceProxy * operationalDeviceProxy = - chip::Platform::New(initParams, fabric->GetPeerIdForNode(peerNodeId)); - if (operationalDeviceProxy == nullptr) - { - ChipLogError(SoftwareUpdate, "Failed in creating an instance of OperationalDeviceProxy"); - return; - } - - 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); - operationalDeviceProxy->UpdateDeviceData(addr, operationalDeviceProxy->GetMRPConfig()); - - CHIP_ERROR err = operationalDeviceProxy->Connect(&mOnConnectedCallback, &mOnConnectionFailureCallback); - if (err != CHIP_NO_ERROR) - { - ChipLogError(SoftwareUpdate, "Cannot establish connection to peer device: %" CHIP_ERROR_FORMAT, err.Format()); - } -} - -void OnStartDelayTimerHandler(Layer * systemLayer, void * appState) -{ - SendQueryImageCommand(); -} - int main(int argc, char * argv[]) { CHIP_ERROR err = CHIP_NO_ERROR; @@ -340,12 +192,42 @@ int main(int argc, char * argv[]) // Initialize device attestation config SetDeviceAttestationCredentialsProvider(chip::Credentials::Examples::GetExampleDACProvider()); - // This will allow ExampleOTARequestor to call SendQueryImageCommand - ExampleOTARequestor::GetInstance().SetConnectToProviderCallback(SendQueryImageCommand); + // Initialize and interconnect the Requestor and Image Processor objects -- START + // Initialize the instance of the main Requestor Class + OTARequestor * requestorCore = new OTARequestor; + SetRequestorInstance(requestorCore); + + // Initialize an instance of the Requestor Driver + LinuxOTARequestorDriver * requestorUser = new LinuxOTARequestorDriver; + + // Connect the Requestor and Requestor Driver objects + requestorCore->SetOtaRequestorDriver(requestorUser); - // If a delay is provided, QueryImage after the timer expires + // Initialize the Downloader object + OTADownloader * downloaderCore = new OTADownloader; + // TODO: enable SetDownloaderInstance(downloaderCore); + + // Initialize the Image Processor object + LinuxOTAImageProcessor * downloaderUser = new LinuxOTAImageProcessor; + + // Connect the Downloader and Image Processor objects + downloaderCore->SetImageProcessorDelegate(downloaderUser); + // Initialize and interconnect the Requestor and Image Processor objects -- END + + // Pass the IP Address to the OTARequestor object: Use of explicit IP address is temporary + // until the Exchange Layer implements address resolution + { + IPAddress ipAddr; + IPAddress::FromString(ipAddress, ipAddr); + requestorCore->SetIpAddress(ipAddr); + } + + // Test Mode operation: If a delay is provided, QueryImage after the timer expires if (delayQueryTimeInSec > 0) { + // In this mode Provider node ID and fabric idx must be supplied explicitly from program args + requestorCore->TestModeSetProviderParameters(providerNodeId, providerFabricIndex); + chip::DeviceLayer::SystemLayer().StartTimer(chip::System::Clock::Milliseconds32(delayQueryTimeInSec * 1000), OnStartDelayTimerHandler, nullptr); } @@ -354,3 +236,9 @@ int main(int argc, char * argv[]) return 0; } + +// Test mode operation +void OnStartDelayTimerHandler(Layer * systemLayer, void * appState) +{ + static_cast(GetRequestorInstance())->TriggerImmediateQuery(); +} diff --git a/examples/ota-requestor-app/ota-requestor-common/BUILD.gn b/examples/ota-requestor-app/ota-requestor-common/BUILD.gn index a48a9897f96cfd..44b115461860d4 100644 --- a/examples/ota-requestor-app/ota-requestor-common/BUILD.gn +++ b/examples/ota-requestor-app/ota-requestor-common/BUILD.gn @@ -31,10 +31,10 @@ chip_data_model("ota-requestor-common") { deps = [ "${chip_root}/src/lib" ] sources = [ - "BDXDownloader.cpp", - "BDXDownloader.h", - "ExampleOTARequestor.cpp", - "ExampleOTARequestor.h", + "${chip_root}/src/app/clusters/ota-requestor/BDXDownloader.cpp", + "${chip_root}/src/app/clusters/ota-requestor/BDXDownloader.h", + "${chip_root}/src/app/clusters/ota-requestor/ClusterInterface.cpp", + "${chip_root}/src/app/clusters/ota-requestor/OTARequestor.cpp", ] is_server = true diff --git a/examples/ota-requestor-app/ota-requestor-common/ExampleOTARequestor.cpp b/examples/ota-requestor-app/ota-requestor-common/ExampleOTARequestor.cpp deleted file mode 100644 index b251d3bfc07c46..00000000000000 --- a/examples/ota-requestor-app/ota-requestor-common/ExampleOTARequestor.cpp +++ /dev/null @@ -1,118 +0,0 @@ -/* - * - * Copyright (c) 2021 Project CHIP Authors - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include - -#include -#include - -ExampleOTARequestor ExampleOTARequestor::sInstance; - -constexpr uint32_t kImmediateStartDelayMs = 1; // Start the timer with this value when starting OTA "immediately" - -// OTA Software Update Requestor Cluster AnnounceOtaProvider Command callback (from client) -bool emberAfOtaSoftwareUpdateRequestorClusterAnnounceOtaProviderCallback( - chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, - const chip::app::Clusters::OtaSoftwareUpdateRequestor::Commands::AnnounceOtaProvider::DecodableType & commandData) -{ - EmberAfStatus status = ExampleOTARequestor::GetInstance().HandleAnnounceOTAProvider(commandObj, commandPath, commandData); - emberAfSendImmediateDefaultResponse(status); - return true; -} - -ExampleOTARequestor::ExampleOTARequestor() -{ - mOtaStartDelayMs = 0; - mProviderNodeId = chip::kUndefinedNodeId; - mProviderFabricIndex = chip::kUndefinedFabricIndex; -} - -void ExampleOTARequestor::Init(uint32_t startDelayMs) -{ - mOtaStartDelayMs = startDelayMs; -} - -void ExampleOTARequestor::ConnectToProvider() -{ - - if (mConnectToProviderCallback != nullptr) - { - ChipLogProgress(SoftwareUpdate, "Attempting to connect to 0x" ChipLogFormatX64 " on FabricIndex 0x%" PRIu8, - ChipLogValueX64(mProviderNodeId), mProviderFabricIndex); - - mConnectToProviderCallback(mProviderNodeId, mProviderFabricIndex); - } - else - { - ChipLogError(SoftwareUpdate, "ConnectToProviderCallback is not set"); - } -} - -EmberAfStatus ExampleOTARequestor::HandleAnnounceOTAProvider( - chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, - const chip::app::Clusters::OtaSoftwareUpdateRequestor::Commands::AnnounceOtaProvider::DecodableType & commandData) -{ - auto & providerLocation = commandData.providerLocation; - auto & announcementReason = commandData.announcementReason; - - if (commandObj == nullptr) - { - ChipLogError(SoftwareUpdate, "Cannot access get FabricIndex"); - return EMBER_ZCL_STATUS_INVALID_COMMAND; - } - - mProviderNodeId = providerLocation; - mProviderFabricIndex = commandObj->GetAccessingFabricIndex(); - - ChipLogProgress(SoftwareUpdate, "OTA Requestor received AnnounceOTAProvider"); - ChipLogDetail(SoftwareUpdate, " FabricIndex: %" PRIu8, mProviderFabricIndex); - ChipLogDetail(SoftwareUpdate, " ProviderNodeID: 0x" ChipLogFormatX64, ChipLogValueX64(mProviderNodeId)); - ChipLogDetail(SoftwareUpdate, " VendorID: 0x%" PRIx16, commandData.vendorId); - ChipLogDetail(SoftwareUpdate, " AnnouncementReason: %" PRIu8, announcementReason); - if (commandData.metadataForNode.HasValue()) - { - ChipLogDetail(SoftwareUpdate, " MetadataForNode: %zu", commandData.metadataForNode.Value().size()); - } - - // If reason is URGENT_UPDATE_AVAILABLE, we start OTA immediately. Otherwise, respect the timer value set in mOtaStartDelayMs. - // This is done to exemplify what a real-world OTA Requestor might do while also being configurable enough to use as a test app. - uint32_t msToStart = 0; - switch (announcementReason) - { - case static_cast(EMBER_ZCL_OTA_ANNOUNCEMENT_REASON_SIMPLE_ANNOUNCEMENT): - case static_cast(EMBER_ZCL_OTA_ANNOUNCEMENT_REASON_UPDATE_AVAILABLE): - msToStart = mOtaStartDelayMs; - break; - case static_cast(EMBER_ZCL_OTA_ANNOUNCEMENT_REASON_URGENT_UPDATE_AVAILABLE): - msToStart = kImmediateStartDelayMs; - break; - default: - ChipLogError(SoftwareUpdate, "Unexpected announcementReason: %" PRIu8, static_cast(announcementReason)); - return EMBER_ZCL_STATUS_INVALID_COMMAND; - } - - chip::DeviceLayer::SystemLayer().StartTimer(chip::System::Clock::Milliseconds32(msToStart), StartDelayTimerHandler, this); - - return EMBER_ZCL_STATUS_SUCCESS; -} - -void ExampleOTARequestor::StartDelayTimerHandler(chip::System::Layer * systemLayer, void * appState) -{ - VerifyOrReturn(appState != nullptr); - static_cast(appState)->ConnectToProvider(); -} diff --git a/examples/ota-requestor-app/ota-requestor-common/ExampleOTARequestor.h b/examples/ota-requestor-app/ota-requestor-common/ExampleOTARequestor.h deleted file mode 100644 index 6348c56b6aa88f..00000000000000 --- a/examples/ota-requestor-app/ota-requestor-common/ExampleOTARequestor.h +++ /dev/null @@ -1,59 +0,0 @@ -/* - * - * Copyright (c) 2021 Project CHIP Authors - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#pragma once - -#include -#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 -// contains other application-specific logic related to OTA Software Update. -class ExampleOTARequestor -{ -public: - static ExampleOTARequestor & GetInstance() { return sInstance; } - - void Init(uint32_t startDelayMs); - - EmberAfStatus HandleAnnounceOTAProvider( - chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, - const chip::app::Clusters::OtaSoftwareUpdateRequestor::Commands::AnnounceOtaProvider::DecodableType & commandData); - - // Setter for mConnectToProviderCallback - void SetConnectToProviderCallback(void (*f)(chip::NodeId, chip::FabricIndex)) { mConnectToProviderCallback = f; } - -private: - ExampleOTARequestor(); - - static void StartDelayTimerHandler(chip::System::Layer * systemLayer, void * appState); - void ConnectToProvider(); - - static ExampleOTARequestor sInstance; - - chip::NodeId mProviderNodeId; - chip::FabricIndex mProviderFabricIndex; - uint32_t mOtaStartDelayMs; - - // TODO: This will be redone once the full Requestor app design is in place - // Pointer to the function that establishes a session with the Provider and initiates - // the BDX download - void (*mConnectToProviderCallback)(chip::NodeId, chip::FabricIndex); -}; diff --git a/examples/ota-requestor-app/ota-requestor-common/BDXDownloader.cpp b/src/app/clusters/ota-requestor/BDXDownloader.cpp similarity index 100% rename from examples/ota-requestor-app/ota-requestor-common/BDXDownloader.cpp rename to src/app/clusters/ota-requestor/BDXDownloader.cpp diff --git a/examples/ota-requestor-app/ota-requestor-common/BDXDownloader.h b/src/app/clusters/ota-requestor/BDXDownloader.h similarity index 100% rename from examples/ota-requestor-app/ota-requestor-common/BDXDownloader.h rename to src/app/clusters/ota-requestor/BDXDownloader.h diff --git a/src/app/clusters/ota-requestor/ClusterInterface.cpp b/src/app/clusters/ota-requestor/ClusterInterface.cpp new file mode 100644 index 00000000000000..3637d9392951ff --- /dev/null +++ b/src/app/clusters/ota-requestor/ClusterInterface.cpp @@ -0,0 +1,52 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* This file contains the glue code for passing the incoming OTA Requestor cluster commands + * to the OTA Requestor object that handles them + */ + +#include "OTARequestorInterface.h" + +// OTA Software Update Requestor Cluster AnnounceOtaProvider Command callback +bool emberAfOtaSoftwareUpdateRequestorClusterAnnounceOtaProviderCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::OtaSoftwareUpdateRequestor::Commands::AnnounceOtaProvider::DecodableType & commandData) +{ + EmberAfStatus status; + OTARequestorInterface * requestor = GetRequestorInstance(); + + if (requestor != nullptr) + { + status = requestor->HandleAnnounceOTAProvider(commandObj, commandPath, commandData); + } + else + { + status = EMBER_ZCL_STATUS_FAILURE; + } + + emberAfSendImmediateDefaultResponse(status); + return true; +} + +// TBD for now. Not clear what is the API for registering a command response handler +/* Callbacks for QueryImage response */ +// Callback mQueryImageResponseCallback(QueryImageResponseHandler, +// nullptr); + +// void QueryImageResponseHandler(void * context, const QueryImageResponse::DecodableType & response) +//{ } diff --git a/src/app/clusters/ota-requestor/ota-downloader.h b/src/app/clusters/ota-requestor/OTADownloader.h similarity index 78% rename from src/app/clusters/ota-requestor/ota-downloader.h rename to src/app/clusters/ota-requestor/OTADownloader.h index 1039a5994c14c3..3f7147f79aace8 100644 --- a/src/app/clusters/ota-requestor/ota-downloader.h +++ b/src/app/clusters/ota-requestor/OTADownloader.h @@ -23,7 +23,7 @@ * must include this file */ -#include "ota-image-processor.h" +#include "OTAImageProcessor.h" #pragma once @@ -35,10 +35,10 @@ class OTADownloader // API declarations start // Application calls this method to direct OTADownloader to begin the download - void virtual BeginDownload(); + void virtual BeginDownload(){}; // Platform calls this method upon the completion of PrepareDownload() processing - void virtual OnPreparedForDownload(); + void virtual OnPreparedForDownload(){}; // Action parameter type for the OnBlockProcessed() enum BlockActionType @@ -48,13 +48,22 @@ class OTADownloader }; // Platform calls this method upon the completion of ProcessBlock() processing - void virtual OnBlockProcessed(BlockActionType action); + void virtual OnBlockProcessed(BlockActionType action){}; // A setter for the delegate class pointer - void SetImageProcessorDelegate(OTAImageProcessorDriver * delegate); + void SetImageProcessorDelegate(OTAImageProcessorDriver * delegate) { mImageProcessorDelegate = delegate; } // API declarations end + // Destructor + virtual ~OTADownloader() = default; + private: OTAImageProcessorDriver * mImageProcessorDelegate; }; + +// Set the object implementing OTADownloader +void SetDownloaderInstance(OTADownloader * instance); + +// Get the object implementing OTADownloaderInterface +OTADownloader * GetDownloaderInstance(); diff --git a/src/app/clusters/ota-requestor/ota-image-processor.h b/src/app/clusters/ota-requestor/OTAImageProcessor.h similarity index 88% rename from src/app/clusters/ota-requestor/ota-image-processor.h rename to src/app/clusters/ota-requestor/OTAImageProcessor.h index b9a7ee9856c261..3bd9a65b7bd90c 100644 --- a/src/app/clusters/ota-requestor/ota-image-processor.h +++ b/src/app/clusters/ota-requestor/OTAImageProcessor.h @@ -16,7 +16,7 @@ * limitations under the License. */ -/* This file contains the declarations for OTAImageProcessor, a platform-agnostic +/* This file contains the declarations for OTAImageProcessorDriver, a platform-agnostic * interface for processing downloaded chunks of OTA image data. * Each platform should provide an implementation of this interface. */ @@ -27,6 +27,7 @@ // chunks of OTA image data (data could be raw image data meant for flash or // metadata). Each platform should provide an implementation of this // interface. + class OTAImageProcessorDriver { public: @@ -34,7 +35,7 @@ class OTAImageProcessorDriver virtual CHIP_ERROR PrepareDownload() = 0; // Must not be a blocking call to support cases that require IO to elements such as // external peripherals/radios - virtual CHIP_ERROR ProcessBlock(ByteSpan & data) = 0; + virtual CHIP_ERROR ProcessBlock(chip::ByteSpan & data) = 0; // Close file, close persistent storage, etc virtual CHIP_ERROR Finalize() = 0; @@ -44,4 +45,7 @@ class OTAImageProcessorDriver // Clean up the download which could mean erasing everything that was written, // releasing buffers, etc. virtual CHIP_ERROR Abort() = 0; + + // Destructor + virtual ~OTAImageProcessorDriver() = default; }; diff --git a/src/app/clusters/ota-requestor/OTARequestor.cpp b/src/app/clusters/ota-requestor/OTARequestor.cpp new file mode 100644 index 00000000000000..cc489768065bfa --- /dev/null +++ b/src/app/clusters/ota-requestor/OTARequestor.cpp @@ -0,0 +1,389 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* This file contains the implementation of the OTARequestor class. All the core + * OTA Requestor logic is contained in this class. + */ +#include "OTARequestor.h" + +#include +#include +#include +#include + +#include "BDXDownloader.h" + +#include +#include +#include + +#include +#include + +using chip::ByteSpan; +using chip::CASESessionManager; +using chip::CASESessionManagerConfig; +using chip::CharSpan; +using chip::DeviceProxy; +using chip::EndpointId; +using chip::FabricIndex; +using chip::FabricInfo; +using chip::NodeId; +using chip::OnDeviceConnected; +using chip::OnDeviceConnectionFailure; +using chip::PeerId; +using chip::Server; +using chip::VendorId; +using chip::bdx::TransferSession; +using chip::Callback::Callback; +using chip::System::Layer; +using chip::Transport::PeerAddress; +// using namespace chip::ArgParser; +using namespace chip::Messaging; +using namespace chip::app::Clusters::OtaSoftwareUpdateProvider::Commands; +using chip::Inet::IPAddress; + +// Global instance of the OTARequestorInterface. +OTARequestorInterface * globalOTARequestorInstance = nullptr; + +constexpr uint32_t kImmediateStartDelayMs = 1; // Start the timer with this value when starting OTA "immediately" + +// Callbacks for connection management +void OnConnected(void * context, chip::OperationalDeviceProxy * deviceProxy); +Callback mOnConnectedCallback(OnConnected, nullptr); + +void OnConnectionFailure(void * context, NodeId deviceId, CHIP_ERROR error); +Callback mOnConnectionFailureCallback(OnConnectionFailure, nullptr); + +void OnQueryImageResponse(void * context, const QueryImageResponse::DecodableType & response); +void OnQueryImageFailure(void * context, EmberAfStatus status); + +void SetRequestorInstance(OTARequestorInterface * instance) +{ + globalOTARequestorInstance = instance; +} + +OTARequestorInterface * GetRequestorInstance() +{ + return globalOTARequestorInstance; +} + +void StartDelayTimerHandler(chip::System::Layer * systemLayer, void * appState) +{ + VerifyOrReturn(appState != nullptr); + static_cast(appState)->ConnectToProvider(); +} + +void OnQueryImageFailure(void * context, EmberAfStatus status) +{ + ChipLogDetail(SoftwareUpdate, "QueryImage failure response %" PRIu8, status); +} + +void OnConnectionFailure(void * context, NodeId deviceId, CHIP_ERROR error) +{ + ChipLogError(SoftwareUpdate, "failed to connect to 0x%" PRIX64 ": %" CHIP_ERROR_FORMAT, deviceId, error.Format()); +} +// Finds the Requestor instance and calls the corresponding OTARequestor member function +void OnQueryImageResponse(void * context, const QueryImageResponse::DecodableType & response) +{ + OTARequestor * requestorCore = static_cast(GetRequestorInstance()); + + assert(requestorCore != nullptr); + + requestorCore->mOnQueryImageResponse(context, response); +} + +void OTARequestor::mOnQueryImageResponse(void * context, const QueryImageResponse::DecodableType & response) +{ + ChipLogDetail(SoftwareUpdate, "QueryImageResponse responded with action %" PRIu8, response.status); + + TransferSession::TransferInitData initOptions; + initOptions.TransferCtlFlags = chip::bdx::TransferControlFlags::kReceiverDrive; + initOptions.MaxBlockSize = 1024; + char testFileDes[9] = { "test.txt" }; + initOptions.FileDesLength = static_cast(strlen(testFileDes)); + initOptions.FileDesignator = reinterpret_cast(testFileDes); + + chip::OperationalDeviceProxy * operationalDeviceProxy = Server::GetInstance().GetOperationalDeviceProxy(); + if (operationalDeviceProxy != nullptr) + { + chip::Messaging::ExchangeManager * exchangeMgr = operationalDeviceProxy->GetExchangeManager(); + chip::Optional session = operationalDeviceProxy->GetSecureSession(); + if (exchangeMgr != nullptr && session.HasValue()) + { + exchangeCtx = exchangeMgr->NewContext(session.Value(), &bdxDownloader); + } + + if (exchangeCtx == nullptr) + { + ChipLogError(BDX, "unable to allocate ec: exchangeMgr=%p sessionExists? %u", exchangeMgr, session.HasValue()); + return; + } + } + + bdxDownloader.SetInitialExchange(exchangeCtx); + + // This will kick of a timer which will regularly check for updates to the bdx::TransferSession state machine. + bdxDownloader.InitiateTransfer(&chip::DeviceLayer::SystemLayer(), chip::bdx::TransferRole::kReceiver, initOptions, + chip::System::Clock::Seconds16(20)); +} + +EmberAfStatus OTARequestor::HandleAnnounceOTAProvider( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::OtaSoftwareUpdateRequestor::Commands::AnnounceOtaProvider::DecodableType & commandData) +{ + auto & providerLocation = commandData.providerLocation; + auto & announcementReason = commandData.announcementReason; + + if (commandObj == nullptr || commandObj->GetExchangeContext() == nullptr) + { + ChipLogError(SoftwareUpdate, "Cannot access ExchangeContext for FabricIndex"); + return EMBER_ZCL_STATUS_FAILURE; + } + + mProviderNodeId = providerLocation; + mProviderFabricIndex = commandObj->GetExchangeContext()->GetSessionHandle().GetFabricIndex(); + + ChipLogProgress(SoftwareUpdate, "OTA Requestor received AnnounceOTAProvider"); + ChipLogDetail(SoftwareUpdate, " FabricIndex: %" PRIu8, mProviderFabricIndex); + ChipLogDetail(SoftwareUpdate, " ProviderNodeID: 0x" ChipLogFormatX64, ChipLogValueX64(mProviderNodeId)); + ChipLogDetail(SoftwareUpdate, " VendorID: 0x%" PRIx16, commandData.vendorId); + ChipLogDetail(SoftwareUpdate, " AnnouncementReason: %" PRIu8, announcementReason); + if (commandData.metadataForNode.HasValue()) + { + ChipLogDetail(SoftwareUpdate, " MetadataForNode: %zu", commandData.metadataForNode.Value().size()); + } + + // If reason is URGENT_UPDATE_AVAILABLE, we start OTA immediately. Otherwise, respect the timer value set in mOtaStartDelayMs. + // This is done to exemplify what a real-world OTA Requestor might do while also being configurable enough to use as a test app. + uint32_t msToStart = 0; + switch (announcementReason) + { + case static_cast(EMBER_ZCL_OTA_ANNOUNCEMENT_REASON_SIMPLE_ANNOUNCEMENT): + case static_cast(EMBER_ZCL_OTA_ANNOUNCEMENT_REASON_UPDATE_AVAILABLE): + msToStart = mOtaStartDelayMs; + break; + case static_cast(EMBER_ZCL_OTA_ANNOUNCEMENT_REASON_URGENT_UPDATE_AVAILABLE): + msToStart = kImmediateStartDelayMs; + break; + default: + ChipLogError(SoftwareUpdate, "Unexpected announcementReason: %" PRIu8, static_cast(announcementReason)); + return EMBER_ZCL_STATUS_FAILURE; + } + + chip::DeviceLayer::SystemLayer().StartTimer(chip::System::Clock::Milliseconds32(msToStart), StartDelayTimerHandler, this); + + return EMBER_ZCL_STATUS_SUCCESS; +} + +CHIP_ERROR OTARequestor::SetupCASESessionManager(chip::FabricIndex fabricIndex) +{ + // A previous CASE session had been established + if (mCASESessionManager != nullptr) + { + if (mCASESessionManager->GetFabricInfo()->GetFabricIndex() != fabricIndex) + { + // CSM is per fabric so if fabric index does not match the previous session, CSM needs to be set up again + chip::Platform::Delete(mCASESessionManager); + mCASESessionManager = nullptr; + } + else + { + // Fabric index matches so use previous instance + return CHIP_NO_ERROR; + } + } + + // CSM has not been setup so create a new instance of it + if (mCASESessionManager == nullptr) + { + chip::Server * server = &(chip::Server::GetInstance()); + chip::FabricInfo * fabricInfo = server->GetFabricTable().FindFabricWithIndex(fabricIndex); + if (fabricInfo == nullptr) + { + ChipLogError(SoftwareUpdate, "Did not find fabric for index %d", fabricIndex); + return CHIP_ERROR_INVALID_ARGUMENT; + } + + chip::DeviceProxyInitParams initParams = { + .sessionManager = &(server->GetSecureSessionManager()), + .exchangeMgr = &(server->GetExchangeManager()), + .idAllocator = &(server->GetSessionIDAllocator()), + .fabricInfo = fabricInfo, + // TODO: Determine where this should be instantiated + .imDelegate = chip::Platform::New(), + }; + + chip::CASESessionManagerConfig sessionManagerConfig = { + .sessionInitParams = initParams, + .dnsCache = nullptr, + }; + + mCASESessionManager = chip::Platform::New(sessionManagerConfig); + } + + if (mCASESessionManager == nullptr) + { + ChipLogError(SoftwareUpdate, "Failed in creating an instance of CASESessionManager"); + return CHIP_ERROR_NO_MEMORY; + } + + return CHIP_NO_ERROR; +} + +// Converted from SendQueryImageCommand() +void OTARequestor::ConnectToProvider() +{ + chip::NodeId peerNodeId = mProviderNodeId; + chip::FabricIndex peerFabricIndex = mProviderFabricIndex; + + Server * server = &(Server::GetInstance()); + chip::FabricInfo * fabric = server->GetFabricTable().FindFabricWithIndex(peerFabricIndex); + if (fabric == nullptr) + { + ChipLogError(SoftwareUpdate, "Did not find fabric for index %d", peerFabricIndex); + return; + } + + chip::DeviceProxyInitParams initParams = { + .sessionManager = &(server->GetSecureSessionManager()), + .exchangeMgr = &(server->GetExchangeManager()), + .idAllocator = &(server->GetSessionIDAllocator()), + .fabricInfo = fabric, + // TODO: Determine where this should be instantiated + .imDelegate = chip::Platform::New(), + }; + + chip::OperationalDeviceProxy * operationalDeviceProxy = + chip::Platform::New(initParams, fabric->GetPeerIdForNode(peerNodeId)); + if (operationalDeviceProxy == nullptr) + { + ChipLogError(SoftwareUpdate, "Failed in creating an instance of OperationalDeviceProxy"); + return; + } + + server->SetOperationalDeviceProxy(operationalDeviceProxy); + + // Explicitly calling UpdateDeviceData() should not be needed once OperationalDeviceProxy can resolve IP address from node ID + // and fabric index + PeerAddress addr = PeerAddress::UDP(mIpAddress, CHIP_PORT); + operationalDeviceProxy->UpdateDeviceData(addr, operationalDeviceProxy->GetMRPConfig()); + + CHIP_ERROR err = operationalDeviceProxy->Connect(&mOnConnectedCallback, &mOnConnectionFailureCallback); + if (err != CHIP_NO_ERROR) + { + ChipLogError(SoftwareUpdate, "Cannot establish connection to peer device: %" CHIP_ERROR_FORMAT, err.Format()); + } +} + +// Called whenever FindOrEstablishSession is successful. Finds the Requestor instance +// and calls the corresponding OTARequestor member function +void OnConnected(void * context, chip::OperationalDeviceProxy * deviceProxy) +{ + OTARequestor * requestorCore = static_cast(GetRequestorInstance()); + + assert(requestorCore != nullptr); + + requestorCore->mOnConnected(context, deviceProxy); +} + +// Member function called whenever FindOrEstablishSession is successful +void OTARequestor::mOnConnected(void * context, chip::DeviceProxy * deviceProxy) +{ + switch (onConnectedState) + { + case kQueryImage: { + CHIP_ERROR err = CHIP_NO_ERROR; + chip::Controller::OtaSoftwareUpdateProviderCluster cluster; + constexpr EndpointId kOtaProviderEndpoint = 0; + + // These QueryImage params have been chosen arbitrarily + constexpr VendorId kExampleVendorId = VendorId::Common; + constexpr uint16_t kExampleProductId = 77; + constexpr uint16_t kExampleHWVersion = 3; + constexpr uint16_t kExampleSoftwareVersion = 0; + constexpr EmberAfOTADownloadProtocol kExampleProtocolsSupported[] = { EMBER_ZCL_OTA_DOWNLOAD_PROTOCOL_BDX_SYNCHRONOUS }; + const char locationBuf[] = { 'U', 'S' }; + CharSpan exampleLocation(locationBuf); + constexpr bool kExampleClientCanConsent = false; + ByteSpan metadata; + + err = cluster.Associate(deviceProxy, kOtaProviderEndpoint); + if (err != CHIP_NO_ERROR) + { + ChipLogError(SoftwareUpdate, "Associate() failed: %" CHIP_ERROR_FORMAT, err.Format()); + return; + } + QueryImage::Type args; + args.vendorId = kExampleVendorId; + args.productId = kExampleProductId; + args.softwareVersion = kExampleSoftwareVersion; + args.protocolsSupported = kExampleProtocolsSupported; + args.hardwareVersion.Emplace(kExampleHWVersion); + args.location.Emplace(exampleLocation); + args.requestorCanConsent.Emplace(kExampleClientCanConsent); + args.metadataForProvider.Emplace(metadata); + err = cluster.InvokeCommand(args, /* context = */ nullptr, OnQueryImageResponse, OnQueryImageFailure); + if (err != CHIP_NO_ERROR) + { + ChipLogError(SoftwareUpdate, "QueryImage() failed: %" CHIP_ERROR_FORMAT, err.Format()); + } + + break; + } + case kStartBDX: { + TransferSession::TransferInitData initOptions; + initOptions.TransferCtlFlags = chip::bdx::TransferControlFlags::kReceiverDrive; + initOptions.MaxBlockSize = 1024; + char testFileDes[9] = { "test.txt" }; + initOptions.FileDesLength = static_cast(strlen(testFileDes)); + initOptions.FileDesignator = reinterpret_cast(testFileDes); + + if (deviceProxy != nullptr) + { + chip::Messaging::ExchangeManager * exchangeMgr = deviceProxy->GetExchangeManager(); + chip::Optional session = deviceProxy->GetSecureSession(); + if (exchangeMgr != nullptr && session.HasValue()) + { + exchangeCtx = exchangeMgr->NewContext(session.Value(), &bdxDownloader); + } + + if (exchangeCtx == nullptr) + { + ChipLogError(BDX, "unable to allocate ec: exchangeMgr=%p sessionExists? %u", exchangeMgr, session.HasValue()); + return; + } + } + + bdxDownloader.SetInitialExchange(exchangeCtx); + + // This will kick of a timer which will regularly check for updates to the bdx::TransferSession state machine. + bdxDownloader.InitiateTransfer(&chip::DeviceLayer::SystemLayer(), chip::bdx::TransferRole::kReceiver, initOptions, + chip::System::Clock::Seconds16(20)); + break; + } + default: + break; + } +} + +void OTARequestor::TriggerImmediateQuery() +{ + // Perhaps we don't need a separate function ConnectToProvider, revisit this + ConnectToProvider(); +} diff --git a/src/app/clusters/ota-requestor/OTARequestor.h b/src/app/clusters/ota-requestor/OTARequestor.h new file mode 100644 index 00000000000000..048776bbf246b8 --- /dev/null +++ b/src/app/clusters/ota-requestor/OTARequestor.h @@ -0,0 +1,96 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* This file contains the declarations for the Matter OTA Requestor implementation and API. + * Applications implementing the OTA Requestor functionality must include this file. + */ + +#include "BDXDownloader.h" +#include "OTARequestorDriver.h" +#include "OTARequestorInterface.h" +#include +#pragma once + +// This class implements all of the core logic of the OTA Requestor +class OTARequestor : public OTARequestorInterface +{ +public: + // Application interface declarations -- start + + // Application directs the Requestor to start the Image Query process + // and download the new image if available + void TriggerImmediateQuery(); + + // A setter for the delegate class pointer + void SetOtaRequestorDriver(OTARequestorDriver * driver) { mOtaRequestorDriver = driver; } + + // Application directs the Requestor to abort any processing related to + // the image update + void AbortImageUpdate(); + + // Application interface declarations -- end + + // Virtual functions from OTARequestorInterface start + // Handler for the AnnounceOTAProvider command + EmberAfStatus HandleAnnounceOTAProvider( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::OtaSoftwareUpdateRequestor::Commands::AnnounceOtaProvider::DecodableType & commandData); + + // Virtual functions from OTARequestorInterface -- end + void ConnectToProvider(); + + void mOnConnected(void * context, chip::DeviceProxy * deviceProxy); + void mOnQueryImageResponse( + void * context, + const chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImageResponse::DecodableType & response); + + // When the Requestor is used as a test tool (Tesm Mode) the Provider parameters may be supplied explicitly + void TestModeSetProviderParameters(chip::NodeId NodeId, chip::FabricIndex FabIndex) + { + mProviderNodeId = NodeId; + mProviderFabricIndex = FabIndex; + } + + // Temporary until IP address resolution is implemented in the Exchange Layer + void SetIpAddress(chip::Inet::IPAddress IpAddress) { mIpAddress = IpAddress; } + +private: + // Enums + // Various cases for when OnConnected callback could be called + enum OnConnectedState + { + kQueryImage = 0, + kStartBDX, + }; + + // Variables + OTARequestorDriver * mOtaRequestorDriver; + chip::NodeId mProviderNodeId; + chip::FabricIndex mProviderFabricIndex; + uint32_t mOtaStartDelayMs = 0; + chip::CASESessionManager * mCASESessionManager = nullptr; + OnConnectedState onConnectedState = kQueryImage; + chip::Messaging::ExchangeContext * exchangeCtx = nullptr; + BdxDownloader bdxDownloader; + + // Temporary until IP address resolution is implemented in the Exchange layer + chip::Inet::IPAddress mIpAddress; + + // Functions + CHIP_ERROR SetupCASESessionManager(chip::FabricIndex fabricIndex); +}; diff --git a/src/app/clusters/ota-requestor/ota-requestor-driver.h b/src/app/clusters/ota-requestor/OTARequestorDriver.h similarity index 96% rename from src/app/clusters/ota-requestor/ota-requestor-driver.h rename to src/app/clusters/ota-requestor/OTARequestorDriver.h index 786c49c27c6715..098417926d922d 100644 --- a/src/app/clusters/ota-requestor/ota-requestor-driver.h +++ b/src/app/clusters/ota-requestor/OTARequestorDriver.h @@ -36,4 +36,7 @@ class OTARequestorDriver // Notify the application that the download is complete and the image can be applied virtual void ImageDownloadComplete() = 0; + + // Destructor + virtual ~OTARequestorDriver() = default; }; diff --git a/src/app/clusters/ota-requestor/ota-requestor-interface.h b/src/app/clusters/ota-requestor/OTARequestorInterface.h similarity index 58% rename from src/app/clusters/ota-requestor/ota-requestor-interface.h rename to src/app/clusters/ota-requestor/OTARequestorInterface.h index a6c5c592d67d63..240e9aa5c7926b 100644 --- a/src/app/clusters/ota-requestor/ota-requestor-interface.h +++ b/src/app/clusters/ota-requestor/OTARequestorInterface.h @@ -21,6 +21,11 @@ * this interface. */ +#include +#include + +#include + #pragma once // Interface class to connect the OTA Software Update Requestor cluster command processing @@ -29,15 +34,25 @@ class OTARequestorInterface { public: // Handler for the AnnounceOTAProvider command - virtual bool HandleAnnounceOTAProvider( + virtual EmberAfStatus HandleAnnounceOTAProvider( chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, - const chip::app::Clusters::OtaSoftwareUpdateRequestor::Commands::AnnounceOtaProvider::DecodableType & commandData ch) = 0; + const chip::app::Clusters::OtaSoftwareUpdateRequestor::Commands::AnnounceOtaProvider::DecodableType & commandData) = 0; + // TBD: This probably doesn't need to be a method OTARequestorInterface as the response handler is + // explicitly supplied at command invocation // Handler for the QueryImageResponse command - virtual bool HandleQueryImageResponse(void * context, uint8_t status, uint32_t delayedActionTime, CharSpan imageURI, - uint32_t softwareVersion, CharSpan softwareVersionString, ByteSpan updateToken, - bool userConsentNeeded, ByteSpan metadataForRequester) = 0; + // virtual bool + // HandleQueryImageResponse(chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImageResponse::DecodableType) = 0; - // Handler for the ApplyUpdateResponse command - virtual bool HandleApplyUpdateResponse(ApplyUpdateResponse::DecodableType); + // Destructor + virtual ~OTARequestorInterface() = default; }; + +// The instance of the class implementing OTARequestorInterface must be managed through +// the following global getter and setter functions. + +// Set the object implementing OTARequestorInterface +void SetRequestorInstance(OTARequestorInterface * instance); + +// Get the object implementing OTARequestorInterface +OTARequestorInterface * GetRequestorInstance(); diff --git a/src/app/clusters/ota-requestor/README.md b/src/app/clusters/ota-requestor/README.md new file mode 100644 index 00000000000000..cc04baecfd1492 --- /dev/null +++ b/src/app/clusters/ota-requestor/README.md @@ -0,0 +1,50 @@ +# OTA Requestor + +This is an implementation of the Matter OTA Requestor functionality that can be +used by Matter applications for OTA software updates + +## Steps for including the OTA Requestor functionality in a Matter application + +- Enable the OTA Requestor Server cluster and the OTA Provider cluster in the + application + +- Explicitly list all the source files in `src/app/clusters/ota-requestor` in + the application's make/build file. See for example + `examples/ota-requestor-app/ota-requestor-common/BUILD.gn` + +- Implement a class derived from `OTARequestorDriver`, see for example + `LinuxOTARequestorDriver`. This class would typically be a part of the + application. + +- In the application initialization logic create an instance of the + `OTARequestor` class and register it through `SetRequestorInstance()`. + Create an instance of the `OTARequestorDriver` implementation and connect it + to the `OTARequestor` object by calling + `OTARequestor::SetOtaRequestorDriver()` + +- Implement a class derived from `OTAImageProcessorDriver`, see for example + `LinuxOTARequestorDriver`. This class would typically be a part of the + platform. + +- In the application initialization logic create an instance of the + `OTADownloader` class. (TODO: How do we register it?) Create an instance of + the `OTAImageProcessorDriver` implementation and connect it to the + `OTADownloader` object by calling + `OTADownloader::SetImageProcessorDelegate()` + +- See `examples/ota-requestor-app/linux/main.cpp` for an example of the + initialization code discussed above + +- Implement application- and platform-specific logic related to image download + and update such as platform-specific image storage and validation, + application-specific logic for triggering image query and applying the + downloaded image, etc. + +- The interface between the core OTA Requestor functionality and the + platform/application logic is realized through the virtual functions of + `OTARequestorDriver` and `OTAImageProcessorDriver` and through the + application interface methods of `OTARequestor` and `OTADownloader`. + +## Design Overview + +To be completed.. diff --git a/src/app/clusters/ota-requestor/ota-requestor.h b/src/app/clusters/ota-requestor/ota-requestor.h deleted file mode 100644 index 4cfacba97b64f1..00000000000000 --- a/src/app/clusters/ota-requestor/ota-requestor.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - * - * Copyright (c) 2021 Project CHIP Authors - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* This file contains the declarations for the Matter OTA Requestor implementation and API. - * Applications implementing the OTA Requestor functionality must include this file. - */ - -#include "ota-requestor-driver.h" -#include "ota-requestor-interface.h" - -#pragma once - -// This class implements all of the core logic of the OTA Requestor -class OTARequestor : public OTARequestorInterface -{ -public: - // Application interface declarations start - - // Application directs the Requestor to start the Image Query process - // and download the new image if available - void TriggerImmediateQuery(); - - // Application directs the Requestor to abort any processing related to - // the image update - void AbortImageUpdate(); - - // A setter for the delegate class pointer - void SetOtaRequestorDriver(OTARequestorDriver * driver); - - // Application interface declarations end - -private: - OTARequestorDriver * mOtaRequestorDriver; -}; From fbaadda901e16ae4863701fed6150ff691737602 Mon Sep 17 00:00:00 2001 From: Vivien Nicolas Date: Tue, 30 Nov 2021 17:30:14 +0100 Subject: [PATCH 37/42] [chip-tool] Move OpenCommissioningWindowCommand to a dedicated file (#11863) --- examples/chip-tool/BUILD.gn | 2 + .../commands/clusters/ModelCommand.cpp | 22 ++--- .../chip-tool/commands/pairing/Commands.h | 11 +-- .../OpenCommissioningWindowCommand.cpp | 57 ++++++++++++ .../pairing/OpenCommissioningWindowCommand.h | 57 ++++++++++++ .../commands/pairing/PairingCommand.cpp | 92 ++----------------- .../commands/pairing/PairingCommand.h | 40 ++------ 7 files changed, 140 insertions(+), 141 deletions(-) create mode 100644 examples/chip-tool/commands/pairing/OpenCommissioningWindowCommand.cpp create mode 100644 examples/chip-tool/commands/pairing/OpenCommissioningWindowCommand.h diff --git a/examples/chip-tool/BUILD.gn b/examples/chip-tool/BUILD.gn index 88f4b2eb3bcb8c..c78ea55662db76 100644 --- a/examples/chip-tool/BUILD.gn +++ b/examples/chip-tool/BUILD.gn @@ -39,6 +39,8 @@ executable("chip-tool") { # TODO - enable CommissionedListCommand once DNS Cache is implemented # "commands/pairing/CommissionedListCommand.cpp", # "commands/pairing/CommissionedListCommand.h", + "commands/pairing/OpenCommissioningWindowCommand.cpp", + "commands/pairing/OpenCommissioningWindowCommand.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 79a3089679fdf4..01406250d7a360 100644 --- a/examples/chip-tool/commands/clusters/ModelCommand.cpp +++ b/examples/chip-tool/commands/clusters/ModelCommand.cpp @@ -26,29 +26,21 @@ using namespace ::chip; CHIP_ERROR ModelCommand::RunCommand() { ChipLogProgress(chipTool, "Sending command to node 0x%" PRIx64, mNodeId); - - CHIP_ERROR err = - CurrentCommissioner().GetConnectedDevice(mNodeId, &mOnDeviceConnectedCallback, &mOnDeviceConnectionFailureCallback); - VerifyOrExit(err == CHIP_NO_ERROR, - ChipLogError(chipTool, "Failed in initiating connection to the device: %" PRIu64 ", error %" CHIP_ERROR_FORMAT, - mNodeId, err.Format())); - -exit: - return err; + return CurrentCommissioner().GetConnectedDevice(mNodeId, &mOnDeviceConnectedCallback, &mOnDeviceConnectionFailureCallback); } void ModelCommand::OnDeviceConnectedFn(void * context, ChipDevice * device) { ModelCommand * command = reinterpret_cast(context); - VerifyOrReturn(command != nullptr, - ChipLogError(chipTool, "Device connected, but cannot send the command, as the context is null")); + VerifyOrReturn(command != nullptr, ChipLogError(chipTool, "OnDeviceConnectedFn: context is null")); command->SendCommand(device, command->mEndPointId); } -void ModelCommand::OnDeviceConnectionFailureFn(void * context, NodeId deviceId, CHIP_ERROR error) +void ModelCommand::OnDeviceConnectionFailureFn(void * context, NodeId deviceId, CHIP_ERROR err) { + LogErrorOnFailure(err); + ModelCommand * command = reinterpret_cast(context); - ChipLogError(chipTool, "Failed in connecting to the device %" PRIu64 ". Error %" CHIP_ERROR_FORMAT, deviceId, error.Format()); - VerifyOrReturn(command != nullptr, ChipLogError(chipTool, "ModelCommand context is null")); - command->SetCommandExitStatus(error); + VerifyOrReturn(command != nullptr, ChipLogError(chipTool, "OnDeviceConnectionFailureFn: context is null")); + command->SetCommandExitStatus(err); } diff --git a/examples/chip-tool/commands/pairing/Commands.h b/examples/chip-tool/commands/pairing/Commands.h index b6040efc34ed52..564bed55a2a889 100644 --- a/examples/chip-tool/commands/pairing/Commands.h +++ b/examples/chip-tool/commands/pairing/Commands.h @@ -19,6 +19,7 @@ #pragma once #include "CommissionedListCommand.h" +#include "OpenCommissioningWindowCommand.h" #include "PairingCommand.h" #include @@ -143,14 +144,6 @@ class Ethernet : public PairingCommand Ethernet() : PairingCommand("ethernet", PairingMode::Ethernet, PairingNetworkType::Ethernet) {} }; -class OpenCommissioningWindow : public PairingCommand -{ -public: - OpenCommissioningWindow() : - PairingCommand("open-commissioning-window", PairingMode::OpenCommissioningWindow, PairingNetworkType::None) - {} -}; - class StartUdcServerCommand : public CHIPCommand { public: @@ -185,10 +178,10 @@ void registerCommandsPairing(Commands & commands) make_unique(), make_unique(), make_unique(), - make_unique(), // TODO - enable CommissionedListCommand once DNS Cache is implemented // make_unique(), make_unique(), + make_unique(), }; commands.Register(clusterName, clusterCommands); diff --git a/examples/chip-tool/commands/pairing/OpenCommissioningWindowCommand.cpp b/examples/chip-tool/commands/pairing/OpenCommissioningWindowCommand.cpp new file mode 100644 index 00000000000000..8c8576d9e30311 --- /dev/null +++ b/examples/chip-tool/commands/pairing/OpenCommissioningWindowCommand.cpp @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2021 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include "OpenCommissioningWindowCommand.h" + +using namespace ::chip; + +CHIP_ERROR OpenCommissioningWindowCommand::RunCommand() +{ + return CurrentCommissioner().GetConnectedDevice(mNodeId, &mOnDeviceConnectedCallback, &mOnDeviceConnectionFailureCallback); +} + +void OpenCommissioningWindowCommand::OnDeviceConnectedFn(void * context, chip::OperationalDeviceProxy * device) +{ + OpenCommissioningWindowCommand * command = reinterpret_cast(context); + VerifyOrReturn(command != nullptr, ChipLogError(chipTool, "OnDeviceConnectedFn: context is null")); + command->OpenCommissioningWindow(); +} +void OpenCommissioningWindowCommand::OnDeviceConnectionFailureFn(void * context, NodeId remoteId, CHIP_ERROR err) +{ + LogErrorOnFailure(err); + + OpenCommissioningWindowCommand * command = reinterpret_cast(context); + VerifyOrReturn(command != nullptr, ChipLogError(chipTool, "OnDeviceConnectionFailureFn: context is null")); + command->SetCommandExitStatus(err); +} + +void OpenCommissioningWindowCommand::OnOpenCommissioningWindowResponse(void * context, NodeId remoteId, CHIP_ERROR err, + chip::SetupPayload payload) +{ + LogErrorOnFailure(err); + + OpenCommissioningWindowCommand * command = reinterpret_cast(context); + VerifyOrReturn(command != nullptr, ChipLogError(chipTool, "OnOpenCommissioningWindowCommand: context is null")); + command->SetCommandExitStatus(err); +} + +CHIP_ERROR OpenCommissioningWindowCommand::OpenCommissioningWindow() +{ + return CurrentCommissioner().OpenCommissioningWindowWithCallback( + mNodeId, mTimeout, mIteration, mDiscriminator, mCommissioningWindowOption, &mOnOpenCommissioningWindowCallback); +} diff --git a/examples/chip-tool/commands/pairing/OpenCommissioningWindowCommand.h b/examples/chip-tool/commands/pairing/OpenCommissioningWindowCommand.h new file mode 100644 index 00000000000000..92130cdb02ceca --- /dev/null +++ b/examples/chip-tool/commands/pairing/OpenCommissioningWindowCommand.h @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2021 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#pragma once + +#include "../common/CHIPCommand.h" + +class OpenCommissioningWindowCommand : public CHIPCommand +{ +public: + OpenCommissioningWindowCommand() : + CHIPCommand("open-commissioning-window"), mOnDeviceConnectedCallback(OnDeviceConnectedFn, this), + mOnDeviceConnectionFailureCallback(OnDeviceConnectionFailureFn, this), + mOnOpenCommissioningWindowCallback(OnOpenCommissioningWindowResponse, this) + { + AddArgument("node-id", 0, UINT64_MAX, &mNodeId); + AddArgument("option", 0, UINT8_MAX, &mCommissioningWindowOption); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + AddArgument("iteration", 0, UINT16_MAX, &mIteration); + AddArgument("discriminator", 0, 4096, &mDiscriminator); + } + + /////////// CHIPCommand Interface ///////// + CHIP_ERROR RunCommand() override; + chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(5); } + +private: + NodeId mNodeId; + uint8_t mCommissioningWindowOption; + uint16_t mTimeout; + uint16_t mIteration; + uint16_t mDiscriminator; + + CHIP_ERROR OpenCommissioningWindow(); + static void OnDeviceConnectedFn(void * context, chip::OperationalDeviceProxy * 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 mOnOpenCommissioningWindowCallback; +}; diff --git a/examples/chip-tool/commands/pairing/PairingCommand.cpp b/examples/chip-tool/commands/pairing/PairingCommand.cpp index 0d9524f2c84bd1..62ed4e94ca2e36 100644 --- a/examples/chip-tool/commands/pairing/PairingCommand.cpp +++ b/examples/chip-tool/commands/pairing/PairingCommand.cpp @@ -34,31 +34,15 @@ constexpr uint32_t kTimeoutMs = 6000; CHIP_ERROR PairingCommand::RunCommand() { - CHIP_ERROR err = CHIP_NO_ERROR; - - // If we're OpenCommissioningWindow we don't need to be registered as a - // delegate; we just get notified directly via the callbacks we pass to - // GetConnectedDevice. In fact, if we _do_ register as a delegate we get - // callbacks we don't expect and then weird things happen. - if (mPairingMode != PairingMode::OpenCommissioningWindow) - { - CurrentCommissioner().RegisterDeviceAddressUpdateDelegate(this); - CurrentCommissioner().RegisterPairingDelegate(this); - } - - err = RunInternal(mNodeId); - VerifyOrExit(err == CHIP_NO_ERROR, ChipLogError(chipTool, "Init Failure! PairDevice: %s", ErrorStr(err))); - -exit: - return err; + CurrentCommissioner().RegisterDeviceAddressUpdateDelegate(this); + CurrentCommissioner().RegisterPairingDelegate(this); + return RunInternal(mNodeId); } CHIP_ERROR PairingCommand::RunInternal(NodeId remoteId) { CHIP_ERROR err = CHIP_NO_ERROR; - InitCallbacks(); - switch (mPairingMode) { case PairingMode::None: @@ -81,33 +65,12 @@ CHIP_ERROR PairingCommand::RunInternal(NodeId remoteId) break; case PairingMode::Ethernet: err = Pair(remoteId, PeerAddress::UDP(mRemoteAddr.address, mRemotePort)); - break; - case PairingMode::OpenCommissioningWindow: - err = CurrentCommissioner().GetConnectedDevice(remoteId, &mOnDeviceConnectedCallback, &mOnDeviceConnectionFailureCallback); - if (err != CHIP_NO_ERROR) - { - ChipLogError(chipTool, "Failed in initiating connection to the device: %" PRIu64 ", error %" CHIP_ERROR_FORMAT, - remoteId, err.Format()); - } - break; } return err; } -void PairingCommand::OnDeviceConnectedFn(void * context, chip::OperationalDeviceProxy * device) -{ - PairingCommand * command = reinterpret_cast(context); - command->OpenCommissioningWindow(); -} -void PairingCommand::OnDeviceConnectionFailureFn(void * context, NodeId deviceId, CHIP_ERROR error) -{ - PairingCommand * command = reinterpret_cast(context); - ChipLogError(chipTool, "Failed in connecting to the device %" PRIu64 ". Error %" CHIP_ERROR_FORMAT, deviceId, error.Format()); - command->SetCommandExitStatus(error); -} - CHIP_ERROR PairingCommand::PairWithQRCode(NodeId remoteId) { return CurrentCommissioner().PairDevice(remoteId, mOnboardingPayload); @@ -162,24 +125,6 @@ CHIP_ERROR PairingCommand::Unpair(NodeId remoteId) return err; } -void PairingCommand::OnOpenCommissioningWindowResponse(void * context, NodeId remoteId, CHIP_ERROR err, chip::SetupPayload payload) -{ - PairingCommand * command = reinterpret_cast(context); - if (err != CHIP_NO_ERROR) - { - ChipLogError(chipTool, - "Failed in opening commissioning window on the device: 0x" ChipLogFormatX64 ", error %" CHIP_ERROR_FORMAT, - ChipLogValueX64(remoteId), err.Format()); - } - command->SetCommandExitStatus(err); -} - -CHIP_ERROR PairingCommand::OpenCommissioningWindow() -{ - return CurrentCommissioner().OpenCommissioningWindowWithCallback( - mNodeId, mTimeout, mIteration, mDiscriminator, mCommissioningWindowOption, &mOnOpenCommissioningWindowCallback); -} - void PairingCommand::OnStatusUpdate(DevicePairingDelegate::Status status) { switch (status) @@ -267,25 +212,6 @@ CHIP_ERROR PairingCommand::SetupNetwork() return err; } -void PairingCommand::InitCallbacks() -{ - mOnAddThreadNetworkCallback = - new Callback::Callback(OnAddNetworkResponse, this); - mOnAddWiFiNetworkCallback = - new Callback::Callback(OnAddNetworkResponse, this); - mOnEnableNetworkCallback = - new Callback::Callback(OnEnableNetworkResponse, this); - mOnFailureCallback = new Callback::Callback(OnDefaultFailureResponse, this); -} - -void PairingCommand::Shutdown() -{ - delete mOnAddThreadNetworkCallback; - delete mOnAddWiFiNetworkCallback; - delete mOnEnableNetworkCallback; - delete mOnFailureCallback; -} - CHIP_ERROR PairingCommand::AddNetwork(PairingNetworkType networkType) { return (networkType == PairingNetworkType::WiFi) ? AddWiFiNetwork() : AddThreadNetwork(); @@ -293,16 +219,16 @@ CHIP_ERROR PairingCommand::AddNetwork(PairingNetworkType networkType) CHIP_ERROR PairingCommand::AddThreadNetwork() { - Callback::Cancelable * successCallback = mOnAddThreadNetworkCallback->Cancel(); - Callback::Cancelable * failureCallback = mOnFailureCallback->Cancel(); + Callback::Cancelable * successCallback = mOnAddThreadNetworkCallback.Cancel(); + Callback::Cancelable * failureCallback = mOnFailureCallback.Cancel(); return mCluster.AddThreadNetwork(successCallback, failureCallback, mOperationalDataset, kBreadcrumb, kTimeoutMs); } CHIP_ERROR PairingCommand::AddWiFiNetwork() { - Callback::Cancelable * successCallback = mOnAddWiFiNetworkCallback->Cancel(); - Callback::Cancelable * failureCallback = mOnFailureCallback->Cancel(); + Callback::Cancelable * successCallback = mOnAddWiFiNetworkCallback.Cancel(); + Callback::Cancelable * failureCallback = mOnFailureCallback.Cancel(); return mCluster.AddWiFiNetwork(successCallback, failureCallback, mSSID, mPassword, kBreadcrumb, kTimeoutMs); } @@ -329,8 +255,8 @@ chip::ByteSpan PairingCommand::GetThreadNetworkId() CHIP_ERROR PairingCommand::EnableNetwork() { - Callback::Cancelable * successCallback = mOnEnableNetworkCallback->Cancel(); - Callback::Cancelable * failureCallback = mOnFailureCallback->Cancel(); + Callback::Cancelable * successCallback = mOnEnableNetworkCallback.Cancel(); + Callback::Cancelable * failureCallback = mOnFailureCallback.Cancel(); ByteSpan networkId; if (mNetworkType == PairingNetworkType::WiFi) diff --git a/examples/chip-tool/commands/pairing/PairingCommand.h b/examples/chip-tool/commands/pairing/PairingCommand.h index 92932efe91246c..e5d0dc36ec00b7 100644 --- a/examples/chip-tool/commands/pairing/PairingCommand.h +++ b/examples/chip-tool/commands/pairing/PairingCommand.h @@ -18,15 +18,12 @@ #pragma once -#include "../../config/PersistentStorage.h" #include "../common/CHIPCommand.h" #include #include -#include #include #include -#include enum class PairingMode { @@ -37,7 +34,6 @@ enum class PairingMode SoftAP, Ethernet, OnNetwork, - OpenCommissioningWindow, }; enum class PairingNetworkType @@ -59,9 +55,8 @@ class PairingCommand : public CHIPCommand, CHIPCommand(commandName), mPairingMode(mode), mNetworkType(networkType), mFilterType(filterType), mRemoteAddr{ IPAddress::Any, chip::Inet::InterfaceId::Null() }, - mOnDeviceConnectedCallback(OnDeviceConnectedFn, this), - mOnDeviceConnectionFailureCallback(OnDeviceConnectionFailureFn, this), - mOnOpenCommissioningWindowCallback(OnOpenCommissioningWindowResponse, this) + mOnAddThreadNetworkCallback(OnAddNetworkResponse, this), mOnAddWiFiNetworkCallback(OnAddNetworkResponse, this), + mOnEnableNetworkCallback(OnEnableNetworkResponse, this), mOnFailureCallback(OnDefaultFailureResponse, this) { AddArgument("node-id", 0, UINT64_MAX, &mNodeId); @@ -88,7 +83,6 @@ class PairingCommand : public CHIPCommand, AddArgument("payload", &mOnboardingPayload); break; case PairingMode::Ble: - AddArgument("fabric-id", 0, UINT64_MAX, &mFabricId); AddArgument("setup-pin-code", 0, 134217727, &mSetupPINCode); AddArgument("discriminator", 0, 4096, &mDiscriminator); break; @@ -96,7 +90,6 @@ class PairingCommand : public CHIPCommand, AddArgument("setup-pin-code", 0, 134217727, &mSetupPINCode); break; case PairingMode::SoftAP: - AddArgument("fabric-id", 0, UINT64_MAX, &mFabricId); AddArgument("setup-pin-code", 0, 134217727, &mSetupPINCode); AddArgument("discriminator", 0, 4096, &mDiscriminator); AddArgument("device-remote-ip", &mRemoteAddr); @@ -108,12 +101,6 @@ class PairingCommand : public CHIPCommand, AddArgument("device-remote-ip", &mRemoteAddr); AddArgument("device-remote-port", 0, UINT16_MAX, &mRemotePort); break; - case PairingMode::OpenCommissioningWindow: - AddArgument("option", 0, UINT8_MAX, &mCommissioningWindowOption); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - AddArgument("iteration", 0, UINT16_MAX, &mIteration); - AddArgument("discriminator", 0, 4096, &mDiscriminator); - break; } switch (filterType) @@ -147,7 +134,6 @@ class PairingCommand : public CHIPCommand, /////////// CHIPCommand Interface ///////// CHIP_ERROR RunCommand() override; chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(120); } - void Shutdown() override; /////////// DevicePairingDelegate Interface ///////// void OnStatusUpdate(chip::Controller::DevicePairingDelegate::Status status) override; @@ -174,9 +160,7 @@ class PairingCommand : public CHIPCommand, CHIP_ERROR PairWithManualCode(NodeId remoteId); CHIP_ERROR PairWithCode(NodeId remoteId, chip::SetupPayload payload); CHIP_ERROR Unpair(NodeId remoteId); - CHIP_ERROR OpenCommissioningWindow(); - void InitCallbacks(); CHIP_ERROR SetupNetwork(); CHIP_ERROR AddNetwork(PairingNetworkType networkType); CHIP_ERROR AddThreadNetwork(); @@ -192,12 +176,8 @@ class PairingCommand : public CHIPCommand, Command::AddressWithInterface mRemoteAddr; NodeId mNodeId; uint16_t mRemotePort; - uint64_t mFabricId; - uint16_t mTimeout; - uint16_t mIteration; uint16_t mDiscriminator; uint32_t mSetupPINCode; - uint8_t mCommissioningWindowOption; chip::ByteSpan mOperationalDataset; uint8_t mExtendedPanId[chip::Thread::kSizeExtendedPanId]; chip::ByteSpan mSSID; @@ -206,19 +186,11 @@ class PairingCommand : public CHIPCommand, uint64_t mDiscoveryFilterCode; char * mDiscoveryFilterInstanceName; - chip::Callback::Callback * mOnAddThreadNetworkCallback = nullptr; - chip::Callback::Callback * mOnAddWiFiNetworkCallback = nullptr; - chip::Callback::Callback * mOnEnableNetworkCallback = nullptr; - chip::Callback::Callback * mOnFailureCallback = nullptr; + chip::Callback::Callback mOnAddThreadNetworkCallback; + chip::Callback::Callback mOnAddWiFiNetworkCallback; + chip::Callback::Callback mOnEnableNetworkCallback; + chip::Callback::Callback mOnFailureCallback; chip::CommissioneeDeviceProxy * mDevice; chip::Controller::NetworkCommissioningCluster mCluster; chip::EndpointId mEndpointId = 0; - - static void OnDeviceConnectedFn(void * context, chip::OperationalDeviceProxy * 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 mOnOpenCommissioningWindowCallback; }; From f7f1cc3b21384010148a6335a8b9a1b117b1a181 Mon Sep 17 00:00:00 2001 From: Victor Morales Date: Tue, 30 Nov 2021 08:31:47 -0800 Subject: [PATCH 38/42] Reduce size doxygen img (#12337) Signed-off-by: Victor Morales --- .github/workflows/docker_img.yaml | 2 +- .github/workflows/doxygen.yaml | 3 +++ .../images/chip-build-doxygen/Dockerfile | 24 ++++--------------- integrations/docker/images/chip-build/version | 2 +- src/transport/SecureSessionTable.h | 1 + 5 files changed, 11 insertions(+), 21 deletions(-) diff --git a/.github/workflows/docker_img.yaml b/.github/workflows/docker_img.yaml index d6a102c960000d..37779a1f3f7af7 100644 --- a/.github/workflows/docker_img.yaml +++ b/.github/workflows/docker_img.yaml @@ -32,7 +32,7 @@ jobs: fail-fast: false matrix: # TODO: Enables "-crosscompile" and "-vscode" images - img: ["", "-android", "-cirque", "-efr32", "-esp32", "-esp32-qemu", "-infineon", "-k32w", "-mbed-os", "-nrf-platform", "-telink", "-tizen"] + img: ["", "-android", "-cirque", "-doxygen", "-efr32", "-esp32", "-esp32-qemu", "-infineon", "-k32w", "-mbed-os", "-nrf-platform", "-telink", "-tizen"] steps: - name: Checkout uses: actions/checkout@v2 diff --git a/.github/workflows/doxygen.yaml b/.github/workflows/doxygen.yaml index 615eb5ab69d44d..8edbc59e8137e8 100644 --- a/.github/workflows/doxygen.yaml +++ b/.github/workflows/doxygen.yaml @@ -29,6 +29,9 @@ jobs: timeout-minutes: 5 runs-on: ubuntu-20.04 + container: + image: connectedhomeip/chip-build-doxygen:0.5.30 + if: github.actor != 'restyled-io[bot]' steps: diff --git a/integrations/docker/images/chip-build-doxygen/Dockerfile b/integrations/docker/images/chip-build-doxygen/Dockerfile index 1f642c26f899d6..04aa5936ff0af1 100644 --- a/integrations/docker/images/chip-build-doxygen/Dockerfile +++ b/integrations/docker/images/chip-build-doxygen/Dockerfile @@ -1,20 +1,6 @@ -ARG VERSION=latest -FROM connectedhomeip/chip-build:${VERSION} +FROM alpine:3.15 -# Docker dependencies -RUN set -x \ - && apt-get update \ - && DEBIAN_FRONTEND=noninteractive apt-get install -fy \ - libclang1-9 \ - libclang-cpp9 \ - && rm -rf /var/lib/apt/lists/ \ - && : # last line - -# Latest version of doxygen -RUN set -x \ - && cd /opt \ - && wget https://www.doxygen.nl/files/doxygen-1.9.2.linux.bin.tar.gz \ - && tar xfvz doxygen-1.9.2.linux.bin.tar.gz \ - && rm doxygen-1.9.2.linux.bin.tar.gz \ - && ln -s /opt/doxygen-1.9.2/bin/doxygen /usr/bin/ \ - && : # last line +RUN apk --no-cache add \ + doxygen=1.9.2-r1 \ + graphviz=2.49.3-r0 \ + bash=5.1.8-r0 diff --git a/integrations/docker/images/chip-build/version b/integrations/docker/images/chip-build/version index 742eec9c06b86e..f6d0247f6012a7 100644 --- a/integrations/docker/images/chip-build/version +++ b/integrations/docker/images/chip-build/version @@ -1 +1 @@ -0.5.31 Version bump reason: Upgrade wget package version to 1.20.3-1ubuntu2 +0.5.32 Version bump reason: Reduce size doxygen image diff --git a/src/transport/SecureSessionTable.h b/src/transport/SecureSessionTable.h index 27b3ad673dbeb9..62a2429e172a5f 100644 --- a/src/transport/SecureSessionTable.h +++ b/src/transport/SecureSessionTable.h @@ -50,6 +50,7 @@ class SecureSessionTable * @param peerCATs represents peer CASE Authenticated Tags * @param peerSessionId represents the encryption key ID assigned by peer node * @param fabric represents fabric ID for the session + * @param config represents the reliable message protocol configuration * * @note the newly created state will have an 'active' time set based on the current time source. * From 86c2c2394ab4e3be480a508225ae9c62b408aaa6 Mon Sep 17 00:00:00 2001 From: Jerry Johns Date: Tue, 30 Nov 2021 08:56:52 -0800 Subject: [PATCH 39/42] Avoid IPython v7.30.0 due to bug in 'await' (#12371) IPython v7.30.0 introduced a bug that results in the use of 'await ...' at the shell failing (for more details, see https://github.com/ipython/ipython/pull/13269) For now, let's just avoid that version (it will be fixed in subsequent versions). --- src/controller/python/build-chip-wheel.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/controller/python/build-chip-wheel.py b/src/controller/python/build-chip-wheel.py index f9b141ca5897be..565fec7329bac2 100644 --- a/src/controller/python/build-chip-wheel.py +++ b/src/controller/python/build-chip-wheel.py @@ -116,7 +116,12 @@ def finalize_options(self): requiredPackages = [ "coloredlogs", 'construct', - 'ipython', + + # + # IPython 7.30.0 has a bug which results in the use of await ... failing on some platforms (see https://github.com/ipython/ipython/pull/13269) + # For now, let's just avoid that version. + # + 'ipython!=7.30.0', 'dacite', 'rich', 'stringcase', From e2b36446e9bf35151c94a00d9241dd403e9e97c8 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Tue, 30 Nov 2021 12:09:21 -0500 Subject: [PATCH 40/42] Update ZAP to get support for "requires timed interaction" quality. (#12365) --- third_party/zap/repo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third_party/zap/repo b/third_party/zap/repo index adc0cd644a3f4c..6c5229b3d2c292 160000 --- a/third_party/zap/repo +++ b/third_party/zap/repo @@ -1 +1 @@ -Subproject commit adc0cd644a3f4c71fd9edd7cdd271485d4af95fb +Subproject commit 6c5229b3d2c292f57d2f7adf68bb5af463aa048a From 376cc75c0d690f555fb58a9d41164730295be2a4 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Tue, 30 Nov 2021 12:16:05 -0500 Subject: [PATCH 41/42] Better test discovery (#12292) * use chip tool to figure out exactly what tests exist rather than searching for YAML files * Fix arguments for running tests * Restyle fixes * Update to the test list command to finding out available tests * ignore empty lines * Update scripts/tests/run_test_suite.py Co-authored-by: Victor Morales * Add missing \ Co-authored-by: Justin Wood Co-authored-by: Victor Morales --- .github/workflows/tests.yaml | 7 ++++--- scripts/tests/chiptest/__init__.py | 21 +++++++++------------ scripts/tests/chiptest/test_definition.py | 1 - scripts/tests/run_test_suite.py | 22 ++++++++++++---------- 4 files changed, 25 insertions(+), 26 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index afd197f554ce4d..e0ba2a9a6aebb1 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -87,9 +87,10 @@ jobs: timeout-minutes: 30 run: | ./scripts/run_in_build_env.sh \ - "./scripts/tests/run_test_suite.py run \ - --iterations 2 \ + "./scripts/tests/run_test_suite.py \ --chip-tool ./out/debug/standalone/chip-tool \ + run \ + --iterations 2 \ --all-clusters-app ./out/debug/standalone/chip-all-clusters-app \ --tv-app ./out/debug/standalone/chip-tv-app \ " @@ -176,10 +177,10 @@ jobs: run: | ./scripts/run_in_build_env.sh \ "./scripts/tests/run_test_suite.py \ + --chip-tool ./out/debug/standalone/chip-tool \ --target-skip-glob 'TV_*' \ run \ --iterations 2 \ - --chip-tool ./out/debug/standalone/chip-tool \ --all-clusters-app ./out/debug/standalone/chip-all-clusters-app \ --tv-app ./out/debug/standalone/chip-tv-app \ " diff --git a/scripts/tests/chiptest/__init__.py b/scripts/tests/chiptest/__init__.py index 2d72bc2b43a4da..b21fc02f310859 100644 --- a/scripts/tests/chiptest/__init__.py +++ b/scripts/tests/chiptest/__init__.py @@ -17,6 +17,8 @@ from pathlib import Path import os import logging +import subprocess +import re import chiptest.linux import chiptest.runner @@ -24,27 +26,22 @@ from .test_definition import TestTarget, TestDefinition, ApplicationPaths -def AllTests(root: str): - """Gets all the tests that can be found in the ROOT directory based on - yaml file names. +def AllTests(chip_tool: str): + """Executes `chip_tool` binary to see what tests are available. """ - for path in Path(os.path.join(root, 'src', 'app', 'tests', 'suites')).rglob("*.yaml"): - logging.debug('Found YAML: %s' % path) - # grab the name without the extension - name = path.stem + result = subprocess.run([chip_tool, 'tests', 'list'], capture_output=True) - if 'Simulated' in name: + for name in result.stdout.decode('utf8').split('\n'): + if not name: continue if name.startswith('TV_'): target = TestTarget.TV - elif name.startswith('Test'): - target = TestTarget.ALL_CLUSTERS else: - continue + target = TestTarget.ALL_CLUSTERS - yield TestDefinition(yaml_file=path, run_name=path.stem, name=name, target=target) + yield TestDefinition(run_name=name, name=name, target=target) __all__ = ['TestTarget', 'TestDefinition', 'AllTests', 'ApplicationPaths'] diff --git a/scripts/tests/chiptest/test_definition.py b/scripts/tests/chiptest/test_definition.py index 9d6e22ba6c3109..9eea86966a6e01 100644 --- a/scripts/tests/chiptest/test_definition.py +++ b/scripts/tests/chiptest/test_definition.py @@ -79,7 +79,6 @@ def LogContents(self): @dataclass class TestDefinition: - yaml_file: str name: str run_name: str target: TestTarget diff --git a/scripts/tests/run_test_suite.py b/scripts/tests/run_test_suite.py index 133e9213ba7ca4..688778423f038a 100755 --- a/scripts/tests/run_test_suite.py +++ b/scripts/tests/run_test_suite.py @@ -61,6 +61,7 @@ class RunContext: root: str tests: typing.List[chiptest.TestDefinition] in_unshare: bool + chip_tool: str @click.group(chain=True) @@ -93,7 +94,7 @@ class RunContext: @click.option( '--root', default=DEFAULT_CHIP_ROOT, - help='Default directory path for CHIP. Used to determine what tests exist') + help='Default directory path for CHIP. Used to copy run configurations') @click.option( '--internal-inside-unshare', hidden=True, @@ -101,8 +102,12 @@ class RunContext: default=False, help='Internal flag for running inside a unshared environment' ) +@click.option( + '--chip-tool', + default=FindBinaryPath('chip-tool'), + help='Binary path of chip tool app to use to run the test') @click.pass_context -def main(context, log_level, target, target_glob, target_skip_glob, no_log_timestamps, root, internal_inside_unshare): +def main(context, log_level, target, target_glob, target_skip_glob, no_log_timestamps, root, internal_inside_unshare, chip_tool): # Ensures somewhat pretty logging of what is going on log_fmt = '%(asctime)s.%(msecs)03d %(levelname)-7s %(message)s' if no_log_timestamps: @@ -110,7 +115,7 @@ def main(context, log_level, target, target_glob, target_skip_glob, no_log_times coloredlogs.install(level=__LOG_LEVELS__[log_level], fmt=log_fmt) # Figures out selected test that match the given name(s) - all_tests = [test for test in chiptest.AllTests(root)] + all_tests = [test for test in chiptest.AllTests(chip_tool)] tests = all_tests if 'all' not in target: tests = [] @@ -139,7 +144,8 @@ def main(context, log_level, target, target_glob, target_skip_glob, no_log_times tests.sort(key=lambda x: x.name) context.obj = RunContext(root=root, tests=tests, - in_unshare=internal_inside_unshare) + in_unshare=internal_inside_unshare, + chip_tool=chip_tool) @main.command( @@ -156,10 +162,6 @@ def cmd_generate(context): '--iterations', default=1, help='Number of iterations to run') -@click.option( - '--chip-tool', - default=FindBinaryPath('chip-tool'), - help='What chip tool app to use to run the test') @click.option( '--all-clusters-app', default=FindBinaryPath('chip-all-clusters-app'), @@ -169,12 +171,12 @@ def cmd_generate(context): default=FindBinaryPath('chip-tv-app'), help='what tv app to use') @click.pass_context -def cmd_run(context, iterations, chip_tool, all_clusters_app, tv_app): +def cmd_run(context, iterations, all_clusters_app, tv_app): runner = chiptest.runner.Runner() # Command execution requires an array paths = chiptest.ApplicationPaths( - chip_tool=[chip_tool], + chip_tool=[context.obj.chip_tool], all_clusters_app=[all_clusters_app], tv_app=[tv_app] ) From 46fbb06a5b86e5a310363f83e95c6d87f8e94baf Mon Sep 17 00:00:00 2001 From: Song GUO Date: Wed, 1 Dec 2021 02:00:47 +0800 Subject: [PATCH 42/42] [Python] TLV schema tag should start from 1 (#12347) --- src/controller/python/chip/ChipReplStartup.py | 10 + src/controller/python/chip/ChipStack.py | 3 + .../python/chip/clusters/Attribute.py | 29 +- .../python/chip/clusters/Objects.py | 366 +++++++++--------- .../templates/python-cluster-Objects-py.zapt | 2 +- .../test/test_scripts/cluster_objects.py | 21 +- 6 files changed, 236 insertions(+), 195 deletions(-) diff --git a/src/controller/python/chip/ChipReplStartup.py b/src/controller/python/chip/ChipReplStartup.py index 865042e34315be..c314d11394a3fc 100644 --- a/src/controller/python/chip/ChipReplStartup.py +++ b/src/controller/python/chip/ChipReplStartup.py @@ -43,9 +43,19 @@ def ReplInit(): def matterhelp(classOrObj=None): if (classOrObj == None): inspect(builtins.devCtrl, methods=True, help=True, private=False) + inspect(mattersetlog) + inspect(mattersetdebug) else: inspect(classOrObj, methods=True, help=True, private=False) def mattersetlog(level): logging.getLogger().setLevel(level) + + +def mattersetdebug(enableDebugMode: bool = True): + ''' Enables debug mode that is utilized by some Matter modules + to better facilitate debugging of failures (e.g throwing exceptions instead + of returning well-formatted results). + ''' + builtins.enableDebugMode = enableDebugMode diff --git a/src/controller/python/chip/ChipStack.py b/src/controller/python/chip/ChipStack.py index e3bc1922442a31..ca4affd3b30aae 100644 --- a/src/controller/python/chip/ChipStack.py +++ b/src/controller/python/chip/ChipStack.py @@ -36,6 +36,7 @@ from ctypes import * from .ChipUtility import ChipUtility from .exceptions import * +import builtins __all__ = [ "DeviceStatusStruct", @@ -160,6 +161,8 @@ def Wait(self): @_singleton class ChipStack(object): def __init__(self, installDefaultLogHandler=True, bluetoothAdapter=0): + builtins.enableDebugMode = False + self.networkLock = Lock() self.completeEvent = Event() self.commissioningCompleteEvent = Event() diff --git a/src/controller/python/chip/clusters/Attribute.py b/src/controller/python/chip/clusters/Attribute.py index 4832494d0e515e..a97f1e4ad9e985 100644 --- a/src/controller/python/chip/clusters/Attribute.py +++ b/src/controller/python/chip/clusters/Attribute.py @@ -30,6 +30,7 @@ import sys import logging import threading +import builtins @dataclass @@ -97,6 +98,16 @@ class AttributeReadResult(AttributeStatus): Data: Any = None +@dataclass +class ValueDecodeFailure: + ''' Encapsulates a failure to decode a TLV value into a cluster object. + Some exceptions have custom fields, so run str(ReasonException) to get more info. + ''' + + TLVValue: Any = None + Reason: Exception = None + + _AttributeIndex = {} @@ -199,21 +210,29 @@ def _handleAttributeData(self, path: AttributePathWithListIndex, status: int, da attributeType = _AttributeIndex.get(str(AttributePath( ClusterId=path.ClusterId, AttributeId=path.AttributeId)), None) attributeValue = None + tlvData = chip.tlv.TLVReader(data).get().get("Any", {}) if attributeType is None: - attributeValue = chip.tlv.TLVReader(data).get().get("Any", {}) + attributeValue = ValueDecodeFailure( + tlvData, LookupError("attribute schema not found")) else: try: - attributeValue = attributeType.FromTLV(data) - except: + attributeValue = attributeType(attributeType.FromTLV(data)) + except Exception as ex: logging.error( f"Error convering TLV to Cluster Object for path: Endpoint = {path.EndpointId}/Cluster = {path.ClusterId}/Attribute = {path.AttributeId}") logging.error( f"Failed Cluster Object: {str(attributeType)}") - raise + logging.error(ex) + attributeValue = ValueDecodeFailure( + tlvData, ex) + + # If we're in debug mode, raise the exception so that we can better debug what's happening. + if (builtins.enableDebugMode): + raise with self._resLock: self._res[path] = AttributeReadResult( - Path=path, Status=imStatus, Data=attributeType(attributeValue)) + Path=path, Status=imStatus, Data=attributeValue) if self._subscription_handler is not None: self._subscription_handler.OnUpdate( path, attributeType(attributeValue)) diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index 027fbb3ef8b594..d5745ee482a8b7 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -1563,11 +1563,11 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor( - Label="clusterId", Tag=0, Type=uint), + Label="clusterId", Tag=1, Type=uint), ClusterObjectFieldDescriptor( - Label="length", Tag=1, Type=uint), + Label="length", Tag=2, Type=uint), ClusterObjectFieldDescriptor( - Label="value", Tag=2, Type=uint), + Label="value", Tag=3, Type=uint), ]) clusterId: 'uint' = None @@ -3416,13 +3416,13 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor( - Label="powerProfileId", Tag=0, Type=uint), + Label="powerProfileId", Tag=1, Type=uint), ClusterObjectFieldDescriptor( - Label="energyPhaseId", Tag=1, Type=uint), + Label="energyPhaseId", Tag=2, Type=uint), ClusterObjectFieldDescriptor( - Label="powerProfileRemoteControl", Tag=2, Type=bool), + Label="powerProfileRemoteControl", Tag=3, Type=bool), ClusterObjectFieldDescriptor( - Label="powerProfileState", Tag=3, Type=uint), + Label="powerProfileState", Tag=4, Type=uint), ]) powerProfileId: 'uint' = None @@ -3437,9 +3437,9 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor( - Label="energyPhaseId", Tag=0, Type=uint), + Label="energyPhaseId", Tag=1, Type=uint), ClusterObjectFieldDescriptor( - Label="scheduledTime", Tag=1, Type=uint), + Label="scheduledTime", Tag=2, Type=uint), ]) energyPhaseId: 'uint' = None @@ -3452,17 +3452,17 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor( - Label="energyPhaseId", Tag=0, Type=uint), + Label="energyPhaseId", Tag=1, Type=uint), ClusterObjectFieldDescriptor( - Label="macroPhaseId", Tag=1, Type=uint), + Label="macroPhaseId", Tag=2, Type=uint), ClusterObjectFieldDescriptor( - Label="expectedDuration", Tag=2, Type=uint), + Label="expectedDuration", Tag=3, Type=uint), ClusterObjectFieldDescriptor( - Label="peakPower", Tag=3, Type=uint), + Label="peakPower", Tag=4, Type=uint), ClusterObjectFieldDescriptor( - Label="energy", Tag=4, Type=uint), + Label="energy", Tag=5, Type=uint), ClusterObjectFieldDescriptor( - Label="maxActivationDelay", Tag=5, Type=uint), + Label="maxActivationDelay", Tag=6, Type=uint), ]) energyPhaseId: 'uint' = None @@ -4276,9 +4276,9 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor( - Label="type", Tag=0, Type=uint), + Label="type", Tag=1, Type=uint), ClusterObjectFieldDescriptor( - Label="revision", Tag=1, Type=uint), + Label="revision", Tag=2, Type=uint), ]) type: 'uint' = None @@ -4645,17 +4645,17 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor( - Label="actionID", Tag=0, Type=uint), + Label="actionID", Tag=1, Type=uint), ClusterObjectFieldDescriptor( - Label="name", Tag=1, Type=str), + Label="name", Tag=2, Type=str), ClusterObjectFieldDescriptor( - Label="type", Tag=2, Type=BridgedActions.Enums.ActionTypeEnum), + Label="type", Tag=3, Type=BridgedActions.Enums.ActionTypeEnum), ClusterObjectFieldDescriptor( - Label="endpointListID", Tag=3, Type=uint), + Label="endpointListID", Tag=4, Type=uint), ClusterObjectFieldDescriptor( - Label="supportedCommands", Tag=4, Type=uint), + Label="supportedCommands", Tag=5, Type=uint), ClusterObjectFieldDescriptor( - Label="status", Tag=5, Type=BridgedActions.Enums.ActionStatusEnum), + Label="status", Tag=6, Type=BridgedActions.Enums.ActionStatusEnum), ]) actionID: 'uint' = None @@ -4672,13 +4672,13 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor( - Label="endpointListID", Tag=0, Type=uint), + Label="endpointListID", Tag=1, Type=uint), ClusterObjectFieldDescriptor( - Label="name", Tag=1, Type=str), + Label="name", Tag=2, Type=str), ClusterObjectFieldDescriptor( - Label="type", Tag=2, Type=BridgedActions.Enums.EndpointListTypeEnum), + Label="type", Tag=3, Type=BridgedActions.Enums.EndpointListTypeEnum), ClusterObjectFieldDescriptor( - Label="endpoints", Tag=3, Type=typing.List[uint]), + Label="endpoints", Tag=4, Type=typing.List[uint]), ]) endpointListID: 'uint' = None @@ -6540,7 +6540,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor( - Label="failSafeExpiryLengthMs", Tag=0, Type=uint), + Label="failSafeExpiryLengthMs", Tag=1, Type=uint), ]) failSafeExpiryLengthMs: 'uint' = None @@ -6795,7 +6795,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor( - Label="discoveryResponse", Tag=0, Type=bytes), + Label="discoveryResponse", Tag=1, Type=bytes), ]) discoveryResponse: 'bytes' = None @@ -6807,15 +6807,15 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor( - Label="security", Tag=0, Type=uint), + Label="security", Tag=1, Type=uint), ClusterObjectFieldDescriptor( - Label="ssid", Tag=1, Type=bytes), + Label="ssid", Tag=2, Type=bytes), ClusterObjectFieldDescriptor( - Label="bssid", Tag=2, Type=bytes), + Label="bssid", Tag=3, Type=bytes), ClusterObjectFieldDescriptor( - Label="channel", Tag=3, Type=uint), + Label="channel", Tag=4, Type=uint), ClusterObjectFieldDescriptor( - Label="frequencyBand", Tag=4, Type=uint), + Label="frequencyBand", Tag=5, Type=uint), ]) security: 'uint' = None @@ -7359,17 +7359,17 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor( - Label="name", Tag=0, Type=str), + Label="name", Tag=1, Type=str), ClusterObjectFieldDescriptor( - Label="fabricConnected", Tag=1, Type=bool), + Label="fabricConnected", Tag=2, Type=bool), ClusterObjectFieldDescriptor( - Label="offPremiseServicesReachableIPv4", Tag=2, Type=bool), + Label="offPremiseServicesReachableIPv4", Tag=3, Type=bool), ClusterObjectFieldDescriptor( - Label="offPremiseServicesReachableIPv6", Tag=3, Type=bool), + Label="offPremiseServicesReachableIPv6", Tag=4, Type=bool), ClusterObjectFieldDescriptor( - Label="hardwareAddress", Tag=4, Type=bytes), + Label="hardwareAddress", Tag=5, Type=bytes), ClusterObjectFieldDescriptor( - Label="type", Tag=5, Type=GeneralDiagnostics.Enums.InterfaceType), + Label="type", Tag=6, Type=GeneralDiagnostics.Enums.InterfaceType), ]) name: 'str' = None @@ -7623,11 +7623,11 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor( - Label="id", Tag=0, Type=uint), + Label="id", Tag=1, Type=uint), ClusterObjectFieldDescriptor( - Label="name", Tag=1, Type=str), + Label="name", Tag=2, Type=str), ClusterObjectFieldDescriptor( - Label="faultRecording", Tag=2, Type=bytes), + Label="faultRecording", Tag=3, Type=bytes), ]) id: 'uint' = None @@ -7641,15 +7641,15 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor( - Label="id", Tag=0, Type=uint), + Label="id", Tag=1, Type=uint), ClusterObjectFieldDescriptor( - Label="name", Tag=1, Type=str), + Label="name", Tag=2, Type=str), ClusterObjectFieldDescriptor( - Label="stackFreeCurrent", Tag=2, Type=uint), + Label="stackFreeCurrent", Tag=3, Type=uint), ClusterObjectFieldDescriptor( - Label="stackFreeMinimum", Tag=3, Type=uint), + Label="stackFreeMinimum", Tag=4, Type=uint), ClusterObjectFieldDescriptor( - Label="stackSize", Tag=4, Type=uint), + Label="stackSize", Tag=5, Type=uint), ]) id: 'uint' = None @@ -7817,33 +7817,33 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor( - Label="extAddress", Tag=0, Type=uint), + Label="extAddress", Tag=1, Type=uint), ClusterObjectFieldDescriptor( - Label="age", Tag=1, Type=uint), + Label="age", Tag=2, Type=uint), ClusterObjectFieldDescriptor( - Label="rloc16", Tag=2, Type=uint), + Label="rloc16", Tag=3, Type=uint), ClusterObjectFieldDescriptor( - Label="linkFrameCounter", Tag=3, Type=uint), + Label="linkFrameCounter", Tag=4, Type=uint), ClusterObjectFieldDescriptor( - Label="mleFrameCounter", Tag=4, Type=uint), + Label="mleFrameCounter", Tag=5, Type=uint), ClusterObjectFieldDescriptor( - Label="lqi", Tag=5, Type=uint), + Label="lqi", Tag=6, Type=uint), ClusterObjectFieldDescriptor( - Label="averageRssi", Tag=6, Type=int), + Label="averageRssi", Tag=7, Type=int), ClusterObjectFieldDescriptor( - Label="lastRssi", Tag=7, Type=int), + Label="lastRssi", Tag=8, Type=int), ClusterObjectFieldDescriptor( - Label="frameErrorRate", Tag=8, Type=uint), + Label="frameErrorRate", Tag=9, Type=uint), ClusterObjectFieldDescriptor( - Label="messageErrorRate", Tag=9, Type=uint), + Label="messageErrorRate", Tag=10, Type=uint), ClusterObjectFieldDescriptor( - Label="rxOnWhenIdle", Tag=10, Type=bool), + Label="rxOnWhenIdle", Tag=11, Type=bool), ClusterObjectFieldDescriptor( - Label="fullThreadDevice", Tag=11, Type=bool), + Label="fullThreadDevice", Tag=12, Type=bool), ClusterObjectFieldDescriptor( - Label="fullNetworkData", Tag=12, Type=bool), + Label="fullNetworkData", Tag=13, Type=bool), ClusterObjectFieldDescriptor( - Label="isChild", Tag=13, Type=bool), + Label="isChild", Tag=14, Type=bool), ]) extAddress: 'uint' = None @@ -7868,29 +7868,29 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor( - Label="activeTimestampPresent", Tag=0, Type=bool), + Label="activeTimestampPresent", Tag=1, Type=bool), ClusterObjectFieldDescriptor( - Label="pendingTimestampPresent", Tag=1, Type=bool), + Label="pendingTimestampPresent", Tag=2, Type=bool), ClusterObjectFieldDescriptor( - Label="masterKeyPresent", Tag=2, Type=bool), + Label="masterKeyPresent", Tag=3, Type=bool), ClusterObjectFieldDescriptor( - Label="networkNamePresent", Tag=3, Type=bool), + Label="networkNamePresent", Tag=4, Type=bool), ClusterObjectFieldDescriptor( - Label="extendedPanIdPresent", Tag=4, Type=bool), + Label="extendedPanIdPresent", Tag=5, Type=bool), ClusterObjectFieldDescriptor( - Label="meshLocalPrefixPresent", Tag=5, Type=bool), + Label="meshLocalPrefixPresent", Tag=6, Type=bool), ClusterObjectFieldDescriptor( - Label="delayPresent", Tag=6, Type=bool), + Label="delayPresent", Tag=7, Type=bool), ClusterObjectFieldDescriptor( - Label="panIdPresent", Tag=7, Type=bool), + Label="panIdPresent", Tag=8, Type=bool), ClusterObjectFieldDescriptor( - Label="channelPresent", Tag=8, Type=bool), + Label="channelPresent", Tag=9, Type=bool), ClusterObjectFieldDescriptor( - Label="pskcPresent", Tag=9, Type=bool), + Label="pskcPresent", Tag=10, Type=bool), ClusterObjectFieldDescriptor( - Label="securityPolicyPresent", Tag=10, Type=bool), + Label="securityPolicyPresent", Tag=11, Type=bool), ClusterObjectFieldDescriptor( - Label="channelMaskPresent", Tag=11, Type=bool), + Label="channelMaskPresent", Tag=12, Type=bool), ]) activeTimestampPresent: 'bool' = None @@ -7913,25 +7913,25 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor( - Label="extAddress", Tag=0, Type=uint), + Label="extAddress", Tag=1, Type=uint), ClusterObjectFieldDescriptor( - Label="rloc16", Tag=1, Type=uint), + Label="rloc16", Tag=2, Type=uint), ClusterObjectFieldDescriptor( - Label="routerId", Tag=2, Type=uint), + Label="routerId", Tag=3, Type=uint), ClusterObjectFieldDescriptor( - Label="nextHop", Tag=3, Type=uint), + Label="nextHop", Tag=4, Type=uint), ClusterObjectFieldDescriptor( - Label="pathCost", Tag=4, Type=uint), + Label="pathCost", Tag=5, Type=uint), ClusterObjectFieldDescriptor( - Label="LQIIn", Tag=5, Type=uint), + Label="LQIIn", Tag=6, Type=uint), ClusterObjectFieldDescriptor( - Label="LQIOut", Tag=6, Type=uint), + Label="LQIOut", Tag=7, Type=uint), ClusterObjectFieldDescriptor( - Label="age", Tag=7, Type=uint), + Label="age", Tag=8, Type=uint), ClusterObjectFieldDescriptor( - Label="allocated", Tag=8, Type=bool), + Label="allocated", Tag=9, Type=bool), ClusterObjectFieldDescriptor( - Label="linkEstablished", Tag=9, Type=bool), + Label="linkEstablished", Tag=10, Type=bool), ]) extAddress: 'uint' = None @@ -7952,9 +7952,9 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor( - Label="rotationTime", Tag=0, Type=uint), + Label="rotationTime", Tag=1, Type=uint), ClusterObjectFieldDescriptor( - Label="flags", Tag=1, Type=uint), + Label="flags", Tag=2, Type=uint), ]) rotationTime: 'uint' = None @@ -10266,17 +10266,17 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor( - Label="fabricIndex", Tag=0, Type=uint), + Label="fabricIndex", Tag=1, Type=uint), ClusterObjectFieldDescriptor( - Label="rootPublicKey", Tag=1, Type=bytes), + Label="rootPublicKey", Tag=2, Type=bytes), ClusterObjectFieldDescriptor( - Label="vendorId", Tag=2, Type=uint), + Label="vendorId", Tag=3, Type=uint), ClusterObjectFieldDescriptor( - Label="fabricId", Tag=3, Type=uint), + Label="fabricId", Tag=4, Type=uint), ClusterObjectFieldDescriptor( - Label="nodeId", Tag=4, Type=uint), + Label="nodeId", Tag=5, Type=uint), ClusterObjectFieldDescriptor( - Label="label", Tag=5, Type=str), + Label="label", Tag=6, Type=str), ]) fabricIndex: 'uint' = None @@ -10293,9 +10293,9 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor( - Label="fabricIndex", Tag=0, Type=uint), + Label="fabricIndex", Tag=1, Type=uint), ClusterObjectFieldDescriptor( - Label="noc", Tag=1, Type=bytes), + Label="noc", Tag=2, Type=bytes), ]) fabricIndex: 'uint' = None @@ -10663,9 +10663,9 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor( - Label="label", Tag=0, Type=str), + Label="label", Tag=1, Type=str), ClusterObjectFieldDescriptor( - Label="value", Tag=1, Type=str), + Label="value", Tag=2, Type=str), ]) label: 'str' = None @@ -10803,11 +10803,11 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor( - Label="label", Tag=0, Type=str), + Label="label", Tag=1, Type=str), ClusterObjectFieldDescriptor( - Label="mode", Tag=1, Type=uint), + Label="mode", Tag=2, Type=uint), ClusterObjectFieldDescriptor( - Label="semanticTag", Tag=2, Type=uint), + Label="semanticTag", Tag=3, Type=uint), ]) label: 'str' = None @@ -10821,9 +10821,9 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor( - Label="mfgCode", Tag=0, Type=uint), + Label="mfgCode", Tag=1, Type=uint), ClusterObjectFieldDescriptor( - Label="value", Tag=1, Type=uint), + Label="value", Tag=2, Type=uint), ]) mfgCode: 'uint' = None @@ -21532,9 +21532,9 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor( - Label="zoneId", Tag=0, Type=uint), + Label="zoneId", Tag=1, Type=uint), ClusterObjectFieldDescriptor( - Label="zoneStatus", Tag=1, Type=uint), + Label="zoneStatus", Tag=2, Type=uint), ]) zoneId: 'uint' = None @@ -22139,15 +22139,15 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor( - Label="majorNumber", Tag=0, Type=uint), + Label="majorNumber", Tag=1, Type=uint), ClusterObjectFieldDescriptor( - Label="minorNumber", Tag=1, Type=uint), + Label="minorNumber", Tag=2, Type=uint), ClusterObjectFieldDescriptor( - Label="name", Tag=2, Type=str), + Label="name", Tag=3, Type=str), ClusterObjectFieldDescriptor( - Label="callSign", Tag=3, Type=str), + Label="callSign", Tag=4, Type=str), ClusterObjectFieldDescriptor( - Label="affiliateCallSign", Tag=4, Type=str), + Label="affiliateCallSign", Tag=5, Type=str), ]) majorNumber: 'uint' = None @@ -22163,13 +22163,13 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor( - Label="operatorName", Tag=0, Type=str), + Label="operatorName", Tag=1, Type=str), ClusterObjectFieldDescriptor( - Label="lineupName", Tag=1, Type=str), + Label="lineupName", Tag=2, Type=str), ClusterObjectFieldDescriptor( - Label="postalCode", Tag=2, Type=str), + Label="postalCode", Tag=3, Type=str), ClusterObjectFieldDescriptor( - Label="lineupInfoType", Tag=3, Type=TvChannel.Enums.TvChannelLineupInfoType), + Label="lineupInfoType", Tag=4, Type=TvChannel.Enums.TvChannelLineupInfoType), ]) operatorName: 'str' = None @@ -22348,9 +22348,9 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor( - Label="identifier", Tag=0, Type=uint), + Label="identifier", Tag=1, Type=uint), ClusterObjectFieldDescriptor( - Label="name", Tag=1, Type=str), + Label="name", Tag=2, Type=str), ]) identifier: 'uint' = None @@ -22488,9 +22488,9 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor( - Label="updatedAt", Tag=0, Type=uint), + Label="updatedAt", Tag=1, Type=uint), ClusterObjectFieldDescriptor( - Label="position", Tag=1, Type=uint), + Label="position", Tag=2, Type=uint), ]) updatedAt: 'uint' = None @@ -23006,13 +23006,13 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor( - Label="index", Tag=0, Type=uint), + Label="index", Tag=1, Type=uint), ClusterObjectFieldDescriptor( - Label="inputType", Tag=1, Type=MediaInput.Enums.MediaInputType), + Label="inputType", Tag=2, Type=MediaInput.Enums.MediaInputType), ClusterObjectFieldDescriptor( - Label="name", Tag=2, Type=str), + Label="name", Tag=3, Type=str), ClusterObjectFieldDescriptor( - Label="description", Tag=3, Type=str), + Label="description", Tag=4, Type=str), ]) index: 'uint' = None @@ -23401,9 +23401,9 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor( - Label="name", Tag=0, Type=str), + Label="name", Tag=1, Type=str), ClusterObjectFieldDescriptor( - Label="value", Tag=1, Type=str), + Label="value", Tag=2, Type=str), ]) name: 'str' = None @@ -23416,11 +23416,11 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor( - Label="type", Tag=0, Type=ContentLauncher.Enums.ContentLaunchParameterEnum), + Label="type", Tag=1, Type=ContentLauncher.Enums.ContentLaunchParameterEnum), ClusterObjectFieldDescriptor( - Label="value", Tag=1, Type=str), + Label="value", Tag=2, Type=str), ClusterObjectFieldDescriptor( - Label="externalIDList", Tag=2, Type=typing.List[ContentLauncher.Structs.ContentLaunchAdditionalInfo]), + Label="externalIDList", Tag=3, Type=typing.List[ContentLauncher.Structs.ContentLaunchAdditionalInfo]), ]) type: 'ContentLauncher.Enums.ContentLaunchParameterEnum' = None @@ -23434,17 +23434,17 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor( - Label="providerName", Tag=0, Type=str), + Label="providerName", Tag=1, Type=str), ClusterObjectFieldDescriptor( - Label="background", Tag=1, Type=uint), + Label="background", Tag=2, Type=uint), ClusterObjectFieldDescriptor( - Label="logo", Tag=2, Type=uint), + Label="logo", Tag=3, Type=uint), ClusterObjectFieldDescriptor( - Label="progressBar", Tag=3, Type=uint), + Label="progressBar", Tag=4, Type=uint), ClusterObjectFieldDescriptor( - Label="splash", Tag=4, Type=uint), + Label="splash", Tag=5, Type=uint), ClusterObjectFieldDescriptor( - Label="waterMark", Tag=5, Type=uint), + Label="waterMark", Tag=6, Type=uint), ]) providerName: 'str' = None @@ -23461,11 +23461,11 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor( - Label="width", Tag=0, Type=str), + Label="width", Tag=1, Type=str), ClusterObjectFieldDescriptor( - Label="height", Tag=1, Type=str), + Label="height", Tag=2, Type=str), ClusterObjectFieldDescriptor( - Label="metric", Tag=2, Type=ContentLauncher.Enums.ContentLaunchMetricType), + Label="metric", Tag=3, Type=ContentLauncher.Enums.ContentLaunchMetricType), ]) width: 'str' = None @@ -23479,11 +23479,11 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor( - Label="imageUrl", Tag=0, Type=str), + Label="imageUrl", Tag=1, Type=str), ClusterObjectFieldDescriptor( - Label="color", Tag=1, Type=str), + Label="color", Tag=2, Type=str), ClusterObjectFieldDescriptor( - Label="size", Tag=2, Type=uint), + Label="size", Tag=3, Type=uint), ]) imageUrl: 'str' = None @@ -23654,11 +23654,11 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor( - Label="index", Tag=0, Type=uint), + Label="index", Tag=1, Type=uint), ClusterObjectFieldDescriptor( - Label="outputType", Tag=1, Type=AudioOutput.Enums.AudioOutputType), + Label="outputType", Tag=2, Type=AudioOutput.Enums.AudioOutputType), ClusterObjectFieldDescriptor( - Label="name", Tag=2, Type=str), + Label="name", Tag=3, Type=str), ]) index: 'uint' = None @@ -23785,9 +23785,9 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor( - Label="catalogVendorId", Tag=0, Type=uint), + Label="catalogVendorId", Tag=1, Type=uint), ClusterObjectFieldDescriptor( - Label="applicationId", Tag=1, Type=str), + Label="applicationId", Tag=2, Type=str), ]) catalogVendorId: 'uint' = None @@ -24200,21 +24200,21 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor( - Label="a", Tag=0, Type=uint), + Label="a", Tag=1, Type=uint), ClusterObjectFieldDescriptor( - Label="b", Tag=1, Type=bool), + Label="b", Tag=2, Type=bool), ClusterObjectFieldDescriptor( - Label="c", Tag=2, Type=TestCluster.Enums.SimpleEnum), + Label="c", Tag=3, Type=TestCluster.Enums.SimpleEnum), ClusterObjectFieldDescriptor( - Label="d", Tag=3, Type=bytes), + Label="d", Tag=4, Type=bytes), ClusterObjectFieldDescriptor( - Label="e", Tag=4, Type=str), + Label="e", Tag=5, Type=str), ClusterObjectFieldDescriptor( - Label="f", Tag=5, Type=uint), + Label="f", Tag=6, Type=uint), ClusterObjectFieldDescriptor( - Label="g", Tag=6, Type=float), + Label="g", Tag=7, Type=float), ClusterObjectFieldDescriptor( - Label="h", Tag=7, Type=float), + Label="h", Tag=8, Type=float), ]) a: 'uint' = None @@ -24233,29 +24233,29 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor( - Label="nullableInt", Tag=0, Type=typing.Union[Nullable, uint]), + Label="nullableInt", Tag=1, Type=typing.Union[Nullable, uint]), ClusterObjectFieldDescriptor( - Label="optionalInt", Tag=1, Type=typing.Optional[uint]), + Label="optionalInt", Tag=2, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor( - Label="nullableOptionalInt", Tag=2, Type=typing.Union[None, Nullable, uint]), + Label="nullableOptionalInt", Tag=3, Type=typing.Union[None, Nullable, uint]), ClusterObjectFieldDescriptor( - Label="nullableString", Tag=3, Type=typing.Union[Nullable, str]), + Label="nullableString", Tag=4, Type=typing.Union[Nullable, str]), ClusterObjectFieldDescriptor( - Label="optionalString", Tag=4, Type=typing.Optional[str]), + Label="optionalString", Tag=5, Type=typing.Optional[str]), ClusterObjectFieldDescriptor( - Label="nullableOptionalString", Tag=5, Type=typing.Union[None, Nullable, str]), + Label="nullableOptionalString", Tag=6, Type=typing.Union[None, Nullable, str]), ClusterObjectFieldDescriptor( - Label="nullableStruct", Tag=6, Type=typing.Union[Nullable, TestCluster.Structs.SimpleStruct]), + Label="nullableStruct", Tag=7, Type=typing.Union[Nullable, TestCluster.Structs.SimpleStruct]), ClusterObjectFieldDescriptor( - Label="optionalStruct", Tag=7, Type=typing.Optional[TestCluster.Structs.SimpleStruct]), + Label="optionalStruct", Tag=8, Type=typing.Optional[TestCluster.Structs.SimpleStruct]), ClusterObjectFieldDescriptor( - Label="nullableOptionalStruct", Tag=8, Type=typing.Union[None, Nullable, TestCluster.Structs.SimpleStruct]), + Label="nullableOptionalStruct", Tag=9, Type=typing.Union[None, Nullable, TestCluster.Structs.SimpleStruct]), ClusterObjectFieldDescriptor( - Label="nullableList", Tag=9, Type=typing.Union[Nullable, typing.List[TestCluster.Enums.SimpleEnum]]), + Label="nullableList", Tag=10, Type=typing.Union[Nullable, typing.List[TestCluster.Enums.SimpleEnum]]), ClusterObjectFieldDescriptor( - Label="optionalList", Tag=10, Type=typing.Optional[typing.List[TestCluster.Enums.SimpleEnum]]), + Label="optionalList", Tag=11, Type=typing.Optional[typing.List[TestCluster.Enums.SimpleEnum]]), ClusterObjectFieldDescriptor( - Label="nullableOptionalList", Tag=11, Type=typing.Union[None, Nullable, typing.List[TestCluster.Enums.SimpleEnum]]), + Label="nullableOptionalList", Tag=12, Type=typing.Union[None, Nullable, typing.List[TestCluster.Enums.SimpleEnum]]), ]) nullableInt: 'typing.Union[Nullable, uint]' = None @@ -24278,11 +24278,11 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor( - Label="a", Tag=0, Type=uint), + Label="a", Tag=1, Type=uint), ClusterObjectFieldDescriptor( - Label="b", Tag=1, Type=bool), + Label="b", Tag=2, Type=bool), ClusterObjectFieldDescriptor( - Label="c", Tag=2, Type=TestCluster.Structs.SimpleStruct), + Label="c", Tag=3, Type=TestCluster.Structs.SimpleStruct), ]) a: 'uint' = None @@ -24296,19 +24296,19 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor( - Label="a", Tag=0, Type=uint), + Label="a", Tag=1, Type=uint), ClusterObjectFieldDescriptor( - Label="b", Tag=1, Type=bool), + Label="b", Tag=2, Type=bool), ClusterObjectFieldDescriptor( - Label="c", Tag=2, Type=TestCluster.Structs.SimpleStruct), + Label="c", Tag=3, Type=TestCluster.Structs.SimpleStruct), ClusterObjectFieldDescriptor( - Label="d", Tag=3, Type=typing.List[TestCluster.Structs.SimpleStruct]), + Label="d", Tag=4, Type=typing.List[TestCluster.Structs.SimpleStruct]), ClusterObjectFieldDescriptor( - Label="e", Tag=4, Type=typing.List[uint]), + Label="e", Tag=5, Type=typing.List[uint]), ClusterObjectFieldDescriptor( - Label="f", Tag=5, Type=typing.List[bytes]), + Label="f", Tag=6, Type=typing.List[bytes]), ClusterObjectFieldDescriptor( - Label="g", Tag=6, Type=typing.List[uint]), + Label="g", Tag=7, Type=typing.List[uint]), ]) a: 'uint' = None @@ -24326,7 +24326,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor( - Label="a", Tag=0, Type=typing.List[TestCluster.Structs.NestedStructList]), + Label="a", Tag=1, Type=typing.List[TestCluster.Structs.NestedStructList]), ]) a: 'typing.List[TestCluster.Structs.NestedStructList]' = None @@ -24338,9 +24338,9 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor( - Label="fabricIndex", Tag=0, Type=uint), + Label="fabricIndex", Tag=1, Type=uint), ClusterObjectFieldDescriptor( - Label="operationalCert", Tag=1, Type=bytes), + Label="operationalCert", Tag=2, Type=bytes), ]) fabricIndex: 'uint' = None @@ -29049,15 +29049,15 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor( - Label="vendorId", Tag=0, Type=uint), + Label="vendorId", Tag=1, Type=uint), ClusterObjectFieldDescriptor( - Label="groupKeyIndex", Tag=1, Type=uint), + Label="groupKeyIndex", Tag=2, Type=uint), ClusterObjectFieldDescriptor( - Label="groupKeyRoot", Tag=2, Type=bytes), + Label="groupKeyRoot", Tag=3, Type=bytes), ClusterObjectFieldDescriptor( - Label="groupKeyEpochStartTime", Tag=3, Type=uint), + Label="groupKeyEpochStartTime", Tag=4, Type=uint), ClusterObjectFieldDescriptor( - Label="groupKeySecurityPolicy", Tag=4, Type=GroupKeyManagement.Enums.GroupKeySecurityPolicy), + Label="groupKeySecurityPolicy", Tag=5, Type=GroupKeyManagement.Enums.GroupKeySecurityPolicy), ]) vendorId: 'uint' = None @@ -29073,11 +29073,11 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor( - Label="vendorId", Tag=0, Type=uint), + Label="vendorId", Tag=1, Type=uint), ClusterObjectFieldDescriptor( - Label="vendorGroupId", Tag=1, Type=uint), + Label="vendorGroupId", Tag=2, Type=uint), ClusterObjectFieldDescriptor( - Label="groupKeySetIndex", Tag=2, Type=uint), + Label="groupKeySetIndex", Tag=3, Type=uint), ]) vendorId: 'uint' = None diff --git a/src/controller/python/templates/python-cluster-Objects-py.zapt b/src/controller/python/templates/python-cluster-Objects-py.zapt index aa80f09a88bfa0..4a7adcd72e0003 100644 --- a/src/controller/python/templates/python-cluster-Objects-py.zapt +++ b/src/controller/python/templates/python-cluster-Objects-py.zapt @@ -42,7 +42,7 @@ class {{asUpperCamelCase name}}(Cluster): return ClusterObjectDescriptor( Fields = [ {{#zcl_struct_items}} - ClusterObjectFieldDescriptor(Label="{{ asLowerCamelCase label }}", Tag={{ index }}, Type={{zapTypeToPythonClusterObjectType type ns=(asUpperCamelCase parent.parent.name)}}), + ClusterObjectFieldDescriptor(Label="{{ asLowerCamelCase label }}", Tag={{ fieldIdentifier }}, Type={{zapTypeToPythonClusterObjectType type ns=(asUpperCamelCase parent.parent.name)}}), {{/zcl_struct_items}} ]) diff --git a/src/controller/python/test/test_scripts/cluster_objects.py b/src/controller/python/test/test_scripts/cluster_objects.py index 850fdb41632014..8774fb1720e49f 100644 --- a/src/controller/python/test/test_scripts/cluster_objects.py +++ b/src/controller/python/test/test_scripts/cluster_objects.py @@ -18,7 +18,7 @@ import chip.clusters as Clusters import logging -from chip.clusters.Attribute import AttributePath, AttributeReadResult, AttributeStatus +from chip.clusters.Attribute import AttributePath, AttributeReadResult, AttributeStatus, ValueDecodeFailure import chip.interaction_model import asyncio @@ -29,6 +29,14 @@ LIGHTING_ENDPOINT_ID = 1 +def _AssumeDecodeSuccess(values): + for k, v in values.items(): + print(f"{k} = {v}") + if isinstance(v.Data, ValueDecodeFailure): + raise AssertionError( + f"Cannot decode value for path {k}, got error: '{str(v.Data.Reason)}', raw TLV data: '{v.Data.TLVValue}'") + + class ClusterObjectTests: @classmethod def TestAPI(cls): @@ -138,36 +146,37 @@ async def TestReadRequests(cls, devCtrl): if (len(res) != 3): raise AssertionError( f"Got back {len(res)} data items instead of 3") + _AssumeDecodeSuccess(res) logger.info("2: Reading Ex Cx A*") req = [ (0, Clusters.Basic), ] - await devCtrl.ReadAttribute(nodeid=NODE_ID, attributes=req) + _AssumeDecodeSuccess(await devCtrl.ReadAttribute(nodeid=NODE_ID, attributes=req)) logger.info("3: Reading E* Cx Ax") req = [ Clusters.Descriptor.Attributes.ServerList ] - await devCtrl.ReadAttribute(nodeid=NODE_ID, attributes=req) + _AssumeDecodeSuccess(await devCtrl.ReadAttribute(nodeid=NODE_ID, attributes=req)) logger.info("4: Reading Ex C* A*") req = [ 0 ] - await devCtrl.ReadAttribute(nodeid=NODE_ID, attributes=req) + _AssumeDecodeSuccess(await devCtrl.ReadAttribute(nodeid=NODE_ID, attributes=req)) logger.info("5: Reading E* Cx A*") req = [ Clusters.Descriptor ] - await devCtrl.ReadAttribute(nodeid=NODE_ID, attributes=req) + _AssumeDecodeSuccess(await devCtrl.ReadAttribute(nodeid=NODE_ID, attributes=req)) logger.info("6: Reading E* C* A*") req = [ '*' ] - await devCtrl.ReadAttribute(nodeid=NODE_ID, attributes=req) + _AssumeDecodeSuccess(await devCtrl.ReadAttribute(nodeid=NODE_ID, attributes=req)) @classmethod async def RunTest(cls, devCtrl):