From 1a907b374ba62736f980524fda43dbfc3a2cd3a1 Mon Sep 17 00:00:00 2001 From: Karsten Sperling <113487422+ksperling-apple@users.noreply.github.com> Date: Wed, 10 Apr 2024 00:48:14 +1200 Subject: [PATCH 001/468] Avoid zombie DeviceControllerSystemState (#32903) Make sure a dead system state can't be revived by raising the retain count above 0 again. Also ensure the retain count is read and updated in a single atomic operation. Return a bool from Release so the caller can know if the release resulted in state shutdown, and add an IsShutdown method. --- .../CHIPDeviceControllerFactory.cpp | 4 ++-- src/controller/CHIPDeviceControllerFactory.h | 4 +++- .../CHIPDeviceControllerSystemState.h | 21 +++++++++++-------- 3 files changed, 17 insertions(+), 12 deletions(-) diff --git a/src/controller/CHIPDeviceControllerFactory.cpp b/src/controller/CHIPDeviceControllerFactory.cpp index 84a00d4243acee..e4e419978d8a2d 100644 --- a/src/controller/CHIPDeviceControllerFactory.cpp +++ b/src/controller/CHIPDeviceControllerFactory.cpp @@ -392,9 +392,9 @@ void DeviceControllerFactory::RetainSystemState() (void) mSystemState->Retain(); } -void DeviceControllerFactory::ReleaseSystemState() +bool DeviceControllerFactory::ReleaseSystemState() { - mSystemState->Release(); + return mSystemState->Release(); } DeviceControllerFactory::~DeviceControllerFactory() diff --git a/src/controller/CHIPDeviceControllerFactory.h b/src/controller/CHIPDeviceControllerFactory.h index 260273180d0ee7..19b19e54eab414 100644 --- a/src/controller/CHIPDeviceControllerFactory.h +++ b/src/controller/CHIPDeviceControllerFactory.h @@ -205,7 +205,9 @@ class DeviceControllerFactory // // This should only be invoked if a matching call to RetainSystemState() was called prior. // - void ReleaseSystemState(); + // Returns true if stack was shut down in response to this call, or false otherwise. + // + bool ReleaseSystemState(); // // Retrieve a read-only pointer to the system state object that contains pointers to key stack diff --git a/src/controller/CHIPDeviceControllerSystemState.h b/src/controller/CHIPDeviceControllerSystemState.h index bc89d6c1d21ec2..707f1befacec94 100644 --- a/src/controller/CHIPDeviceControllerSystemState.h +++ b/src/controller/CHIPDeviceControllerSystemState.h @@ -167,8 +167,9 @@ class DeviceControllerSystemState // should be called to release the reference once it is no longer needed. DeviceControllerSystemState * Retain() { - VerifyOrDie(mRefCount < std::numeric_limits::max()); - ++mRefCount; + auto count = mRefCount++; + VerifyOrDie(count < std::numeric_limits::max()); // overflow + VerifyOrDie(!IsShutdown()); // avoid zombie return this; }; @@ -178,14 +179,15 @@ class DeviceControllerSystemState // // NB: The system state is owned by the factory; Relase() will not free it // but will free its members (Shutdown()). - void Release() + // + // Returns true if the system state was shut down in response to this call. + bool Release() { - VerifyOrDie(mRefCount > 0); - - if (--mRefCount == 0) - { - Shutdown(); - } + auto count = mRefCount--; + VerifyOrDie(count > 0); // underflow + VerifyOrReturnValue(count == 1, false); + Shutdown(); + return true; }; bool IsInitialized() { @@ -195,6 +197,7 @@ class DeviceControllerSystemState mGroupDataProvider != nullptr && mReportScheduler != nullptr && mTimerDelegate != nullptr && mSessionKeystore != nullptr && mSessionResumptionStorage != nullptr && mBDXTransferServer != nullptr; }; + bool IsShutdown() { return mHaveShutDown; } System::Layer * SystemLayer() const { return mSystemLayer; }; Inet::EndPointManager * TCPEndPointManager() const { return mTCPEndPointManager; }; From 45a9a6682b73054b2b7590d976a9d5d88cfea52c Mon Sep 17 00:00:00 2001 From: Terence Hampson Date: Tue, 9 Apr 2024 09:32:31 -0400 Subject: [PATCH 002/468] CIPD gen script is callable regard where activate is called from (#32822) --- scripts/setup/bootstrap.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/setup/bootstrap.sh b/scripts/setup/bootstrap.sh index 0a2a898eaf02c5..ce6b12f1df330d 100644 --- a/scripts/setup/bootstrap.sh +++ b/scripts/setup/bootstrap.sh @@ -113,7 +113,7 @@ _bootstrap_or_activate() { local _PIGWEED_CIPD_JSON="$_CHIP_ROOT/third_party/pigweed/repo/pw_env_setup/py/pw_env_setup/cipd_setup/pigweed.json" mkdir -p "$_PW_ACTUAL_ENVIRONMENT_ROOT" local _GENERATED_PIGWEED_CIPD_JSON="$_PW_ACTUAL_ENVIRONMENT_ROOT/pigweed.json" - scripts/setup/gen_pigweed_cipd_json.py -i $_PIGWEED_CIPD_JSON -o $_GENERATED_PIGWEED_CIPD_JSON + $_CHIP_ROOT/scripts/setup/gen_pigweed_cipd_json.py -i $_PIGWEED_CIPD_JSON -o $_GENERATED_PIGWEED_CIPD_JSON if test -n "$GITHUB_ACTION"; then tee <"${_PW_ACTUAL_ENVIRONMENT_ROOT}/pip.conf" From eb2650a1c391c87a74430128ec588d4ed18999a1 Mon Sep 17 00:00:00 2001 From: Vatsal Ghelani <152916324+vatsalghelani-csa@users.noreply.github.com> Date: Tue, 9 Apr 2024 10:55:15 -0400 Subject: [PATCH 003/468] Issue/30754 dependabot ci runs for both push and pull (#32834) * Update examples-tizen.yaml - use on: push: branches: - 'master' to fulfill * Update cirque.yaml * Update examples-linux-standalone.yaml * Update examples-qpg.yaml * Update zap_templates.yaml * Update examples-linux-imx.yaml * Update examples-ameba.yaml * Update chef.yaml * Update darwin.yaml * Update gradle-wrapper-validation.yml * Update spell.yml * Update examples-efr32.yaml * Update examples-asr.yaml * Update examples-esp32.yaml * Update examples-stm32.yaml * Update tests.yaml * Update examples-mw320.yaml * Update examples-nrfconnect.yaml * Update chef.yaml * Update cirque.yaml * Update examples-ameba.yaml * Update examples-asr.yaml * Update examples-efr32.yaml * Update examples-esp32.yaml * Update examples-linux-imx.yaml * Update examples-linux-standalone.yaml * Update examples-mw320.yaml * Update examples-nrfconnect.yaml * Update examples-qpg.yaml * Update examples-stm32.yaml * Update examples-tizen.yaml * Update gradle-wrapper-validation.yml * Update spell.yml * Update tests.yaml * Update zap_templates.yaml * Update gradle-wrapper-validation.yml * Update darwin.yaml * Update examples-asr.yaml * Update examples-asr.yaml --------- Co-authored-by: Kai Liao <140431279+kliao-csa@users.noreply.github.com> --- .github/workflows/chef.yaml | 2 ++ .github/workflows/cirque.yaml | 2 ++ .github/workflows/darwin.yaml | 2 ++ .github/workflows/examples-ameba.yaml | 2 ++ .github/workflows/examples-asr.yaml | 4 +++- .github/workflows/examples-efr32.yaml | 2 ++ .github/workflows/examples-esp32.yaml | 2 ++ .github/workflows/examples-linux-imx.yaml | 2 ++ .github/workflows/examples-linux-standalone.yaml | 2 ++ .github/workflows/examples-mw320.yaml | 2 ++ .github/workflows/examples-nrfconnect.yaml | 2 ++ .github/workflows/examples-qpg.yaml | 4 +++- .github/workflows/examples-stm32.yaml | 2 ++ .github/workflows/examples-tizen.yaml | 2 ++ .github/workflows/gradle-wrapper-validation.yml | 6 +++++- .github/workflows/spell.yml | 2 ++ .github/workflows/tests.yaml | 2 ++ .github/workflows/zap_templates.yaml | 2 ++ 18 files changed, 41 insertions(+), 3 deletions(-) diff --git a/.github/workflows/chef.yaml b/.github/workflows/chef.yaml index 862ada5236f96f..b2119552c7924a 100644 --- a/.github/workflows/chef.yaml +++ b/.github/workflows/chef.yaml @@ -16,6 +16,8 @@ name: Build Chef CI examples on all platforms on: push: + branches-ignore: + - 'dependabot/**' pull_request: merge_group: diff --git a/.github/workflows/cirque.yaml b/.github/workflows/cirque.yaml index a82750e546278d..4da74b74bcae18 100644 --- a/.github/workflows/cirque.yaml +++ b/.github/workflows/cirque.yaml @@ -16,6 +16,8 @@ name: Cirque on: push: + branches-ignore: + - 'dependabot/**' pull_request: merge_group: workflow_dispatch: diff --git a/.github/workflows/darwin.yaml b/.github/workflows/darwin.yaml index af8740f74eddb7..e857515b11f952 100644 --- a/.github/workflows/darwin.yaml +++ b/.github/workflows/darwin.yaml @@ -16,6 +16,8 @@ name: Darwin on: push: + branches-ignore: + - 'dependabot/**' pull_request: merge_group: workflow_dispatch: diff --git a/.github/workflows/examples-ameba.yaml b/.github/workflows/examples-ameba.yaml index 16cfb4c17e0419..0beab0cc0aa8a3 100644 --- a/.github/workflows/examples-ameba.yaml +++ b/.github/workflows/examples-ameba.yaml @@ -16,6 +16,8 @@ name: Build example - Ameba on: push: + branches-ignore: + - 'dependabot/**' pull_request: merge_group: diff --git a/.github/workflows/examples-asr.yaml b/.github/workflows/examples-asr.yaml index 6e9d4a8b13527b..6708f2221ea2d4 100644 --- a/.github/workflows/examples-asr.yaml +++ b/.github/workflows/examples-asr.yaml @@ -16,6 +16,8 @@ name: Build example - ASR on: push: + branches-ignore: + - 'dependabot/**' pull_request: merge_group: @@ -60,4 +62,4 @@ jobs: --target asr-asr582x-dishwasher \ --target asr-asr582x-refrigerator \ build \ - " \ No newline at end of file + " diff --git a/.github/workflows/examples-efr32.yaml b/.github/workflows/examples-efr32.yaml index 0ec8a540c2311f..8586542fc6242d 100644 --- a/.github/workflows/examples-efr32.yaml +++ b/.github/workflows/examples-efr32.yaml @@ -16,6 +16,8 @@ name: Build example - EFR32 on: push: + branches-ignore: + - 'dependabot/**' pull_request: merge_group: diff --git a/.github/workflows/examples-esp32.yaml b/.github/workflows/examples-esp32.yaml index 09eca99abad026..33637e81068194 100644 --- a/.github/workflows/examples-esp32.yaml +++ b/.github/workflows/examples-esp32.yaml @@ -16,6 +16,8 @@ name: Build example - ESP32 on: push: + branches-ignore: + - 'dependabot/**' pull_request: merge_group: diff --git a/.github/workflows/examples-linux-imx.yaml b/.github/workflows/examples-linux-imx.yaml index 27a997db1bf5cf..772765e1e110f7 100644 --- a/.github/workflows/examples-linux-imx.yaml +++ b/.github/workflows/examples-linux-imx.yaml @@ -16,6 +16,8 @@ name: Build example - i.MX Linux on: push: + branches-ignore: + - 'dependabot/**' pull_request: merge_group: diff --git a/.github/workflows/examples-linux-standalone.yaml b/.github/workflows/examples-linux-standalone.yaml index ffec5dad8cb1a9..832afae53b3851 100644 --- a/.github/workflows/examples-linux-standalone.yaml +++ b/.github/workflows/examples-linux-standalone.yaml @@ -16,6 +16,8 @@ name: Build example - Linux Standalone on: push: + branches-ignore: + - 'dependabot/**' pull_request: merge_group: diff --git a/.github/workflows/examples-mw320.yaml b/.github/workflows/examples-mw320.yaml index 1f2940af4c576f..7513c8fb477c09 100644 --- a/.github/workflows/examples-mw320.yaml +++ b/.github/workflows/examples-mw320.yaml @@ -16,6 +16,8 @@ name: Build example - MW320 on: push: + branches-ignore: + - 'dependabot/**' pull_request: merge_group: diff --git a/.github/workflows/examples-nrfconnect.yaml b/.github/workflows/examples-nrfconnect.yaml index d305ebf05e4717..d8a5f15fb0e4b4 100644 --- a/.github/workflows/examples-nrfconnect.yaml +++ b/.github/workflows/examples-nrfconnect.yaml @@ -16,6 +16,8 @@ name: Build example - nRF Connect SDK on: push: + branches-ignore: + - 'dependabot/**' pull_request: merge_group: diff --git a/.github/workflows/examples-qpg.yaml b/.github/workflows/examples-qpg.yaml index b67ef067ed1caf..8e7b28727c5591 100644 --- a/.github/workflows/examples-qpg.yaml +++ b/.github/workflows/examples-qpg.yaml @@ -16,6 +16,8 @@ name: Build example - QPG on: push: + branches-ignore: + - 'dependabot/**' pull_request: merge_group: @@ -86,4 +88,4 @@ jobs: uses: ./.github/actions/upload-size-reports if: ${{ !env.ACT }} with: - platform-name: QPG \ No newline at end of file + platform-name: QPG diff --git a/.github/workflows/examples-stm32.yaml b/.github/workflows/examples-stm32.yaml index 57d0c3115ca01b..c1af5e399cddec 100644 --- a/.github/workflows/examples-stm32.yaml +++ b/.github/workflows/examples-stm32.yaml @@ -16,6 +16,8 @@ name: Build example - stm32 on: push: + branches-ignore: + - 'dependabot/**' pull_request: merge_group: diff --git a/.github/workflows/examples-tizen.yaml b/.github/workflows/examples-tizen.yaml index f89c2d259490cc..b3d584de22f45f 100644 --- a/.github/workflows/examples-tizen.yaml +++ b/.github/workflows/examples-tizen.yaml @@ -16,6 +16,8 @@ name: Build example - Tizen on: push: + branches-ignore: + - 'dependabot/**' pull_request: merge_group: diff --git a/.github/workflows/gradle-wrapper-validation.yml b/.github/workflows/gradle-wrapper-validation.yml index 97617480d8f292..ab3f49942329ce 100644 --- a/.github/workflows/gradle-wrapper-validation.yml +++ b/.github/workflows/gradle-wrapper-validation.yml @@ -1,5 +1,9 @@ name: "Validate Gradle Wrapper" -on: [push, pull_request] +on: + push: + branches-ignore: + - 'dependabot/**' + pull_request: jobs: validation: diff --git a/.github/workflows/spell.yml b/.github/workflows/spell.yml index 84877bf6f8c8bb..f37a0e28711c6f 100644 --- a/.github/workflows/spell.yml +++ b/.github/workflows/spell.yml @@ -16,6 +16,8 @@ name: Run misspell on: push: + branches-ignore: + - 'dependabot/**' paths: - "**.md" - ".github/.wordlist.txt" diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 68f978f1ab9fbf..73158ccb0557fd 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -16,6 +16,8 @@ name: Tests on: push: + branches-ignore: + - 'dependabot/**' pull_request: merge_group: workflow_dispatch: diff --git a/.github/workflows/zap_templates.yaml b/.github/workflows/zap_templates.yaml index ea8c72ae349ba7..07c5f64afe591a 100644 --- a/.github/workflows/zap_templates.yaml +++ b/.github/workflows/zap_templates.yaml @@ -16,6 +16,8 @@ name: ZAP on: push: + branches-ignore: + - 'dependabot/**' pull_request: merge_group: From d96944524e85c03cc10c2ef37bc4209f3cd1e978 Mon Sep 17 00:00:00 2001 From: Kai Liao <140431279+kliao-csa@users.noreply.github.com> Date: Tue, 9 Apr 2024 07:56:10 -0700 Subject: [PATCH 004/468] 30754 cicd dependabot ci runs for both push and pull effectively double the processing (#32833) * Update examples-infineon.yaml * Update examples-telink.yaml * Update examples-openiotsdk.yaml * Update examples-mbed.yaml * Update java-tests.yaml * Update minimal-build.yaml * Update examples-cc13x2x7_26x2x7.yaml * Update full-android.yaml * Update unit_integration_test.yaml * Update qemu.yaml * Update examples-cc32xx.yaml * Update examples-bouffalolab.yaml * Update lint.yml * Update examples-linux-arm.yaml * Update build.yaml * Update examples-mbed.yaml * Update java-tests.yaml * Update examples-infineon.yaml * Update examples-telink.yaml * Update examples-openiotsdk.yaml * Update minimal-build.yaml * Update examples-cc13x2x7_26x2x7.yaml * Update full-android.yaml * Update unit_integration_test.yaml * Update qemu.yaml * Update examples-cc32xx.yaml * Update examples-bouffalolab.yaml * Update build.yaml * Update examples-linux-arm.yaml * Update lint.yml * Update lint.yml * Update examples-cc13x2x7_26x2x7.yaml Entire yaml seems to be deleted so I'm removing changes to the file --- .github/workflows/build.yaml | 2 ++ .github/workflows/examples-bouffalolab.yaml | 2 ++ .github/workflows/examples-cc32xx.yaml | 2 ++ .github/workflows/examples-infineon.yaml | 4 +++- .github/workflows/examples-linux-arm.yaml | 2 ++ .github/workflows/examples-mbed.yaml | 2 ++ .github/workflows/examples-openiotsdk.yaml | 2 ++ .github/workflows/examples-telink.yaml | 2 ++ .github/workflows/full-android.yaml | 2 ++ .github/workflows/java-tests.yaml | 2 ++ .github/workflows/lint.yml | 3 +++ .github/workflows/minimal-build.yaml | 2 ++ .github/workflows/qemu.yaml | 2 ++ .github/workflows/unit_integration_test.yaml | 2 ++ 14 files changed, 30 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index f6abbd7315128d..3ba46848909d8d 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -16,6 +16,8 @@ name: Builds on: push: + branches-ignore: + - 'dependabot/**' pull_request: merge_group: workflow_dispatch: diff --git a/.github/workflows/examples-bouffalolab.yaml b/.github/workflows/examples-bouffalolab.yaml index ce38acdc0d5165..2cba36cc443b6e 100644 --- a/.github/workflows/examples-bouffalolab.yaml +++ b/.github/workflows/examples-bouffalolab.yaml @@ -16,6 +16,8 @@ name: Build example - BouffaloLab on: push: + branches-ignore: + - 'dependabot/**' pull_request: merge_group: workflow_dispatch: diff --git a/.github/workflows/examples-cc32xx.yaml b/.github/workflows/examples-cc32xx.yaml index a56e5cff8d70c4..4e11072e711e03 100644 --- a/.github/workflows/examples-cc32xx.yaml +++ b/.github/workflows/examples-cc32xx.yaml @@ -16,6 +16,8 @@ name: Build example - TI CC32XX on: push: + branches-ignore: + - 'dependabot/**' pull_request: merge_group: diff --git a/.github/workflows/examples-infineon.yaml b/.github/workflows/examples-infineon.yaml index 9aba6a2ec6e1fc..240db045f051e4 100644 --- a/.github/workflows/examples-infineon.yaml +++ b/.github/workflows/examples-infineon.yaml @@ -16,6 +16,8 @@ name: Build example - Infineon on: push: + branches-ignore: + - 'dependabot/**' pull_request: merge_group: workflow_dispatch: @@ -144,4 +146,4 @@ jobs: uses: ./.github/actions/upload-size-reports if: ${{ !env.ACT }} with: - platform-name: Infineon \ No newline at end of file + platform-name: Infineon diff --git a/.github/workflows/examples-linux-arm.yaml b/.github/workflows/examples-linux-arm.yaml index 6dc80615c426ac..8ca577410ac37d 100644 --- a/.github/workflows/examples-linux-arm.yaml +++ b/.github/workflows/examples-linux-arm.yaml @@ -16,6 +16,8 @@ name: Build example - Linux ARM on: push: + branches-ignore: + - 'dependabot/**' pull_request: merge_group: diff --git a/.github/workflows/examples-mbed.yaml b/.github/workflows/examples-mbed.yaml index 3744047406009a..2da09b78003fa0 100644 --- a/.github/workflows/examples-mbed.yaml +++ b/.github/workflows/examples-mbed.yaml @@ -16,6 +16,8 @@ name: Build example - Mbed OS on: push: + branches-ignore: + - 'dependabot/**' pull_request: merge_group: workflow_dispatch: diff --git a/.github/workflows/examples-openiotsdk.yaml b/.github/workflows/examples-openiotsdk.yaml index fead4424f712a1..e61e06761a1a16 100644 --- a/.github/workflows/examples-openiotsdk.yaml +++ b/.github/workflows/examples-openiotsdk.yaml @@ -16,6 +16,8 @@ name: Build example - Open IoT SDK on: push: + branches-ignore: + - 'dependabot/**' pull_request: merge_group: workflow_dispatch: diff --git a/.github/workflows/examples-telink.yaml b/.github/workflows/examples-telink.yaml index a21d4970730703..563a450aa6ed1a 100644 --- a/.github/workflows/examples-telink.yaml +++ b/.github/workflows/examples-telink.yaml @@ -16,6 +16,8 @@ name: Build example - Telink on: push: + branches-ignore: + - 'dependabot/**' pull_request: merge_group: diff --git a/.github/workflows/full-android.yaml b/.github/workflows/full-android.yaml index 48f0af185c268e..4c54b4be121491 100644 --- a/.github/workflows/full-android.yaml +++ b/.github/workflows/full-android.yaml @@ -16,6 +16,8 @@ name: Full builds - Android on: push: + branches-ignore: + - 'dependabot/**' workflow_dispatch: concurrency: diff --git a/.github/workflows/java-tests.yaml b/.github/workflows/java-tests.yaml index b609ad79fc9d56..ce3ceb0e292721 100644 --- a/.github/workflows/java-tests.yaml +++ b/.github/workflows/java-tests.yaml @@ -16,6 +16,8 @@ name: Java Tests on: push: + branches-ignore: + - 'dependabot/**' pull_request: merge_group: workflow_dispatch: diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 1968718809124a..89f25b2c163142 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -13,8 +13,11 @@ # limitations under the License. name: Lint Code Base + on: push: + branches-ignore: + - 'dependabot/**' pull_request: merge_group: workflow_dispatch: diff --git a/.github/workflows/minimal-build.yaml b/.github/workflows/minimal-build.yaml index 3320dab5a0b59c..e6514bb72f7cc0 100644 --- a/.github/workflows/minimal-build.yaml +++ b/.github/workflows/minimal-build.yaml @@ -16,6 +16,8 @@ name: Minimal Build (Linux / configure) on: push: + branches-ignore: + - 'dependabot/**' pull_request: merge_group: diff --git a/.github/workflows/qemu.yaml b/.github/workflows/qemu.yaml index 9b6c85592d8755..ba52f767485371 100644 --- a/.github/workflows/qemu.yaml +++ b/.github/workflows/qemu.yaml @@ -16,6 +16,8 @@ name: QEMU on: push: + branches-ignore: + - 'dependabot/**' pull_request: merge_group: diff --git a/.github/workflows/unit_integration_test.yaml b/.github/workflows/unit_integration_test.yaml index 480e9ec74362be..d2e2af12adea65 100644 --- a/.github/workflows/unit_integration_test.yaml +++ b/.github/workflows/unit_integration_test.yaml @@ -16,6 +16,8 @@ name: Unit / Integration Tests on: push: + branches-ignore: + - 'dependabot/**' pull_request: merge_group: From 46b33ad085c53a22950d66fb14da2d4b9c503879 Mon Sep 17 00:00:00 2001 From: chrisdecenzo <61757564+chrisdecenzo@users.noreply.github.com> Date: Tue, 9 Apr 2024 08:27:01 -0700 Subject: [PATCH 005/468] Temp fix for #32875 (network commissioning cluster check for SSID on Thread feature) (#32884) * Temp fix for 32875 * Clarify comments --- .../network-commissioning.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/app/clusters/network-commissioning/network-commissioning.cpp b/src/app/clusters/network-commissioning/network-commissioning.cpp index 8212ea9f8008dc..3ad47b6cee7540 100644 --- a/src/app/clusters/network-commissioning/network-commissioning.cpp +++ b/src/app/clusters/network-commissioning/network-commissioning.cpp @@ -491,12 +491,17 @@ void Instance::HandleScanNetworks(HandlerContext & ctx, const Commands::ScanNetw } else if (mFeatureFlags.Has(Feature::kThreadNetworkInterface)) { + // NOTE: the following lines were commented out due to issue #32875. In short, a popular + // commissioner is passing a null SSID argument and this logic breaks interoperability as a result. + // The spec has some inconsistency on this which also needs to be fixed. The commissioner maker is + // fixing its code and will return to un-comment this code, with that work tracked by Issue #32887. + // // SSID present on Thread violates the `[WI]` conformance. - if (req.ssid.HasValue()) - { - ctx.mCommandHandler.AddStatus(ctx.mRequestPath, Protocols::InteractionModel::Status::InvalidCommand); - return; - } + // if (req.ssid.HasValue()) + // { + // ctx.mCommandHandler.AddStatus(ctx.mRequestPath, Protocols::InteractionModel::Status::InvalidCommand); + // return; + // } mCurrentOperationBreadcrumb = req.breadcrumb; mAsyncCommandHandle = CommandHandler::Handle(&ctx.mCommandHandler); From ff6c19b0edd2d3de6d46ff88a1d16d0b7ee7627c Mon Sep 17 00:00:00 2001 From: Jakub Latusek Date: Tue, 9 Apr 2024 17:35:00 +0200 Subject: [PATCH 006/468] Replace enum to enum class (#32909) --- .../Linux/ConnectivityManagerImpl.cpp | 36 +++++++++---------- src/platform/Linux/ConnectivityManagerImpl.h | 24 ++++++------- .../Linux/bluez/ChipDeviceScanner.cpp | 14 ++++---- src/platform/Linux/bluez/ChipDeviceScanner.h | 12 +++---- 4 files changed, 43 insertions(+), 43 deletions(-) diff --git a/src/platform/Linux/ConnectivityManagerImpl.cpp b/src/platform/Linux/ConnectivityManagerImpl.cpp index 2a57a99d507976..7e7d2a1786b29e 100644 --- a/src/platform/Linux/ConnectivityManagerImpl.cpp +++ b/src/platform/Linux/ConnectivityManagerImpl.cpp @@ -209,7 +209,7 @@ bool ConnectivityManagerImpl::_IsWiFiStationConnected() std::lock_guard lock(mWpaSupplicantMutex); - if (mWpaSupplicant.state != GDBusWpaSupplicant::WPA_INTERFACE_CONNECTED) + if (mWpaSupplicant.state != GDBusWpaSupplicant::WpaState::INTERFACE_CONNECTED) { ChipLogProgress(DeviceLayer, "wpa_supplicant: _IsWiFiStationConnected: interface not connected"); return false; @@ -238,7 +238,7 @@ bool ConnectivityManagerImpl::_IsWiFiStationProvisioned() std::lock_guard lock(mWpaSupplicantMutex); - if (mWpaSupplicant.state != GDBusWpaSupplicant::WPA_INTERFACE_CONNECTED) + if (mWpaSupplicant.state != GDBusWpaSupplicant::WpaState::INTERFACE_CONNECTED) { ChipLogProgress(DeviceLayer, "wpa_supplicant: _IsWiFiStationProvisioned: interface not connected"); return false; @@ -257,7 +257,7 @@ void ConnectivityManagerImpl::_ClearWiFiStationProvision() { std::lock_guard lock(mWpaSupplicantMutex); - if (mWpaSupplicant.state != GDBusWpaSupplicant::WPA_INTERFACE_CONNECTED) + if (mWpaSupplicant.state != GDBusWpaSupplicant::WpaState::INTERFACE_CONNECTED) { ChipLogProgress(DeviceLayer, "wpa_supplicant: _ClearWiFiStationProvision: interface not connected"); return; @@ -280,8 +280,8 @@ bool ConnectivityManagerImpl::_CanStartWiFiScan() { std::lock_guard lock(mWpaSupplicantMutex); - bool ret = mWpaSupplicant.state == GDBusWpaSupplicant::WPA_INTERFACE_CONNECTED && - mWpaSupplicant.scanState == GDBusWpaSupplicant::WIFI_SCANNING_IDLE; + bool ret = mWpaSupplicant.state == GDBusWpaSupplicant::WpaState::INTERFACE_CONNECTED && + mWpaSupplicant.scanState == GDBusWpaSupplicant::WpaScanningState::IDLE; return ret; } @@ -507,7 +507,7 @@ void ConnectivityManagerImpl::_OnWpaInterfaceProxyReady(GObject * sourceObject, if (iface != nullptr && err == nullptr) { mWpaSupplicant.iface = iface; - mWpaSupplicant.state = GDBusWpaSupplicant::WPA_INTERFACE_CONNECTED; + mWpaSupplicant.state = GDBusWpaSupplicant::WpaState::INTERFACE_CONNECTED; ChipLogProgress(DeviceLayer, "wpa_supplicant: connected to wpa_supplicant interface proxy"); g_signal_connect( @@ -527,7 +527,7 @@ void ConnectivityManagerImpl::_OnWpaInterfaceProxyReady(GObject * sourceObject, ChipLogProgress(DeviceLayer, "wpa_supplicant: failed to create wpa_supplicant interface proxy %s: %s", mWpaSupplicant.interfacePath, err ? err->message : "unknown error"); - mWpaSupplicant.state = GDBusWpaSupplicant::WPA_NOT_CONNECTED; + mWpaSupplicant.state = GDBusWpaSupplicant::WpaState::NOT_CONNECTED; } // We need to stop auto scan or it will block our network scan. @@ -584,7 +584,7 @@ void ConnectivityManagerImpl::_OnWpaInterfaceReady(GObject * sourceObject, GAsyn &err.GetReceiver()); if (result) { - mWpaSupplicant.state = GDBusWpaSupplicant::WPA_GOT_INTERFACE_PATH; + mWpaSupplicant.state = GDBusWpaSupplicant::WpaState::GOT_INTERFACE_PATH; ChipLogProgress(DeviceLayer, "wpa_supplicant: WiFi interface: %s", mWpaSupplicant.interfacePath); wpa_fi_w1_wpa_supplicant1_interface_proxy_new_for_bus( @@ -623,7 +623,7 @@ void ConnectivityManagerImpl::_OnWpaInterfaceReady(GObject * sourceObject, GAsyn if (result) { - mWpaSupplicant.state = GDBusWpaSupplicant::WPA_GOT_INTERFACE_PATH; + mWpaSupplicant.state = GDBusWpaSupplicant::WpaState::GOT_INTERFACE_PATH; ChipLogProgress(DeviceLayer, "wpa_supplicant: WiFi interface: %s", mWpaSupplicant.interfacePath); Platform::CopyString(sWiFiIfName, CHIP_DEVICE_CONFIG_WIFI_STATION_IF_NAME); @@ -649,7 +649,7 @@ void ConnectivityManagerImpl::_OnWpaInterfaceReady(GObject * sourceObject, GAsyn ChipLogProgress(DeviceLayer, "wpa_supplicant: failed to create interface %s: %s", CHIP_DEVICE_CONFIG_WIFI_STATION_IF_NAME, error ? error->message : "unknown error"); - mWpaSupplicant.state = GDBusWpaSupplicant::WPA_NO_INTERFACE_PATH; + mWpaSupplicant.state = GDBusWpaSupplicant::WpaState::NO_INTERFACE_PATH; if (mWpaSupplicant.interfacePath) { @@ -676,7 +676,7 @@ void ConnectivityManagerImpl::_OnWpaInterfaceAdded(WpaFiW1Wpa_supplicant1 * prox mWpaSupplicant.interfacePath = const_cast(path); if (mWpaSupplicant.interfacePath) { - mWpaSupplicant.state = GDBusWpaSupplicant::WPA_GOT_INTERFACE_PATH; + mWpaSupplicant.state = GDBusWpaSupplicant::WpaState::GOT_INTERFACE_PATH; ChipLogProgress(DeviceLayer, "wpa_supplicant: WiFi interface added: %s", mWpaSupplicant.interfacePath); wpa_fi_w1_wpa_supplicant1_interface_proxy_new_for_bus( @@ -710,7 +710,7 @@ void ConnectivityManagerImpl::_OnWpaInterfaceRemoved(WpaFiW1Wpa_supplicant1 * pr { ChipLogProgress(DeviceLayer, "wpa_supplicant: WiFi interface removed: %s", StringOrNullMarker(path)); - mWpaSupplicant.state = GDBusWpaSupplicant::WPA_NO_INTERFACE_PATH; + mWpaSupplicant.state = GDBusWpaSupplicant::WpaState::NO_INTERFACE_PATH; if (mWpaSupplicant.interfacePath) { @@ -730,7 +730,7 @@ void ConnectivityManagerImpl::_OnWpaInterfaceRemoved(WpaFiW1Wpa_supplicant1 * pr mWpaSupplicant.bss = nullptr; } - mWpaSupplicant.scanState = GDBusWpaSupplicant::WIFI_SCANNING_IDLE; + mWpaSupplicant.scanState = GDBusWpaSupplicant::WpaScanningState::IDLE; } } @@ -747,7 +747,7 @@ void ConnectivityManagerImpl::_OnWpaProxyReady(GObject * sourceObject, GAsyncRes mWpaSupplicant.proxy = wpa_fi_w1_wpa_supplicant1_proxy_new_for_bus_finish(res, &err.GetReceiver()); if (mWpaSupplicant.proxy != nullptr && err.get() == nullptr) { - mWpaSupplicant.state = GDBusWpaSupplicant::WPA_CONNECTED; + mWpaSupplicant.state = GDBusWpaSupplicant::WpaState::CONNECTED; ChipLogProgress(DeviceLayer, "wpa_supplicant: connected to wpa_supplicant proxy"); g_signal_connect( @@ -773,7 +773,7 @@ void ConnectivityManagerImpl::_OnWpaProxyReady(GObject * sourceObject, GAsyncRes { ChipLogProgress(DeviceLayer, "wpa_supplicant: failed to create wpa_supplicant proxy %s", err ? err->message : "unknown error"); - mWpaSupplicant.state = GDBusWpaSupplicant::WPA_NOT_CONNECTED; + mWpaSupplicant.state = GDBusWpaSupplicant::WpaState::NOT_CONNECTED; } } @@ -793,7 +793,7 @@ bool ConnectivityManagerImpl::IsWiFiManagementStarted() { std::lock_guard lock(mWpaSupplicantMutex); - bool ret = mWpaSupplicant.state == GDBusWpaSupplicant::WPA_INTERFACE_CONNECTED; + bool ret = mWpaSupplicant.state == GDBusWpaSupplicant::WpaState::INTERFACE_CONNECTED; return ret; } @@ -1322,7 +1322,7 @@ CHIP_ERROR ConnectivityManagerImpl::CommitConfig() std::lock_guard lock(mWpaSupplicantMutex); - if (mWpaSupplicant.state != GDBusWpaSupplicant::WPA_INTERFACE_CONNECTED) + if (mWpaSupplicant.state != GDBusWpaSupplicant::WpaState::INTERFACE_CONNECTED) { ChipLogError(DeviceLayer, "wpa_supplicant: CommitConfig: interface proxy not connected"); return CHIP_ERROR_INCORRECT_STATE; @@ -1391,7 +1391,7 @@ CHIP_ERROR ConnectivityManagerImpl::GetWiFiSecurityType(SecurityTypeEnum & secur std::lock_guard lock(mWpaSupplicantMutex); - if (mWpaSupplicant.state != GDBusWpaSupplicant::WPA_INTERFACE_CONNECTED) + if (mWpaSupplicant.state != GDBusWpaSupplicant::WpaState::INTERFACE_CONNECTED) { ChipLogError(DeviceLayer, "wpa_supplicant: GetWiFiSecurityType: interface proxy not connected"); return CHIP_ERROR_INCORRECT_STATE; diff --git a/src/platform/Linux/ConnectivityManagerImpl.h b/src/platform/Linux/ConnectivityManagerImpl.h index 26d6172ad438eb..ee5978faf6ff70 100644 --- a/src/platform/Linux/ConnectivityManagerImpl.h +++ b/src/platform/Linux/ConnectivityManagerImpl.h @@ -66,25 +66,25 @@ namespace DeviceLayer { #if CHIP_DEVICE_CONFIG_ENABLE_WPA struct GDBusWpaSupplicant { - enum WpaState + enum class WpaState { INIT, - WPA_CONNECTING, - WPA_CONNECTED, - WPA_NOT_CONNECTED, - WPA_NO_INTERFACE_PATH, - WPA_GOT_INTERFACE_PATH, - WPA_INTERFACE_CONNECTED, + CONNECTING, + CONNECTED, + NOT_CONNECTED, + NO_INTERFACE_PATH, + GOT_INTERFACE_PATH, + INTERFACE_CONNECTED, }; - enum WpaScanning + enum class WpaScanningState { - WIFI_SCANNING_IDLE, - WIFI_SCANNING, + IDLE, + SCANNING, }; - WpaState state = INIT; - WpaScanning scanState = WIFI_SCANNING_IDLE; + WpaState state = WpaState::INIT; + WpaScanningState scanState = WpaScanningState::IDLE; WpaFiW1Wpa_supplicant1 * proxy = nullptr; WpaFiW1Wpa_supplicant1Interface * iface = nullptr; WpaFiW1Wpa_supplicant1BSS * bss = nullptr; diff --git a/src/platform/Linux/bluez/ChipDeviceScanner.cpp b/src/platform/Linux/bluez/ChipDeviceScanner.cpp index 2842da85256dad..28a9baa358b33f 100644 --- a/src/platform/Linux/bluez/ChipDeviceScanner.cpp +++ b/src/platform/Linux/bluez/ChipDeviceScanner.cpp @@ -65,14 +65,14 @@ CHIP_ERROR ChipDeviceScanner::Init(BluezAdapter1 * adapter, ChipDeviceScannerDel mAdapter.reset(reinterpret_cast(g_object_ref(adapter))); mDelegate = delegate; - mScannerState = ChipDeviceScannerState::SCANNER_INITIALIZED; + mScannerState = ChipDeviceScannerState::INITIALIZED; return CHIP_NO_ERROR; } void ChipDeviceScanner::Shutdown() { - VerifyOrReturn(mScannerState != ChipDeviceScannerState::SCANNER_UNINITIALIZED); + VerifyOrReturn(mScannerState != ChipDeviceScannerState::UNINITIALIZED); StopScan(); @@ -86,13 +86,13 @@ void ChipDeviceScanner::Shutdown() }, this); - mScannerState = ChipDeviceScannerState::SCANNER_UNINITIALIZED; + mScannerState = ChipDeviceScannerState::UNINITIALIZED; } CHIP_ERROR ChipDeviceScanner::StartScan() { assertChipStackLockedByCurrentThread(); - VerifyOrReturnError(mScannerState != ChipDeviceScannerState::SCANNER_SCANNING, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(mScannerState != ChipDeviceScannerState::SCANNING, CHIP_ERROR_INCORRECT_STATE); mCancellable.reset(g_cancellable_new()); CHIP_ERROR err = PlatformMgrImpl().GLibMatterContextInvokeSync( @@ -104,7 +104,7 @@ CHIP_ERROR ChipDeviceScanner::StartScan() return err; } - mScannerState = ChipDeviceScannerState::SCANNER_SCANNING; + mScannerState = ChipDeviceScannerState::SCANNING; ChipLogDetail(Ble, "ChipDeviceScanner has started scanning!"); return CHIP_NO_ERROR; @@ -113,7 +113,7 @@ CHIP_ERROR ChipDeviceScanner::StartScan() CHIP_ERROR ChipDeviceScanner::StopScan() { assertChipStackLockedByCurrentThread(); - VerifyOrReturnError(mScannerState == ChipDeviceScannerState::SCANNER_SCANNING, CHIP_NO_ERROR); + VerifyOrReturnError(mScannerState == ChipDeviceScannerState::SCANNING, CHIP_NO_ERROR); CHIP_ERROR err = PlatformMgrImpl().GLibMatterContextInvokeSync( +[](ChipDeviceScanner * self) { return self->StopScanImpl(); }, this); @@ -124,7 +124,7 @@ CHIP_ERROR ChipDeviceScanner::StopScan() } // Stop scanning and return to initialization state - mScannerState = ChipDeviceScannerState::SCANNER_INITIALIZED; + mScannerState = ChipDeviceScannerState::INITIALIZED; ChipLogDetail(Ble, "ChipDeviceScanner has stopped scanning!"); diff --git a/src/platform/Linux/bluez/ChipDeviceScanner.h b/src/platform/Linux/bluez/ChipDeviceScanner.h index d3730527589bfc..ead9467fdc29ef 100644 --- a/src/platform/Linux/bluez/ChipDeviceScanner.h +++ b/src/platform/Linux/bluez/ChipDeviceScanner.h @@ -79,7 +79,7 @@ class ChipDeviceScanner : public BluezObjectManagerAdapterNotificationsDelegate CHIP_ERROR StopScan(); /// Check if the scanner is active - bool IsScanning() const { return mScannerState == ChipDeviceScannerState::SCANNER_SCANNING; } + bool IsScanning() const { return mScannerState == ChipDeviceScannerState::SCANNING; } /// Members that implement virtual methods on BluezObjectManagerAdapterNotificationsDelegate void OnDeviceAdded(BluezDevice1 & device) override; @@ -87,11 +87,11 @@ class ChipDeviceScanner : public BluezObjectManagerAdapterNotificationsDelegate void OnDeviceRemoved(BluezDevice1 & device) override {} private: - enum ChipDeviceScannerState + enum class ChipDeviceScannerState { - SCANNER_UNINITIALIZED, - SCANNER_INITIALIZED, - SCANNER_SCANNING + UNINITIALIZED, + INITIALIZED, + SCANNING }; CHIP_ERROR StartScanImpl(); @@ -108,7 +108,7 @@ class ChipDeviceScanner : public BluezObjectManagerAdapterNotificationsDelegate GAutoPtr mAdapter; ChipDeviceScannerDelegate * mDelegate = nullptr; - ChipDeviceScannerState mScannerState = ChipDeviceScannerState::SCANNER_UNINITIALIZED; + ChipDeviceScannerState mScannerState = ChipDeviceScannerState::UNINITIALIZED; GAutoPtr mCancellable; }; From fffec4ceea26c7c196616b5d3423cbd8ea273a47 Mon Sep 17 00:00:00 2001 From: Arkadiusz Bokowy Date: Tue, 9 Apr 2024 18:11:53 +0200 Subject: [PATCH 007/468] Remove CHIPoBLE testing dead code (#32910) * Remove CHIPoBLE testing dead code * Remove legacy TX queue locking functions * Do not turn off clang-format * Fix spelling typos --- src/ble/BLEEndPoint.cpp | 124 +++++------------------------- src/ble/BLEEndPoint.h | 34 -------- src/ble/BUILD.gn | 5 +- src/ble/BleConfig.h | 14 +--- src/ble/BleLayer.cpp | 8 -- src/ble/BleLayer.h | 15 +--- src/ble/BtpEngine.cpp | 44 +---------- src/ble/BtpEngine.h | 42 +--------- src/ble/tests/TestBleErrorStr.cpp | 5 +- 9 files changed, 31 insertions(+), 260 deletions(-) diff --git a/src/ble/BLEEndPoint.cpp b/src/ble/BLEEndPoint.cpp index 5f60c009753cbe..840a668be0a62a 100644 --- a/src/ble/BLEEndPoint.cpp +++ b/src/ble/BLEEndPoint.cpp @@ -41,17 +41,12 @@ #include #include #include -#if CHIP_ENABLE_CHIPOBLE_TEST -#include "BtpEngineTest.h" -#endif - -// clang-format off // Define below to enable extremely verbose, BLE end point-specific debug logging. #undef CHIP_BLE_END_POINT_DEBUG_LOGGING_ENABLED #ifdef CHIP_BLE_END_POINT_DEBUG_LOGGING_ENABLED -#define ChipLogDebugBleEndPoint(MOD, MSG, ...) ChipLogDetail(MOD, MSG, ## __VA_ARGS__) +#define ChipLogDebugBleEndPoint(MOD, MSG, ...) ChipLogDetail(MOD, MSG, ##__VA_ARGS__) #else #define ChipLogDebugBleEndPoint(MOD, MSG, ...) #endif @@ -64,7 +59,7 @@ * packet to re-open its window instead of waiting for the send-ack timer to expire. * */ -#define BLE_CONFIG_IMMEDIATE_ACK_WINDOW_THRESHOLD 1 +#define BLE_CONFIG_IMMEDIATE_ACK_WINDOW_THRESHOLD 1 /** * @def BLE_UNSUBSCRIBE_TIMEOUT_MS @@ -74,14 +69,18 @@ * before it automatically releases its BLE connection and frees itself. The default value of 5 seconds is arbitrary. * */ -#define BLE_UNSUBSCRIBE_TIMEOUT_MS 5000 // 5 seconds - -#define BTP_ACK_SEND_TIMEOUT_MS 2500 // 2.5 seconds +#define BLE_UNSUBSCRIBE_TIMEOUT_MS 5000 -#define BTP_WINDOW_NO_ACK_SEND_THRESHOLD 1 // Data fragments may only be sent without piggybacked - // acks if receiver's window size is above this threshold. +#define BTP_ACK_SEND_TIMEOUT_MS 2500 -// clang-format on +/** + * @def BTP_WINDOW_NO_ACK_SEND_THRESHOLD + * + * @brief + * Data fragments may only be sent without piggybacked acks if receiver's window size is above this threshold. + * + */ +#define BTP_WINDOW_NO_ACK_SEND_THRESHOLD 1 namespace chip { namespace Ble { @@ -204,18 +203,13 @@ void BLEEndPoint::HandleSubscribeReceived() VerifyOrExit(!mSendQueue.IsNull(), err = CHIP_ERROR_INCORRECT_STATE); // Send BTP capabilities response to peripheral via GATT indication. -#if CHIP_ENABLE_CHIPOBLE_TEST - VerifyOrExit(mBtpEngine.PopPacketTag(mSendQueue) == kType_Data, err = BLE_ERROR_INVALID_BTP_HEADER_FLAGS); -#endif // Add reference to message fragment for duration of platform's GATT indication attempt. CHIP retains partial // ownership of message fragment's packet buffer, since this is the same buffer as that of the whole message, just // with a fragmenter-modified payload offset and data length. if (!SendIndication(mSendQueue.Retain())) { // Ensure transmit queue is empty and set to NULL. - QueueTxLock(); mSendQueue = nullptr; - QueueTxUnlock(); ChipLogError(Ble, "cap resp ind failed"); err = BLE_ERROR_GATT_INDICATE_FAILED; @@ -289,9 +283,6 @@ void BLEEndPoint::Abort() OnConnectComplete = nullptr; OnConnectionClosed = nullptr; OnMessageReceived = nullptr; -#if CHIP_ENABLE_CHIPOBLE_TEST - OnCommandReceived = NULL; -#endif DoClose(kBleCloseFlag_SuppressCallback | kBleCloseFlag_AbortTransmission, CHIP_NO_ERROR); } @@ -302,9 +293,6 @@ void BLEEndPoint::Close() OnConnectComplete = nullptr; OnConnectionClosed = nullptr; OnMessageReceived = nullptr; -#if CHIP_ENABLE_CHIPOBLE_TEST - OnCommandReceived = NULL; -#endif DoClose(kBleCloseFlag_SuppressCallback, CHIP_NO_ERROR); } @@ -364,9 +352,7 @@ void BLEEndPoint::FinalizeClose(uint8_t oldState, uint8_t flags, CHIP_ERROR err) mState = kState_Closed; // Ensure transmit queue is empty and set to NULL. - QueueTxLock(); mSendQueue = nullptr; - QueueTxUnlock(); // Fire application's close callback if we haven't already, and it's not suppressed. if (oldState != kState_Closing && (flags & kBleCloseFlag_SuppressCallback) == 0) @@ -486,11 +472,6 @@ void BLEEndPoint::Free() StopAckReceivedTimer(); StopSendAckTimer(); StopUnsubscribeTimer(); -#if CHIP_ENABLE_CHIPOBLE_TEST - mBtpEngineTest.StopTestTimer(); - // Clear callback - OnCommandReceived = NULL; -#endif // Clear callbacks. OnConnectComplete = nullptr; @@ -524,7 +505,7 @@ CHIP_ERROR BLEEndPoint::Init(BleLayer * bleLayer, BLE_CONNECTION_OBJECT connObj, VerifyOrReturnError((role == kBleRole_Central || role == kBleRole_Peripheral), CHIP_ERROR_INVALID_ARGUMENT); // If end point plays peripheral role, expect ack for indication sent as last step of BTP handshake. - // If central, periperal's handshake indication 'ack's write sent by central to kick off the BTP handshake. + // If central, peripheral's handshake indication 'ack's write sent by central to kick off the BTP handshake. bool expectInitialAck = (role == kBleRole_Peripheral); CHIP_ERROR err = mBtpEngine.Init(this, expectInitialAck); @@ -534,21 +515,6 @@ CHIP_ERROR BLEEndPoint::Init(BleLayer * bleLayer, BLE_CONNECTION_OBJECT connObj, return err; } -#if CHIP_ENABLE_CHIPOBLE_TEST - err = static_cast(mTxQueueMutex.Init(mTxQueueMutex)); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Ble, "%s: Mutex init failed", __FUNCTION__); - return err; - } - err = mBtpEngineTest.Init(this); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Ble, "BTP test init failed"); - return err; - } -#endif - mBle = bleLayer; mRefCount = 1; @@ -630,13 +596,6 @@ CHIP_ERROR BLEEndPoint::SendCharacteristic(PacketBufferHandle && buf) */ void BLEEndPoint::QueueTx(PacketBufferHandle && data, PacketType_t type) { -#if CHIP_ENABLE_CHIPOBLE_TEST - ChipLogDebugBleEndPoint(Ble, "%s: data->%p, type %d, len %d", __FUNCTION__, data, type, data->DataLength()); - mBtpEngine.PushPacketTag(data, type); -#endif - - QueueTxLock(); - if (mSendQueue.IsNull()) { mSendQueue = std::move(data); @@ -647,8 +606,6 @@ void BLEEndPoint::QueueTx(PacketBufferHandle && data, PacketType_t type) mSendQueue->AddToEnd(std::move(data)); ChipLogDebugBleEndPoint(Ble, "%s: Append data to mSendQueue %p, type %d", __FUNCTION__, mSendQueue->Start(), type); } - - QueueTxUnlock(); } CHIP_ERROR BLEEndPoint::Send(PacketBufferHandle && data) @@ -714,26 +671,7 @@ bool BLEEndPoint::PrepareNextFragment(PacketBufferHandle && data, bool & sentAck CHIP_ERROR BLEEndPoint::SendNextMessage() { // Get the first queued packet to send - QueueTxLock(); -#if CHIP_ENABLE_CHIPOBLE_TEST - // Return if tx queue is empty - // Note: PopHead() does not check an empty queue - if (mSendQueue.IsNull()) - { - QueueTxUnlock(); - return CHIP_NO_ERROR; - } -#endif - PacketBufferHandle data = mSendQueue.PopHead(); - QueueTxUnlock(); - -#if CHIP_ENABLE_CHIPOBLE_TEST - // Get and consume the packet tag in message buffer - PacketType_t type = mBtpEngine.PopPacketTag(data); - mBtpEngine.SetTxPacketType(type); - mBtpEngineTest.DoTxTiming(data, BTP_TX_START); -#endif // Hand whole message payload to the fragmenter. bool sentAck; @@ -799,9 +737,7 @@ CHIP_ERROR BLEEndPoint::HandleHandshakeConfirmationReceived() uint8_t closeFlags = kBleCloseFlag_AbortTransmission; // Free capabilities request/response payload. - QueueTxLock(); mSendQueue.FreeHead(); - QueueTxUnlock(); if (mRole == kBleRole_Central) { @@ -831,7 +767,7 @@ CHIP_ERROR BLEEndPoint::HandleHandshakeConfirmationReceived() } else { - // Drive sending in case application callend Send() after we sent the handshake indication, but + // Drive sending in case application called Send() after we sent the handshake indication, but // before the GATT confirmation for this indication was received. err = DriveSending(); SuccessOrExit(err); @@ -1020,9 +956,6 @@ CHIP_ERROR BLEEndPoint::DriveSending() // Clear fragmenter's pointer to sent message buffer and reset its Tx state. // Buffer will be freed at scope exit. PacketBufferHandle sentBuf = mBtpEngine.TakeTxPacket(); -#if CHIP_ENABLE_CHIPOBLE_TEST - mBtpEngineTest.DoTxTiming(sentBuf, BTP_TX_DONE); -#endif // CHIP_ENABLE_CHIPOBLE_TEST if (!mSendQueue.IsNull()) { @@ -1201,13 +1134,6 @@ CHIP_ERROR BLEEndPoint::Receive(PacketBufferHandle && data) uint8_t closeFlags = kBleCloseFlag_AbortTransmission; bool didReceiveAck = false; -#if CHIP_ENABLE_CHIPOBLE_TEST - if (mBtpEngine.IsCommandPacket(data)) - { - ChipLogDebugBleEndPoint(Ble, "%s: Received Control frame: Flags %x", __FUNCTION__, *(data->Start())); - } - else -#endif { // This is a special handling on the first CHIPoBLE data packet, the CapabilitiesRequest. // Suppress error logging if peer's send overlaps with our unsubscribe on final close. if (IsUnsubscribePending()) @@ -1283,7 +1209,7 @@ CHIP_ERROR BLEEndPoint::Receive(PacketBufferHandle && data) { ChipLogDebugBleEndPoint(Ble, "got btp ack = %u", receivedAck); - // If ack was rx'd for neweset unacked sent fragment, stop ack received timer. + // If ack was rx'd for newest unacked sent fragment, stop ack received timer. if (!mBtpEngine.ExpectingAck()) { ChipLogDebugBleEndPoint(Ble, "got ack for last outstanding fragment"); @@ -1359,24 +1285,12 @@ CHIP_ERROR BLEEndPoint::Receive(PacketBufferHandle && data) ChipLogDebugBleEndPoint(Ble, "reassembled whole msg, len = %d", full_packet->DataLength()); -#if CHIP_ENABLE_CHIPOBLE_TEST - // If we have a control message received callback, and end point is not closing... - if (mBtpEngine.RxPacketType() == kType_Control && OnCommandReceived && mState != kState_Closing) + // If we have a message received callback, and end point is not closing... + if (mBleTransport != nullptr && mState != kState_Closing) { - ChipLogDebugBleEndPoint(Ble, "%s: calling OnCommandReceived, seq# %u, len = %u, type %u", __FUNCTION__, receivedAck, - full_packet->DataLength(), mBtpEngine.RxPacketType()); - // Pass received control message up the stack. - mBtpEngine.SetRxPacketSeq(receivedAck); - OnCommandReceived(this, std::move(full_packet)); + // Pass received message up the stack. + mBleTransport->OnEndPointMessageReceived(this, std::move(full_packet)); } - else -#endif - // If we have a message received callback, and end point is not closing... - if (mBleTransport != nullptr && mState != kState_Closing) - { - // Pass received message up the stack. - mBleTransport->OnEndPointMessageReceived(this, std::move(full_packet)); - } } exit: diff --git a/src/ble/BLEEndPoint.h b/src/ble/BLEEndPoint.h index dba18fc5b43511..1bce51e1671419 100644 --- a/src/ble/BLEEndPoint.h +++ b/src/ble/BLEEndPoint.h @@ -32,11 +32,6 @@ #include #include -#if CHIP_ENABLE_CHIPOBLE_TEST -#include -#include -#endif - namespace chip { namespace Ble { @@ -53,17 +48,11 @@ class BleLayer; class BleEndPointPool; // BLEEndPoint holds a pointer to BleLayerDelegate for messages, while BleLayerDelegate functions also accepts BLEEndPoint. class BleLayerDelegate; -#if CHIP_ENABLE_CHIPOBLE_TEST -class BtpEngineTest; -#endif class DLL_EXPORT BLEEndPoint { friend class BleLayer; friend class BleEndPointPool; -#if CHIP_ENABLE_CHIPOBLE_TEST - friend class BtpEngineTest; -#endif public: typedef uint64_t AlignT; @@ -90,15 +79,6 @@ class DLL_EXPORT BLEEndPoint typedef void (*OnConnectionClosedFunct)(BLEEndPoint * endPoint, CHIP_ERROR err); OnConnectionClosedFunct OnConnectionClosed; -#if CHIP_ENABLE_CHIPOBLE_TEST - typedef void (*OnCommandReceivedFunct)(BLEEndPoint * endPoint, PacketBufferHandle && msg); - OnCommandReceivedFunct OnCommandReceived; - inline void SetOnCommandReceivedCB(OnCommandReceivedFunct cb) { OnCommandReceived = cb; }; - BtpEngineTest mBtpEngineTest; - inline void SetTxWindowSize(uint8_t size) { mRemoteReceiveWindowSize = size; }; - inline void SetRxWindowSize(uint8_t size) { mReceiveWindowMaxSize = size; }; -#endif - // Public functions: CHIP_ERROR Send(PacketBufferHandle && data); CHIP_ERROR Receive(PacketBufferHandle && data); @@ -137,9 +117,6 @@ class DLL_EXPORT BLEEndPoint kAckReceivedTimerRunning = 0x04, // Ack received timer running due to unacked sent fragment. kSendAckTimerRunning = 0x08, // Send ack timer running; indicates pending ack to send. kUnsubscribeTimerRunning = 0x10, // Unsubscribe completion timer running. -#if CHIP_ENABLE_CHIPOBLE_TEST - kUnderTestTimerRunnung = 0x80 // running throughput Tx test -#endif }; // BLE connection to which an end point is uniquely bound. Type BLE_CONNECTION_OBJECT is defined by the platform or @@ -164,9 +141,6 @@ class DLL_EXPORT BLEEndPoint SequenceNumber_t mLocalReceiveWindowSize; SequenceNumber_t mRemoteReceiveWindowSize; SequenceNumber_t mReceiveWindowMaxSize; -#if CHIP_ENABLE_CHIPOBLE_TEST - chip::System::Mutex mTxQueueMutex; // For MT-safe Tx queuing -#endif // Private functions: BLEEndPoint() = delete; @@ -228,14 +202,6 @@ class DLL_EXPORT BLEEndPoint void Free(); void FreeBtpEngine(); - // Mutex lock on Tx queue. Used only in BtpEngine test build for now. -#if CHIP_ENABLE_CHIPOBLE_TEST - inline void QueueTxLock() { mTxQueueMutex.Lock(); } - inline void QueueTxUnlock() { mTxQueueMutex.Unlock(); } -#else - inline void QueueTxLock() {} - inline void QueueTxUnlock() {} -#endif void QueueTx(PacketBufferHandle && data, PacketType_t type); }; diff --git a/src/ble/BUILD.gn b/src/ble/BUILD.gn index bfdc3db2548044..508d420f665107 100644 --- a/src/ble/BUILD.gn +++ b/src/ble/BUILD.gn @@ -29,10 +29,7 @@ buildconfig_header("ble_buildconfig") { header = "BleBuildConfig.h" header_dir = "ble" - defines = [ - "CONFIG_NETWORK_LAYER_BLE=${chip_config_network_layer_ble}", - "CHIP_ENABLE_CHIPOBLE_TEST=false", - ] + defines = [ "CONFIG_NETWORK_LAYER_BLE=${chip_config_network_layer_ble}" ] if (chip_ble_project_config_include != "") { defines += diff --git a/src/ble/BleConfig.h b/src/ble/BleConfig.h index 91005a20882fc1..c6d7877081f340 100644 --- a/src/ble/BleConfig.h +++ b/src/ble/BleConfig.h @@ -65,9 +65,6 @@ #include BLE_PLATFORM_CONFIG_INCLUDE #endif -// clang-format off - - /** * @def BLE_LAYER_NUM_BLE_ENDPOINTS * @@ -102,7 +99,7 @@ * */ #ifndef BLE_CONNECTION_OBJECT -#define BLE_CONNECTION_OBJECT void* +#define BLE_CONNECTION_OBJECT void * #endif // BLE_CONNECTION_OBJECT /** @@ -129,7 +126,7 @@ * */ #ifndef BLE_READ_REQUEST_CONTEXT -#define BLE_READ_REQUEST_CONTEXT void* +#define BLE_READ_REQUEST_CONTEXT void * #endif // BLE_READ_REQUEST_CONTEXT /** @@ -197,7 +194,6 @@ #define BLE_CONFIG_ERROR(e) (BLE_CONFIG_ERROR_MIN + (e)) #endif // BLE_CONFIG_ERROR - /** * @def BTP_CONN_RSP_TIMEOUT_MS * @@ -206,7 +202,7 @@ * request to wait for connection establishment. */ #ifndef BTP_CONN_RSP_TIMEOUT_MS -#define BTP_CONN_RSP_TIMEOUT_MS 15000 // 15 seconds +#define BTP_CONN_RSP_TIMEOUT_MS 15000 #endif // BTP_CONN_RSP_TIMEOUT_MS /** @@ -217,9 +213,7 @@ * an acknowledgement. When the ack is not received within this period the BTP session is closed. */ #ifndef BTP_ACK_TIMEOUT_MS -#define BTP_ACK_TIMEOUT_MS 15000 // 15 seconds +#define BTP_ACK_TIMEOUT_MS 15000 #endif // BTP_ACK_TIMEOUT_MS -// clang-format on - #include diff --git a/src/ble/BleLayer.cpp b/src/ble/BleLayer.cpp index eae49a0bfa8dd1..0472d70ac28d2c 100644 --- a/src/ble/BleLayer.cpp +++ b/src/ble/BleLayer.cpp @@ -287,10 +287,6 @@ CHIP_ERROR BleLayer::Init(BlePlatformDelegate * platformDelegate, BleConnectionD mState = kState_Initialized; -#if CHIP_ENABLE_CHIPOBLE_TEST - mTestBleEndPoint = NULL; -#endif - return CHIP_NO_ERROR; } @@ -444,10 +440,6 @@ CHIP_ERROR BleLayer::NewBleEndPoint(BLEEndPoint ** retEndPoint, BLE_CONNECTION_O (*retEndPoint)->Init(this, connObj, role, autoClose); (*retEndPoint)->mBleTransport = mBleTransport; -#if CHIP_ENABLE_CHIPOBLE_TEST - mTestBleEndPoint = *retEndPoint; -#endif - return CHIP_NO_ERROR; } diff --git a/src/ble/BleLayer.h b/src/ble/BleLayer.h index af2267b770fcf8..a1c4d191672617 100644 --- a/src/ble/BleLayer.h +++ b/src/ble/BleLayer.h @@ -22,7 +22,7 @@ * platform's Bluetooth Low Energy (BLE) implementation and the CHIP * stack. * - * The BleLayer obect accepts BLE data and control input from the + * The BleLayer object accepts BLE data and control input from the * application via a functional interface. It performs the fragmentation * and reassembly required to transmit CHIP message via a BLE GATT * characteristic interface, and drives incoming messages up the CHIP @@ -197,7 +197,7 @@ class BleTransportCapabilitiesResponseMessage * and hand the platform-specific BLE_CONNECTION_OBJECT that this receipt * generates to BleLayer via the corresponding platform interface function. * This causes BleLayer to wrap the BLE_CONNECTION_OBJECT in a BLEEndPoint, - * and notify chipMessageLayer that a new BLE conneciotn has been received. + * and notify chipMessageLayer that a new BLE connection has been received. * The message layer then wraps the new BLEEndPoint object in a * chipConnection, and hands this object to the application via the message * layer's OnConnectionReceived callback. @@ -214,9 +214,6 @@ class BleTransportCapabilitiesResponseMessage class DLL_EXPORT BleLayer { friend class BLEEndPoint; -#if CHIP_ENABLE_CHIPOBLE_TEST - friend class BtpEngineTest; -#endif public: // Public data members: @@ -271,7 +268,7 @@ class DLL_EXPORT BleLayer * characteristics CHIP cares about. * Platform must call this function when a GATT subscription has been established to any CHIP service - * charateristic. + * characteristic. * * If this function returns true, CHIP has accepted the BLE connection and wrapped it * in a chipConnection object. If CHIP accepts a BLE connection, the platform MUST @@ -283,7 +280,7 @@ class DLL_EXPORT BleLayer bool HandleSubscribeComplete(BLE_CONNECTION_OBJECT connObj, const ChipBleUUID * svcId, const ChipBleUUID * charId); /**< Platform must call this function when a GATT unsubscribe is requested on any CHIP - * service charateristic, that is, when an existing GATT subscription on a CHIP service + * service characteristic, that is, when an existing GATT subscription on a CHIP service * characteristic is canceled. */ bool HandleUnsubscribeReceived(BLE_CONNECTION_OBJECT connObj, const ChipBleUUID * svcId, const ChipBleUUID * charId); @@ -319,10 +316,6 @@ class DLL_EXPORT BleLayer * err = BLE_ERROR_APP_CLOSED_CONNECTION to prevent the leak of this chipConnection and its end point object. */ void HandleConnectionError(BLE_CONNECTION_OBJECT connObj, CHIP_ERROR err); -#if CHIP_ENABLE_CHIPOBLE_TEST - BLEEndPoint * mTestBleEndPoint; -#endif - private: // Private data members: diff --git a/src/ble/BtpEngine.cpp b/src/ble/BtpEngine.cpp index 3183c6db79aed1..cb3ac8ee092e2a 100644 --- a/src/ble/BtpEngine.cpp +++ b/src/ble/BtpEngine.cpp @@ -30,9 +30,6 @@ #if CONFIG_NETWORK_LAYER_BLE #include -#if CHIP_ENABLE_CHIPOBLE_TEST -#include -#endif #include #include @@ -93,10 +90,6 @@ CHIP_ERROR BtpEngine::Init(void * an_app_state, bool expect_first_ack) mTxPacketCount = 0; mTxNewestUnackedSeqNum = 0; mTxOldestUnackedSeqNum = 0; -#if CHIP_ENABLE_CHIPOBLE_TEST - mTxPacketType = kType_Data; // Default BtpEngine Data packet - mRxPacketType = kType_Data; // Default BtpEngine Data packet -#endif if (expect_first_ack) { @@ -144,25 +137,6 @@ SequenceNumber_t BtpEngine::GetAndRecordRxAckSeqNum() return ret; } -#if CHIP_ENABLE_CHIPOBLE_TEST -bool BtpEngine::IsCommandPacket(const PacketBufferHandle & p) -{ - if (p.IsNull()) - { - return false; - } - - BitFlags rx_flags; - Encoding::LittleEndian::Reader reader(data->Start(), data->DataLength()); - CHIP_ERROR err = reader.Read8(rx_flags.RawStorage()).StatusCode(); - if (err != CHIP_NO_ERROR) - { - return false; - } - return rx_flags.Has(HeaderFlags::kCommandMessage); -} -#endif // CHIP_ENABLE_CHIPOBLE_TEST - bool BtpEngine::HasUnackedData() const { return (mRxOldestUnackedSeqNum != mRxNextSeqNum); @@ -271,12 +245,6 @@ CHIP_ERROR BtpEngine::HandleCharacteristicReceived(System::PacketBufferHandle && // Get header flags, always in first byte. err = reader.Read8(rx_flags.RawStorage()).StatusCode(); SuccessOrExit(err); -#if CHIP_ENABLE_CHIPOBLE_TEST - if (rx_flags.Has(HeaderFlags::kCommandMessage)) - SetRxPacketType(kType_Control); - else - SetRxPacketType(kType_Data); -#endif didReceiveAck = rx_flags.Has(HeaderFlags::kFragmentAck); @@ -307,7 +275,7 @@ CHIP_ERROR BtpEngine::HandleCharacteristicReceived(System::PacketBufferHandle && } // Truncate the incoming fragment length by the mRxFragmentSize as the negotiated - // mRxFragnentSize may be smaller than the characteristic size. Make sure + // mRxFragmentSize may be smaller than the characteristic size. Make sure // we're not truncating to a data length smaller than what we have already consumed. VerifyOrExit(reader.OctetsRead() <= mRxFragmentSize, err = BLE_ERROR_REASSEMBLER_INCORRECT_STATE); data->SetDataLength(chip::min(data->DataLength(), mRxFragmentSize)); @@ -483,11 +451,6 @@ bool BtpEngine::HandleCharacteristicSend(System::PacketBufferHandle data, bool s uint8_t cursor = 1; // first position past header flags byte BitFlags headerFlags(HeaderFlags::kStartMessage); -#if CHIP_ENABLE_CHIPOBLE_TEST - if (TxPacketType() == kType_Control) - headerFlags.Set(HeaderFlags::kCommandMessage); -#endif - if (send_ack) { headerFlags.Set(HeaderFlags::kFragmentAck); @@ -536,11 +499,6 @@ bool BtpEngine::HandleCharacteristicSend(System::PacketBufferHandle data, bool s BitFlags headerFlags(HeaderFlags::kContinueMessage); -#if CHIP_ENABLE_CHIPOBLE_TEST - if (TxPacketType() == kType_Control) - headerFlags.Set(HeaderFlags::kCommandMessage); -#endif - if (send_ack) { headerFlags.Set(HeaderFlags::kFragmentAck); diff --git a/src/ble/BtpEngine.h b/src/ble/BtpEngine.h index 2055c2a9c1cfbb..0e1ed33789f513 100644 --- a/src/ble/BtpEngine.h +++ b/src/ble/BtpEngine.h @@ -39,7 +39,7 @@ namespace chip { namespace Ble { -inline constexpr size_t kTransferProtocolHeaderFlagsSize = 1; // Size in bytes of enocded BTP fragment header flag bits +inline constexpr size_t kTransferProtocolHeaderFlagsSize = 1; // Size in bytes of encoded BTP fragment header flag bits inline constexpr size_t kTransferProtocolSequenceNumSize = 1; // Size in bytes of encoded BTP sequence number inline constexpr size_t kTransferProtocolAckSize = 1; // Size in bytes of encoded BTP fragment acknowledgement number inline constexpr size_t kTransferProtocolMsgLenSize = 2; // Size in byte of encoded BTP total fragmented message length @@ -56,10 +56,6 @@ using ::chip::System::PacketBufferHandle; typedef uint8_t SequenceNumber_t; // If type changed from uint8_t, adjust assumptions in BtpEngine::IsValidAck and // BLEEndPoint::AdjustReceiveWindow. -#if CHIP_ENABLE_CHIPOBLE_TEST -class BLEEndPoint; -#endif - // Public data members: typedef enum { @@ -69,10 +65,6 @@ typedef enum class BtpEngine { -#if CHIP_ENABLE_CHIPOBLE_TEST - friend class BLEEndPoint; -#endif - public: // Public data members: typedef enum @@ -90,9 +82,6 @@ class BtpEngine kContinueMessage = 0x02, kEndMessage = 0x04, kFragmentAck = 0x08, -#if CHIP_ENABLE_CHIPOBLE_TEST - kCommandMessage = 0x10, -#endif }; static const uint16_t sDefaultFragmentSize; @@ -117,29 +106,6 @@ class BtpEngine inline State_t RxState() { return mRxState; } inline State_t TxState() { return mTxState; } -#if CHIP_ENABLE_CHIPOBLE_TEST - inline PacketType_t SetTxPacketType(PacketType_t type) { return (mTxPacketType = type); } - inline PacketType_t SetRxPacketType(PacketType_t type) { return (mRxPacketType = type); } - inline PacketType_t TxPacketType() { return mTxPacketType; } - inline PacketType_t RxPacketType() { return mRxPacketType; } - inline SequenceNumber_t SetTxPacketSeq(SequenceNumber_t seq) { return (mTxPacketSeq = seq); } - inline SequenceNumber_t SetRxPacketSeq(SequenceNumber_t seq) { return (mRxPacketSeq = seq); } - inline SequenceNumber_t TxPacketSeq() { return mTxPacketSeq; } - inline SequenceNumber_t RxPacketSeq() { return mRxPacketSeq; } - static bool IsCommandPacket(const PacketBufferHandle & p); - inline void PushPacketTag(const PacketBufferHandle & p, PacketType_t type) - { - p->SetStart(p->Start() - sizeof(type)); - memcpy(p->Start(), &type, sizeof(type)); - } - inline PacketType_t PopPacketTag(const PacketBufferHandle & p) - { - PacketType_t type; - memcpy(&type, p->Start(), sizeof(type)); - p->SetStart(p->Start() + sizeof(type)); - return type; - } -#endif // CHIP_ENABLE_CHIPOBLE_TEST bool HasUnackedData() const; @@ -160,12 +126,6 @@ class BtpEngine private: // Private data members: -#if CHIP_ENABLE_CHIPOBLE_TEST - PacketType_t mTxPacketType; - PacketType_t mRxPacketType; - SequenceNumber_t mTxPacketSeq; - SequenceNumber_t mRxPacketSeq; -#endif State_t mRxState; uint16_t mRxLength; void * mAppState; diff --git a/src/ble/tests/TestBleErrorStr.cpp b/src/ble/tests/TestBleErrorStr.cpp index 34123c17803c58..1dcb30e6e9878d 100644 --- a/src/ble/tests/TestBleErrorStr.cpp +++ b/src/ble/tests/TestBleErrorStr.cpp @@ -37,9 +37,7 @@ using namespace chip; // Test input data. -// clang-format off -static const CHIP_ERROR kTestElements[] = -{ +static const CHIP_ERROR kTestElements[] = { BLE_ERROR_ADAPTER_UNAVAILABLE, BLE_ERROR_NO_CONNECTION_RECEIVED_CALLBACK, BLE_ERROR_CENTRAL_UNSUBSCRIBED, @@ -66,7 +64,6 @@ static const CHIP_ERROR kTestElements[] = BLE_ERROR_INVALID_BTP_SEQUENCE_NUMBER, BLE_ERROR_REASSEMBLER_INCORRECT_STATE, }; -// clang-format on TEST(TestBleErrorStr, CheckBleErrorStr) { From bc9fc76a1f8e95c54730f6233617db28a4842c01 Mon Sep 17 00:00:00 2001 From: Jaehoon-You <55170115+Jaehoon-You@users.noreply.github.com> Date: Wed, 10 Apr 2024 01:12:08 +0900 Subject: [PATCH 008/468] virtual-device-app: Enable WindowCovering cluster (#32906) Signed-off-by: Jaehoon You Signed-off-by: Charles Kim --- .../virtual-device-app.matter | 192 +++++++ .../virtual-device-app.zap | 516 ++++++++++++++++++ 2 files changed, 708 insertions(+) diff --git a/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter b/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter index a190ff6d15e4ab..12ca71b573185f 100644 --- a/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter +++ b/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter @@ -2688,6 +2688,159 @@ cluster DoorLock = 257 { timed command access(invoke: administer) ClearAliroReaderConfig(): DefaultSuccess = 41; } +/** Provides an interface for controlling and adjusting automatic window coverings. */ +cluster WindowCovering = 258 { + revision 5; + + enum EndProductType : enum8 { + kRollerShade = 0; + kRomanShade = 1; + kBalloonShade = 2; + kWovenWood = 3; + kPleatedShade = 4; + kCellularShade = 5; + kLayeredShade = 6; + kLayeredShade2D = 7; + kSheerShade = 8; + kTiltOnlyInteriorBlind = 9; + kInteriorBlind = 10; + kVerticalBlindStripCurtain = 11; + kInteriorVenetianBlind = 12; + kExteriorVenetianBlind = 13; + kLateralLeftCurtain = 14; + kLateralRightCurtain = 15; + kCentralCurtain = 16; + kRollerShutter = 17; + kExteriorVerticalScreen = 18; + kAwningTerracePatio = 19; + kAwningVerticalScreen = 20; + kTiltOnlyPergola = 21; + kSwingingShutter = 22; + kSlidingShutter = 23; + kUnknown = 255; + } + + enum Type : enum8 { + kRollerShade = 0; + kRollerShade2Motor = 1; + kRollerShadeExterior = 2; + kRollerShadeExterior2Motor = 3; + kDrapery = 4; + kAwning = 5; + kShutter = 6; + kTiltBlindTiltOnly = 7; + kTiltBlindLiftAndTilt = 8; + kProjectorScreen = 9; + kUnknown = 255; + } + + bitmap ConfigStatus : bitmap8 { + kOperational = 0x1; + kOnlineReserved = 0x2; + kLiftMovementReversed = 0x4; + kLiftPositionAware = 0x8; + kTiltPositionAware = 0x10; + kLiftEncoderControlled = 0x20; + kTiltEncoderControlled = 0x40; + } + + bitmap Feature : bitmap32 { + kLift = 0x1; + kTilt = 0x2; + kPositionAwareLift = 0x4; + kAbsolutePosition = 0x8; + kPositionAwareTilt = 0x10; + } + + bitmap Mode : bitmap8 { + kMotorDirectionReversed = 0x1; + kCalibrationMode = 0x2; + kMaintenanceMode = 0x4; + kLedFeedback = 0x8; + } + + bitmap OperationalStatus : bitmap8 { + kGlobal = 0x3; + kLift = 0xC; + kTilt = 0x30; + } + + bitmap SafetyStatus : bitmap16 { + kRemoteLockout = 0x1; + kTamperDetection = 0x2; + kFailedCommunication = 0x4; + kPositionFailure = 0x8; + kThermalProtection = 0x10; + kObstacleDetected = 0x20; + kPower = 0x40; + kStopInput = 0x80; + kMotorJammed = 0x100; + kHardwareFailure = 0x200; + kManualOperation = 0x400; + kProtection = 0x800; + } + + readonly attribute Type type = 0; + readonly attribute optional int16u physicalClosedLimitLift = 1; + readonly attribute optional int16u physicalClosedLimitTilt = 2; + readonly attribute optional nullable int16u currentPositionLift = 3; + readonly attribute optional nullable int16u currentPositionTilt = 4; + readonly attribute optional int16u numberOfActuationsLift = 5; + readonly attribute optional int16u numberOfActuationsTilt = 6; + readonly attribute ConfigStatus configStatus = 7; + readonly attribute optional nullable percent currentPositionLiftPercentage = 8; + readonly attribute optional nullable percent currentPositionTiltPercentage = 9; + readonly attribute OperationalStatus operationalStatus = 10; + readonly attribute optional nullable percent100ths targetPositionLiftPercent100ths = 11; + readonly attribute optional nullable percent100ths targetPositionTiltPercent100ths = 12; + readonly attribute EndProductType endProductType = 13; + readonly attribute optional nullable percent100ths currentPositionLiftPercent100ths = 14; + readonly attribute optional nullable percent100ths currentPositionTiltPercent100ths = 15; + readonly attribute optional int16u installedOpenLimitLift = 16; + readonly attribute optional int16u installedClosedLimitLift = 17; + readonly attribute optional int16u installedOpenLimitTilt = 18; + readonly attribute optional int16u installedClosedLimitTilt = 19; + attribute access(write: manage) Mode mode = 23; + readonly attribute optional SafetyStatus safetyStatus = 26; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct GoToLiftValueRequest { + int16u liftValue = 0; + } + + request struct GoToLiftPercentageRequest { + percent100ths liftPercent100thsValue = 0; + } + + request struct GoToTiltValueRequest { + int16u tiltValue = 0; + } + + request struct GoToTiltPercentageRequest { + percent100ths tiltPercent100thsValue = 0; + } + + /** Moves window covering to InstalledOpenLimitLift and InstalledOpenLimitTilt */ + command UpOrOpen(): DefaultSuccess = 0; + /** Moves window covering to InstalledClosedLimitLift and InstalledCloseLimitTilt */ + command DownOrClose(): DefaultSuccess = 1; + /** Stop any adjusting of window covering */ + command StopMotion(): DefaultSuccess = 2; + /** Go to lift value specified */ + command GoToLiftValue(GoToLiftValueRequest): DefaultSuccess = 4; + /** Go to lift percentage specified */ + command GoToLiftPercentage(GoToLiftPercentageRequest): DefaultSuccess = 5; + /** Go to tilt value specified */ + command GoToTiltValue(GoToTiltValueRequest): DefaultSuccess = 7; + /** Go to tilt percentage specified */ + command GoToTiltPercentage(GoToTiltPercentageRequest): DefaultSuccess = 8; +} + /** Attributes and commands for controlling the color properties of a color-capable light. */ cluster ColorControl = 768 { revision 6; @@ -3505,6 +3658,45 @@ endpoint 1 { handle command ClearCredential; } + server cluster WindowCovering { + ram attribute type default = 0x00; + ram attribute physicalClosedLimitLift default = 0x0000; + ram attribute physicalClosedLimitTilt default = 0x0000; + ram attribute currentPositionLift; + ram attribute currentPositionTilt; + ram attribute numberOfActuationsLift default = 0x0000; + ram attribute numberOfActuationsTilt default = 0x0000; + ram attribute configStatus default = 0x03; + ram attribute currentPositionLiftPercentage; + ram attribute currentPositionTiltPercentage; + ram attribute operationalStatus default = 0x00; + ram attribute targetPositionLiftPercent100ths; + ram attribute targetPositionTiltPercent100ths; + ram attribute endProductType default = 0x00; + ram attribute currentPositionLiftPercent100ths; + ram attribute currentPositionTiltPercent100ths; + ram attribute installedOpenLimitLift default = 0x0000; + ram attribute installedClosedLimitLift default = 0xFFFF; + ram attribute installedOpenLimitTilt default = 0x0000; + ram attribute installedClosedLimitTilt default = 0xFFFF; + ram attribute mode default = 0x00; + ram attribute safetyStatus default = 0x0000; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 5; + + handle command UpOrOpen; + handle command DownOrClose; + handle command StopMotion; + handle command GoToLiftValue; + handle command GoToLiftPercentage; + handle command GoToTiltValue; + handle command GoToTiltPercentage; + } + server cluster ColorControl { ram attribute currentHue default = 0x00; ram attribute currentSaturation default = 0x00; diff --git a/examples/virtual-device-app/virtual-device-common/virtual-device-app.zap b/examples/virtual-device-app/virtual-device-common/virtual-device-app.zap index 144c21afd7d90b..af20ff3733f846 100644 --- a/examples/virtual-device-app/virtual-device-common/virtual-device-app.zap +++ b/examples/virtual-device-app/virtual-device-common/virtual-device-app.zap @@ -5748,6 +5748,522 @@ } ] }, + { + "name": "Window Covering", + "code": 258, + "mfgCode": null, + "define": "WINDOW_COVERING_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "UpOrOpen", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "DownOrClose", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "StopMotion", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "GoToLiftValue", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "GoToLiftPercentage", + "code": 5, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "GoToTiltValue", + "code": 7, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "GoToTiltPercentage", + "code": 8, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "Type", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "Type", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PhysicalClosedLimitLift", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PhysicalClosedLimitTilt", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentPositionLift", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentPositionTilt", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfActuationsLift", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfActuationsTilt", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ConfigStatus", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "ConfigStatus", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x03", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentPositionLiftPercentage", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "percent", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentPositionTiltPercentage", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "percent", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OperationalStatus", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "OperationalStatus", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TargetPositionLiftPercent100ths", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "percent100ths", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TargetPositionTiltPercent100ths", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "percent100ths", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EndProductType", + "code": 13, + "mfgCode": null, + "side": "server", + "type": "EndProductType", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentPositionLiftPercent100ths", + "code": 14, + "mfgCode": null, + "side": "server", + "type": "percent100ths", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentPositionTiltPercent100ths", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "percent100ths", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "InstalledOpenLimitLift", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "InstalledClosedLimitLift", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFFFF", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "InstalledOpenLimitTilt", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "InstalledClosedLimitTilt", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFFFF", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Mode", + "code": 23, + "mfgCode": null, + "side": "server", + "type": "Mode", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SafetyStatus", + "code": 26, + "mfgCode": null, + "side": "server", + "type": "SafetyStatus", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, { "name": "Color Control", "code": 768, From a9e3b0a026efc31706cf189e8d70ee6ad8121c92 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Tue, 9 Apr 2024 12:53:34 -0400 Subject: [PATCH 009/468] Move `EventLoggingDelegate.h` into `app:events` gn target (#32912) * Move EventLoggingDelegate to be part of "events" in app. - Remove unneeded includes from this header - add dependency to core (due to TLV) * Restyle --- src/app/BUILD.gn | 3 ++- src/app/EventLoggingDelegate.h | 3 --- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/app/BUILD.gn b/src/app/BUILD.gn index 0f982e22cee9f8..312fe005d88f0b 100644 --- a/src/app/BUILD.gn +++ b/src/app/BUILD.gn @@ -260,12 +260,14 @@ static_library("interaction-model") { source_set("events") { sources = [ "EventHeader.h", + "EventLoggingDelegate.h", "EventLoggingTypes.h", ] deps = [ ":paths", "${chip_root}/src/access:types", + "${chip_root}/src/lib/core", ] } @@ -291,7 +293,6 @@ static_library("app") { "DeferredAttributePersistenceProvider.cpp", "DeferredAttributePersistenceProvider.h", "EventLogging.h", - "EventLoggingDelegate.h", "EventManagement.cpp", "EventManagement.h", "FailSafeContext.cpp", diff --git a/src/app/EventLoggingDelegate.h b/src/app/EventLoggingDelegate.h index 7cb1fd46eb85e7..2f86a334de7f2a 100644 --- a/src/app/EventLoggingDelegate.h +++ b/src/app/EventLoggingDelegate.h @@ -23,10 +23,7 @@ #pragma once -#include #include -#include -#include namespace chip { namespace app { From 774f6c424fd1298b651ddcd0a22fbeb98c123597 Mon Sep 17 00:00:00 2001 From: Junior Martinez <67972863+jmartinez-silabs@users.noreply.github.com> Date: Tue, 9 Apr 2024 12:58:07 -0400 Subject: [PATCH 010/468] [Silabs] Continue Migration to CMSIS OS2 api (#32901) * Migrate pw rpc support to cmsis os api * Migration efr32 uart.cpp to cmsis os --- .../common/pigweed/efr32/PigweedLoggerMutex.h | 11 ++- examples/platform/silabs/PigweedLogger.cpp | 21 +++-- examples/platform/silabs/PigweedLogger.h | 6 +- examples/platform/silabs/Rpc.cpp | 38 +++++---- examples/platform/silabs/efr32/uart.cpp | 78 ++++++++----------- 5 files changed, 73 insertions(+), 81 deletions(-) diff --git a/examples/common/pigweed/efr32/PigweedLoggerMutex.h b/examples/common/pigweed/efr32/PigweedLoggerMutex.h index 4df8b616895e39..a60b9a28f30141 100644 --- a/examples/common/pigweed/efr32/PigweedLoggerMutex.h +++ b/examples/common/pigweed/efr32/PigweedLoggerMutex.h @@ -20,8 +20,7 @@ #include "PigweedLogger.h" #include "pigweed/RpcService.h" -#include "semphr.h" -#include +#include namespace chip { namespace rpc { @@ -32,18 +31,18 @@ class PigweedLoggerMutex : public ::chip::rpc::Mutex PigweedLoggerMutex() {} void Lock() override { - SemaphoreHandle_t * sem = PigweedLogger::GetSemaphore(); + osMutexId_t * sem = PigweedLogger::GetMutex(); if (sem) { - xSemaphoreTake(*sem, portMAX_DELAY); + osMutexAcquire(*sem, osWaitForever); } } void Unlock() override { - SemaphoreHandle_t * sem = PigweedLogger::GetSemaphore(); + osMutexId_t * sem = PigweedLogger::GetMutex(); if (sem) { - xSemaphoreGive(*sem); + osMutexRelease(*sem); } } }; diff --git a/examples/platform/silabs/PigweedLogger.cpp b/examples/platform/silabs/PigweedLogger.cpp index 280b232374ffcb..d136f663e9405e 100644 --- a/examples/platform/silabs/PigweedLogger.cpp +++ b/examples/platform/silabs/PigweedLogger.cpp @@ -24,16 +24,13 @@ * needs to use HDLC/UART for another purpose like the RPC server. */ -#include - -#include "semphr.h" -#include -#include -#include - +#include "PigweedLogger.h" #include "pw_span/span.h" #include #include +#include +#include +#include #include namespace PigweedLogger { @@ -44,7 +41,7 @@ constexpr size_t kWriteBufferSize = 128; // Buffer for constructing HDLC frames // Exclusive access to the backend is needed to make sure that log messages coming // from different threads are not interwoven. -SemaphoreHandle_t sLoggerLock; +osMutexId_t sLoggerLock; static pw::stream::SysIoWriter sWriter; static size_t sWriteBufferPos; @@ -60,7 +57,7 @@ static void send(void) void init(void) { - sLoggerLock = xSemaphoreCreateMutex(); + sLoggerLock = osMutexNew(nullptr); assert(sLoggerLock != NULL); pw_sys_io_Init(); @@ -68,7 +65,7 @@ void init(void) int putString(const char * buffer, size_t size) { - xSemaphoreTake(sLoggerLock, portMAX_DELAY); + osMutexAcquire(sLoggerLock, osWaitForever); assert(sWriteBufferPos < kWriteBufferSize); for (size_t i = 0; i < size; ++i) @@ -90,11 +87,11 @@ int putString(const char * buffer, size_t size) send(); } - xSemaphoreGive(sLoggerLock); + osMutexRelease(sLoggerLock); return size; } -SemaphoreHandle_t * GetSemaphore() +osMutexId_t * GetMutex() { return &sLoggerLock; } diff --git a/examples/platform/silabs/PigweedLogger.h b/examples/platform/silabs/PigweedLogger.h index 9907ade58772da..746724d02c46ea 100644 --- a/examples/platform/silabs/PigweedLogger.h +++ b/examples/platform/silabs/PigweedLogger.h @@ -17,15 +17,13 @@ #pragma once -#include - -#include "semphr.h" +#include #include namespace PigweedLogger { void init(void); int putString(const char * buffer, size_t size); -SemaphoreHandle_t * GetSemaphore(); +osMutexId_t * GetMutex(); } // namespace PigweedLogger diff --git a/examples/platform/silabs/Rpc.cpp b/examples/platform/silabs/Rpc.cpp index c78426847c1a42..d265e65af7848c 100644 --- a/examples/platform/silabs/Rpc.cpp +++ b/examples/platform/silabs/Rpc.cpp @@ -17,11 +17,11 @@ */ #include "AppTask.h" -#include "FreeRTOS.h" #include "PigweedLoggerMutex.h" #include "pigweed/RpcService.h" #include "pw_sys_io_efr32/init.h" -#include "task.h" +#include +#include #if defined(PW_RPC_ATTRIBUTE_SERVICE) && PW_RPC_ATTRIBUTE_SERVICE #include "pigweed/rpc_services/Attributes.h" @@ -94,7 +94,7 @@ class Efr32Device final : public Device public: pw::Status Reboot(const chip_rpc_RebootRequest & request, pw_protobuf_Empty & response) override { - TickType_t delayMs = kRebootTimerPeriodMs; + uint32_t delayMs = kRebootTimerPeriodMs; if (request.delay_ms != 0) { delayMs = request.delay_ms; @@ -104,27 +104,36 @@ class Efr32Device final : public Device ChipLogProgress(NotSpecified, "Did not receive a reboot delay. Defaulting to %d ms", static_cast(kRebootTimerPeriodMs)); } - mRebootTimer = xTimerCreateStatic("Reboot", pdMS_TO_TICKS(delayMs), false, nullptr, RebootHandler, &mRebootTimerBuffer); - xTimerStart(mRebootTimer, 0); + + mRebootTimer = osTimerNew(RebootHandler, osTimerOnce, nullptr, &mRebootTimerAttr); + uint32_t delayTicks = ((uint64_t) osKernelGetTickFreq() * delayMs) / 1000; + osTimerStart(mRebootTimer, delayTicks); return pw::OkStatus(); } private: static constexpr uint32_t kRebootTimerPeriodMs = 1000; - TimerHandle_t mRebootTimer; - StaticTimer_t mRebootTimerBuffer; + osTimerId_t mRebootTimer; + osTimer_t mRebootTimerBuffer; + osTimerAttr_t mRebootTimerAttr = { .name = "Reboot", .cb_mem = &mRebootTimerBuffer, .cb_size = osTimerCbSize }; - static void RebootHandler(TimerHandle_t) { NVIC_SystemReset(); } + static void RebootHandler(void * timerCbArg) { NVIC_SystemReset(); } }; #endif // defined(PW_RPC_DEVICE_SERVICE) && PW_RPC_DEVICE_SERVICE namespace { -#define RPC_TASK_STACK_SIZE 4096 -#define RPC_TASK_PRIORITY 1 -static TaskHandle_t sRpcTaskHandle; -StaticTask_t sRpcTaskBuffer; -StackType_t sRpcTaskStack[RPC_TASK_STACK_SIZE]; +static osThreadId_t sRpcTaskHandle; +osThread_t sRpcTaskControlBlock; +constexpr uint32_t kRpcTaskSize = 4096; +uint8_t sRpcTaskStack[kRpcTaskSize]; +constexpr osThreadAttr_t kRpcTaskAttr = { .name = "RPC", + .attr_bits = osThreadDetached, + .cb_mem = &sRpcTaskControlBlock, + .cb_size = osThreadCbSize, + .stack_mem = sRpcTaskStack, + .stack_size = kRpcTaskSize, + .priority = osPriorityLow }; #if defined(PW_RPC_ATTRIBUTE_SERVICE) && PW_RPC_ATTRIBUTE_SERVICE Attributes attributes_service; @@ -214,8 +223,7 @@ void Init() pw_sys_io_Init(); // Start App task. - sRpcTaskHandle = xTaskCreateStatic(RunRpcService, "RPC_TASK", ArraySize(sRpcTaskStack), nullptr, RPC_TASK_PRIORITY, - sRpcTaskStack, &sRpcTaskBuffer); + sRpcTaskHandle = osThreadNew(RunRpcService, nullptr, &kRpcTaskAttr); } } // namespace rpc diff --git a/examples/platform/silabs/efr32/uart.cpp b/examples/platform/silabs/efr32/uart.cpp index 544016e0072437..2b29cca0db0a92 100644 --- a/examples/platform/silabs/efr32/uart.cpp +++ b/examples/platform/silabs/efr32/uart.cpp @@ -16,11 +16,9 @@ * limitations under the License. */ #include "AppConfig.h" -#include "FreeRTOS.h" -#include "event_groups.h" #include "matter_shell.h" -#include "semphr.h" -#include "task.h" +#include +#include #ifdef __cplusplus extern "C" { @@ -108,8 +106,6 @@ static uint16_t lastCount; // Nb of bytes already processed from the active dmaB #else #define UART_MAX_QUEUE_SIZE 25 #endif -#define UART_TASK_SIZE 256 -#define UART_TASK_NAME "UART" #ifdef CHIP_CONFIG_LOG_MESSAGE_MAX_SIZE #define UART_TX_MAX_BUF_LEN (CHIP_CONFIG_LOG_MESSAGE_MAX_SIZE + 2) // \r\n @@ -117,9 +113,18 @@ static uint16_t lastCount; // Nb of bytes already processed from the active dmaB #define UART_TX_MAX_BUF_LEN (258) #endif -static TaskHandle_t sUartTaskHandle; -static StackType_t uartStack[UART_TASK_SIZE * sizeof(StackType_t)]; -static StaticTask_t uartTaskStruct; +static constexpr uint32_t kUartTxCompleteFlag = 1; +static osThreadId_t sUartTaskHandle; +constexpr uint32_t kUartTaskSize = 1024; +static uint8_t uartStack[kUartTaskSize]; +static osThread_t sUartTaskControlBlock; +constexpr osThreadAttr_t kUartTaskAttr = { .name = "UART", + .attr_bits = osThreadDetached, + .cb_mem = &sUartTaskControlBlock, + .cb_size = osThreadCbSize, + .stack_mem = uartStack, + .stack_size = kUartTaskSize, + .priority = osPriorityRealtime }; typedef struct { @@ -127,9 +132,13 @@ typedef struct uint16_t length = 0; } UartTxStruct_t; +static osMessageQueueId_t sUartTxQueue; +static osMessageQueue_t sUartTxQueueStruct; uint8_t sUartTxQueueBuffer[UART_MAX_QUEUE_SIZE * sizeof(UartTxStruct_t)]; -static StaticQueue_t sUartTxQueueStruct; -static QueueHandle_t sUartTxQueue; +constexpr osMessageQueueAttr_t kUartTxQueueAttr = { .cb_mem = &sUartTxQueueStruct, + .cb_size = osMessageQueueCbSize, + .mq_mem = sUartTxQueueBuffer, + .mq_size = sizeof(sUartTxQueueBuffer) }; // Rx buffer for the receive Fifo static uint8_t sRxFifoBuffer[MAX_BUFFER_SIZE]; @@ -264,8 +273,8 @@ void uartConsoleInit(void) UARTDRV_Receive(vcom_handle, sRxDmaBuffer, MAX_DMA_BUFFER_SIZE, UART_rx_callback); UARTDRV_Receive(vcom_handle, sRxDmaBuffer2, MAX_DMA_BUFFER_SIZE, UART_rx_callback); - sUartTxQueue = xQueueCreateStatic(UART_MAX_QUEUE_SIZE, sizeof(UartTxStruct_t), sUartTxQueueBuffer, &sUartTxQueueStruct); - sUartTaskHandle = xTaskCreateStatic(uartMainLoop, UART_TASK_NAME, UART_TASK_SIZE, nullptr, 30, uartStack, &uartTaskStruct); + sUartTxQueue = osMessageQueueNew(UART_MAX_QUEUE_SIZE, sizeof(UartTxStruct_t), &kUartTxQueueAttr); + sUartTaskHandle = osThreadNew(uartMainLoop, nullptr, &kUartTaskAttr); assert(sUartTaskHandle); assert(sUartTxQueue); @@ -311,9 +320,8 @@ void USART_IRQHandler(void) */ void UART_tx_callback(struct UARTDRV_HandleData * handle, Ecode_t transferStatus, uint8_t * data, UARTDRV_Count_t transferCount) { - BaseType_t xHigherPriorityTaskWoken; - - vTaskNotifyGiveFromISR(sUartTaskHandle, &xHigherPriorityTaskWoken) portYIELD_FROM_ISR(xHigherPriorityTaskWoken); + // This function may be called from Interrupt Service Routines. + osThreadFlagsSet(sUartTaskHandle, kUartTxCompleteFlag); } /* @@ -363,20 +371,10 @@ int16_t uartConsoleWrite(const char * Buf, uint16_t BufLength) memcpy(workBuffer.data, Buf, BufLength); workBuffer.length = BufLength; - if (xPortIsInsideInterrupt()) + if (osMessageQueuePut(sUartTxQueue, &workBuffer, osPriorityNormal, 0) == osOK) { - BaseType_t xHigherPriorityTaskWoken; - xQueueSendFromISR(sUartTxQueue, &workBuffer, &xHigherPriorityTaskWoken); - portYIELD_FROM_ISR(xHigherPriorityTaskWoken); return BufLength; } - else - { - if (pdTRUE == xQueueSend(sUartTxQueue, &workBuffer, portMAX_DELAY)) - { - return BufLength; - } - } return UART_CONSOLE_ERR; } @@ -400,20 +398,10 @@ int16_t uartLogWrite(const char * log, uint16_t length) memcpy(workBuffer.data + length, "\r\n", 2); workBuffer.length = length + 2; - if (xPortIsInsideInterrupt()) + if (osMessageQueuePut(sUartTxQueue, &workBuffer, osPriorityNormal, 0) == osOK) { - BaseType_t xHigherPriorityTaskWoken; - xQueueSendFromISR(sUartTxQueue, &workBuffer, &xHigherPriorityTaskWoken); - portYIELD_FROM_ISR(xHigherPriorityTaskWoken); return length; } - else - { - if (pdTRUE == xQueueSend(sUartTxQueue, &workBuffer, 0)) - { - return length; - } - } return UART_CONSOLE_ERR; } @@ -453,11 +441,11 @@ void uartMainLoop(void * args) while (1) { - BaseType_t eventReceived = xQueueReceive(sUartTxQueue, &workBuffer, portMAX_DELAY); + osStatus_t eventReceived = osMessageQueueGet(sUartTxQueue, &workBuffer, nullptr, osWaitForever); while (eventReceived == pdTRUE) { uartSendBytes(workBuffer.data, workBuffer.length); - eventReceived = xQueueReceive(sUartTxQueue, &workBuffer, 0); + eventReceived = osMessageQueueGet(sUartTxQueue, &workBuffer, nullptr, 0); } } } @@ -470,13 +458,14 @@ void uartMainLoop(void * args) */ void uartSendBytes(uint8_t * buffer, uint16_t nbOfBytes) { - #if defined(SL_CATALOG_POWER_MANAGER_PRESENT) sl_power_manager_add_em_requirement(SL_POWER_MANAGER_EM1); -#endif +#endif // SL_CATALOG_POWER_MANAGER_PRESENT + #if SL_UARTCTRL_MUX sl_wfx_host_pre_uart_transfer(); #endif // SL_UARTCTRL_MUX + #if (defined(EFR32MG24) && defined(WF200_WIFI)) // Blocking transmit for the MG24 + WF200 since UART TX is multiplexed with // WF200 SPI IRQ @@ -484,15 +473,16 @@ void uartSendBytes(uint8_t * buffer, uint16_t nbOfBytes) #else // Non Blocking Transmit UARTDRV_Transmit(vcom_handle, (uint8_t *) buffer, nbOfBytes, UART_tx_callback); - ulTaskNotifyTake(pdTRUE, portMAX_DELAY); + osThreadFlagsWait(kUartTxCompleteFlag, osFlagsWaitAny, osWaitForever); #endif /* EFR32MG24 && WF200_WIFI */ + #if SL_UARTCTRL_MUX sl_wfx_host_post_uart_transfer(); #endif // SL_UARTCTRL_MUX #if defined(SL_CATALOG_POWER_MANAGER_PRESENT) sl_power_manager_remove_em_requirement(SL_POWER_MANAGER_EM1); -#endif +#endif // SL_CATALOG_POWER_MANAGER_PRESENT } #ifdef __cplusplus From d7dde9bf69e5d4abfebbd12f3a87e1fd5575fc50 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Tue, 9 Apr 2024 16:19:37 -0400 Subject: [PATCH 011/468] Stop pre-composing log strings in MTRASyncWorkQueue. (#32915) Just log the data we want directly instead of building up a string and logging it. --- src/darwin/Framework/CHIP/MTRAsyncWorkQueue.mm | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/src/darwin/Framework/CHIP/MTRAsyncWorkQueue.mm b/src/darwin/Framework/CHIP/MTRAsyncWorkQueue.mm index 4a717e5daa24aa..eff85b1b0cb503 100644 --- a/src/darwin/Framework/CHIP/MTRAsyncWorkQueue.mm +++ b/src/darwin/Framework/CHIP/MTRAsyncWorkQueue.mm @@ -225,18 +225,11 @@ - (instancetype)initWithContext:(id)context return self; } -- (NSString *)_lockedSelfDescription:(const ContextSnapshot &)context -{ - os_unfair_lock_assert_owner(&_lock); - - return [NSString stringWithFormat:@"%@, items count: %tu", context.description, _items.count]; -} - - (NSString *)description { ContextSnapshot context(self); std::lock_guard lock(_lock); - return [NSString stringWithFormat:@"<%@ context: %@>", self.class, [self _lockedSelfDescription:context]]; + return [NSString stringWithFormat:@"<%@ context: %@, items count: %tu>", self.class, context.description, _items.count]; } - (void)enqueueWorkItem:(MTRAsyncWorkItem *)item @@ -268,9 +261,9 @@ - (void)enqueueWorkItem:(MTRAsyncWorkItem *)item // Logging the description once is enough because other log messages // related to the work item (execution, completion etc) can easily be // correlated using the unique id. - MTR_LOG_DEFAULT("MTRAsyncWorkQueue<%@> enqueued work item [%llu]: %@", [self _lockedSelfDescription:context], item.uniqueID, description); + MTR_LOG_DEFAULT("MTRAsyncWorkQueue<%@, items count: %tu> enqueued work item [%llu]: %@", context.description, _items.count, item.uniqueID, description); } else { - MTR_LOG_DEFAULT("MTRAsyncWorkQueue<%@> enqueued work item [%llu]", [self _lockedSelfDescription:context], item.uniqueID); + MTR_LOG_DEFAULT("MTRAsyncWorkQueue<%@, items count: %tu> enqueued work item [%llu]", context.description, _items.count, item.uniqueID); } [self _callNextReadyWorkItemWithContext:context]; @@ -304,7 +297,7 @@ - (void)_postProcessWorkItem:(MTRAsyncWorkItem *)workItem } else { [workItem markComplete]; [_items removeObjectAtIndex:0]; - MTR_LOG_DEFAULT("MTRAsyncWorkQueue<%@> completed work item [%llu]", [self _lockedSelfDescription:context], workItem.uniqueID); + MTR_LOG_DEFAULT("MTRAsyncWorkQueue<%@, items count: %tu> completed work item [%llu]", context.description, _items.count, workItem.uniqueID); } // when "concurrency width" is implemented this will be decremented instead From 935c79336e528922af324c1608d7623abf59ceb1 Mon Sep 17 00:00:00 2001 From: Karsten Sperling <113487422+ksperling-apple@users.noreply.github.com> Date: Wed, 10 Apr 2024 11:22:01 +1200 Subject: [PATCH 012/468] Darwin: Refactor stack startup logic when creating a controller (#32845) * Darwin: Don't stop/start the stack when creating a controller * Keep refactorings in place but retain current behavior for now * Darwin: Enable CHIP_CONFIG_GLOBALS_NO_DESTRUCT=1 This was missed in #32745 when adding -fno-c++-static-destructors, since that flag does not carry through to lazily initialized chip::Global instances. --- .../Framework/CHIP/MTRDeviceController.mm | 16 ++------- .../CHIP/MTRDeviceControllerFactory.mm | 34 +++++++++++++++---- .../Matter.xcodeproj/project.pbxproj | 2 ++ 3 files changed, 33 insertions(+), 19 deletions(-) diff --git a/src/darwin/Framework/CHIP/MTRDeviceController.mm b/src/darwin/Framework/CHIP/MTRDeviceController.mm index 22d52cd5b4a684..961b6f87694536 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceController.mm @@ -139,25 +139,15 @@ - (nullable instancetype)initWithParameters:(MTRDeviceControllerAbstractParamete { if (![parameters isKindOfClass:MTRDeviceControllerParameters.class]) { MTR_LOG_ERROR("Unsupported type of MTRDeviceControllerAbstractParameters: %@", parameters); - if (error) { *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INVALID_ARGUMENT]; } return nil; } + auto * controllerParameters = static_cast(parameters); - __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; - if (!factory.isRunning) { - auto * params = [[MTRDeviceControllerFactoryParams alloc] initWithoutStorage]; - - if (![factory startControllerFactory:params error:error]) { - return nil; - } - } - - auto * parametersForFactory = static_cast(parameters); - - return [factory initializeController:self withParameters:parametersForFactory error:error]; + // MTRDeviceControllerFactory will auto-start in per-controller-storage mode if necessary + return [MTRDeviceControllerFactory.sharedInstance initializeController:self withParameters:controllerParameters error:error]; } - (instancetype)initWithFactory:(MTRDeviceControllerFactory *)factory diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm index 5941a799b5b514..b31003c238bea5 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm @@ -417,7 +417,14 @@ - (CHIP_ERROR)_initFabricTable:(FabricTable &)fabricTable return [NSArray arrayWithArray:fabricList]; } -- (BOOL)startControllerFactory:(MTRDeviceControllerFactoryParams *)startupParams error:(NSError * __autoreleasing *)error; +- (BOOL)startControllerFactory:(MTRDeviceControllerFactoryParams *)startupParams error:(NSError * __autoreleasing *)error +{ + return [self _startControllerFactory:startupParams startingController:NO error:error]; +} + +- (BOOL)_startControllerFactory:(MTRDeviceControllerFactoryParams *)startupParams + startingController:(BOOL)startingController + error:(NSError * __autoreleasing *)error { [self _assertCurrentQueueIsNotMatterQueue]; @@ -535,6 +542,7 @@ - (BOOL)startControllerFactory:(MTRDeviceControllerFactoryParams *)startupParams // state is brought up live on factory init, and not when it comes time // to actually start a controller, and does not actually clean itself up // until its refcount (which starts as 0) goes to 0. + // TODO: Don't cause a stack shutdown and restart if startingController _controllerFactory->RetainSystemState(); _controllerFactory->ReleaseSystemState(); @@ -597,11 +605,6 @@ - (MTRDeviceController * _Nullable)_startDeviceController:(MTRDeviceController * { [self _assertCurrentQueueIsNotMatterQueue]; - if (![self checkIsRunning:error]) { - MTR_LOG_ERROR("Trying to start controller while Matter controller factory is not running"); - return nil; - } - id _Nullable storageDelegate; dispatch_queue_t _Nullable storageDelegateQueue; NSUUID * uniqueIdentifier; @@ -623,9 +626,28 @@ - (MTRDeviceController * _Nullable)_startDeviceController:(MTRDeviceController * otaProviderDelegateQueue = nil; } else { MTR_LOG_ERROR("Unknown kind of startup params: %@", startupParams); + if (error != nil) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INVALID_ARGUMENT]; + } return nil; } + if (![self isRunning]) { + if (storageDelegate != nil) { + MTR_LOG_DEFAULT("Auto-starting Matter controller factory in per-controller storage mode"); + auto * params = [[MTRDeviceControllerFactoryParams alloc] initWithoutStorage]; + if (![self _startControllerFactory:params startingController:YES error:error]) { + return nil; + } + } else { + MTR_LOG_ERROR("Trying to start controller while Matter controller factory is not running"); + if (error != nil) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + } + return nil; + } + } + if (_usingPerControllerStorage && storageDelegate == nil) { MTR_LOG_ERROR("Must have a controller storage delegate when we do not have storage for the controller factory"); if (error != nil) { diff --git a/src/darwin/Framework/Matter.xcodeproj/project.pbxproj b/src/darwin/Framework/Matter.xcodeproj/project.pbxproj index 1e540620fe2632..80c451c937e2de 100644 --- a/src/darwin/Framework/Matter.xcodeproj/project.pbxproj +++ b/src/darwin/Framework/Matter.xcodeproj/project.pbxproj @@ -2256,6 +2256,7 @@ OTHER_CPLUSPLUSFLAGS = ( "$(OTHER_CFLAGS)", "-fno-c++-static-destructors", + "-DCHIP_CONFIG_GLOBALS_NO_DESTRUCT=1", ); OTHER_LDFLAGS = ""; "OTHER_LDFLAGS[sdk=*]" = ( @@ -2421,6 +2422,7 @@ OTHER_CPLUSPLUSFLAGS = ( "$(OTHER_CFLAGS)", "-fno-c++-static-destructors", + "-DCHIP_CONFIG_GLOBALS_NO_DESTRUCT=1", ); OTHER_LDFLAGS = ""; "OTHER_LDFLAGS[sdk=*]" = ( From 845ce9b4736042f52f431004e258606452e0bd0e Mon Sep 17 00:00:00 2001 From: mkardous-silabs <84793247+mkardous-silabs@users.noreply.github.com> Date: Tue, 9 Apr 2024 20:13:38 -0400 Subject: [PATCH 013/468] [ICD] Add TestEventTrigger support to the ICDManager (#32898) * Add TestEventTrigger to the ICDManager * Update copyright year * Update init / shutdown to not modify them * Remove unnecessary import * Fix nxp build * remove unnused import * add test event trigger to the app layer * Remove TestEventTrigger from known problems linter * fix typo * fix merge conflicts * update TestICDManager inits * Fix TestCommissionManager * move enum to the impl anonymous namespace --- .github/workflows/lint.yml | 52 ++++++++++----- .github/workflows/tests.yaml | 1 + examples/lighting-app/nxp/k32w/k32w0/BUILD.gn | 1 + src/app/BUILD.gn | 4 ++ src/app/icd/server/BUILD.gn | 1 + src/app/icd/server/ICDManager.cpp | 29 +++++++++ src/app/icd/server/ICDManager.h | 29 ++++++--- src/app/icd/server/ICDNotifier.h | 11 ++-- src/app/server/BUILD.gn | 1 + src/app/server/Server.cpp | 6 ++ src/app/tests/TestCommissionManager.cpp | 3 + src/app/tests/TestICDManager.cpp | 30 +++++++++ src/platform/nxp/k32w/k32w0/BUILD.gn | 5 +- src/platform/nxp/k32w/k32w1/BUILD.gn | 5 +- src/python_testing/TC_ICDManagementCluster.py | 63 +++++++++++++++++++ 15 files changed, 210 insertions(+), 31 deletions(-) create mode 100644 src/python_testing/TC_ICDManagementCluster.py diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 89f25b2c163142..7601ec0d7495b9 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -23,7 +23,10 @@ on: workflow_dispatch: concurrency: - group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} + group: + ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == + 'pull_request' && github.event.number) || (github.event_name == + 'workflow_dispatch' && github.run_number) || github.sha }} cancel-in-progress: true jobs: @@ -43,7 +46,7 @@ jobs: - name: Checkout submodules & Bootstrap uses: ./.github/actions/checkout-submodules-and-bootstrap with: - platform: linux + platform: linux - name: Check for orphaned gn files if: always() @@ -103,7 +106,6 @@ jobs: --known-failure app/reporting/reporting.cpp \ --known-failure app/reporting/tests/MockReportScheduler.cpp \ --known-failure app/reporting/tests/MockReportScheduler.h \ - --known-failure app/TestEventTriggerDelegate.h \ --known-failure app/util/attribute-storage.cpp \ --known-failure app/util/attribute-storage.h \ --known-failure app/util/attribute-storage-detail.h \ @@ -174,7 +176,8 @@ jobs: # git grep exits with 0 if it finds a match, but we want # to fail (exit nonzero) on match. And we want to exclude this file, # to avoid our grep regexp matching itself. - - name: Check for use of PRI*8, which are not supported on some libcs. + - name: + Check for use of PRI*8, which are not supported on some libcs. if: always() run: | git grep -I -n "PRI.8" -- './*' ':(exclude).github/workflows/lint.yml' ':(exclude)third_party/lwip/repo/lwip/src/include/lwip/arch.h' && exit 1 || exit 0 @@ -182,7 +185,9 @@ jobs: # git grep exits with 0 if it finds a match, but we want # to fail (exit nonzero) on match. And we want to exclude this file, # to avoid our grep regexp matching itself. - - name: Check for use of PRI*16, which are not supported on some libcs. + - name: + Check for use of PRI*16, which are not supported on some + libcs. if: always() run: | git grep -I -n "PRI.16" -- './*' ':(exclude).github/workflows/lint.yml' ':(exclude)third_party/lwip/repo/lwip/src/include/lwip/arch.h' && exit 1 || exit 0 @@ -190,7 +195,9 @@ jobs: # git grep exits with 0 if it finds a match, but we want # to fail (exit nonzero) on match. And we want to exclude this file, # to avoid our grep regexp matching itself. - - name: Check for use of PRI*64, which are not supported on some libcs. + - name: + Check for use of PRI*64, which are not supported on some + libcs. if: always() run: | # TODO: MessageDefHelper should ideally not be excluded here. @@ -230,7 +237,9 @@ jobs: # git grep exits with 0 if it finds a match, but we want # to fail (exit nonzero) on match. And we want to exclude this file, # to avoid our grep regexp matching itself. - - name: Check for use of 0x%u and the like, which lead to misleading output. + - name: + Check for use of 0x%u and the like, which lead to misleading + output. if: always() run: | git grep -I -n '0x%[0-9l.-]*[^0-9lxX".-]' -- './*' ':(exclude).github/workflows/lint.yml' && exit 1 || exit 0 @@ -238,14 +247,18 @@ jobs: # git grep exits with 0 if it finds a match, but we want # to fail (exit nonzero) on match. And we want to exclude this file, # to avoid our grep regexp matching itself. - - name: Check for use of '"0x" PRIu*' and the like, which lead to misleading output. + - name: + Check for use of '"0x" PRIu*' and the like, which lead to + misleading output. if: always() run: | git grep -I -n '0x%[0-9-]*" *PRI[^xX]' -- './*' ':(exclude).github/workflows/lint.yml' && exit 1 || exit 0 # git grep exits with 0 if it finds a match, but we want # to fail (exit nonzero) on match. - - name: Check for use of NSLog instead of Matter logging in Matter framework + - name: + Check for use of NSLog instead of Matter logging in Matter + framework if: always() run: | git grep -n 'NSLog(' -- src/darwin/Framework/CHIP && exit 1 || exit 0 @@ -254,7 +267,9 @@ jobs: # to fail (exit nonzero) on match. And we want to exclude this file, # to avoid our grep regexp matching itself, as well as excluding the files # that implement the type-safe accessors - - name: Check for use of 'emberAfReadAttribute' instead of the type-safe getters + - name: + Check for use of 'emberAfReadAttribute' instead of the + type-safe getters if: always() run: | git grep -I -n 'emberAfReadAttribute' -- './*' ':(exclude).github/workflows/lint.yml' ':(exclude)src/app/util/attribute-table.h' ':(exclude)zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp' ':(exclude)src/app/zap-templates/templates/app/attributes/Accessors-src.zapt' ':(exclude)src/app/util/attribute-table.cpp' && exit 1 || exit 0 @@ -264,7 +279,9 @@ jobs: # to avoid our grep regexp matching itself, as well as excluding the files # that implement the type-safe accessors, attribute writing from the wire, and some # Pigweed RPC code that seems hard to update. - - name: Check for use of 'emberAfWriteAttribute' instead of the type-safe setters + - name: + Check for use of 'emberAfWriteAttribute' instead of the + type-safe setters if: always() run: | git grep -I -n 'emberAfWriteAttribute' -- './*' ':(exclude).github/workflows/lint.yml' ':(exclude)zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp' ':(exclude)src/app/zap-templates/templates/app/attributes/Accessors-src.zapt' ':(exclude)src/app/util/attribute-table.cpp' ':(exclude)examples/common/pigweed/rpc_services/Attributes.h' ':(exclude)src/app/util/attribute-table.h' ':(exclude)src/app/util/ember-compatibility-functions.cpp' && exit 1 || exit 0 @@ -278,7 +295,9 @@ jobs: # git grep exits with 0 if it finds a match, but we want # to fail (exit nonzero) on match. And we want to exclude this file, # to avoid our grep regexp matching itself. - - name: Check for use of "SuccessOrExit(CHIP_ERROR_*)", which should probably be "SuccessOrExit(err = CHIP_ERROR_*)" + - name: + Check for use of "SuccessOrExit(CHIP_ERROR_*)", which should + probably be "SuccessOrExit(err = CHIP_ERROR_*)" if: always() run: | git grep -I -n 'SuccessOrExit(CHIP_ERROR' -- './*' ':(exclude).github/workflows/lint.yml' && exit 1 || exit 0 @@ -286,14 +305,19 @@ jobs: # git grep exits with 0 if it finds a match, but we want # to fail (exit nonzero) on match. And we want to exclude this file, # to avoid our grep regexp matching itself. - - name: Check for use of "SuccessOrExit(something-without-assignment(", which should probably be "SuccessOrExit(err = something(" + - name: + Check for use of + "SuccessOrExit(something-without-assignment(", which should + probably be "SuccessOrExit(err = something(" if: always() run: | git grep -I -n 'SuccessOrExit([^=)]*(' -- './*' ':(exclude).github/workflows/lint.yml' && exit 1 || exit 0 # git grep exits with 0 if it finds a match, but we want # to fail (exit nonzero) on match. - - name: Check for use of "using namespace" outside of a class/function in headers. + - name: + Check for use of "using namespace" outside of a class/function + in headers. if: always() run: | # Various platforms have `using namespace chip::Ble` in their BLEManager* headers; just exclude those for now. diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 73158ccb0557fd..d7639273132898 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -508,6 +508,7 @@ jobs: scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_FAN_3_4.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_FAN_3_5.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-lit-icd-ipv6only-no-ble-no-wifi-tsan-clang-test/lit-icd-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_ICDM_2_1.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' + scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-lit-icd-ipv6only-no-ble-no-wifi-tsan-clang-test/lit-icd-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json --enable-key 000102030405060708090a0b0c0d0e0f" --script "src/python_testing/TC_ICDManagementCluster.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --hex-arg enableKey:000102030405060708090a0b0c0d0e0f --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_IDM_1_2.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json --enable-key 000102030405060708090a0b0c0d0e0f" --script "src/python_testing/TC_IDM_1_4.py" --script-args "--hex-arg PIXIT.DGGEN.TEST_EVENT_TRIGGER_KEY:000102030405060708090a0b0c0d0e0f --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_PWRTL_2_1.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' diff --git a/examples/lighting-app/nxp/k32w/k32w0/BUILD.gn b/examples/lighting-app/nxp/k32w/k32w0/BUILD.gn index 43a9860b5da48a..322c728a063ba7 100644 --- a/examples/lighting-app/nxp/k32w/k32w0/BUILD.gn +++ b/examples/lighting-app/nxp/k32w/k32w0/BUILD.gn @@ -112,6 +112,7 @@ k32w0_executable("light_app") { "${chip_root}/examples/common/QRCode", "${chip_root}/examples/lighting-app/nxp/zap/", "${chip_root}/examples/providers:device_info_provider", + "${chip_root}/src/app:test-event-trigger", "${chip_root}/src/lib", "${chip_root}/src/platform:syscalls_stub", "${chip_root}/third_party/mbedtls:mbedtls", diff --git a/src/app/BUILD.gn b/src/app/BUILD.gn index 312fe005d88f0b..76bd115a851a21 100644 --- a/src/app/BUILD.gn +++ b/src/app/BUILD.gn @@ -146,6 +146,10 @@ source_set("constants") { ] } +source_set("test-event-trigger") { + sources = [ "TestEventTriggerDelegate.h" ] +} + # interaction-model is a static-library because it currently requires global functions (app/util/...) that are stubbed in different test files that depend on the app static_library # which in tern depens on the interaction-model. # Using source_set prevents the unit test to build correctly. diff --git a/src/app/icd/server/BUILD.gn b/src/app/icd/server/BUILD.gn index a6c5096dde7d0c..c100cc7d041e84 100644 --- a/src/app/icd/server/BUILD.gn +++ b/src/app/icd/server/BUILD.gn @@ -81,6 +81,7 @@ source_set("manager") { ":notifier", ":observer", "${chip_root}/src/app:subscription-info-provider", + "${chip_root}/src/app:test-event-trigger", "${chip_root}/src/credentials:credentials", "${chip_root}/src/messaging", ] diff --git a/src/app/icd/server/ICDManager.cpp b/src/app/icd/server/ICDManager.cpp index f4442e85972ee2..479fb9a240bc30 100644 --- a/src/app/icd/server/ICDManager.cpp +++ b/src/app/icd/server/ICDManager.cpp @@ -28,6 +28,14 @@ #include #include +namespace { +enum class ICDTestEventTriggerEvent : uint64_t +{ + kAddActiveModeReq = 0x0046'0000'00000001, + kRemoveActiveModeReq = 0x0046'0000'00000002, +}; +} // namespace + namespace chip { namespace app { @@ -643,6 +651,27 @@ void ICDManager::ExtendActiveMode(Milliseconds16 extendDuration) } } +CHIP_ERROR ICDManager::HandleEventTrigger(uint64_t eventTrigger) +{ + ICDTestEventTriggerEvent trigger = static_cast(eventTrigger); + CHIP_ERROR err = CHIP_NO_ERROR; + + switch (trigger) + { + case ICDTestEventTriggerEvent::kAddActiveModeReq: + SetKeepActiveModeRequirements(KeepActiveFlag::kTestEventTriggerActiveMode, true); + break; + case ICDTestEventTriggerEvent::kRemoveActiveModeReq: + SetKeepActiveModeRequirements(KeepActiveFlag::kTestEventTriggerActiveMode, false); + break; + default: + err = CHIP_ERROR_INVALID_ARGUMENT; + break; + } + + return err; +} + ICDManager::ObserverPointer * ICDManager::RegisterObserver(ICDStateObserver * observer) { return mStateObserverPool.CreateObject(observer); diff --git a/src/app/icd/server/ICDManager.h b/src/app/icd/server/ICDManager.h index 058285802eb309..43a5386d4d7844 100644 --- a/src/app/icd/server/ICDManager.h +++ b/src/app/icd/server/ICDManager.h @@ -16,16 +16,11 @@ */ #pragma once -#include - #include -#if CHIP_CONFIG_ENABLE_ICD_CIP -#include // nogncheck -#include // nogncheck -#endif // CHIP_CONFIG_ENABLE_ICD_CIP - +#include #include +#include #include #include #include @@ -38,6 +33,11 @@ #include #include +#if CHIP_CONFIG_ENABLE_ICD_CIP +#include // nogncheck +#include // nogncheck +#endif // CHIP_CONFIG_ENABLE_ICD_CIP + namespace chip { namespace Crypto { using SymmetricKeystore = SessionKeystore; @@ -54,7 +54,7 @@ class TestICDManager; /** * @brief ICD Manager is responsible of processing the events and triggering the correct action for an ICD */ -class ICDManager : public ICDListener +class ICDManager : public ICDListener, public TestEventTriggerHandler { public: // This structure is used for the creation an ObjectPool of ICDStateObserver pointers @@ -129,6 +129,15 @@ class ICDManager : public ICDListener */ uint32_t StayActiveRequest(uint32_t stayActiveDuration); + /** + * @brief TestEventTriggerHandler for the ICD feature set + * + * @param eventTrigger Event trigger to handle. + * @return CHIP_ERROR CHIP_NO_ERROR - No erros during the processing + * CHIP_ERROR_INVALID_ARGUMENT - eventTrigger isn't a valid value + */ + CHIP_ERROR HandleEventTrigger(uint64_t eventTrigger) override; + #if CHIP_CONFIG_ENABLE_ICD_CIP void SendCheckInMsgs(); @@ -165,14 +174,14 @@ class ICDManager : public ICDListener void OnSubscriptionReport() override; protected: + friend class TestICDManager; + /** * @brief Hepler function that extends the Active Mode duration as well as the Active Mode Jitter timer for the transition to * iddle mode. */ void ExtendActiveMode(System::Clock::Milliseconds16 extendDuration); - friend class TestICDManager; - static void OnIdleModeDone(System::Layer * aLayer, void * appState); static void OnActiveModeDone(System::Layer * aLayer, void * appState); diff --git a/src/app/icd/server/ICDNotifier.h b/src/app/icd/server/ICDNotifier.h index 5db14503a296d7..785fd1e08c9879 100644 --- a/src/app/icd/server/ICDNotifier.h +++ b/src/app/icd/server/ICDNotifier.h @@ -39,11 +39,12 @@ class ICDListener public: enum class KeepActiveFlagsValues : uint8_t { - kCommissioningWindowOpen = 0x01, - kFailSafeArmed = 0x02, - kExchangeContextOpen = 0x04, - kCheckInInProgress = 0x08, - kInvalidFlag = 0x10, // Move up when adding more flags + kCommissioningWindowOpen = 0x01, + kFailSafeArmed = 0x02, + kExchangeContextOpen = 0x04, + kCheckInInProgress = 0x08, + kTestEventTriggerActiveMode = 0x10, + kInvalidFlag = 0x20, // Move up when adding more flags }; enum class ICDManagementEvents : uint8_t diff --git a/src/app/server/BUILD.gn b/src/app/server/BUILD.gn index 7c661464bbaea3..51a259c86d2552 100644 --- a/src/app/server/BUILD.gn +++ b/src/app/server/BUILD.gn @@ -52,6 +52,7 @@ static_library("server") { public_deps = [ "${chip_root}/src/app", + "${chip_root}/src/app:test-event-trigger", "${chip_root}/src/app/icd/server:icd-server-config", "${chip_root}/src/app/icd/server:observer", "${chip_root}/src/lib/address_resolve", diff --git a/src/app/server/Server.cpp b/src/app/server/Server.cpp index eff11222bfae7b..57abf8087f59ca 100644 --- a/src/app/server/Server.cpp +++ b/src/app/server/Server.cpp @@ -348,6 +348,10 @@ CHIP_ERROR Server::Init(const ServerInitParams & initParams) mICDManager.Init(mDeviceStorage, &GetFabricTable(), mSessionKeystore, &mExchangeMgr, chip::app::InteractionModelEngine::GetInstance()); + + // Register Test Event Trigger Handler + mTestEventTriggerDelegate->AddHandler(&mICDManager); + #endif // CHIP_CONFIG_ENABLE_ICD_SERVER // This code is necessary to restart listening to existing groups after a reboot @@ -592,6 +596,8 @@ void Server::Shutdown() Access::ResetAccessControlToDefault(); Credentials::SetGroupDataProvider(nullptr); #if CHIP_CONFIG_ENABLE_ICD_SERVER + // Remove Test Event Trigger Handler + mTestEventTriggerDelegate->RemoveHandler(&mICDManager); mICDManager.Shutdown(); #endif // CHIP_CONFIG_ENABLE_ICD_SERVER mAttributePersister.Shutdown(); diff --git a/src/app/tests/TestCommissionManager.cpp b/src/app/tests/TestCommissionManager.cpp index c88b459742de16..c314421d4e3a9a 100644 --- a/src/app/tests/TestCommissionManager.cpp +++ b/src/app/tests/TestCommissionManager.cpp @@ -15,6 +15,7 @@ * limitations under the License. */ +#include #include #include #include @@ -100,6 +101,8 @@ void InitializeChip(nlTestSuite * suite) static chip::app::DefaultTimerDelegate sTimerDelegate; static chip::app::reporting::ReportSchedulerImpl sReportScheduler(&sTimerDelegate); initParams.reportScheduler = &sReportScheduler; + static chip::SimpleTestEventTriggerDelegate sSimpleTestEventTriggerDelegate; + initParams.testEventTriggerDelegate = &sSimpleTestEventTriggerDelegate; (void) initParams.InitializeStaticResourcesBeforeServerInit(); err = chip::Server::GetInstance().Init(initParams); diff --git a/src/app/tests/TestICDManager.cpp b/src/app/tests/TestICDManager.cpp index ac8c220351fd86..fd93a146cf2755 100644 --- a/src/app/tests/TestICDManager.cpp +++ b/src/app/tests/TestICDManager.cpp @@ -17,6 +17,7 @@ */ #include #include +#include #include #include #include @@ -66,6 +67,13 @@ constexpr uint8_t kKeyBuffer2b[] = { 0xf2, 0xe2, 0xd2, 0xc2, 0xb2, 0xa2, 0x92, 0x82, 0x72, 0x62, 0x52, 0x42, 0x32, 0x22, 0x12, 0x02 }; +// Taken from the ICDManager Implementation +enum class ICDTestEventTriggerEvent : uint64_t +{ + kAddActiveModeReq = 0x0046'0000'00000001, + kRemoveActiveModeReq = 0x0046'0000'00000002, +}; + class TestICDStateObserver : public app::ICDStateObserver { public: @@ -115,6 +123,7 @@ class TestContext : public chip::Test::AppContext // Performs setup for each individual test in the test suite CHIP_ERROR SetUp() override { + ReturnErrorOnFailure(chip::Test::AppContext::SetUp()); mICDManager.Init(&testStorage, &GetFabricTable(), &mKeystore, &GetExchangeManager(), &mSubInfoProvider); mICDManager.RegisterObserver(&mICDStateObserver); @@ -692,6 +701,26 @@ class TestICDManager NL_TEST_ASSERT(aSuite, ctx->mICDManager.ShouldCheckInMsgsBeSentAtActiveModeFunction(kTestFabricIndex1, kClientNodeId11)); } #endif // CHIP_CONFIG_PERSIST_SUBSCRIPTIONS + + static void TestHandleTestEventTriggerActiveModeReq(nlTestSuite * aSuite, void * aContext) + { + TestContext * ctx = static_cast(aContext); + + // Verify That ICDManager starts in Idle + NL_TEST_ASSERT(aSuite, ctx->mICDManager.mOperationalState == ICDManager::OperationalState::IdleMode); + + // Add ActiveMode req for the Test event trigger event + ctx->mICDManager.HandleEventTrigger(static_cast(ICDTestEventTriggerEvent::kAddActiveModeReq)); + NL_TEST_ASSERT(aSuite, ctx->mICDManager.mOperationalState == ICDManager::OperationalState::ActiveMode); + + // Advance clock by the ActiveModeDuration and check that the device is still in ActiveMode + AdvanceClockAndRunEventLoop(ctx, ICDConfigurationData::GetInstance().GetActiveModeDuration() + 1_ms32); + NL_TEST_ASSERT(aSuite, ctx->mICDManager.mOperationalState == ICDManager::OperationalState::ActiveMode); + + // Remove req and device should go to IdleMode + ctx->mICDManager.HandleEventTrigger(static_cast(ICDTestEventTriggerEvent::kRemoveActiveModeReq)); + NL_TEST_ASSERT(aSuite, ctx->mICDManager.mOperationalState == ICDManager::OperationalState::IdleMode); + } }; } // namespace app @@ -710,6 +739,7 @@ static const nlTest sTests[] = { NL_TEST_DEF("TestICDCounter", TestICDManager::TestICDCounter), NL_TEST_DEF("TestICDStayActive", TestICDManager::TestICDMStayActive), NL_TEST_DEF("TestShouldCheckInMsgsBeSentAtActiveModeFunction", TestICDManager::TestShouldCheckInMsgsBeSentAtActiveModeFunction), + NL_TEST_DEF("TestHandleTestEventTriggerActiveModeReq", TestICDManager::TestHandleTestEventTriggerActiveModeReq), NL_TEST_SENTINEL(), }; diff --git a/src/platform/nxp/k32w/k32w0/BUILD.gn b/src/platform/nxp/k32w/k32w0/BUILD.gn index 9d1ef45db9fdb5..c8aea6ee945f22 100644 --- a/src/platform/nxp/k32w/k32w0/BUILD.gn +++ b/src/platform/nxp/k32w/k32w0/BUILD.gn @@ -108,7 +108,10 @@ static_library("nxp_platform") { deps = [ "${chip_root}/src/platform/logging:headers" ] - public_deps = [ "${chip_root}/src/platform:platform_base" ] + public_deps = [ + "${chip_root}/src/app:test-event-trigger", + "${chip_root}/src/platform:platform_base", + ] if (chip_crypto == "platform") { if (chip_crypto_flavor == "tinycrypt") { diff --git a/src/platform/nxp/k32w/k32w1/BUILD.gn b/src/platform/nxp/k32w/k32w1/BUILD.gn index 30352203eebaaa..34dc5ca1b4e38a 100644 --- a/src/platform/nxp/k32w/k32w1/BUILD.gn +++ b/src/platform/nxp/k32w/k32w1/BUILD.gn @@ -77,7 +77,10 @@ static_library("nxp_platform") { "${chip_root}/src/platform/nxp/k32w/k32w1/SMU2Manager.h", ] - public_deps = [ "${chip_root}/src/platform:platform_base" ] + public_deps = [ + "${chip_root}/src/app:test-event-trigger", + "${chip_root}/src/platform:platform_base", + ] if (chip_with_low_power != 0) { sources += [ "LowPowerHooks.cpp" ] diff --git a/src/python_testing/TC_ICDManagementCluster.py b/src/python_testing/TC_ICDManagementCluster.py new file mode 100644 index 00000000000000..a5b769ba30272c --- /dev/null +++ b/src/python_testing/TC_ICDManagementCluster.py @@ -0,0 +1,63 @@ +# +# Copyright (c) 2024 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. + +import chip.clusters as Clusters +from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main +from mobly import asserts + +# Assumes `--enable-key 000102030405060708090a0b0c0d0e0f` on Linux app command line, or a DUT +# that has that Enable Key +kTestEventTriggerKey = bytes([b for b in range(16)]) + +kAddActiveModeReq = 0x0046000000000001 +kRemoveActiveModeReq = 0x0046000000000002 + + +class TestICDManagementCluster(MatterBaseTest): + @async_test_body + async def test_active_mode_test_event_trigger(self): + dev_ctrl = self.default_controller + is_test_event_triggers_enabled = await self.read_single_attribute( + dev_ctrl, + self.dut_node_id, + endpoint=0, + attribute=Clusters.GeneralDiagnostics.Attributes.TestEventTriggersEnabled + ) + asserts.assert_true(is_test_event_triggers_enabled, + "This test expects Test Event Triggers are Enabled") + + # No response to command --> Success yields "None". + asserts.assert_is_none( + await dev_ctrl.SendCommand( + self.dut_node_id, + endpoint=0, + payload=Clusters.GeneralDiagnostics.Commands.TestEventTrigger(enableKey=kTestEventTriggerKey, + eventTrigger=kAddActiveModeReq) + ) + ) + + asserts.assert_is_none( + await dev_ctrl.SendCommand( + self.dut_node_id, + endpoint=0, + payload=Clusters.GeneralDiagnostics.Commands.TestEventTrigger(enableKey=kTestEventTriggerKey, + eventTrigger=kRemoveActiveModeReq) + ) + ) + + +if __name__ == "__main__": + default_matter_test_main() From 8e49f2c036e63afe9aae05d6d4c12cd534e923eb Mon Sep 17 00:00:00 2001 From: erwinpan1 Date: Wed, 10 Apr 2024 08:30:26 +0800 Subject: [PATCH 014/468] Add RPC Event Service draft --- .../chef/common/chef-rpc-command-delegate.cpp | 231 +++++++++++++ .../chef/common/chef-rpc-command-delegate.h | 85 +++++ .../rootnode_genericswitch_9866e35d0b.matter | 283 +++++++++++++++- .../rootnode_genericswitch_9866e35d0b.zap | 316 +++++++++++++++++- examples/chef/linux/BUILD.gn | 2 + examples/common/pigweed/BUILD.gn | 7 + .../common/pigweed/protos/event_service.proto | 33 ++ .../common/pigweed/rpc_console/py/BUILD.gn | 1 + .../rpc_console/py/chip_rpc/console.py | 2 + examples/common/pigweed/rpc_services/Event.h | 73 ++++ examples/platform/esp32/Rpc.cpp | 12 + examples/platform/linux/Rpc.cpp | 12 + examples/platform/nrfconnect/Rpc.cpp | 12 + 13 files changed, 1067 insertions(+), 2 deletions(-) create mode 100644 examples/chef/common/chef-rpc-command-delegate.cpp create mode 100644 examples/chef/common/chef-rpc-command-delegate.h create mode 100644 examples/common/pigweed/protos/event_service.proto create mode 100644 examples/common/pigweed/rpc_services/Event.h diff --git a/examples/chef/common/chef-rpc-command-delegate.cpp b/examples/chef/common/chef-rpc-command-delegate.cpp new file mode 100644 index 00000000000000..1bcbdcfa8202d2 --- /dev/null +++ b/examples/chef/common/chef-rpc-command-delegate.cpp @@ -0,0 +1,231 @@ +/* + * + * Copyright (c) 2022 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "AllClustersCommandDelegate.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +using namespace chip; +using namespace chip::app; +using namespace chip::app::Clusters; +using namespace chip::DeviceLayer; + +ChefRpcCommandHandler * ChefRpcCommandHandler::FromJSON(const char * json) +{ + Json::Reader reader; + Json::Value value; + + if (!reader.parse(json, value)) + { + ChipLogError(NotSpecified, + "AllClusters App: Error parsing JSON with error %s:", reader.getFormattedErrorMessages().c_str()); + return nullptr; + } + + if (value.empty() || !value.isObject()) + { + ChipLogError(NotSpecified, "AllClusters App: Invalid JSON command received"); + return nullptr; + } + + if (!value.isMember("Name") || !value["Name"].isString()) + { + ChipLogError(NotSpecified, "AllClusters App: Invalid JSON command received: command name is missing"); + return nullptr; + } + + return Platform::New(std::move(value)); +} + +void ChefRpcCommandHandler::HandleCommand(intptr_t context) +{ + auto * self = reinterpret_cast(context); + std::string name = self->mJsonValue["Name"].asString(); + + VerifyOrExit(!self->mJsonValue.empty(), ChipLogError(NotSpecified, "Invalid JSON event command received")); + + if (name == "SwitchLatched") + { + uint8_t newPosition = static_cast(self->mJsonValue["NewPosition"].asUInt()); + self->OnSwitchLatchedHandler(newPosition); + } + else if (name == "InitialPress") + { + uint8_t newPosition = static_cast(self->mJsonValue["NewPosition"].asUInt()); + self->OnSwitchInitialPressedHandler(newPosition); + } + else if (name == "LongPress") + { + uint8_t newPosition = static_cast(self->mJsonValue["NewPosition"].asUInt()); + self->OnSwitchLongPressedHandler(newPosition); + } + else if (name == "ShortRelease") + { + uint8_t previousPosition = static_cast(self->mJsonValue["PreviousPosition"].asUInt()); + self->OnSwitchShortReleasedHandler(previousPosition); + } + else if (name == "LongRelease") + { + uint8_t previousPosition = static_cast(self->mJsonValue["PreviousPosition"].asUInt()); + self->OnSwitchLongReleasedHandler(previousPosition); + } + else if (name == "MultiPressOngoing") + { + uint8_t newPosition = static_cast(self->mJsonValue["NewPosition"].asUInt()); + uint8_t count = static_cast(self->mJsonValue["CurrentNumberOfPressesCounted"].asUInt()); + self->OnSwitchMultiPressOngoingHandler(newPosition, count); + } + else if (name == "MultiPressComplete") + { + uint8_t previousPosition = static_cast(self->mJsonValue["PreviousPosition"].asUInt()); + uint8_t count = static_cast(self->mJsonValue["TotalNumberOfPressesCounted"].asUInt()); + self->OnSwitchMultiPressCompleteHandler(previousPosition, count); + } + else + { + ChipLogError(NotSpecified, "Unhandled command: Should never happens"); + } + +exit: + Platform::Delete(self); +} + +bool ChefRpcCommandHandler::IsClusterPresentOnAnyEndpoint(ClusterId clusterId) +{ + EnabledEndpointsWithServerCluster enabledEndpoints(clusterId); + + return (enabledEndpoints.begin() != enabledEndpoints.end()); +} + +void ChefRpcCommandHandler::OnSwitchLatchedHandler(uint8_t newPosition) +{ + EndpointId endpoint = 1; + + Protocols::InteractionModel::Status status = Switch::Attributes::CurrentPosition::Set(endpoint, newPosition); + VerifyOrReturn(Protocols::InteractionModel::Status::Success == status, + ChipLogError(NotSpecified, "Failed to set CurrentPosition attribute")); + ChipLogDetail(NotSpecified, "The latching switch is moved to a new position:%d", newPosition); + + Clusters::SwitchServer::Instance().OnSwitchLatch(endpoint, newPosition); +} + +void ChefRpcCommandHandler::OnSwitchInitialPressedHandler(uint8_t newPosition) +{ + EndpointId endpoint = 1; + + Protocols::InteractionModel::Status status = Switch::Attributes::CurrentPosition::Set(endpoint, newPosition); + VerifyOrReturn(Protocols::InteractionModel::Status::Success == status, + ChipLogError(NotSpecified, "Failed to set CurrentPosition attribute")); + ChipLogDetail(NotSpecified, "The new position when the momentary switch starts to be pressed:%d", newPosition); + + Clusters::SwitchServer::Instance().OnInitialPress(endpoint, newPosition); +} + +void ChefRpcCommandHandler::OnSwitchLongPressedHandler(uint8_t newPosition) +{ + EndpointId endpoint = 1; + + Protocols::InteractionModel::Status status = Switch::Attributes::CurrentPosition::Set(endpoint, newPosition); + VerifyOrReturn(Protocols::InteractionModel::Status::Success == status, + ChipLogError(NotSpecified, "Failed to set CurrentPosition attribute")); + ChipLogDetail(NotSpecified, "The new position when the momentary switch has been pressed for a long time:%d", newPosition); + + Clusters::SwitchServer::Instance().OnLongPress(endpoint, newPosition); + + // Long press to trigger smokeco self-test + SmokeCoAlarmServer::Instance().RequestSelfTest(endpoint); +} + +void ChefRpcCommandHandler::OnSwitchShortReleasedHandler(uint8_t previousPosition) +{ + EndpointId endpoint = 1; + + Protocols::InteractionModel::Status status = Switch::Attributes::CurrentPosition::Set(endpoint, 0); + VerifyOrReturn(Protocols::InteractionModel::Status::Success == status, + ChipLogError(NotSpecified, "Failed to reset CurrentPosition attribute")); + ChipLogDetail(NotSpecified, "The the previous value of the CurrentPosition when the momentary switch has been released:%d", + previousPosition); + + Clusters::SwitchServer::Instance().OnShortRelease(endpoint, previousPosition); +} + +void ChefRpcCommandHandler::OnSwitchLongReleasedHandler(uint8_t previousPosition) +{ + EndpointId endpoint = 1; + + Protocols::InteractionModel::Status status = Switch::Attributes::CurrentPosition::Set(endpoint, 0); + VerifyOrReturn(Protocols::InteractionModel::Status::Success == status, + ChipLogError(NotSpecified, "Failed to reset CurrentPosition attribute")); + ChipLogDetail(NotSpecified, + "The the previous value of the CurrentPosition when the momentary switch has been released after having been " + "pressed for a long time:%d", + previousPosition); + + Clusters::SwitchServer::Instance().OnLongRelease(endpoint, previousPosition); +} + +void ChefRpcCommandHandler::OnSwitchMultiPressOngoingHandler(uint8_t newPosition, uint8_t count) +{ + EndpointId endpoint = 1; + + Protocols::InteractionModel::Status status = Switch::Attributes::CurrentPosition::Set(endpoint, newPosition); + VerifyOrReturn(Protocols::InteractionModel::Status::Success == status, + ChipLogError(NotSpecified, "Failed to set CurrentPosition attribute")); + ChipLogDetail(NotSpecified, "The new position when the momentary switch has been pressed in a multi-press sequence:%d", + newPosition); + ChipLogDetail(NotSpecified, "%d times the momentary switch has been pressed", count); + + Clusters::SwitchServer::Instance().OnMultiPressOngoing(endpoint, newPosition, count); +} + +void ChefRpcCommandHandler::OnSwitchMultiPressCompleteHandler(uint8_t previousPosition, uint8_t count) +{ + EndpointId endpoint = 1; + + Protocols::InteractionModel::Status status = Switch::Attributes::CurrentPosition::Set(endpoint, 0); + VerifyOrReturn(Protocols::InteractionModel::Status::Success == status, + ChipLogError(NotSpecified, "Failed to reset CurrentPosition attribute")); + ChipLogDetail(NotSpecified, "The previous position when the momentary switch has been pressed in a multi-press sequence:%d", + previousPosition); + ChipLogDetail(NotSpecified, "%d times the momentary switch has been pressed", count); + + Clusters::SwitchServer::Instance().OnMultiPressComplete(endpoint, previousPosition, count); +} + + +void ChefRpcCommandDelegate::OnEventCommandReceived(const char * json) +{ + auto handler = ChefRpcCommandHandler::FromJSON(json); + if (nullptr == handler) + { + ChipLogError(NotSpecified, "AllClusters App: Unable to instantiate a command handler"); + return; + } + + chip::DeviceLayer::PlatformMgr().ScheduleWork(ChefRpcCommandHandler::HandleCommand, reinterpret_cast(handler)); +} diff --git a/examples/chef/common/chef-rpc-command-delegate.h b/examples/chef/common/chef-rpc-command-delegate.h new file mode 100644 index 00000000000000..bfa8291fb45d1b --- /dev/null +++ b/examples/chef/common/chef-rpc-command-delegate.h @@ -0,0 +1,85 @@ +/* + * + * Copyright (c) 2022 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include "NamedPipeCommands.h" + +#include +#include + +#include + +class ChefRpcCommandHandler +{ +public: + static ChefRpcCommandHandler * FromJSON(const char * json); + + static void HandleCommand(intptr_t context); + + ChefRpcCommandHandler(Json::Value && jasonValue) : mJsonValue(std::move(jasonValue)) {} + +private: + Json::Value mJsonValue; + + bool IsClusterPresentOnAnyEndpoint(chip::ClusterId clusterId); + + /** + * Should be called when the latching switch is moved to a new position. + */ + void OnSwitchLatchedHandler(uint8_t newPosition); + + /** + * Should be called when the momentary switch starts to be pressed. + */ + void OnSwitchInitialPressedHandler(uint8_t newPosition); + + /** + * Should be called when the momentary switch has been pressed for a "long" time. + */ + void OnSwitchLongPressedHandler(uint8_t newPosition); + + /** + * Should be called when the momentary switch has been released. + */ + void OnSwitchShortReleasedHandler(uint8_t previousPosition); + + /** + * Should be called when the momentary switch has been released after having been pressed for a long time. + */ + void OnSwitchLongReleasedHandler(uint8_t previousPosition); + + /** + * Should be called to indicate how many times the momentary switch has been pressed in a multi-press + * sequence, during that sequence. + */ + void OnSwitchMultiPressOngoingHandler(uint8_t newPosition, uint8_t count); + + /** + * Should be called to indicate how many times the momentary switch has been pressed in a multi-press + * sequence, after it has been detected that the sequence has ended. + */ + void OnSwitchMultiPressCompleteHandler(uint8_t previousPosition, uint8_t count); + +}; + +class ChefRpcCommandDelegate +{ +public: + void OnEventCommandReceived(const char * json) override; +}; diff --git a/examples/chef/devices/rootnode_genericswitch_9866e35d0b.matter b/examples/chef/devices/rootnode_genericswitch_9866e35d0b.matter index 8e2d0166cc44a9..8452f079e59f4b 100644 --- a/examples/chef/devices/rootnode_genericswitch_9866e35d0b.matter +++ b/examples/chef/devices/rootnode_genericswitch_9866e35d0b.matter @@ -256,6 +256,265 @@ cluster BasicInformation = 40 { command MfgSpecificPing(): DefaultSuccess = 0; } +/** This cluster is used to describe the configuration and capabilities of a physical power source that provides power to the Node. */ +cluster PowerSource = 47 { + revision 1; // NOTE: Default/not specifically set + + enum BatApprovedChemistryEnum : enum16 { + kUnspecified = 0; + kAlkaline = 1; + kLithiumCarbonFluoride = 2; + kLithiumChromiumOxide = 3; + kLithiumCopperOxide = 4; + kLithiumIronDisulfide = 5; + kLithiumManganeseDioxide = 6; + kLithiumThionylChloride = 7; + kMagnesium = 8; + kMercuryOxide = 9; + kNickelOxyhydride = 10; + kSilverOxide = 11; + kZincAir = 12; + kZincCarbon = 13; + kZincChloride = 14; + kZincManganeseDioxide = 15; + kLeadAcid = 16; + kLithiumCobaltOxide = 17; + kLithiumIon = 18; + kLithiumIonPolymer = 19; + kLithiumIronPhosphate = 20; + kLithiumSulfur = 21; + kLithiumTitanate = 22; + kNickelCadmium = 23; + kNickelHydrogen = 24; + kNickelIron = 25; + kNickelMetalHydride = 26; + kNickelZinc = 27; + kSilverZinc = 28; + kSodiumIon = 29; + kSodiumSulfur = 30; + kZincBromide = 31; + kZincCerium = 32; + } + + enum BatChargeFaultEnum : enum8 { + kUnspecified = 0; + kAmbientTooHot = 1; + kAmbientTooCold = 2; + kBatteryTooHot = 3; + kBatteryTooCold = 4; + kBatteryAbsent = 5; + kBatteryOverVoltage = 6; + kBatteryUnderVoltage = 7; + kChargerOverVoltage = 8; + kChargerUnderVoltage = 9; + kSafetyTimeout = 10; + } + + enum BatChargeLevelEnum : enum8 { + kOK = 0; + kWarning = 1; + kCritical = 2; + } + + enum BatChargeStateEnum : enum8 { + kUnknown = 0; + kIsCharging = 1; + kIsAtFullCharge = 2; + kIsNotCharging = 3; + } + + enum BatCommonDesignationEnum : enum16 { + kUnspecified = 0; + kAAA = 1; + kAA = 2; + kC = 3; + kD = 4; + k4v5 = 5; + k6v0 = 6; + k9v0 = 7; + k12AA = 8; + kAAAA = 9; + kA = 10; + kB = 11; + kF = 12; + kN = 13; + kNo6 = 14; + kSubC = 15; + kA23 = 16; + kA27 = 17; + kBA5800 = 18; + kDuplex = 19; + k4SR44 = 20; + k523 = 21; + k531 = 22; + k15v0 = 23; + k22v5 = 24; + k30v0 = 25; + k45v0 = 26; + k67v5 = 27; + kJ = 28; + kCR123A = 29; + kCR2 = 30; + k2CR5 = 31; + kCRP2 = 32; + kCRV3 = 33; + kSR41 = 34; + kSR43 = 35; + kSR44 = 36; + kSR45 = 37; + kSR48 = 38; + kSR54 = 39; + kSR55 = 40; + kSR57 = 41; + kSR58 = 42; + kSR59 = 43; + kSR60 = 44; + kSR63 = 45; + kSR64 = 46; + kSR65 = 47; + kSR66 = 48; + kSR67 = 49; + kSR68 = 50; + kSR69 = 51; + kSR516 = 52; + kSR731 = 53; + kSR712 = 54; + kLR932 = 55; + kA5 = 56; + kA10 = 57; + kA13 = 58; + kA312 = 59; + kA675 = 60; + kAC41E = 61; + k10180 = 62; + k10280 = 63; + k10440 = 64; + k14250 = 65; + k14430 = 66; + k14500 = 67; + k14650 = 68; + k15270 = 69; + k16340 = 70; + kRCR123A = 71; + k17500 = 72; + k17670 = 73; + k18350 = 74; + k18500 = 75; + k18650 = 76; + k19670 = 77; + k25500 = 78; + k26650 = 79; + k32600 = 80; + } + + enum BatFaultEnum : enum8 { + kUnspecified = 0; + kOverTemp = 1; + kUnderTemp = 2; + } + + enum BatReplaceabilityEnum : enum8 { + kUnspecified = 0; + kNotReplaceable = 1; + kUserReplaceable = 2; + kFactoryReplaceable = 3; + } + + enum PowerSourceStatusEnum : enum8 { + kUnspecified = 0; + kActive = 1; + kStandby = 2; + kUnavailable = 3; + } + + enum WiredCurrentTypeEnum : enum8 { + kAC = 0; + kDC = 1; + } + + enum WiredFaultEnum : enum8 { + kUnspecified = 0; + kOverVoltage = 1; + kUnderVoltage = 2; + } + + bitmap Feature : bitmap32 { + kWired = 0x1; + kBattery = 0x2; + kRechargeable = 0x4; + kReplaceable = 0x8; + } + + struct BatChargeFaultChangeType { + BatChargeFaultEnum current[] = 0; + BatChargeFaultEnum previous[] = 1; + } + + struct BatFaultChangeType { + BatFaultEnum current[] = 0; + BatFaultEnum previous[] = 1; + } + + struct WiredFaultChangeType { + WiredFaultEnum current[] = 0; + WiredFaultEnum previous[] = 1; + } + + info event WiredFaultChange = 0 { + WiredFaultEnum current[] = 0; + WiredFaultEnum previous[] = 1; + } + + info event BatFaultChange = 1 { + BatFaultEnum current[] = 0; + BatFaultEnum previous[] = 1; + } + + info event BatChargeFaultChange = 2 { + BatChargeFaultEnum current[] = 0; + BatChargeFaultEnum previous[] = 1; + } + + readonly attribute PowerSourceStatusEnum status = 0; + readonly attribute int8u order = 1; + readonly attribute char_string<60> description = 2; + readonly attribute optional nullable int32u wiredAssessedInputVoltage = 3; + readonly attribute optional nullable int16u wiredAssessedInputFrequency = 4; + readonly attribute optional WiredCurrentTypeEnum wiredCurrentType = 5; + readonly attribute optional nullable int32u wiredAssessedCurrent = 6; + readonly attribute optional int32u wiredNominalVoltage = 7; + readonly attribute optional int32u wiredMaximumCurrent = 8; + readonly attribute optional boolean wiredPresent = 9; + readonly attribute optional WiredFaultEnum activeWiredFaults[] = 10; + readonly attribute optional nullable int32u batVoltage = 11; + readonly attribute optional nullable int8u batPercentRemaining = 12; + readonly attribute optional nullable int32u batTimeRemaining = 13; + readonly attribute optional BatChargeLevelEnum batChargeLevel = 14; + readonly attribute optional boolean batReplacementNeeded = 15; + readonly attribute optional BatReplaceabilityEnum batReplaceability = 16; + readonly attribute optional boolean batPresent = 17; + readonly attribute optional BatFaultEnum activeBatFaults[] = 18; + readonly attribute optional char_string<60> batReplacementDescription = 19; + readonly attribute optional BatCommonDesignationEnum batCommonDesignation = 20; + readonly attribute optional char_string<20> batANSIDesignation = 21; + readonly attribute optional char_string<20> batIECDesignation = 22; + readonly attribute optional BatApprovedChemistryEnum batApprovedChemistry = 23; + readonly attribute optional int32u batCapacity = 24; + readonly attribute optional int8u batQuantity = 25; + readonly attribute optional BatChargeStateEnum batChargeState = 26; + readonly attribute optional nullable int32u batTimeToFullCharge = 27; + readonly attribute optional boolean batFunctionalWhileCharging = 28; + readonly attribute optional nullable int32u batChargingCurrent = 29; + readonly attribute optional BatChargeFaultEnum activeBatChargeFaults[] = 30; + readonly attribute endpoint_no endpointList[] = 31; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + /** This cluster is used to manage global aspects of the Commissioning flow. */ cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set @@ -1196,9 +1455,31 @@ endpoint 1 { callback attribute clusterRevision; } + server cluster PowerSource { + persist attribute status default = 1; + persist attribute order default = 1; + persist attribute description default = "Battery"; + ram attribute batVoltage; + ram attribute batPercentRemaining; + ram attribute batTimeRemaining; + ram attribute batChargeLevel; + ram attribute batReplacementNeeded; + ram attribute batReplaceability; + ram attribute batPresent; + ram attribute batReplacementDescription; + persist attribute batQuantity default = 1; + callback attribute endpointList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0x0A; + ram attribute clusterRevision default = 1; + } + server cluster Switch { emits event SwitchLatched; - persist attribute numberOfPositions default = 2; + persist attribute numberOfPositions default = 5; persist attribute currentPosition default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; diff --git a/examples/chef/devices/rootnode_genericswitch_9866e35d0b.zap b/examples/chef/devices/rootnode_genericswitch_9866e35d0b.zap index 172c6d31772296..2a95e6fadaf61d 100644 --- a/examples/chef/devices/rootnode_genericswitch_9866e35d0b.zap +++ b/examples/chef/devices/rootnode_genericswitch_9866e35d0b.zap @@ -2273,6 +2273,320 @@ } ] }, + { + "name": "Power Source", + "code": 47, + "mfgCode": null, + "define": "POWER_SOURCE_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "Status", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "PowerSourceStatusEnum", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Order", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Description", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "Battery", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatVoltage", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatPercentRemaining", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatTimeRemaining", + "code": 13, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatChargeLevel", + "code": 14, + "mfgCode": null, + "side": "server", + "type": "BatChargeLevelEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatReplacementNeeded", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatReplaceability", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "BatReplaceabilityEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatPresent", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatReplacementDescription", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatQuantity", + "code": 25, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EndpointList", + "code": 31, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0A", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, { "name": "Switch", "code": 59, @@ -2291,7 +2605,7 @@ "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": "2", + "defaultValue": "5", "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/chef/linux/BUILD.gn b/examples/chef/linux/BUILD.gn index 264ced698b62e8..ca2ba7ece1f806 100644 --- a/examples/chef/linux/BUILD.gn +++ b/examples/chef/linux/BUILD.gn @@ -85,6 +85,7 @@ executable("${sample_name}") { "PW_RPC_BUTTON_SERVICE=1", "PW_RPC_DESCRIPTOR_SERVICE=1", "PW_RPC_DEVICE_SERVICE=1", + "PW_RPC_EVENT_SERVICE=1", "PW_RPC_LIGHTING_SERVICE=1", "PW_RPC_TRACING_SERVICE=1", ] @@ -112,6 +113,7 @@ executable("${sample_name}") { "${chip_root}/examples/common/pigweed:button_service.nanopb_rpc", "${chip_root}/examples/common/pigweed:descriptor_service.nanopb_rpc", "${chip_root}/examples/common/pigweed:device_service.nanopb_rpc", + "${chip_root}/examples/common/pigweed:event_service.nanopb_rpc", "${chip_root}/examples/common/pigweed:lighting_service.nanopb_rpc", "${chip_root}/examples/common/pigweed:rpc_services", ] diff --git a/examples/common/pigweed/BUILD.gn b/examples/common/pigweed/BUILD.gn index e056f2ef228a8a..638707c72040d1 100644 --- a/examples/common/pigweed/BUILD.gn +++ b/examples/common/pigweed/BUILD.gn @@ -72,6 +72,13 @@ pw_proto_library("button_service") { prefix = "button_service" } +pw_proto_library("event_service") { + sources = [ "protos/event_service.proto" ] + deps = [ "$dir_pw_protobuf:common_protos" ] + strip_prefix = "protos" + prefix = "event_service" +} + pw_proto_library("lighting_service") { sources = [ "protos/lighting_service.proto" ] deps = [ "$dir_pw_protobuf:common_protos" ] diff --git a/examples/common/pigweed/protos/event_service.proto b/examples/common/pigweed/protos/event_service.proto new file mode 100644 index 00000000000000..01c5589fe1aebe --- /dev/null +++ b/examples/common/pigweed/protos/event_service.proto @@ -0,0 +1,33 @@ +syntax = "proto3"; + +import 'pw_protobuf_protos/common.proto'; + +package chip.rpc; + +message EventSetRequest { + uint32 endpoint_id = 1; + uint32 cluster_id = 2; + uint32 event_id = 3; + std::string event_payload = 4; +} + +message EventSetResponse { + uint64 event_number = 1; +} + +message EventGetRequest { + uint32 endpoint_id = 1; +} + +message EventGetResponse { + uint32 event_id = 1; +} + +service Event { + // Set will return generated event number (caused by change) if all supported fields are successfully applied, any + // unsupported fields will be ignored. + rpc Set(EventSetRequest) returns (EventSetResponse){} + + // Get will return the latest event number + rpc Get(EventGetRequest) returns (EventGetResponse){} +} diff --git a/examples/common/pigweed/rpc_console/py/BUILD.gn b/examples/common/pigweed/rpc_console/py/BUILD.gn index a050fb64747302..bf14f08b4ade4f 100644 --- a/examples/common/pigweed/rpc_console/py/BUILD.gn +++ b/examples/common/pigweed/rpc_console/py/BUILD.gn @@ -45,6 +45,7 @@ pw_python_package("chip_rpc") { "${chip_root}/examples/common/pigweed:descriptor_service.python", "${chip_root}/examples/common/pigweed:device_service.python", "${chip_root}/examples/common/pigweed:echo_service.python", + "${chip_root}/examples/common/pigweed:event_service.python", "${chip_root}/examples/common/pigweed:lighting_service.python", "${chip_root}/examples/common/pigweed:locking_service.python", "${chip_root}/examples/common/pigweed:ot_cli_service.python", diff --git a/examples/common/pigweed/rpc_console/py/chip_rpc/console.py b/examples/common/pigweed/rpc_console/py/chip_rpc/console.py index f5ed5b5ab4d582..4019da385bbfe3 100644 --- a/examples/common/pigweed/rpc_console/py/chip_rpc/console.py +++ b/examples/common/pigweed/rpc_console/py/chip_rpc/console.py @@ -52,6 +52,7 @@ from descriptor_service import descriptor_service_pb2 from device_service import device_service_pb2 from echo_service import echo_pb2 +from event_service import event_service_pb2 from lighting_service import lighting_service_pb2 from locking_service import locking_service_pb2 from ot_cli_service import ot_cli_service_pb2 @@ -134,6 +135,7 @@ def show_console(device: str, baudrate: int, descriptor_service_pb2, device_service_pb2, echo_pb2, + event_service_pb2, lighting_service_pb2, locking_service_pb2, ot_cli_service_pb2, diff --git a/examples/common/pigweed/rpc_services/Event.h b/examples/common/pigweed/rpc_services/Event.h new file mode 100644 index 00000000000000..d40a95e64dd88e --- /dev/null +++ b/examples/common/pigweed/rpc_services/Event.h @@ -0,0 +1,73 @@ +/* + * + * Copyright (c) 2024 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 "app/util/attribute-storage.h" +#include "event_service/event_service.rpc.pb.h" +#include "pigweed/rpc_services/internal/StatusUtils.h" +#include +#include +#include + +namespace chip { +namespace rpc { + +class Event final : public pw_rpc::nanopb::Event::Service +{ +public: + virtual ~Event() = default; + + virtual pw::Status Set(const chip_rpc_EventSetRequest & request, chip_rpc_EventSetResponse & response) + { + EndpointId endpointId = request.endpoint_id; + uint8_t newPosition = 1 ; // to be parsed from request.event_payload + + EventNumber eventNumber; + { + DeviceLayer::StackLock lock; + + // Update attribute first, then emit SwitchLatched event only on success. + RETURN_STATUS_IF_NOT_OK(app::Clusters::Switch::Attributes::CurrentPosition::Set(endpointId, newPosition)); + + chip::app::Clusters::Switch::Events::SwitchLatched::Type event{ newPosition }; + RETURN_STATUS_IF_NOT_OK(app::LogEvent(event, endpointId, eventNumber)); + } + + response.event_number = static_cast(eventNumber); + return pw::OkStatus(); + } + + virtual pw::Status Get(const chip_rpc_EventGetRequest & request, chip_rpc_EventGetResponse & response) + { + EndpointId endpointId = request.endpoint_id; + uint32 event_id = 1; // TBD + + { + DeviceLayer::StackLock lock; + // TBD: Get latest event number + // RETURN_STATUS_IF_NOT_OK(app::Clusters::Switch::Attributes::StateValue::Get(endpointId, &state_value)); + } + + response.state.event_id = event_id; + return pw::OkStatus(); + } +}; + +} // namespace rpc +} // namespace chip diff --git a/examples/platform/esp32/Rpc.cpp b/examples/platform/esp32/Rpc.cpp index 61efb842f089b7..e17b4045f5e625 100644 --- a/examples/platform/esp32/Rpc.cpp +++ b/examples/platform/esp32/Rpc.cpp @@ -52,6 +52,10 @@ #include "pigweed/rpc_services/Device.h" #endif // defined(PW_RPC_DEVICE_SERVICE) && PW_RPC_DEVICE_SERVICE +#if defined(PW_RPC_EVENT_SERVICE) && PW_RPC_EVENT_SERVICE +#include "pigweed/rpc_services/Event.h" +#endif // defined(PW_RPC_EVENT_SERVICE) && PW_RPC_EVENT_SERVICE + #if defined(PW_RPC_LIGHTING_SERVICE) && PW_RPC_LIGHTING_SERVICE #include "pigweed/rpc_services/Lighting.h" #endif // defined(PW_RPC_LIGHTING_SERVICE) && PW_RPC_LIGHTING_SERVICE @@ -295,6 +299,10 @@ Descriptor descriptor_service; Esp32Device device_service; #endif // defined(PW_RPC_DEVICE_SERVICE) && PW_RPC_DEVICE_SERVICE +#if defined(PW_RPC_EVENT_SERVICE) && PW_RPC_EVENT_SERVICE +Event event_service; +#endif // defined(PW_RPC_EVENT_SERVICE) && PW_RPC_EVENT_SERVICE + #if defined(PW_RPC_LIGHTING_SERVICE) && PW_RPC_LIGHTING_SERVICE Lighting lighting_service; #endif // defined(PW_RPC_LIGHTING_SERVICE) && PW_RPC_LIGHTING_SERVICE @@ -333,6 +341,10 @@ void RegisterServices(pw::rpc::Server & server) server.RegisterService(device_service); #endif // defined(PW_RPC_DEVICE_SERVICE) && PW_RPC_DEVICE_SERVICE +#if defined(PW_RPC_EVENT_SERVICE) && PW_RPC_EVENT_SERVICE + server.RegisterService(event_service); +#endif // defined(PW_RPC_EVENT_SERVICE) && PW_RPC_EVENT_SERVICE + #if defined(PW_RPC_LIGHTING_SERVICE) && PW_RPC_LIGHTING_SERVICE server.RegisterService(lighting_service); #endif // defined(PW_RPC_LIGHTING_SERVICE) && PW_RPC_LIGHTING_SERVICE diff --git a/examples/platform/linux/Rpc.cpp b/examples/platform/linux/Rpc.cpp index da6b73b9135c13..6e5f2433cfaf03 100644 --- a/examples/platform/linux/Rpc.cpp +++ b/examples/platform/linux/Rpc.cpp @@ -38,6 +38,10 @@ #include "pigweed/rpc_services/Device.h" #endif // defined(PW_RPC_DEVICE_SERVICE) && PW_RPC_DEVICE_SERVICE +#if defined(PW_RPC_EVENT_SERVICE) && PW_RPC_EVENT_SERVICE +#include "pigweed/rpc_services/Event.h" +#endif // defined(PW_RPC_EVENT_SERVICE) && PW_RPC_EVENT_SERVICE + #if defined(PW_RPC_LIGHTING_SERVICE) && PW_RPC_LIGHTING_SERVICE #include "pigweed/rpc_services/Lighting.h" #endif // defined(PW_RPC_LIGHTING_SERVICE) && PW_RPC_LIGHTING_SERVICE @@ -84,6 +88,10 @@ Descriptor descriptor_service; Device device_service; #endif // defined(PW_RPC_DEVICE_SERVICE) && PW_RPC_DEVICE_SERVICE +#if defined(PW_RPC_EVENT_SERVICE) && PW_RPC_EVENT_SERVICE +BooleanState event_service; +#endif // defined(PW_RPC_EVENT_SERVICE) && PW_RPC_EVENT_SERVICE + #if defined(PW_RPC_LIGHTING_SERVICE) && PW_RPC_LIGHTING_SERVICE Lighting lighting_service; #endif // defined(PW_RPC_LIGHTING_SERVICE) && PW_RPC_LIGHTING_SERVICE @@ -110,6 +118,10 @@ void RegisterServices(pw::rpc::Server & server) server.RegisterService(device_service); #endif // defined(PW_RPC_DEVICE_SERVICE) && PW_RPC_DEVICE_SERVICE +#if defined(PW_RPC_EVENT_SERVICE) && PW_RPC_EVENT_SERVICE + server.RegisterService(event_service); +#endif // defined(PW_RPC_EVENT_SERVICE) && PW_RPC_EVENT_SERVICE + #if defined(PW_RPC_LIGHTING_SERVICE) && PW_RPC_LIGHTING_SERVICE server.RegisterService(lighting_service); #endif // defined(PW_RPC_LIGHTING_SERVICE) && PW_RPC_LIGHTING_SERVICE diff --git a/examples/platform/nrfconnect/Rpc.cpp b/examples/platform/nrfconnect/Rpc.cpp index 8b47215d6a0680..65dc40ca002f93 100644 --- a/examples/platform/nrfconnect/Rpc.cpp +++ b/examples/platform/nrfconnect/Rpc.cpp @@ -48,6 +48,10 @@ LOG_MODULE_DECLARE(app, CONFIG_CHIP_APP_LOG_LEVEL); #include "pigweed/rpc_services/Device.h" #endif // defined(PW_RPC_DEVICE_SERVICE) && PW_RPC_DEVICE_SERVICE +#if defined(PW_RPC_EVENT_SERVICE) && PW_RPC_EVENT_SERVICE +#include "pigweed/rpc_services/Event.h" +#endif // defined(PW_RPC_EVENT_SERVICE) && PW_RPC_EVENT_SERVICE + #if defined(PW_RPC_LIGHTING_SERVICE) && PW_RPC_LIGHTING_SERVICE #include "pigweed/rpc_services/Lighting.h" #endif // defined(PW_RPC_LIGHTING_SERVICE) && PW_RPC_LIGHTING_SERVICE @@ -159,6 +163,10 @@ Descriptor descriptor_service; NrfDevice device_service; #endif // defined(PW_RPC_DEVICE_SERVICE) && PW_RPC_DEVICE_SERVICE +#if defined(PW_RPC_EVENT_SERVICE) && PW_RPC_EVENT_SERVICE +Event event_service; +#endif // defined(PW_RPC_EVENT_SERVICE) && PW_RPC_EVENT_SERVICE + #if defined(PW_RPC_LIGHTING_SERVICE) && PW_RPC_LIGHTING_SERVICE Lighting lighting_service; #endif // defined(PW_RPC_LIGHTING_SERVICE) && PW_RPC_LIGHTING_SERVICE @@ -201,6 +209,10 @@ void RegisterServices(pw::rpc::Server & server) server.RegisterService(device_service); #endif // defined(PW_RPC_DEVICE_SERVICE) && PW_RPC_DEVICE_SERVICE +#if defined(PW_RPC_EVENT_SERVICE) && PW_RPC_EVENT_SERVICE + server.RegisterService(event_service); +#endif // defined(PW_RPC_EVENT_SERVICE) && PW_RPC_EVENT_SERVICE + #if defined(PW_RPC_LIGHTING_SERVICE) && PW_RPC_LIGHTING_SERVICE server.RegisterService(lighting_service); #endif // defined(PW_RPC_LIGHTING_SERVICE) && PW_RPC_LIGHTING_SERVICE From 20a55def9443cd504969a0448e1f734c7da6c599 Mon Sep 17 00:00:00 2001 From: Jean-Francois Penven <67962328+jepenven-silabs@users.noreply.github.com> Date: Tue, 9 Apr 2024 22:20:32 -0400 Subject: [PATCH 015/468] [Silabs] Reduce code size for the Lighting-app (#32876) * Reduce code size for the silabs Lighting-app * Fix Wifi breakage --- .../silabs/build_for_wifi_args.gni | 3 + .../data_model/lighting-thread-app.matter | 438 +-------- .../silabs/data_model/lighting-thread-app.zap | 851 ++++-------------- examples/lighting-app/silabs/openthread.gni | 3 + examples/platform/silabs/matter-platform.slcp | 18 +- .../silabs/ConfigurationManagerImpl.cpp | 2 + src/platform/silabs/SilabsConfig.cpp | 2 + third_party/silabs/matter_support | 2 +- 8 files changed, 189 insertions(+), 1130 deletions(-) diff --git a/examples/lighting-app/silabs/build_for_wifi_args.gni b/examples/lighting-app/silabs/build_for_wifi_args.gni index bbb57ae35a4343..7e33551c30a97c 100644 --- a/examples/lighting-app/silabs/build_for_wifi_args.gni +++ b/examples/lighting-app/silabs/build_for_wifi_args.gni @@ -18,6 +18,9 @@ silabs_sdk_target = get_label_info(":sdk", "label_no_toolchain") chip_enable_openthread = false import("${chip_root}/src/platform/silabs/wifi_args.gni") +# Not needed for the Lighting-app +chip_enable_read_client = false + chip_enable_ota_requestor = true app_data_model = "${chip_root}/examples/lighting-app/silabs/data_model:silabs-lighting" diff --git a/examples/lighting-app/silabs/data_model/lighting-thread-app.matter b/examples/lighting-app/silabs/data_model/lighting-thread-app.matter index 415281989cae5d..60b6480176d518 100644 --- a/examples/lighting-app/silabs/data_model/lighting-thread-app.matter +++ b/examples/lighting-app/silabs/data_model/lighting-thread-app.matter @@ -745,265 +745,6 @@ cluster TimeFormatLocalization = 44 { readonly attribute int16u clusterRevision = 65533; } -/** This cluster is used to describe the configuration and capabilities of a physical power source that provides power to the Node. */ -cluster PowerSource = 47 { - revision 1; // NOTE: Default/not specifically set - - enum BatApprovedChemistryEnum : enum16 { - kUnspecified = 0; - kAlkaline = 1; - kLithiumCarbonFluoride = 2; - kLithiumChromiumOxide = 3; - kLithiumCopperOxide = 4; - kLithiumIronDisulfide = 5; - kLithiumManganeseDioxide = 6; - kLithiumThionylChloride = 7; - kMagnesium = 8; - kMercuryOxide = 9; - kNickelOxyhydride = 10; - kSilverOxide = 11; - kZincAir = 12; - kZincCarbon = 13; - kZincChloride = 14; - kZincManganeseDioxide = 15; - kLeadAcid = 16; - kLithiumCobaltOxide = 17; - kLithiumIon = 18; - kLithiumIonPolymer = 19; - kLithiumIronPhosphate = 20; - kLithiumSulfur = 21; - kLithiumTitanate = 22; - kNickelCadmium = 23; - kNickelHydrogen = 24; - kNickelIron = 25; - kNickelMetalHydride = 26; - kNickelZinc = 27; - kSilverZinc = 28; - kSodiumIon = 29; - kSodiumSulfur = 30; - kZincBromide = 31; - kZincCerium = 32; - } - - enum BatChargeFaultEnum : enum8 { - kUnspecified = 0; - kAmbientTooHot = 1; - kAmbientTooCold = 2; - kBatteryTooHot = 3; - kBatteryTooCold = 4; - kBatteryAbsent = 5; - kBatteryOverVoltage = 6; - kBatteryUnderVoltage = 7; - kChargerOverVoltage = 8; - kChargerUnderVoltage = 9; - kSafetyTimeout = 10; - } - - enum BatChargeLevelEnum : enum8 { - kOK = 0; - kWarning = 1; - kCritical = 2; - } - - enum BatChargeStateEnum : enum8 { - kUnknown = 0; - kIsCharging = 1; - kIsAtFullCharge = 2; - kIsNotCharging = 3; - } - - enum BatCommonDesignationEnum : enum16 { - kUnspecified = 0; - kAAA = 1; - kAA = 2; - kC = 3; - kD = 4; - k4v5 = 5; - k6v0 = 6; - k9v0 = 7; - k12AA = 8; - kAAAA = 9; - kA = 10; - kB = 11; - kF = 12; - kN = 13; - kNo6 = 14; - kSubC = 15; - kA23 = 16; - kA27 = 17; - kBA5800 = 18; - kDuplex = 19; - k4SR44 = 20; - k523 = 21; - k531 = 22; - k15v0 = 23; - k22v5 = 24; - k30v0 = 25; - k45v0 = 26; - k67v5 = 27; - kJ = 28; - kCR123A = 29; - kCR2 = 30; - k2CR5 = 31; - kCRP2 = 32; - kCRV3 = 33; - kSR41 = 34; - kSR43 = 35; - kSR44 = 36; - kSR45 = 37; - kSR48 = 38; - kSR54 = 39; - kSR55 = 40; - kSR57 = 41; - kSR58 = 42; - kSR59 = 43; - kSR60 = 44; - kSR63 = 45; - kSR64 = 46; - kSR65 = 47; - kSR66 = 48; - kSR67 = 49; - kSR68 = 50; - kSR69 = 51; - kSR516 = 52; - kSR731 = 53; - kSR712 = 54; - kLR932 = 55; - kA5 = 56; - kA10 = 57; - kA13 = 58; - kA312 = 59; - kA675 = 60; - kAC41E = 61; - k10180 = 62; - k10280 = 63; - k10440 = 64; - k14250 = 65; - k14430 = 66; - k14500 = 67; - k14650 = 68; - k15270 = 69; - k16340 = 70; - kRCR123A = 71; - k17500 = 72; - k17670 = 73; - k18350 = 74; - k18500 = 75; - k18650 = 76; - k19670 = 77; - k25500 = 78; - k26650 = 79; - k32600 = 80; - } - - enum BatFaultEnum : enum8 { - kUnspecified = 0; - kOverTemp = 1; - kUnderTemp = 2; - } - - enum BatReplaceabilityEnum : enum8 { - kUnspecified = 0; - kNotReplaceable = 1; - kUserReplaceable = 2; - kFactoryReplaceable = 3; - } - - enum PowerSourceStatusEnum : enum8 { - kUnspecified = 0; - kActive = 1; - kStandby = 2; - kUnavailable = 3; - } - - enum WiredCurrentTypeEnum : enum8 { - kAC = 0; - kDC = 1; - } - - enum WiredFaultEnum : enum8 { - kUnspecified = 0; - kOverVoltage = 1; - kUnderVoltage = 2; - } - - bitmap Feature : bitmap32 { - kWired = 0x1; - kBattery = 0x2; - kRechargeable = 0x4; - kReplaceable = 0x8; - } - - struct BatChargeFaultChangeType { - BatChargeFaultEnum current[] = 0; - BatChargeFaultEnum previous[] = 1; - } - - struct BatFaultChangeType { - BatFaultEnum current[] = 0; - BatFaultEnum previous[] = 1; - } - - struct WiredFaultChangeType { - WiredFaultEnum current[] = 0; - WiredFaultEnum previous[] = 1; - } - - info event WiredFaultChange = 0 { - WiredFaultEnum current[] = 0; - WiredFaultEnum previous[] = 1; - } - - info event BatFaultChange = 1 { - BatFaultEnum current[] = 0; - BatFaultEnum previous[] = 1; - } - - info event BatChargeFaultChange = 2 { - BatChargeFaultEnum current[] = 0; - BatChargeFaultEnum previous[] = 1; - } - - readonly attribute PowerSourceStatusEnum status = 0; - readonly attribute int8u order = 1; - readonly attribute char_string<60> description = 2; - readonly attribute optional nullable int32u wiredAssessedInputVoltage = 3; - readonly attribute optional nullable int16u wiredAssessedInputFrequency = 4; - readonly attribute optional WiredCurrentTypeEnum wiredCurrentType = 5; - readonly attribute optional nullable int32u wiredAssessedCurrent = 6; - readonly attribute optional int32u wiredNominalVoltage = 7; - readonly attribute optional int32u wiredMaximumCurrent = 8; - readonly attribute optional boolean wiredPresent = 9; - readonly attribute optional WiredFaultEnum activeWiredFaults[] = 10; - readonly attribute optional nullable int32u batVoltage = 11; - readonly attribute optional nullable int8u batPercentRemaining = 12; - readonly attribute optional nullable int32u batTimeRemaining = 13; - readonly attribute optional BatChargeLevelEnum batChargeLevel = 14; - readonly attribute optional boolean batReplacementNeeded = 15; - readonly attribute optional BatReplaceabilityEnum batReplaceability = 16; - readonly attribute optional boolean batPresent = 17; - readonly attribute optional BatFaultEnum activeBatFaults[] = 18; - readonly attribute optional char_string<60> batReplacementDescription = 19; - readonly attribute optional BatCommonDesignationEnum batCommonDesignation = 20; - readonly attribute optional char_string<20> batANSIDesignation = 21; - readonly attribute optional char_string<20> batIECDesignation = 22; - readonly attribute optional BatApprovedChemistryEnum batApprovedChemistry = 23; - readonly attribute optional int32u batCapacity = 24; - readonly attribute optional int8u batQuantity = 25; - readonly attribute optional BatChargeStateEnum batChargeState = 26; - readonly attribute optional nullable int32u batTimeToFullCharge = 27; - readonly attribute optional boolean batFunctionalWhileCharging = 28; - readonly attribute optional nullable int32u batChargingCurrent = 29; - readonly attribute optional BatChargeFaultEnum activeBatChargeFaults[] = 30; - readonly attribute endpoint_no endpointList[] = 31; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - /** This cluster is used to manage global aspects of the Commissioning flow. */ cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set @@ -1253,53 +994,6 @@ cluster NetworkCommissioning = 49 { command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; } -/** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ -cluster DiagnosticLogs = 50 { - revision 1; // NOTE: Default/not specifically set - - enum IntentEnum : enum8 { - kEndUserSupport = 0; - kNetworkDiag = 1; - kCrashLogs = 2; - } - - enum StatusEnum : enum8 { - kSuccess = 0; - kExhausted = 1; - kNoLogs = 2; - kBusy = 3; - kDenied = 4; - } - - enum TransferProtocolEnum : enum8 { - kResponsePayload = 0; - kBDX = 1; - } - - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; - - request struct RetrieveLogsRequestRequest { - IntentEnum intent = 0; - TransferProtocolEnum requestedProtocol = 1; - optional char_string<32> transferFileDesignator = 2; - } - - response struct RetrieveLogsResponse = 1 { - StatusEnum status = 0; - long_octet_string logContent = 1; - optional epoch_us UTCTimeStamp = 2; - optional systime_us timeSinceBoot = 3; - } - - /** Retrieving diagnostic logs from a Node */ - command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; -} - /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster GeneralDiagnostics = 51 { revision 2; @@ -1431,43 +1125,6 @@ cluster GeneralDiagnostics = 51 { command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; } -/** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -cluster SoftwareDiagnostics = 52 { - revision 1; // NOTE: Default/not specifically set - - bitmap Feature : bitmap32 { - kWatermarks = 0x1; - } - - struct ThreadMetricsStruct { - int64u id = 0; - optional char_string<8> name = 1; - optional int32u stackFreeCurrent = 2; - optional int32u stackFreeMinimum = 3; - optional int32u stackSize = 4; - } - - info event SoftwareFault = 0 { - int64u id = 0; - optional char_string name = 1; - optional octet_string faultRecording = 2; - } - - readonly attribute optional ThreadMetricsStruct threadMetrics[] = 0; - readonly attribute optional int64u currentHeapFree = 1; - readonly attribute optional int64u currentHeapUsed = 2; - readonly attribute optional int64u currentHeapHighWatermark = 3; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; - - /** Reception of this command SHALL reset the values: The StackFreeMinimum field of the ThreadMetrics attribute, CurrentHeapHighWaterMark attribute. */ - command access(invoke: manage) ResetWatermarks(): DefaultSuccess = 0; -} - /** The Thread Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems */ cluster ThreadNetworkDiagnostics = 53 { revision 2; @@ -1888,43 +1545,6 @@ cluster GroupKeyManagement = 63 { fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } -/** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only -labels. */ -cluster FixedLabel = 64 { - revision 1; // NOTE: Default/not specifically set - - struct LabelStruct { - char_string<16> label = 0; - char_string<16> value = 1; - } - - readonly attribute LabelStruct labelList[] = 0; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - -/** The User Label Cluster provides a feature to tag an endpoint with zero or more labels. */ -cluster UserLabel = 65 { - revision 1; // NOTE: Default/not specifically set - - struct LabelStruct { - char_string<16> label = 0; - char_string<16> value = 1; - } - - attribute access(write: manage) LabelStruct labelList[] = 0; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - /** Attributes and commands for scene configuration and manipulation. */ provisional cluster ScenesManagement = 98 { revision 1; @@ -2515,13 +2135,6 @@ endpoint 0 { handle command ReorderNetwork; } - server cluster DiagnosticLogs { - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - - handle command RetrieveLogsRequest; - } - server cluster GeneralDiagnostics { emits event BootReason; callback attribute networkInterfaces; @@ -2541,18 +2154,6 @@ endpoint 0 { handle command TimeSnapshotResponse; } - server cluster SoftwareDiagnostics { - emits event SoftwareFault; - callback attribute threadMetrics; - callback attribute currentHeapFree; - callback attribute currentHeapUsed; - callback attribute currentHeapHighWatermark; - callback attribute featureMap; - ram attribute clusterRevision default = 1; - - handle command ResetWatermarks; - } - server cluster ThreadNetworkDiagnostics { callback attribute channel; callback attribute routingRole; @@ -2673,22 +2274,9 @@ endpoint 0 { handle command KeySetReadAllIndices; handle command KeySetReadAllIndicesResponse; } - - server cluster FixedLabel { - callback attribute labelList; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - - server cluster UserLabel { - callback attribute labelList; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } } endpoint 1 { - device type ma_powersource = 17, version 1; - device type ma_dimmablelight = 257, version 1; + device type ma_extendedcolorlight = 269, version 1; server cluster Identify { @@ -2792,26 +2380,6 @@ endpoint 1 { callback attribute clusterRevision; } - server cluster PowerSource { - ram attribute status default = 0; - ram attribute order default = 0; - ram attribute description default = "USB"; - ram attribute wiredAssessedInputVoltage; - ram attribute wiredAssessedInputFrequency; - ram attribute wiredCurrentType default = 1; - ram attribute wiredAssessedCurrent; - ram attribute wiredNominalVoltage default = 5000; - ram attribute wiredMaximumCurrent default = 1000; - ram attribute wiredPresent default = 1; - callback attribute endpointList; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute eventList; - callback attribute attributeList; - ram attribute featureMap default = 1; - ram attribute clusterRevision default = 2; - } - server cluster ScenesManagement { ram attribute lastConfiguredBy; ram attribute sceneTableSize default = 16; @@ -2860,6 +2428,10 @@ endpoint 1 { ram attribute colorTempPhysicalMaxMireds default = 0xFEFF; ram attribute coupleColorTempToLevelMinMireds; persist attribute startUpColorTemperatureMireds; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0x1F; ram attribute clusterRevision default = 6; diff --git a/examples/lighting-app/silabs/data_model/lighting-thread-app.zap b/examples/lighting-app/silabs/data_model/lighting-thread-app.zap index b894a2f5a70c00..9e293bcd3032d1 100644 --- a/examples/lighting-app/silabs/data_model/lighting-thread-app.zap +++ b/examples/lighting-app/silabs/data_model/lighting-thread-app.zap @@ -17,6 +17,12 @@ } ], "package": [ + { + "pathRelativity": "relativeToZap", + "path": "../../../../src/app/zap-templates/app-templates.json", + "type": "gen-templates-json", + "version": "chip-v1" + }, { "pathRelativity": "relativeToZap", "path": "../../../../src/app/zap-templates/zcl/zcl.json", @@ -24,12 +30,6 @@ "category": "matter", "version": 1, "description": "Matter SDK ZCL data" - }, - { - "pathRelativity": "relativeToZap", - "path": "../../../../src/app/zap-templates/app-templates.json", - "type": "gen-templates-json", - "version": "chip-v1" } ], "endpointTypes": [ @@ -1494,58 +1494,6 @@ } ] }, - { - "name": "Diagnostic Logs", - "code": 50, - "mfgCode": null, - "define": "DIAGNOSTIC_LOGS_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [ - { - "name": "RetrieveLogsRequest", - "code": 0, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, { "name": "General Diagnostics", "code": 51, @@ -1767,131 +1715,6 @@ } ] }, - { - "name": "Software Diagnostics", - "code": 52, - "mfgCode": null, - "define": "SOFTWARE_DIAGNOSTICS_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [ - { - "name": "ResetWatermarks", - "code": 0, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - } - ], - "attributes": [ - { - "name": "ThreadMetrics", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "CurrentHeapFree", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "int64u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "CurrentHeapUsed", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "int64u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "CurrentHeapHighWatermark", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "int64u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ], - "events": [ - { - "name": "SoftwareFault", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1 - } - ] - }, { "name": "Thread Network Diagnostics", "code": 53, @@ -3451,229 +3274,105 @@ "reportableChange": 0 } ] - }, + } + ] + }, + { + "id": 2, + "name": "MA-dimmablelight", + "deviceTypeRef": { + "code": 269, + "profileId": 259, + "label": "MA-extendedcolorlight", + "name": "MA-extendedcolorlight" + }, + "deviceTypes": [ + { + "code": 269, + "profileId": 259, + "label": "MA-extendedcolorlight", + "name": "MA-extendedcolorlight" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 269 + ], + "deviceTypeName": "MA-extendedcolorlight", + "deviceTypeCode": 269, + "deviceTypeProfileId": 259, + "clusters": [ { - "name": "Fixed Label", - "code": 64, + "name": "Identify", + "code": 3, "mfgCode": null, - "define": "FIXED_LABEL_CLUSTER", + "define": "IDENTIFY_CLUSTER", "side": "server", "enabled": 1, + "commands": [ + { + "name": "Identify", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "TriggerEffect", + "code": 64, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], "attributes": [ { - "name": "LabelList", + "name": "IdentifyTime", "code": 0, "mfgCode": null, "side": "server", - "type": "array", + "type": "int16u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "defaultValue": "0x0000", + "reportable": 0, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, + "name": "IdentifyType", + "code": 1, "mfgCode": null, "side": "server", - "type": "bitmap32", + "type": "IdentifyTypeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", - "reportable": 1, + "defaultValue": "0x0", + "reportable": 0, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "User Label", - "code": 65, - "mfgCode": null, - "define": "USER_LABEL_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "LabelList", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - } - ] - }, - { - "id": 2, - "name": "MA-dimmablelight", - "deviceTypeRef": { - "code": 257, - "profileId": 259, - "label": "MA-dimmablelight", - "name": "MA-dimmablelight" - }, - "deviceTypes": [ - { - "code": 257, - "profileId": 259, - "label": "MA-dimmablelight", - "name": "MA-dimmablelight" - }, - { - "code": 17, - "profileId": 259, - "label": "MA-powersource", - "name": "MA-powersource" - } - ], - "deviceVersions": [ - 1, - 1 - ], - "deviceIdentifiers": [ - 257, - 17 - ], - "deviceTypeName": "MA-dimmablelight", - "deviceTypeCode": 257, - "deviceTypeProfileId": 259, - "clusters": [ - { - "name": "Identify", - "code": 3, - "mfgCode": null, - "define": "IDENTIFY_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [ - { - "name": "Identify", - "code": 0, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "TriggerEffect", - "code": 64, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - } - ], - "attributes": [ - { - "name": "IdentifyTime", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "IdentifyType", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "IdentifyTypeEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3862,7 +3561,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 1, + "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -4034,7 +3733,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x00", - "reportable": 1, + "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -4050,7 +3749,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x01", - "reportable": 1, + "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -4066,7 +3765,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0000", - "reportable": 1, + "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -4082,7 +3781,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0000", - "reportable": 1, + "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -4098,7 +3797,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0xFF", - "reportable": 1, + "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -4286,7 +3985,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x01", - "reportable": 1, + "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -4302,7 +4001,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0000", - "reportable": 1, + "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -4318,7 +4017,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x01", - "reportable": 1, + "reportable": 0, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -4398,7 +4097,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x00", - "reportable": 1, + "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -4430,7 +4129,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0xFF", - "reportable": 1, + "reportable": 0, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -4494,7 +4193,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "255", - "reportable": 1, + "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -4632,7 +4331,7 @@ "singleton": 0, "bounded": 0, "defaultValue": null, - "reportable": 1, + "reportable": 0, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -4648,7 +4347,7 @@ "singleton": 0, "bounded": 0, "defaultValue": null, - "reportable": 1, + "reportable": 0, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -4664,7 +4363,7 @@ "singleton": 0, "bounded": 0, "defaultValue": null, - "reportable": 1, + "reportable": 0, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -4767,288 +4466,6 @@ } ] }, - { - "name": "Power Source", - "code": 47, - "mfgCode": null, - "define": "POWER_SOURCE_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "Status", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "PowerSourceStatusEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "Order", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "Description", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "USB", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "WiredAssessedInputVoltage", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "int32u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "WiredAssessedInputFrequency", - "code": 4, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "WiredCurrentType", - "code": 5, - "mfgCode": null, - "side": "server", - "type": "WiredCurrentTypeEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "WiredAssessedCurrent", - "code": 6, - "mfgCode": null, - "side": "server", - "type": "int32u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "WiredNominalVoltage", - "code": 7, - "mfgCode": null, - "side": "server", - "type": "int32u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "5000", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "WiredMaximumCurrent", - "code": 8, - "mfgCode": null, - "side": "server", - "type": "int32u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1000", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "WiredPresent", - "code": 9, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "EndpointList", - "code": 31, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "2", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, { "name": "Scenes Management", "code": 98, @@ -5515,7 +4932,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0000", - "reportable": 1, + "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -5531,7 +4948,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x616B", - "reportable": 1, + "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -5547,7 +4964,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x607D", - "reportable": 1, + "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -5563,7 +4980,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x00FA", - "reportable": 1, + "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -5579,7 +4996,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x01", - "reportable": 1, + "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -5595,7 +5012,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x00", - "reportable": 1, + "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -5611,7 +5028,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 1, + "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -5643,7 +5060,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x01", - "reportable": 1, + "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -5739,7 +5156,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x1F", - "reportable": 1, + "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -5755,7 +5172,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0x0000", - "reportable": 1, + "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -5771,7 +5188,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0xFEFF", - "reportable": 1, + "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -5787,7 +5204,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 1, + "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 @@ -5803,11 +5220,75 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 1, + "reportable": 0, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, diff --git a/examples/lighting-app/silabs/openthread.gni b/examples/lighting-app/silabs/openthread.gni index 71fa3271ea5073..b39a1cb8e5878d 100644 --- a/examples/lighting-app/silabs/openthread.gni +++ b/examples/lighting-app/silabs/openthread.gni @@ -23,5 +23,8 @@ app_data_model = chip_enable_ota_requestor = true chip_enable_openthread = true +# Not needed for the Lighting-app +chip_enable_read_client = false + openthread_external_platform = "${chip_root}/third_party/openthread/platforms/efr32:libopenthread-efr32" diff --git a/examples/platform/silabs/matter-platform.slcp b/examples/platform/silabs/matter-platform.slcp index bc30556be60fe5..3e1c52a6ec66f5 100644 --- a/examples/platform/silabs/matter-platform.slcp +++ b/examples/platform/silabs/matter-platform.slcp @@ -31,22 +31,19 @@ sdk: {id: gecko_sdk, version: 4.3.1} toolchain_settings: [] component: -- {id: bluetooth_feature_nvm} +#bluetooth components +- {id: gatt_configuration} - {id: bluetooth_feature_gatt_server} -- {id: nvm3_lib} -- {id: bluetooth_feature_sm} -- {id: bluetooth_feature_gap} - {id: bluetooth_feature_legacy_advertiser} -- {id: gatt_configuration} -- {id: freertos} +- {id: bluetooth_feature_connection} +- {id: bluetooth_feature_system} - {id: bluetooth_stack} +# Other components +- {id: nvm3_lib} +- {id: freertos} - {id: brd4002a} - {id: rail_util_pti} -- {id: bluetooth_feature_gatt} -- {id: bluetooth_feature_connection} - {id: rail_lib_multiprotocol} -- {id: bluetooth_feature_system} -- {id: bluetooth_feature_scanner} - {id: rail_util_power_manager_init} - {id: psa_crypto} - {id: psa_crypto_aes} @@ -62,7 +59,6 @@ component: - {id: mbedtls_platform_dynamic_memory_allocation_config_init_runtime } - {id: mbedtls_base64} - {id: ot_psa_crypto} -- {id: bluetooth_crypto} - {id: iostream_rtt} # Necessary componenets for ot coap cert lib # - {id: mbedtls_dtls} # Requried by COAP lib diff --git a/src/platform/silabs/ConfigurationManagerImpl.cpp b/src/platform/silabs/ConfigurationManagerImpl.cpp index 8412075de3a914..5ebf349c15484b 100644 --- a/src/platform/silabs/ConfigurationManagerImpl.cpp +++ b/src/platform/silabs/ConfigurationManagerImpl.cpp @@ -255,7 +255,9 @@ CHIP_ERROR ConfigurationManagerImpl::WriteConfigValueBin(Key key, const uint8_t void ConfigurationManagerImpl::RunConfigUnitTest(void) { +#if CONFIG_BUILD_FOR_HOST_UNIT_TEST SilabsConfig::RunConfigUnitTest(); +#endif // CONFIG_BUILD_FOR_HOST_UNIT_TEST } void ConfigurationManagerImpl::DoFactoryReset(intptr_t arg) diff --git a/src/platform/silabs/SilabsConfig.cpp b/src/platform/silabs/SilabsConfig.cpp index 6c362d41c2c330..356aa4c39b1703 100644 --- a/src/platform/silabs/SilabsConfig.cpp +++ b/src/platform/silabs/SilabsConfig.cpp @@ -552,11 +552,13 @@ bool SilabsConfig::ValidConfigKey(Key key) return false; } +#if CONFIG_BUILD_FOR_HOST_UNIT_TEST void SilabsConfig::RunConfigUnitTest() { // Run common unit test. ::chip::DeviceLayer::Internal::RunConfigUnitTest(); } +#endif // CONFIG_BUILD_FOR_HOST_UNIT_TEST void SilabsConfig::RepackNvm3Flash(void) { diff --git a/third_party/silabs/matter_support b/third_party/silabs/matter_support index 53f098de9fdc7d..0dbd0dd89fa90d 160000 --- a/third_party/silabs/matter_support +++ b/third_party/silabs/matter_support @@ -1 +1 @@ -Subproject commit 53f098de9fdc7db248a72eabbe07d8ce4876daab +Subproject commit 0dbd0dd89fa90dc6e0d1d2636563ea980c010c19 From f92178b4cbd70a82ea0e41a192f775044d36978f Mon Sep 17 00:00:00 2001 From: Suhas Shankar <118879678+su-shanka@users.noreply.github.com> Date: Wed, 10 Apr 2024 10:52:29 +0530 Subject: [PATCH 016/468] Refactored mDNS Browse Interface (#32866) * Refactored mDNS Browse Interface and necessary renaming done * Restyled by clang-format --------- Co-authored-by: Restyled.io --- .../commands/common/DeviceScanner.cpp | 2 +- .../chip-tool/commands/common/DeviceScanner.h | 4 +- .../commands/common/RemoteDataModelLogger.cpp | 2 +- .../commands/pairing/PairingCommand.cpp | 2 +- .../linux/ControllerShellCommands.cpp | 4 +- .../app/src/main/jni/cpp/ConversionUtils.cpp | 31 ++++--- .../MatterTvCastingBridge/ConversionUtils.mm | 40 +++++----- .../core/CastingPlayerDiscovery.cpp | 10 +-- .../tv-casting-common/src/CastingServer.cpp | 10 +-- .../tv-casting-common/src/ConversionUtils.cpp | 11 ++- .../src/TargetVideoPlayerInfo.cpp | 2 +- .../AbstractDnssdDiscoveryController.h | 2 +- .../CHIPCommissionableNodeController.cpp | 4 +- src/controller/CHIPDeviceController.cpp | 2 +- src/controller/SetUpCodePairer.cpp | 13 ++- .../java/CHIPDeviceController-JNI.cpp | 22 ++--- ...issionableNodeController-ScriptBinding.cpp | 22 ++--- .../python/ChipDeviceController-Discovery.cpp | 46 +++++------ ...r-ScriptPairingDeviceDiscoveryDelegate.cpp | 2 +- .../TestCommissionableNodeController.cpp | 5 +- .../CHIP/MTRCommissionableBrowser.mm | 6 +- src/lib/dnssd/ActiveResolveAttempts.h | 12 +-- src/lib/dnssd/Discovery_ImplPlatform.cpp | 17 +++- src/lib/dnssd/Discovery_ImplPlatform.h | 5 +- src/lib/dnssd/IncrementalResolve.cpp | 14 ++-- src/lib/dnssd/IncrementalResolve.h | 8 +- src/lib/dnssd/Resolver.h | 28 ++----- src/lib/dnssd/ResolverProxy.cpp | 6 +- src/lib/dnssd/ResolverProxy.h | 4 +- src/lib/dnssd/Resolver_ImplMinimalMdns.cpp | 21 ++--- src/lib/dnssd/Resolver_ImplNone.cpp | 6 +- src/lib/dnssd/TxtFields.cpp | 2 +- src/lib/dnssd/TxtFields.h | 2 +- src/lib/dnssd/Types.h | 20 ++--- src/lib/dnssd/platform/Dnssd.h | 3 +- .../dnssd/tests/TestActiveResolveAttempts.cpp | 4 +- .../dnssd/tests/TestIncrementalResolve.cpp | 20 ++--- src/lib/dnssd/tests/TestTxtFields.cpp | 80 +++++++++---------- src/lib/shell/commands/Dns.cpp | 24 +++--- src/platform/Darwin/DnssdContexts.cpp | 4 +- src/platform/Darwin/DnssdImpl.cpp | 4 +- src/platform/Darwin/DnssdImpl.h | 4 +- .../UserDirectedCommissioningServer.cpp | 19 +++-- .../tests/TestUdcMessages.cpp | 14 ++-- 44 files changed, 276 insertions(+), 287 deletions(-) diff --git a/examples/chip-tool/commands/common/DeviceScanner.cpp b/examples/chip-tool/commands/common/DeviceScanner.cpp index 35d74bd06c844f..9d3dbca98f8db9 100644 --- a/examples/chip-tool/commands/common/DeviceScanner.cpp +++ b/examples/chip-tool/commands/common/DeviceScanner.cpp @@ -55,7 +55,7 @@ CHIP_ERROR DeviceScanner::Stop() void DeviceScanner::OnNodeDiscovered(const DiscoveredNodeData & nodeData) { - auto & commissionData = nodeData.commissionData; + auto & commissionData = nodeData.nodeData; auto discriminator = commissionData.longDiscriminator; auto vendorId = static_cast(commissionData.vendorId); diff --git a/examples/chip-tool/commands/common/DeviceScanner.h b/examples/chip-tool/commands/common/DeviceScanner.h index 0f29c87175a18e..e8259ffc554897 100644 --- a/examples/chip-tool/commands/common/DeviceScanner.h +++ b/examples/chip-tool/commands/common/DeviceScanner.h @@ -42,7 +42,7 @@ struct DeviceScannerResult chip::Optional mResolutionData; }; -class DeviceScanner : public chip::Dnssd::CommissioningResolveDelegate, +class DeviceScanner : public chip::Dnssd::DiscoverNodeDelegate, public chip::Dnssd::DnssdBrowseDelegate #if CONFIG_NETWORK_LAYER_BLE , @@ -56,7 +56,7 @@ class DeviceScanner : public chip::Dnssd::CommissioningResolveDelegate, CHIP_ERROR Get(uint16_t index, chip::Dnssd::CommonResolutionData & resolutionData); void Log() const; - /////////// CommissioningResolveDelegate Interface ///////// + /////////// DiscoverNodeDelegate Interface ///////// void OnNodeDiscovered(const chip::Dnssd::DiscoveredNodeData & nodeData) override; /////////// DnssdBrowseDelegate Interface ///////// diff --git a/examples/chip-tool/commands/common/RemoteDataModelLogger.cpp b/examples/chip-tool/commands/common/RemoteDataModelLogger.cpp index 37955e821e8b82..9e3026262db97d 100644 --- a/examples/chip-tool/commands/common/RemoteDataModelLogger.cpp +++ b/examples/chip-tool/commands/common/RemoteDataModelLogger.cpp @@ -209,7 +209,7 @@ CHIP_ERROR LogDiscoveredNodeData(const chip::Dnssd::DiscoveredNodeData & nodeDat VerifyOrReturnError(gDelegate != nullptr, CHIP_NO_ERROR); auto & resolutionData = nodeData.resolutionData; - auto & commissionData = nodeData.commissionData; + auto & commissionData = nodeData.nodeData; if (!chip::CanCastTo(resolutionData.numIPs)) { diff --git a/examples/chip-tool/commands/pairing/PairingCommand.cpp b/examples/chip-tool/commands/pairing/PairingCommand.cpp index 0f47e48314b5a4..5ec206c25b7ea0 100644 --- a/examples/chip-tool/commands/pairing/PairingCommand.cpp +++ b/examples/chip-tool/commands/pairing/PairingCommand.cpp @@ -482,7 +482,7 @@ void PairingCommand::OnICDStayActiveComplete(NodeId deviceId, uint32_t promisedA void PairingCommand::OnDiscoveredDevice(const chip::Dnssd::DiscoveredNodeData & nodeData) { // Ignore nodes with closed commissioning window - VerifyOrReturn(nodeData.commissionData.commissioningMode != 0); + VerifyOrReturn(nodeData.nodeData.commissioningMode != 0); auto & resolutionData = nodeData.resolutionData; diff --git a/examples/platform/linux/ControllerShellCommands.cpp b/examples/platform/linux/ControllerShellCommands.cpp index 49b1e20dc97eb8..aefbb3fafa4353 100644 --- a/examples/platform/linux/ControllerShellCommands.cpp +++ b/examples/platform/linux/ControllerShellCommands.cpp @@ -124,8 +124,8 @@ static CHIP_ERROR display(bool printHeader) else { streamer_printf(sout, " Entry %d instanceName=%s host=%s longDiscriminator=%d vendorId=%d productId=%d\r\n", i, - next->commissionData.instanceName, next->resolutionData.hostName, - next->commissionData.longDiscriminator, next->commissionData.vendorId, next->commissionData.productId); + next->nodeData.instanceName, next->resolutionData.hostName, next->nodeData.longDiscriminator, + next->nodeData.vendorId, next->nodeData.productId); } } diff --git a/examples/tv-casting-app/android/App/app/src/main/jni/cpp/ConversionUtils.cpp b/examples/tv-casting-app/android/App/app/src/main/jni/cpp/ConversionUtils.cpp index 2c3001cf5cabea..fd66ba44649cea 100644 --- a/examples/tv-casting-app/android/App/app/src/main/jni/cpp/ConversionUtils.cpp +++ b/examples/tv-casting-app/android/App/app/src/main/jni/cpp/ConversionUtils.cpp @@ -324,53 +324,50 @@ CHIP_ERROR convertJDiscoveredNodeDataToCppDiscoveredNodeData(jobject jDiscovered jstring jInstanceName = static_cast(env->GetObjectField(jDiscoveredNodeData, getInstanceNameField)); if (jInstanceName != nullptr) { - chip::Platform::CopyString(outCppDiscoveredNodeData.commissionData.instanceName, + chip::Platform::CopyString(outCppDiscoveredNodeData.nodeData.instanceName, chip::Dnssd::Commission::kInstanceNameMaxLength + 1, env->GetStringUTFChars(jInstanceName, 0)); } jfieldID jLongDiscriminatorField = env->GetFieldID(jDiscoveredNodeDataClass, "longDiscriminator", "J"); - outCppDiscoveredNodeData.commissionData.vendorId = + outCppDiscoveredNodeData.nodeData.vendorId = static_cast(env->GetLongField(jDiscoveredNodeData, jLongDiscriminatorField)); - jfieldID jVendorIdField = env->GetFieldID(jDiscoveredNodeDataClass, "vendorId", "J"); - outCppDiscoveredNodeData.commissionData.vendorId = - static_cast(env->GetLongField(jDiscoveredNodeData, jVendorIdField)); + jfieldID jVendorIdField = env->GetFieldID(jDiscoveredNodeDataClass, "vendorId", "J"); + outCppDiscoveredNodeData.nodeData.vendorId = static_cast(env->GetLongField(jDiscoveredNodeData, jVendorIdField)); - jfieldID jProductIdField = env->GetFieldID(jDiscoveredNodeDataClass, "productId", "J"); - outCppDiscoveredNodeData.commissionData.productId = - static_cast(env->GetLongField(jDiscoveredNodeData, jProductIdField)); + jfieldID jProductIdField = env->GetFieldID(jDiscoveredNodeDataClass, "productId", "J"); + outCppDiscoveredNodeData.nodeData.productId = static_cast(env->GetLongField(jDiscoveredNodeData, jProductIdField)); jfieldID jCommissioningModeField = env->GetFieldID(jDiscoveredNodeDataClass, "commissioningMode", "B"); - outCppDiscoveredNodeData.commissionData.commissioningMode = + outCppDiscoveredNodeData.nodeData.commissioningMode = static_cast(env->GetByteField(jDiscoveredNodeData, jCommissioningModeField)); - jfieldID jDeviceTypeField = env->GetFieldID(jDiscoveredNodeDataClass, "deviceType", "J"); - outCppDiscoveredNodeData.commissionData.deviceType = - static_cast(env->GetLongField(jDiscoveredNodeData, jDeviceTypeField)); + jfieldID jDeviceTypeField = env->GetFieldID(jDiscoveredNodeDataClass, "deviceType", "J"); + outCppDiscoveredNodeData.nodeData.deviceType = static_cast(env->GetLongField(jDiscoveredNodeData, jDeviceTypeField)); jfieldID getDeviceNameField = env->GetFieldID(jDiscoveredNodeDataClass, "deviceName", "Ljava/lang/String;"); jstring jDeviceName = static_cast(env->GetObjectField(jDiscoveredNodeData, getDeviceNameField)); if (jDeviceName != nullptr) { - chip::Platform::CopyString(outCppDiscoveredNodeData.commissionData.deviceName, chip::Dnssd::kMaxDeviceNameLen + 1, + chip::Platform::CopyString(outCppDiscoveredNodeData.nodeData.deviceName, chip::Dnssd::kMaxDeviceNameLen + 1, env->GetStringUTFChars(jDeviceName, 0)); } // TODO: map rotating ID jfieldID jRotatingIdLenField = env->GetFieldID(jDiscoveredNodeDataClass, "rotatingIdLen", "I"); - outCppDiscoveredNodeData.commissionData.rotatingIdLen = + outCppDiscoveredNodeData.nodeData.rotatingIdLen = static_cast(env->GetIntField(jDiscoveredNodeData, jRotatingIdLenField)); jfieldID jPairingHintField = env->GetFieldID(jDiscoveredNodeDataClass, "pairingHint", "S"); - outCppDiscoveredNodeData.commissionData.pairingHint = + outCppDiscoveredNodeData.nodeData.pairingHint = static_cast(env->GetShortField(jDiscoveredNodeData, jPairingHintField)); jfieldID getPairingInstructionField = env->GetFieldID(jDiscoveredNodeDataClass, "pairingInstruction", "Ljava/lang/String;"); jstring jPairingInstruction = static_cast(env->GetObjectField(jDiscoveredNodeData, getPairingInstructionField)); if (jPairingInstruction != nullptr) { - chip::Platform::CopyString(outCppDiscoveredNodeData.commissionData.pairingInstruction, - chip::Dnssd::kMaxPairingInstructionLen + 1, env->GetStringUTFChars(jPairingInstruction, 0)); + chip::Platform::CopyString(outCppDiscoveredNodeData.nodeData.pairingInstruction, chip::Dnssd::kMaxPairingInstructionLen + 1, + env->GetStringUTFChars(jPairingInstruction, 0)); } jfieldID jPortField = env->GetFieldID(jDiscoveredNodeDataClass, "port", "I"); diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/ConversionUtils.mm b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/ConversionUtils.mm index a13f231b09b6c0..902e386ae551e1 100644 --- a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/ConversionUtils.mm +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/ConversionUtils.mm @@ -48,20 +48,20 @@ + (CHIP_ERROR)convertToCppDiscoveredNodeDataFrom:(DiscoveredNodeData * _Nonnull) outDiscoveredNodeData:(chip::Dnssd::DiscoveredNodeData &)outDiscoveredNodeData { // setting CommissionNodeData - outDiscoveredNodeData.commissionData.deviceType = objCDiscoveredNodeData.deviceType; - outDiscoveredNodeData.commissionData.vendorId = objCDiscoveredNodeData.vendorId; - outDiscoveredNodeData.commissionData.productId = objCDiscoveredNodeData.productId; - outDiscoveredNodeData.commissionData.longDiscriminator = objCDiscoveredNodeData.longDiscriminator; - outDiscoveredNodeData.commissionData.commissioningMode = objCDiscoveredNodeData.commissioningMode; - outDiscoveredNodeData.commissionData.pairingHint = objCDiscoveredNodeData.pairingHint; - memset(outDiscoveredNodeData.commissionData.deviceName, '\0', sizeof(outDiscoveredNodeData.commissionData.deviceName)); + outDiscoveredNodeData.nodeData.deviceType = objCDiscoveredNodeData.deviceType; + outDiscoveredNodeData.nodeData.vendorId = objCDiscoveredNodeData.vendorId; + outDiscoveredNodeData.nodeData.productId = objCDiscoveredNodeData.productId; + outDiscoveredNodeData.nodeData.longDiscriminator = objCDiscoveredNodeData.longDiscriminator; + outDiscoveredNodeData.nodeData.commissioningMode = objCDiscoveredNodeData.commissioningMode; + outDiscoveredNodeData.nodeData.pairingHint = objCDiscoveredNodeData.pairingHint; + memset(outDiscoveredNodeData.nodeData.deviceName, '\0', sizeof(outDiscoveredNodeData.nodeData.deviceName)); if (objCDiscoveredNodeData.deviceName != nullptr) { - chip::Platform::CopyString(outDiscoveredNodeData.commissionData.deviceName, chip::Dnssd::kMaxDeviceNameLen + 1, + chip::Platform::CopyString(outDiscoveredNodeData.nodeData.deviceName, chip::Dnssd::kMaxDeviceNameLen + 1, [objCDiscoveredNodeData.deviceName UTF8String]); } - outDiscoveredNodeData.commissionData.rotatingIdLen = objCDiscoveredNodeData.rotatingIdLen; + outDiscoveredNodeData.nodeData.rotatingIdLen = objCDiscoveredNodeData.rotatingIdLen; memcpy( - outDiscoveredNodeData.commissionData.rotatingId, objCDiscoveredNodeData.rotatingId, objCDiscoveredNodeData.rotatingIdLen); + outDiscoveredNodeData.nodeData.rotatingId, objCDiscoveredNodeData.rotatingId, objCDiscoveredNodeData.rotatingIdLen); // setting CommonResolutionData outDiscoveredNodeData.resolutionData.port = objCDiscoveredNodeData.port; @@ -121,17 +121,17 @@ + (DiscoveredNodeData *)convertToObjCDiscoveredNodeDataFrom:(const chip::Dnssd:: DiscoveredNodeData * objCDiscoveredNodeData = [DiscoveredNodeData new]; // from CommissionNodeData - objCDiscoveredNodeData.deviceType = cppDiscoveredNodedata->commissionData.deviceType; - objCDiscoveredNodeData.vendorId = cppDiscoveredNodedata->commissionData.vendorId; - objCDiscoveredNodeData.productId = cppDiscoveredNodedata->commissionData.productId; - objCDiscoveredNodeData.longDiscriminator = cppDiscoveredNodedata->commissionData.longDiscriminator; - objCDiscoveredNodeData.commissioningMode = cppDiscoveredNodedata->commissionData.commissioningMode; - objCDiscoveredNodeData.pairingHint = cppDiscoveredNodedata->commissionData.pairingHint; - objCDiscoveredNodeData.deviceName = [NSString stringWithCString:cppDiscoveredNodedata->commissionData.deviceName + objCDiscoveredNodeData.deviceType = cppDiscoveredNodedata->nodeData.deviceType; + objCDiscoveredNodeData.vendorId = cppDiscoveredNodedata->nodeData.vendorId; + objCDiscoveredNodeData.productId = cppDiscoveredNodedata->nodeData.productId; + objCDiscoveredNodeData.longDiscriminator = cppDiscoveredNodedata->nodeData.longDiscriminator; + objCDiscoveredNodeData.commissioningMode = cppDiscoveredNodedata->nodeData.commissioningMode; + objCDiscoveredNodeData.pairingHint = cppDiscoveredNodedata->nodeData.pairingHint; + objCDiscoveredNodeData.deviceName = [NSString stringWithCString:cppDiscoveredNodedata->nodeData.deviceName encoding:NSUTF8StringEncoding]; - objCDiscoveredNodeData.rotatingIdLen = cppDiscoveredNodedata->commissionData.rotatingIdLen; - objCDiscoveredNodeData.rotatingId = cppDiscoveredNodedata->commissionData.rotatingId; - objCDiscoveredNodeData.instanceName = [NSString stringWithCString:cppDiscoveredNodedata->commissionData.instanceName + objCDiscoveredNodeData.rotatingIdLen = cppDiscoveredNodedata->nodeData.rotatingIdLen; + objCDiscoveredNodeData.rotatingId = cppDiscoveredNodedata->nodeData.rotatingId; + objCDiscoveredNodeData.instanceName = [NSString stringWithCString:cppDiscoveredNodedata->nodeData.instanceName encoding:NSUTF8StringEncoding]; // from CommonResolutionData diff --git a/examples/tv-casting-app/tv-casting-common/core/CastingPlayerDiscovery.cpp b/examples/tv-casting-app/tv-casting-common/core/CastingPlayerDiscovery.cpp index 402febdb9f6b97..9b26a868efd8c1 100644 --- a/examples/tv-casting-app/tv-casting-common/core/CastingPlayerDiscovery.cpp +++ b/examples/tv-casting-app/tv-casting-common/core/CastingPlayerDiscovery.cpp @@ -83,10 +83,10 @@ void DeviceDiscoveryDelegateImpl::OnDiscoveredDevice(const chip::Dnssd::Discover CastingPlayerAttributes attributes; snprintf(attributes.id, kIdMaxLength + 1, "%s%u", nodeData.resolutionData.hostName, nodeData.resolutionData.port); - chip::Platform::CopyString(attributes.deviceName, chip::Dnssd::kMaxDeviceNameLen + 1, nodeData.commissionData.deviceName); + chip::Platform::CopyString(attributes.deviceName, chip::Dnssd::kMaxDeviceNameLen + 1, nodeData.nodeData.deviceName); chip::Platform::CopyString(attributes.hostName, chip::Dnssd::kHostNameMaxLength + 1, nodeData.resolutionData.hostName); chip::Platform::CopyString(attributes.instanceName, chip::Dnssd::Commission::kInstanceNameMaxLength + 1, - nodeData.commissionData.instanceName); + nodeData.nodeData.instanceName); attributes.numIPs = (unsigned int) nodeData.resolutionData.numIPs; for (unsigned j = 0; j < attributes.numIPs; j++) @@ -95,9 +95,9 @@ void DeviceDiscoveryDelegateImpl::OnDiscoveredDevice(const chip::Dnssd::Discover } attributes.interfaceId = nodeData.resolutionData.interfaceId; attributes.port = nodeData.resolutionData.port; - attributes.productId = nodeData.commissionData.productId; - attributes.vendorId = nodeData.commissionData.vendorId; - attributes.deviceType = nodeData.commissionData.deviceType; + attributes.productId = nodeData.nodeData.productId; + attributes.vendorId = nodeData.nodeData.vendorId; + attributes.deviceType = nodeData.nodeData.deviceType; memory::Strong player = std::make_shared(attributes); diff --git a/examples/tv-casting-app/tv-casting-common/src/CastingServer.cpp b/examples/tv-casting-app/tv-casting-common/src/CastingServer.cpp index 4cb72732292a2e..b98647db802050 100644 --- a/examples/tv-casting-app/tv-casting-common/src/CastingServer.cpp +++ b/examples/tv-casting-app/tv-casting-common/src/CastingServer.cpp @@ -226,20 +226,20 @@ CHIP_ERROR CastingServer::SendUserDirectedCommissioningRequest(Dnssd::Discovered getIpAddressForUDCRequest(selectedCommissioner->resolutionData.ipAddress, selectedCommissioner->resolutionData.numIPs); ReturnErrorOnFailure(SendUserDirectedCommissioningRequest(chip::Transport::PeerAddress::UDP( *ipAddressToUse, selectedCommissioner->resolutionData.port, selectedCommissioner->resolutionData.interfaceId))); - mTargetVideoPlayerVendorId = selectedCommissioner->commissionData.vendorId; - mTargetVideoPlayerProductId = selectedCommissioner->commissionData.productId; - mTargetVideoPlayerDeviceType = selectedCommissioner->commissionData.deviceType; + mTargetVideoPlayerVendorId = selectedCommissioner->nodeData.vendorId; + mTargetVideoPlayerProductId = selectedCommissioner->nodeData.productId; + mTargetVideoPlayerDeviceType = selectedCommissioner->nodeData.deviceType; mTargetVideoPlayerNumIPs = selectedCommissioner->resolutionData.numIPs; for (size_t i = 0; i < mTargetVideoPlayerNumIPs && i < chip::Dnssd::CommonResolutionData::kMaxIPAddresses; i++) { mTargetVideoPlayerIpAddress[i] = selectedCommissioner->resolutionData.ipAddress[i]; } chip::Platform::CopyString(mTargetVideoPlayerDeviceName, chip::Dnssd::kMaxDeviceNameLen + 1, - selectedCommissioner->commissionData.deviceName); + selectedCommissioner->nodeData.deviceName); chip::Platform::CopyString(mTargetVideoPlayerHostName, chip::Dnssd::kHostNameMaxLength + 1, selectedCommissioner->resolutionData.hostName); chip::Platform::CopyString(mTargetVideoPlayerInstanceName, chip::Dnssd::Commission::kInstanceNameMaxLength + 1, - selectedCommissioner->commissionData.instanceName); + selectedCommissioner->nodeData.instanceName); mTargetVideoPlayerPort = selectedCommissioner->resolutionData.port; return CHIP_NO_ERROR; } diff --git a/examples/tv-casting-app/tv-casting-common/src/ConversionUtils.cpp b/examples/tv-casting-app/tv-casting-common/src/ConversionUtils.cpp index 322e9d46bec8c4..a57e2548009ada 100644 --- a/examples/tv-casting-app/tv-casting-common/src/ConversionUtils.cpp +++ b/examples/tv-casting-app/tv-casting-common/src/ConversionUtils.cpp @@ -23,10 +23,10 @@ CHIP_ERROR ConvertToDiscoveredNodeData(TargetVideoPlayerInfo * inPlayer, chip::D if (inPlayer == nullptr) return CHIP_ERROR_INVALID_ARGUMENT; - outNodeData.commissionData.vendorId = inPlayer->GetVendorId(); - outNodeData.commissionData.productId = static_cast(inPlayer->GetProductId()); - outNodeData.commissionData.deviceType = inPlayer->GetDeviceType(); - outNodeData.resolutionData.numIPs = inPlayer->GetNumIPs(); + outNodeData.nodeData.vendorId = inPlayer->GetVendorId(); + outNodeData.nodeData.productId = static_cast(inPlayer->GetProductId()); + outNodeData.nodeData.deviceType = inPlayer->GetDeviceType(); + outNodeData.resolutionData.numIPs = inPlayer->GetNumIPs(); const chip::Inet::IPAddress * ipAddresses = inPlayer->GetIpAddresses(); if (ipAddresses != nullptr) @@ -37,8 +37,7 @@ CHIP_ERROR ConvertToDiscoveredNodeData(TargetVideoPlayerInfo * inPlayer, chip::D } } - chip::Platform::CopyString(outNodeData.commissionData.deviceName, chip::Dnssd::kMaxDeviceNameLen + 1, - inPlayer->GetDeviceName()); + chip::Platform::CopyString(outNodeData.nodeData.deviceName, chip::Dnssd::kMaxDeviceNameLen + 1, inPlayer->GetDeviceName()); chip::Platform::CopyString(outNodeData.resolutionData.hostName, chip::Dnssd::kHostNameMaxLength + 1, inPlayer->GetHostName()); return CHIP_NO_ERROR; diff --git a/examples/tv-casting-app/tv-casting-common/src/TargetVideoPlayerInfo.cpp b/examples/tv-casting-app/tv-casting-common/src/TargetVideoPlayerInfo.cpp index 7d9c7d51168eaf..c182856039975a 100644 --- a/examples/tv-casting-app/tv-casting-common/src/TargetVideoPlayerInfo.cpp +++ b/examples/tv-casting-app/tv-casting-common/src/TargetVideoPlayerInfo.cpp @@ -232,6 +232,6 @@ bool TargetVideoPlayerInfo::IsSameAs(const chip::Dnssd::DiscoveredNodeData * dis return false; } - return IsSameAs(discoveredNodeData->resolutionData.hostName, discoveredNodeData->commissionData.deviceName, + return IsSameAs(discoveredNodeData->resolutionData.hostName, discoveredNodeData->nodeData.deviceName, discoveredNodeData->resolutionData.numIPs, discoveredNodeData->resolutionData.ipAddress); } diff --git a/src/controller/AbstractDnssdDiscoveryController.h b/src/controller/AbstractDnssdDiscoveryController.h index 6e50d7b40c89ca..c8c9053f878ff3 100644 --- a/src/controller/AbstractDnssdDiscoveryController.h +++ b/src/controller/AbstractDnssdDiscoveryController.h @@ -36,7 +36,7 @@ namespace Controller { * to maintain a list of DiscoveredNodes and providing the implementation * of the template GetDiscoveredNodes() function. */ -class DLL_EXPORT AbstractDnssdDiscoveryController : public Dnssd::CommissioningResolveDelegate +class DLL_EXPORT AbstractDnssdDiscoveryController : public Dnssd::DiscoverNodeDelegate { public: explicit AbstractDnssdDiscoveryController(Dnssd::Resolver * resolver = nullptr) : mDNSResolver(resolver) {} diff --git a/src/controller/CHIPCommissionableNodeController.cpp b/src/controller/CHIPCommissionableNodeController.cpp index d187cc1289a851..f116928b585d82 100644 --- a/src/controller/CHIPCommissionableNodeController.cpp +++ b/src/controller/CHIPCommissionableNodeController.cpp @@ -36,13 +36,13 @@ CHIP_ERROR CommissionableNodeController::DiscoverCommissioners(Dnssd::DiscoveryF mDNSResolver.Shutdown(); // reset if already inited ReturnErrorOnFailure(mDNSResolver.Init(DeviceLayer::UDPEndPointManager())); #endif - mDNSResolver.SetCommissioningDelegate(this); + mDNSResolver.SetDiscoveryDelegate(this); return mDNSResolver.DiscoverCommissioners(discoveryFilter); } CommissionableNodeController::~CommissionableNodeController() { - mDNSResolver.SetCommissioningDelegate(nullptr); + mDNSResolver.SetDiscoveryDelegate(nullptr); } const Dnssd::DiscoveredNodeData * CommissionableNodeController::GetDiscoveredCommissioner(int idx) diff --git a/src/controller/CHIPDeviceController.cpp b/src/controller/CHIPDeviceController.cpp index c67c48c0cce2be..a9c41d87fd04fa 100644 --- a/src/controller/CHIPDeviceController.cpp +++ b/src/controller/CHIPDeviceController.cpp @@ -110,7 +110,7 @@ CHIP_ERROR DeviceController::Init(ControllerInitParams params) VerifyOrReturnError(params.systemState->TransportMgr() != nullptr, CHIP_ERROR_INVALID_ARGUMENT); ReturnErrorOnFailure(mDNSResolver.Init(params.systemState->UDPEndPointManager())); - mDNSResolver.SetCommissioningDelegate(this); + mDNSResolver.SetDiscoveryDelegate(this); RegisterDeviceDiscoveryDelegate(params.deviceDiscoveryDelegate); mVendorId = params.controllerVendorId; diff --git a/src/controller/SetUpCodePairer.cpp b/src/controller/SetUpCodePairer.cpp index db09d91fd74441..3a995a6e93579a 100644 --- a/src/controller/SetUpCodePairer.cpp +++ b/src/controller/SetUpCodePairer.cpp @@ -332,23 +332,22 @@ bool SetUpCodePairer::IdIsPresent(uint16_t vendorOrProductID) bool SetUpCodePairer::NodeMatchesCurrentFilter(const Dnssd::DiscoveredNodeData & nodeData) const { - if (nodeData.commissionData.commissioningMode == 0) + if (nodeData.nodeData.commissioningMode == 0) { ChipLogProgress(Controller, "Discovered device does not have an open commissioning window."); return false; } // The advertisement may not include a vendor id. - if (IdIsPresent(mPayloadVendorID) && IdIsPresent(nodeData.commissionData.vendorId) && - mPayloadVendorID != nodeData.commissionData.vendorId) + if (IdIsPresent(mPayloadVendorID) && IdIsPresent(nodeData.nodeData.vendorId) && mPayloadVendorID != nodeData.nodeData.vendorId) { ChipLogProgress(Controller, "Discovered device does not match our vendor id."); return false; } // The advertisement may not include a product id. - if (IdIsPresent(mPayloadProductID) && IdIsPresent(nodeData.commissionData.productId) && - mPayloadProductID != nodeData.commissionData.productId) + if (IdIsPresent(mPayloadProductID) && IdIsPresent(nodeData.nodeData.productId) && + mPayloadProductID != nodeData.nodeData.productId) { ChipLogProgress(Controller, "Discovered device does not match our product id."); return false; @@ -358,10 +357,10 @@ bool SetUpCodePairer::NodeMatchesCurrentFilter(const Dnssd::DiscoveredNodeData & switch (mCurrentFilter.type) { case Dnssd::DiscoveryFilterType::kShortDiscriminator: - discriminatorMatches = (((nodeData.commissionData.longDiscriminator >> 8) & 0x0F) == mCurrentFilter.code); + discriminatorMatches = (((nodeData.nodeData.longDiscriminator >> 8) & 0x0F) == mCurrentFilter.code); break; case Dnssd::DiscoveryFilterType::kLongDiscriminator: - discriminatorMatches = (nodeData.commissionData.longDiscriminator == mCurrentFilter.code); + discriminatorMatches = (nodeData.nodeData.longDiscriminator == mCurrentFilter.code); break; default: ChipLogError(Controller, "Unknown filter type; all matches will fail"); diff --git a/src/controller/java/CHIPDeviceController-JNI.cpp b/src/controller/java/CHIPDeviceController-JNI.cpp index aa1dd41149189e..82a0485718a21e 100644 --- a/src/controller/java/CHIPDeviceController-JNI.cpp +++ b/src/controller/java/CHIPDeviceController-JNI.cpp @@ -1905,7 +1905,7 @@ JNI_METHOD(jobject, getDiscoveredDevice)(JNIEnv * env, jobject self, jlong handl jobject discoveredObj = env->NewObject(discoveredDeviceCls, constructor); - env->SetLongField(discoveredObj, discrminatorID, data->commissionData.longDiscriminator); + env->SetLongField(discoveredObj, discrminatorID, data->nodeData.longDiscriminator); char ipAddress[100]; data->resolutionData.ipAddress[0].ToString(ipAddress, 100); @@ -1913,13 +1913,13 @@ JNI_METHOD(jobject, getDiscoveredDevice)(JNIEnv * env, jobject self, jlong handl env->SetObjectField(discoveredObj, ipAddressID, jniipAdress); env->SetIntField(discoveredObj, portID, static_cast(data->resolutionData.port)); - env->SetLongField(discoveredObj, deviceTypeID, static_cast(data->commissionData.deviceType)); - env->SetIntField(discoveredObj, vendorIdID, static_cast(data->commissionData.vendorId)); - env->SetIntField(discoveredObj, productIdID, static_cast(data->commissionData.productId)); + env->SetLongField(discoveredObj, deviceTypeID, static_cast(data->nodeData.deviceType)); + env->SetIntField(discoveredObj, vendorIdID, static_cast(data->nodeData.vendorId)); + env->SetIntField(discoveredObj, productIdID, static_cast(data->nodeData.productId)); jbyteArray jRotatingId; - CHIP_ERROR err = JniReferences::GetInstance().N2J_ByteArray( - env, data->commissionData.rotatingId, static_cast(data->commissionData.rotatingIdLen), jRotatingId); + CHIP_ERROR err = JniReferences::GetInstance().N2J_ByteArray(env, data->nodeData.rotatingId, + static_cast(data->nodeData.rotatingIdLen), jRotatingId); if (err != CHIP_NO_ERROR) { @@ -1927,12 +1927,12 @@ JNI_METHOD(jobject, getDiscoveredDevice)(JNIEnv * env, jobject self, jlong handl return nullptr; } env->SetObjectField(discoveredObj, rotatingIdID, static_cast(jRotatingId)); - env->SetObjectField(discoveredObj, instanceNameID, env->NewStringUTF(data->commissionData.instanceName)); - env->SetObjectField(discoveredObj, deviceNameID, env->NewStringUTF(data->commissionData.deviceName)); - env->SetObjectField(discoveredObj, pairingInstructionID, env->NewStringUTF(data->commissionData.pairingInstruction)); + env->SetObjectField(discoveredObj, instanceNameID, env->NewStringUTF(data->nodeData.instanceName)); + env->SetObjectField(discoveredObj, deviceNameID, env->NewStringUTF(data->nodeData.deviceName)); + env->SetObjectField(discoveredObj, pairingInstructionID, env->NewStringUTF(data->nodeData.pairingInstruction)); - env->CallVoidMethod(discoveredObj, setCommissioningModeID, static_cast(data->commissionData.commissioningMode)); - env->CallVoidMethod(discoveredObj, setPairingHintID, static_cast(data->commissionData.pairingHint)); + env->CallVoidMethod(discoveredObj, setCommissioningModeID, static_cast(data->nodeData.commissioningMode)); + env->CallVoidMethod(discoveredObj, setPairingHintID, static_cast(data->nodeData.pairingHint)); return discoveredObj; } diff --git a/src/controller/python/ChipCommissionableNodeController-ScriptBinding.cpp b/src/controller/python/ChipCommissionableNodeController-ScriptBinding.cpp index c82dd13f0e452f..39d70e350ae4db 100644 --- a/src/controller/python/ChipCommissionableNodeController-ScriptBinding.cpp +++ b/src/controller/python/ChipCommissionableNodeController-ScriptBinding.cpp @@ -82,22 +82,22 @@ void pychip_CommissionableNodeController_PrintDiscoveredCommissioners( continue; } char rotatingId[chip::Dnssd::kMaxRotatingIdLen * 2 + 1] = ""; - Encoding::BytesToUppercaseHexString(dnsSdInfo->commissionData.rotatingId, dnsSdInfo->commissionData.rotatingIdLen, - rotatingId, sizeof(rotatingId)); + Encoding::BytesToUppercaseHexString(dnsSdInfo->nodeData.rotatingId, dnsSdInfo->nodeData.rotatingIdLen, rotatingId, + sizeof(rotatingId)); ChipLogProgress(Discovery, "Commissioner %d", i); - ChipLogProgress(Discovery, "\tInstance name:\t\t%s", dnsSdInfo->commissionData.instanceName); + ChipLogProgress(Discovery, "\tInstance name:\t\t%s", dnsSdInfo->nodeData.instanceName); ChipLogProgress(Discovery, "\tHost name:\t\t%s", dnsSdInfo->resolutionData.hostName); ChipLogProgress(Discovery, "\tPort:\t\t\t%u", dnsSdInfo->resolutionData.port); - ChipLogProgress(Discovery, "\tLong discriminator:\t%u", dnsSdInfo->commissionData.longDiscriminator); - ChipLogProgress(Discovery, "\tVendor ID:\t\t%u", dnsSdInfo->commissionData.vendorId); - ChipLogProgress(Discovery, "\tProduct ID:\t\t%u", dnsSdInfo->commissionData.productId); - ChipLogProgress(Discovery, "\tCommissioning Mode\t%u", dnsSdInfo->commissionData.commissioningMode); - ChipLogProgress(Discovery, "\tDevice Type\t\t%u", dnsSdInfo->commissionData.deviceType); - ChipLogProgress(Discovery, "\tDevice Name\t\t%s", dnsSdInfo->commissionData.deviceName); + ChipLogProgress(Discovery, "\tLong discriminator:\t%u", dnsSdInfo->nodeData.longDiscriminator); + ChipLogProgress(Discovery, "\tVendor ID:\t\t%u", dnsSdInfo->nodeData.vendorId); + ChipLogProgress(Discovery, "\tProduct ID:\t\t%u", dnsSdInfo->nodeData.productId); + ChipLogProgress(Discovery, "\tCommissioning Mode\t%u", dnsSdInfo->nodeData.commissioningMode); + ChipLogProgress(Discovery, "\tDevice Type\t\t%u", dnsSdInfo->nodeData.deviceType); + ChipLogProgress(Discovery, "\tDevice Name\t\t%s", dnsSdInfo->nodeData.deviceName); ChipLogProgress(Discovery, "\tRotating Id\t\t%s", rotatingId); - ChipLogProgress(Discovery, "\tPairing Instruction\t%s", dnsSdInfo->commissionData.pairingInstruction); - ChipLogProgress(Discovery, "\tPairing Hint\t\t%u", dnsSdInfo->commissionData.pairingHint); + ChipLogProgress(Discovery, "\tPairing Instruction\t%s", dnsSdInfo->nodeData.pairingInstruction); + ChipLogProgress(Discovery, "\tPairing Hint\t\t%u", dnsSdInfo->nodeData.pairingHint); if (dnsSdInfo->resolutionData.GetMrpRetryIntervalIdle().HasValue()) { ChipLogProgress(Discovery, "\tMrp Interval idle\t%u", diff --git a/src/controller/python/ChipDeviceController-Discovery.cpp b/src/controller/python/ChipDeviceController-Discovery.cpp index 7b502140a36bb6..a8896628680a8f 100644 --- a/src/controller/python/ChipDeviceController-Discovery.cpp +++ b/src/controller/python/ChipDeviceController-Discovery.cpp @@ -110,21 +110,21 @@ void pychip_DeviceController_IterateDiscoveredCommissionableNodes(Controller::De Json::Value jsonVal; char rotatingId[Dnssd::kMaxRotatingIdLen * 2 + 1] = ""; - Encoding::BytesToUppercaseHexString(dnsSdInfo->commissionData.rotatingId, dnsSdInfo->commissionData.rotatingIdLen, - rotatingId, sizeof(rotatingId)); + Encoding::BytesToUppercaseHexString(dnsSdInfo->nodeData.rotatingId, dnsSdInfo->nodeData.rotatingIdLen, rotatingId, + sizeof(rotatingId)); ChipLogProgress(Discovery, "Commissionable Node %d", i); - jsonVal["instanceName"] = dnsSdInfo->commissionData.instanceName; + jsonVal["instanceName"] = dnsSdInfo->nodeData.instanceName; jsonVal["hostName"] = dnsSdInfo->resolutionData.hostName; jsonVal["port"] = dnsSdInfo->resolutionData.port; - jsonVal["longDiscriminator"] = dnsSdInfo->commissionData.longDiscriminator; - jsonVal["vendorId"] = dnsSdInfo->commissionData.vendorId; - jsonVal["productId"] = dnsSdInfo->commissionData.productId; - jsonVal["commissioningMode"] = dnsSdInfo->commissionData.commissioningMode; - jsonVal["deviceType"] = dnsSdInfo->commissionData.deviceType; - jsonVal["deviceName"] = dnsSdInfo->commissionData.deviceName; - jsonVal["pairingInstruction"] = dnsSdInfo->commissionData.pairingInstruction; - jsonVal["pairingHint"] = dnsSdInfo->commissionData.pairingHint; + jsonVal["longDiscriminator"] = dnsSdInfo->nodeData.longDiscriminator; + jsonVal["vendorId"] = dnsSdInfo->nodeData.vendorId; + jsonVal["productId"] = dnsSdInfo->nodeData.productId; + jsonVal["commissioningMode"] = dnsSdInfo->nodeData.commissioningMode; + jsonVal["deviceType"] = dnsSdInfo->nodeData.deviceType; + jsonVal["deviceName"] = dnsSdInfo->nodeData.deviceName; + jsonVal["pairingInstruction"] = dnsSdInfo->nodeData.pairingInstruction; + jsonVal["pairingHint"] = dnsSdInfo->nodeData.pairingHint; if (dnsSdInfo->resolutionData.GetMrpRetryIntervalIdle().HasValue()) { jsonVal["mrpRetryIntervalIdle"] = dnsSdInfo->resolutionData.GetMrpRetryIntervalIdle().Value().count(); @@ -152,7 +152,7 @@ void pychip_DeviceController_IterateDiscoveredCommissionableNodes(Controller::De { jsonVal["isICDOperatingAsLIT"] = dnsSdInfo->resolutionData.isICDOperatingAsLIT.Value(); } - if (dnsSdInfo->commissionData.rotatingIdLen > 0) + if (dnsSdInfo->nodeData.rotatingIdLen > 0) { jsonVal["rotatingId"] = rotatingId; } @@ -174,22 +174,22 @@ void pychip_DeviceController_PrintDiscoveredDevices(Controller::DeviceCommission continue; } char rotatingId[Dnssd::kMaxRotatingIdLen * 2 + 1] = ""; - Encoding::BytesToUppercaseHexString(dnsSdInfo->commissionData.rotatingId, dnsSdInfo->commissionData.rotatingIdLen, - rotatingId, sizeof(rotatingId)); + Encoding::BytesToUppercaseHexString(dnsSdInfo->nodeData.rotatingId, dnsSdInfo->nodeData.rotatingIdLen, rotatingId, + sizeof(rotatingId)); ChipLogProgress(Discovery, "Commissionable Node %d", i); - ChipLogProgress(Discovery, "\tInstance name:\t\t%s", dnsSdInfo->commissionData.instanceName); + ChipLogProgress(Discovery, "\tInstance name:\t\t%s", dnsSdInfo->nodeData.instanceName); ChipLogProgress(Discovery, "\tHost name:\t\t%s", dnsSdInfo->resolutionData.hostName); ChipLogProgress(Discovery, "\tPort:\t\t\t%u", dnsSdInfo->resolutionData.port); - ChipLogProgress(Discovery, "\tLong discriminator:\t%u", dnsSdInfo->commissionData.longDiscriminator); - ChipLogProgress(Discovery, "\tVendor ID:\t\t%u", dnsSdInfo->commissionData.vendorId); - ChipLogProgress(Discovery, "\tProduct ID:\t\t%u", dnsSdInfo->commissionData.productId); - ChipLogProgress(Discovery, "\tCommissioning Mode\t%u", dnsSdInfo->commissionData.commissioningMode); - ChipLogProgress(Discovery, "\tDevice Type\t\t%u", dnsSdInfo->commissionData.deviceType); - ChipLogProgress(Discovery, "\tDevice Name\t\t%s", dnsSdInfo->commissionData.deviceName); + ChipLogProgress(Discovery, "\tLong discriminator:\t%u", dnsSdInfo->nodeData.longDiscriminator); + ChipLogProgress(Discovery, "\tVendor ID:\t\t%u", dnsSdInfo->nodeData.vendorId); + ChipLogProgress(Discovery, "\tProduct ID:\t\t%u", dnsSdInfo->nodeData.productId); + ChipLogProgress(Discovery, "\tCommissioning Mode\t%u", dnsSdInfo->nodeData.commissioningMode); + ChipLogProgress(Discovery, "\tDevice Type\t\t%u", dnsSdInfo->nodeData.deviceType); + ChipLogProgress(Discovery, "\tDevice Name\t\t%s", dnsSdInfo->nodeData.deviceName); ChipLogProgress(Discovery, "\tRotating Id\t\t%s", rotatingId); - ChipLogProgress(Discovery, "\tPairing Instruction\t%s", dnsSdInfo->commissionData.pairingInstruction); - ChipLogProgress(Discovery, "\tPairing Hint\t\t%u", dnsSdInfo->commissionData.pairingHint); + ChipLogProgress(Discovery, "\tPairing Instruction\t%s", dnsSdInfo->nodeData.pairingInstruction); + ChipLogProgress(Discovery, "\tPairing Hint\t\t%u", dnsSdInfo->nodeData.pairingHint); if (dnsSdInfo->resolutionData.GetMrpRetryIntervalIdle().HasValue()) { ChipLogProgress(Discovery, "\tMrp Interval idle\t%u", diff --git a/src/controller/python/ChipDeviceController-ScriptPairingDeviceDiscoveryDelegate.cpp b/src/controller/python/ChipDeviceController-ScriptPairingDeviceDiscoveryDelegate.cpp index e5cb7d768e4d18..a83a56c1b813f9 100644 --- a/src/controller/python/ChipDeviceController-ScriptPairingDeviceDiscoveryDelegate.cpp +++ b/src/controller/python/ChipDeviceController-ScriptPairingDeviceDiscoveryDelegate.cpp @@ -24,7 +24,7 @@ namespace Controller { void ScriptPairingDeviceDiscoveryDelegate::OnDiscoveredDevice(const Dnssd::DiscoveredNodeData & nodeData) { // Ignore nodes with closed comissioning window - VerifyOrReturn(nodeData.commissionData.commissioningMode != 0); + VerifyOrReturn(nodeData.nodeData.commissioningMode != 0); VerifyOrReturn(mActiveDeviceCommissioner != nullptr); const uint16_t port = nodeData.resolutionData.port; diff --git a/src/controller/tests/TestCommissionableNodeController.cpp b/src/controller/tests/TestCommissionableNodeController.cpp index c2aafe500c293d..760b62e97386b0 100644 --- a/src/controller/tests/TestCommissionableNodeController.cpp +++ b/src/controller/tests/TestCommissionableNodeController.cpp @@ -38,9 +38,10 @@ class MockResolver : public Resolver void SetOperationalDelegate(OperationalResolveDelegate * delegate) override {} CHIP_ERROR ResolveNodeId(const PeerId & peerId) override { return ResolveNodeIdStatus; } void NodeIdResolutionNoLongerNeeded(const PeerId & peerId) override {} - CHIP_ERROR DiscoverCommissioners(DiscoveryFilter filter, DiscoveryContext &) override { return DiscoverCommissionersStatus; } - CHIP_ERROR DiscoverCommissionableNodes(DiscoveryFilter filter, DiscoveryContext &) override + CHIP_ERROR StartDiscovery(DiscoveryType type, DiscoveryFilter filter, DiscoveryContext &) override { + if (DiscoveryType::kCommissionerNode == type) + return DiscoverCommissionersStatus; return CHIP_ERROR_NOT_IMPLEMENTED; } CHIP_ERROR StopDiscovery(DiscoveryContext &) override { return CHIP_ERROR_NOT_IMPLEMENTED; } diff --git a/src/darwin/Framework/CHIP/MTRCommissionableBrowser.mm b/src/darwin/Framework/CHIP/MTRCommissionableBrowser.mm index a0ccfd380a232d..bf975b672decd5 100644 --- a/src/darwin/Framework/CHIP/MTRCommissionableBrowser.mm +++ b/src/darwin/Framework/CHIP/MTRCommissionableBrowser.mm @@ -53,7 +53,7 @@ @interface MTRCommissionableBrowserResult () @implementation MTRCommissionableBrowserResult @end -class CommissionableBrowserInternal : public CommissioningResolveDelegate, +class CommissionableBrowserInternal : public DiscoverNodeDelegate, public DnssdBrowseDelegate #if CONFIG_NETWORK_LAYER_BLE , @@ -156,12 +156,12 @@ void ClearDnssdDiscoveredDevices() mDiscoveredResults = discoveredResultsCopy; } - /////////// CommissioningResolveDelegate Interface ///////// + /////////// DiscoverNodeDelegate Interface ///////// void OnNodeDiscovered(const DiscoveredNodeData & nodeData) override { assertChipStackLockedByCurrentThread(); - auto & commissionData = nodeData.commissionData; + auto & commissionData = nodeData.nodeData; auto key = [NSString stringWithUTF8String:commissionData.instanceName]; if ([mDiscoveredResults objectForKey:key] == nil) { // It should not happens. diff --git a/src/lib/dnssd/ActiveResolveAttempts.h b/src/lib/dnssd/ActiveResolveAttempts.h index 15796abf85b20c..ba6d8cf7a54f6e 100644 --- a/src/lib/dnssd/ActiveResolveAttempts.h +++ b/src/lib/dnssd/ActiveResolveAttempts.h @@ -159,17 +159,17 @@ class ActiveResolveAttempts case chip::Dnssd::DiscoveryFilterType::kNone: return true; case chip::Dnssd::DiscoveryFilterType::kShortDiscriminator: - return browse.filter.code == static_cast((data.commissionData.longDiscriminator >> 8) & 0x0F); + return browse.filter.code == static_cast((data.nodeData.longDiscriminator >> 8) & 0x0F); case chip::Dnssd::DiscoveryFilterType::kLongDiscriminator: - return browse.filter.code == data.commissionData.longDiscriminator; + return browse.filter.code == data.nodeData.longDiscriminator; case chip::Dnssd::DiscoveryFilterType::kVendorId: - return browse.filter.code == data.commissionData.vendorId; + return browse.filter.code == data.nodeData.vendorId; case chip::Dnssd::DiscoveryFilterType::kDeviceType: - return browse.filter.code == data.commissionData.deviceType; + return browse.filter.code == data.nodeData.deviceType; case chip::Dnssd::DiscoveryFilterType::kCommissioningMode: - return browse.filter.code == data.commissionData.commissioningMode; + return browse.filter.code == data.nodeData.commissioningMode; case chip::Dnssd::DiscoveryFilterType::kInstanceName: - return strncmp(browse.filter.instanceName, data.commissionData.instanceName, + return strncmp(browse.filter.instanceName, data.nodeData.instanceName, chip::Dnssd::Commission::kInstanceNameMaxLength + 1) == 0; case chip::Dnssd::DiscoveryFilterType::kCommissioner: case chip::Dnssd::DiscoveryFilterType::kCompressedFabricId: diff --git a/src/lib/dnssd/Discovery_ImplPlatform.cpp b/src/lib/dnssd/Discovery_ImplPlatform.cpp index 6904480a4d1691..c12019ca60b5fd 100644 --- a/src/lib/dnssd/Discovery_ImplPlatform.cpp +++ b/src/lib/dnssd/Discovery_ImplPlatform.cpp @@ -340,7 +340,7 @@ void DiscoveryImplPlatform::HandleNodeIdResolve(void * context, DnssdService * r void DnssdService::ToDiscoveredNodeData(const Span & addresses, DiscoveredNodeData & nodeData) { auto & resolutionData = nodeData.resolutionData; - auto & commissionData = nodeData.commissionData; + auto & commissionData = nodeData.nodeData; Platform::CopyString(resolutionData.hostName, mHostName); Platform::CopyString(commissionData.instanceName, mName); @@ -743,6 +743,21 @@ CHIP_ERROR DiscoveryImplPlatform::DiscoverCommissioners(DiscoveryFilter filter, return error; } +CHIP_ERROR DiscoveryImplPlatform::StartDiscovery(DiscoveryType type, DiscoveryFilter filter, DiscoveryContext & context) +{ + switch (type) + { + case DiscoveryType::kCommissionableNode: + return DiscoverCommissionableNodes(filter, context); + case DiscoveryType::kCommissionerNode: + return DiscoverCommissioners(filter, context); + case DiscoveryType::kOperational: + return CHIP_ERROR_NOT_IMPLEMENTED; + default: + return CHIP_ERROR_INVALID_ARGUMENT; + } +} + CHIP_ERROR DiscoveryImplPlatform::StopDiscovery(DiscoveryContext & context) { if (!context.GetBrowseIdentifier().HasValue()) diff --git a/src/lib/dnssd/Discovery_ImplPlatform.h b/src/lib/dnssd/Discovery_ImplPlatform.h index a3f79796ca535c..c6ba929801ba7b 100644 --- a/src/lib/dnssd/Discovery_ImplPlatform.h +++ b/src/lib/dnssd/Discovery_ImplPlatform.h @@ -53,8 +53,9 @@ class DiscoveryImplPlatform : public ServiceAdvertiser, public Resolver void SetOperationalDelegate(OperationalResolveDelegate * delegate) override { mOperationalDelegate = delegate; } CHIP_ERROR ResolveNodeId(const PeerId & peerId) override; void NodeIdResolutionNoLongerNeeded(const PeerId & peerId) override; - CHIP_ERROR DiscoverCommissionableNodes(DiscoveryFilter filter, DiscoveryContext & context) override; - CHIP_ERROR DiscoverCommissioners(DiscoveryFilter filter, DiscoveryContext & context) override; + CHIP_ERROR DiscoverCommissionableNodes(DiscoveryFilter filter, DiscoveryContext & context); + CHIP_ERROR DiscoverCommissioners(DiscoveryFilter filter, DiscoveryContext & context); + CHIP_ERROR StartDiscovery(DiscoveryType type, DiscoveryFilter filter, DiscoveryContext & context) override; CHIP_ERROR StopDiscovery(DiscoveryContext & context) override; CHIP_ERROR ReconfirmRecord(const char * hostname, Inet::IPAddress address, Inet::InterfaceId interfaceId) override; diff --git a/src/lib/dnssd/IncrementalResolve.cpp b/src/lib/dnssd/IncrementalResolve.cpp index c36efbde177a6d..766d979e33a4ba 100644 --- a/src/lib/dnssd/IncrementalResolve.cpp +++ b/src/lib/dnssd/IncrementalResolve.cpp @@ -189,7 +189,7 @@ CHIP_ERROR IncrementalResolver::InitializeParsing(mdns::Minimal::SerializedQName break; case ServiceNameType::kCommissioner: case ServiceNameType::kCommissionable: - mSpecificResolutionData.Set(); + mSpecificResolutionData.Set(); { // Commission addresses start with instance name @@ -199,10 +199,10 @@ CHIP_ERROR IncrementalResolver::InitializeParsing(mdns::Minimal::SerializedQName return CHIP_ERROR_INVALID_ARGUMENT; } - Platform::CopyString(mSpecificResolutionData.Get().instanceName, nameCopy.Value()); + Platform::CopyString(mSpecificResolutionData.Get().instanceName, nameCopy.Value()); } - LogFoundCommissionSrvRecord(mSpecificResolutionData.Get().instanceName, mTargetHostName.Get()); + LogFoundCommissionSrvRecord(mSpecificResolutionData.Get().instanceName, mTargetHostName.Get()); break; default: return CHIP_ERROR_INVALID_ARGUMENT; @@ -304,9 +304,9 @@ CHIP_ERROR IncrementalResolver::OnTxtRecord(const ResourceData & data, BytesRang } } - if (IsActiveCommissionParse()) + if (IsActiveBrowseParse()) { - TxtParser delegate(mSpecificResolutionData.Get()); + TxtParser delegate(mSpecificResolutionData.Get()); if (!ParseTxtRecord(data.GetData(), &delegate)) { return CHIP_ERROR_INVALID_ARGUMENT; @@ -343,12 +343,12 @@ CHIP_ERROR IncrementalResolver::OnIpAddress(Inet::InterfaceId interface, const I CHIP_ERROR IncrementalResolver::Take(DiscoveredNodeData & outputData) { - VerifyOrReturnError(IsActiveCommissionParse(), CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(IsActiveBrowseParse(), CHIP_ERROR_INCORRECT_STATE); IPAddressSorter::Sort(mCommonResolutionData.ipAddress, mCommonResolutionData.numIPs, mCommonResolutionData.interfaceId); outputData.resolutionData = mCommonResolutionData; - outputData.commissionData = mSpecificResolutionData.Get(); + outputData.nodeData = mSpecificResolutionData.Get(); ResetToInactive(); diff --git a/src/lib/dnssd/IncrementalResolve.h b/src/lib/dnssd/IncrementalResolve.h index b28b3cb897b5f3..9d2386472d7eba 100644 --- a/src/lib/dnssd/IncrementalResolve.h +++ b/src/lib/dnssd/IncrementalResolve.h @@ -99,7 +99,7 @@ class IncrementalResolver /// method. bool IsActive() const { return mSpecificResolutionData.Valid(); } - bool IsActiveCommissionParse() const { return mSpecificResolutionData.Is(); } + bool IsActiveBrowseParse() const { return mSpecificResolutionData.Is(); } bool IsActiveOperationalParse() const { return mSpecificResolutionData.Is(); } ServiceNameType GetCurrentType() const { return mServiceNameType; } @@ -143,7 +143,7 @@ class IncrementalResolver /// Take the current value of the object and clear it once returned. /// - /// Object must be in `IsActiveCommissionParse()` for this to succeed. + /// Object must be in `IsActiveBrowseParse()` for this to succeed. /// Data will be returned (and cleared) even if not yet complete based /// on `GetMissingRequiredInformation()`. This method takes as much data as /// it was parsed so far. @@ -170,7 +170,7 @@ class IncrementalResolver /// Input data MUST have GetType() == QType::TXT CHIP_ERROR OnTxtRecord(const mdns::Minimal::ResourceData & data, mdns::Minimal::BytesRange packetRange); - /// Notify that a new IP addres has been found. + /// Notify that a new IP address has been found. /// /// This is to be called on both A (if IPv4 support is enabled) and AAAA /// addresses. @@ -178,7 +178,7 @@ class IncrementalResolver /// Prerequisite: IP address belongs to the right nost name CHIP_ERROR OnIpAddress(Inet::InterfaceId interface, const Inet::IPAddress & addr); - using ParsedRecordSpecificData = Variant; + using ParsedRecordSpecificData = Variant; StoredServerName mRecordName; // Record name for what is parsed (SRV/PTR/TXT) StoredServerName mTargetHostName; // `Target` for the SRV record diff --git a/src/lib/dnssd/Resolver.h b/src/lib/dnssd/Resolver.h index 6f9827b82218a6..bf684cef6a12a5 100644 --- a/src/lib/dnssd/Resolver.h +++ b/src/lib/dnssd/Resolver.h @@ -78,12 +78,12 @@ class DiscoveryContext : public ReferenceCounted void ClearBrowseIdentifier() { mBrowseIdentifier.ClearValue(); } const Optional & GetBrowseIdentifier() const { return mBrowseIdentifier; } - void SetCommissioningDelegate(CommissioningResolveDelegate * delegate) { mCommissioningDelegate = delegate; } + void SetDiscoveryDelegate(DiscoverNodeDelegate * delegate) { mDelegate = delegate; } void OnNodeDiscovered(const DiscoveredNodeData & nodeData) { - if (mCommissioningDelegate != nullptr) + if (mDelegate != nullptr) { - mCommissioningDelegate->OnNodeDiscovered(nodeData); + mDelegate->OnNodeDiscovered(nodeData); } else { @@ -92,7 +92,7 @@ class DiscoveryContext : public ReferenceCounted } private: - CommissioningResolveDelegate * mCommissioningDelegate = nullptr; + DiscoverNodeDelegate * mDelegate = nullptr; Optional mBrowseIdentifier; }; @@ -168,31 +168,19 @@ class Resolver virtual void NodeIdResolutionNoLongerNeeded(const PeerId & peerId) = 0; /** - * Finds all commissionable nodes matching the given filter. + * Finds all nodes of given type matching the given filter. * * Whenever a new matching node is found, the node information is passed to - * the `OnNodeDiscovered` method of the commissioning delegate configured + * the `OnNodeDiscovered` method of the discovery delegate configured * in the context object. * * This method is expected to increase the reference count of the context * object for as long as it takes to complete the discovery request. */ - virtual CHIP_ERROR DiscoverCommissionableNodes(DiscoveryFilter filter, DiscoveryContext & context) = 0; + virtual CHIP_ERROR StartDiscovery(DiscoveryType type, DiscoveryFilter filter, DiscoveryContext & context) = 0; /** - * Finds all commissioner nodes matching the given filter. - * - * Whenever a new matching node is found, the node information is passed to - * the `OnNodeDiscovered` method of the commissioning delegate configured - * in the context object. - * - * This method is expected to increase the reference count of the context - * object for as long as it takes to complete the discovery request. - */ - virtual CHIP_ERROR DiscoverCommissioners(DiscoveryFilter filter, DiscoveryContext & context) = 0; - - /** - * Stop discovery (of commissionable or commissioner nodes). + * Stop discovery (of all node types). * * Some back ends may not support stopping discovery, so consumers should * not assume they will stop getting callbacks after calling this. diff --git a/src/lib/dnssd/ResolverProxy.cpp b/src/lib/dnssd/ResolverProxy.cpp index 3e7446ebbbdc6b..e43028ee54023d 100644 --- a/src/lib/dnssd/ResolverProxy.cpp +++ b/src/lib/dnssd/ResolverProxy.cpp @@ -36,7 +36,7 @@ CHIP_ERROR ResolverProxy::Init(Inet::EndPointManager * udpEnd void ResolverProxy::Shutdown() { VerifyOrReturn(mContext != nullptr); - mContext->SetCommissioningDelegate(nullptr); + mContext->SetDiscoveryDelegate(nullptr); mContext->Release(); mContext = nullptr; } @@ -45,14 +45,14 @@ CHIP_ERROR ResolverProxy::DiscoverCommissionableNodes(DiscoveryFilter filter) { VerifyOrReturnError(mContext != nullptr, CHIP_ERROR_INCORRECT_STATE); - return mResolver.DiscoverCommissionableNodes(filter, *mContext); + return mResolver.StartDiscovery(DiscoveryType::kCommissionableNode, filter, *mContext); } CHIP_ERROR ResolverProxy::DiscoverCommissioners(DiscoveryFilter filter) { VerifyOrReturnError(mContext != nullptr, CHIP_ERROR_INCORRECT_STATE); - return mResolver.DiscoverCommissioners(filter, *mContext); + return mResolver.StartDiscovery(DiscoveryType::kCommissionerNode, filter, *mContext); } CHIP_ERROR ResolverProxy::StopDiscovery() diff --git a/src/lib/dnssd/ResolverProxy.h b/src/lib/dnssd/ResolverProxy.h index 09a50e89c1a209..58617b0d0162d7 100644 --- a/src/lib/dnssd/ResolverProxy.h +++ b/src/lib/dnssd/ResolverProxy.h @@ -44,11 +44,11 @@ class ResolverProxy CHIP_ERROR Init(Inet::EndPointManager * udpEndPoint = nullptr); void Shutdown(); - void SetCommissioningDelegate(CommissioningResolveDelegate * delegate) + void SetDiscoveryDelegate(DiscoverNodeDelegate * delegate) { if (mContext != nullptr) { - mContext->SetCommissioningDelegate(delegate); + mContext->SetDiscoveryDelegate(delegate); } } diff --git a/src/lib/dnssd/Resolver_ImplMinimalMdns.cpp b/src/lib/dnssd/Resolver_ImplMinimalMdns.cpp index b74d0ae87d8507..a5e7117a72a005 100644 --- a/src/lib/dnssd/Resolver_ImplMinimalMdns.cpp +++ b/src/lib/dnssd/Resolver_ImplMinimalMdns.cpp @@ -285,8 +285,7 @@ class MinMdnsResolver : public Resolver, public MdnsPacketDelegate void SetOperationalDelegate(OperationalResolveDelegate * delegate) override { mOperationalDelegate = delegate; } CHIP_ERROR ResolveNodeId(const PeerId & peerId) override; void NodeIdResolutionNoLongerNeeded(const PeerId & peerId) override; - CHIP_ERROR DiscoverCommissionableNodes(DiscoveryFilter filter, DiscoveryContext & context) override; - CHIP_ERROR DiscoverCommissioners(DiscoveryFilter filter, DiscoveryContext & context) override; + CHIP_ERROR StartDiscovery(DiscoveryType type, DiscoveryFilter filter, DiscoveryContext & context) override; CHIP_ERROR StopDiscovery(DiscoveryContext & context) override; CHIP_ERROR ReconfirmRecord(const char * hostname, Inet::IPAddress address, Inet::InterfaceId interfaceId) override; @@ -386,7 +385,7 @@ void MinMdnsResolver::AdvancePendingResolverStates() } // SUCCESS. Call the delegates - if (resolver->IsActiveCommissionParse()) + if (resolver->IsActiveBrowseParse()) { MATTER_TRACE_SCOPE("Active commissioning delegate call", "MinMdnsResolver"); DiscoveredNodeData nodeData; @@ -412,13 +411,15 @@ void MinMdnsResolver::AdvancePendingResolverStates() case IncrementalResolver::ServiceNameType::kCommissioner: discoveredNodeIsRelevant = mActiveResolves.HasBrowseFor(chip::Dnssd::DiscoveryType::kCommissionerNode); mActiveResolves.CompleteCommissioner(nodeData); + nodeData.nodeType = DiscoveryType::kCommissionerNode; break; case IncrementalResolver::ServiceNameType::kCommissionable: discoveredNodeIsRelevant = mActiveResolves.HasBrowseFor(chip::Dnssd::DiscoveryType::kCommissionableNode); mActiveResolves.CompleteCommissionable(nodeData); + nodeData.nodeType = DiscoveryType::kCommissionableNode; break; default: - ChipLogError(Discovery, "Unexpected type for commission data parsing"); + ChipLogError(Discovery, "Unexpected type for browse data parsing"); continue; } @@ -685,20 +686,12 @@ void MinMdnsResolver::ExpireIncrementalResolvers() } } -CHIP_ERROR MinMdnsResolver::DiscoverCommissionableNodes(DiscoveryFilter filter, DiscoveryContext & context) +CHIP_ERROR MinMdnsResolver::StartDiscovery(DiscoveryType type, DiscoveryFilter filter, DiscoveryContext & context) { // minmdns currently supports only one discovery context at a time so override the previous context SetDiscoveryContext(&context); - return BrowseNodes(DiscoveryType::kCommissionableNode, filter); -} - -CHIP_ERROR MinMdnsResolver::DiscoverCommissioners(DiscoveryFilter filter, DiscoveryContext & context) -{ - // minmdns currently supports only one discovery context at a time so override the previous context - SetDiscoveryContext(&context); - - return BrowseNodes(DiscoveryType::kCommissionerNode, filter); + return BrowseNodes(type, filter); } CHIP_ERROR MinMdnsResolver::StopDiscovery(DiscoveryContext & context) diff --git a/src/lib/dnssd/Resolver_ImplNone.cpp b/src/lib/dnssd/Resolver_ImplNone.cpp index 36e2bd9aead89f..497c82af9e53d9 100644 --- a/src/lib/dnssd/Resolver_ImplNone.cpp +++ b/src/lib/dnssd/Resolver_ImplNone.cpp @@ -40,11 +40,7 @@ class NoneResolver : public Resolver { ChipLogError(Discovery, "Failed to stop resolving node ID: dnssd resolving not available"); } - CHIP_ERROR DiscoverCommissionableNodes(DiscoveryFilter filter, DiscoveryContext & context) override - { - return CHIP_ERROR_NOT_IMPLEMENTED; - } - CHIP_ERROR DiscoverCommissioners(DiscoveryFilter filter, DiscoveryContext & context) override + CHIP_ERROR StartDiscovery(DiscoveryType type, DiscoveryFilter filter, DiscoveryContext & context) override { return CHIP_ERROR_NOT_IMPLEMENTED; } diff --git a/src/lib/dnssd/TxtFields.cpp b/src/lib/dnssd/TxtFields.cpp index d43650748e53a2..b77d991784867d 100644 --- a/src/lib/dnssd/TxtFields.cpp +++ b/src/lib/dnssd/TxtFields.cpp @@ -225,7 +225,7 @@ TxtFieldKey GetTxtFieldKey(const ByteSpan & key) } // namespace Internal -void FillNodeDataFromTxt(const ByteSpan & key, const ByteSpan & val, CommissionNodeData & nodeData) +void FillNodeDataFromTxt(const ByteSpan & key, const ByteSpan & val, DnssdNodeData & nodeData) { TxtFieldKey keyType = Internal::GetTxtFieldKey(key); switch (keyType) diff --git a/src/lib/dnssd/TxtFields.h b/src/lib/dnssd/TxtFields.h index 5546493624119d..194750451289a4 100644 --- a/src/lib/dnssd/TxtFields.h +++ b/src/lib/dnssd/TxtFields.h @@ -192,7 +192,7 @@ constexpr size_t ValSize(TxtFieldKey key) } void FillNodeDataFromTxt(const ByteSpan & key, const ByteSpan & value, CommonResolutionData & nodeData); -void FillNodeDataFromTxt(const ByteSpan & key, const ByteSpan & value, CommissionNodeData & nodeData); +void FillNodeDataFromTxt(const ByteSpan & key, const ByteSpan & value, DnssdNodeData & nodeData); } // namespace Dnssd } // namespace chip diff --git a/src/lib/dnssd/Types.h b/src/lib/dnssd/Types.h index 3718d9b2757aec..15dbf90670ac34 100644 --- a/src/lib/dnssd/Types.h +++ b/src/lib/dnssd/Types.h @@ -205,7 +205,7 @@ inline constexpr size_t kMaxRotatingIdLen = 50; inline constexpr size_t kMaxPairingInstructionLen = 128; /// Data that is specific to commisionable/commissioning node discovery -struct CommissionNodeData +struct DnssdNodeData { size_t rotatingIdLen = 0; uint32_t deviceType = 0; @@ -220,13 +220,13 @@ struct CommissionNodeData char deviceName[kMaxDeviceNameLen + 1] = {}; char pairingInstruction[kMaxPairingInstructionLen + 1] = {}; - CommissionNodeData() {} + DnssdNodeData() {} void Reset() { // Let constructor clear things as default - this->~CommissionNodeData(); - new (this) CommissionNodeData(); + this->~DnssdNodeData(); + new (this) DnssdNodeData(); } bool IsInstanceName(const char * instance) const { return strcmp(instance, instanceName) == 0; } @@ -298,12 +298,14 @@ struct ResolvedNodeData struct DiscoveredNodeData { CommonResolutionData resolutionData; - CommissionNodeData commissionData; + DnssdNodeData nodeData; + DiscoveryType nodeType; void Reset() { resolutionData.Reset(); - commissionData.Reset(); + nodeData.Reset(); + nodeType = DiscoveryType::kUnknown; } DiscoveredNodeData() { Reset(); } @@ -311,7 +313,7 @@ struct DiscoveredNodeData { ChipLogDetail(Discovery, "Discovered node:"); resolutionData.LogDetail(); - commissionData.LogDetail(); + nodeData.LogDetail(); } }; @@ -319,10 +321,10 @@ struct DiscoveredNodeData /// - Commissioners /// - Nodes in commissioning modes over IP (e.g. ethernet devices, devices already /// connected to thread/wifi or devices with a commissioning window open) -class CommissioningResolveDelegate +class DiscoverNodeDelegate { public: - virtual ~CommissioningResolveDelegate() = default; + virtual ~DiscoverNodeDelegate() = default; /// Called within the CHIP event loop once a node is discovered. /// diff --git a/src/lib/dnssd/platform/Dnssd.h b/src/lib/dnssd/platform/Dnssd.h index 778e9bc05f1d9c..fcbeabe1ce8d51 100644 --- a/src/lib/dnssd/platform/Dnssd.h +++ b/src/lib/dnssd/platform/Dnssd.h @@ -288,8 +288,7 @@ CHIP_ERROR ChipDnssdResolve(DnssdService * browseResult, chip::Inet::InterfaceId * @retval Error code The resolve fails. * */ -CHIP_ERROR ChipDnssdResolve(DnssdService * browseResult, chip::Inet::InterfaceId interface, - CommissioningResolveDelegate * delegate); +CHIP_ERROR ChipDnssdResolve(DnssdService * browseResult, chip::Inet::InterfaceId interface, DiscoverNodeDelegate * delegate); #endif // CHIP_DEVICE_LAYER_TARGET_DARWIN /** diff --git a/src/lib/dnssd/tests/TestActiveResolveAttempts.cpp b/src/lib/dnssd/tests/TestActiveResolveAttempts.cpp index 574268bb3c8e55..f4ef2f202c4def 100644 --- a/src/lib/dnssd/tests/TestActiveResolveAttempts.cpp +++ b/src/lib/dnssd/tests/TestActiveResolveAttempts.cpp @@ -126,7 +126,7 @@ void TestSingleBrowseAddRemove(nlTestSuite * inSuite, void * inContext) // once complete, nothing to schedule Dnssd::DiscoveredNodeData data; - data.commissionData.longDiscriminator = 1234; + data.nodeData.longDiscriminator = 1234; attempts.CompleteCommissionable(data); NL_TEST_ASSERT(inSuite, !attempts.GetTimeUntilNextExpectedResponse().HasValue()); NL_TEST_ASSERT(inSuite, !attempts.NextScheduled().HasValue()); @@ -375,7 +375,7 @@ void TestCombination(nlTestSuite * inSuite, void * inContext) attempts.Complete(MakePeerId(2)); attempts.Complete(MakePeerId(1)); Dnssd::DiscoveredNodeData data; - data.commissionData.longDiscriminator = 1234; + data.nodeData.longDiscriminator = 1234; attempts.CompleteCommissionable(data); NL_TEST_ASSERT(inSuite, !attempts.GetTimeUntilNextExpectedResponse().HasValue()); diff --git a/src/lib/dnssd/tests/TestIncrementalResolve.cpp b/src/lib/dnssd/tests/TestIncrementalResolve.cpp index 1cc3b714d28ae3..03b585c4ce14c3 100644 --- a/src/lib/dnssd/tests/TestIncrementalResolve.cpp +++ b/src/lib/dnssd/tests/TestIncrementalResolve.cpp @@ -163,7 +163,7 @@ void TestCreation(nlTestSuite * inSuite, void * inContext) IncrementalResolver resolver; NL_TEST_ASSERT(inSuite, !resolver.IsActive()); - NL_TEST_ASSERT(inSuite, !resolver.IsActiveCommissionParse()); + NL_TEST_ASSERT(inSuite, !resolver.IsActiveBrowseParse()); NL_TEST_ASSERT(inSuite, !resolver.IsActiveOperationalParse()); NL_TEST_ASSERT( inSuite, @@ -183,7 +183,7 @@ void TestInactiveResetOnInitError(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT(inSuite, resolver.InitializeParsing(kTestHostName.Serialized(), srvRecord) != CHIP_NO_ERROR); NL_TEST_ASSERT(inSuite, !resolver.IsActive()); - NL_TEST_ASSERT(inSuite, !resolver.IsActiveCommissionParse()); + NL_TEST_ASSERT(inSuite, !resolver.IsActiveBrowseParse()); NL_TEST_ASSERT(inSuite, !resolver.IsActiveOperationalParse()); } @@ -199,7 +199,7 @@ void TestStartOperational(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT(inSuite, resolver.InitializeParsing(kTestOperationalName.Serialized(), srvRecord) == CHIP_NO_ERROR); NL_TEST_ASSERT(inSuite, resolver.IsActive()); - NL_TEST_ASSERT(inSuite, !resolver.IsActiveCommissionParse()); + NL_TEST_ASSERT(inSuite, !resolver.IsActiveBrowseParse()); NL_TEST_ASSERT(inSuite, resolver.IsActiveOperationalParse()); NL_TEST_ASSERT(inSuite, resolver.GetMissingRequiredInformation().HasOnly(IncrementalResolver::RequiredInformationBitFlags::kIpAddress)); @@ -218,7 +218,7 @@ void TestStartCommissionable(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT(inSuite, resolver.InitializeParsing(kTestCommissionableNode.Serialized(), srvRecord) == CHIP_NO_ERROR); NL_TEST_ASSERT(inSuite, resolver.IsActive()); - NL_TEST_ASSERT(inSuite, resolver.IsActiveCommissionParse()); + NL_TEST_ASSERT(inSuite, resolver.IsActiveBrowseParse()); NL_TEST_ASSERT(inSuite, !resolver.IsActiveOperationalParse()); NL_TEST_ASSERT(inSuite, resolver.GetMissingRequiredInformation().HasOnly(IncrementalResolver::RequiredInformationBitFlags::kIpAddress)); @@ -237,7 +237,7 @@ void TestStartCommissioner(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT(inSuite, resolver.InitializeParsing(kTestCommissionerNode.Serialized(), srvRecord) == CHIP_NO_ERROR); NL_TEST_ASSERT(inSuite, resolver.IsActive()); - NL_TEST_ASSERT(inSuite, resolver.IsActiveCommissionParse()); + NL_TEST_ASSERT(inSuite, resolver.IsActiveBrowseParse()); NL_TEST_ASSERT(inSuite, !resolver.IsActiveOperationalParse()); NL_TEST_ASSERT(inSuite, resolver.GetMissingRequiredInformation().HasOnly(IncrementalResolver::RequiredInformationBitFlags::kIpAddress)); @@ -336,7 +336,7 @@ void TestParseCommissionable(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT(inSuite, resolver.InitializeParsing(kTestCommissionableNode.Serialized(), srvRecord) == CHIP_NO_ERROR); // once initialized, parsing should be ready however no IP address is available - NL_TEST_ASSERT(inSuite, resolver.IsActiveCommissionParse()); + NL_TEST_ASSERT(inSuite, resolver.IsActiveBrowseParse()); NL_TEST_ASSERT(inSuite, resolver.GetMissingRequiredInformation().HasOnly(IncrementalResolver::RequiredInformationBitFlags::kIpAddress)); NL_TEST_ASSERT(inSuite, resolver.GetTargetHostName() == kTestHostName.Serialized()); @@ -414,10 +414,10 @@ void TestParseCommissionable(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT(inSuite, nodeData.resolutionData.ipAddress[1] == addr); // parsed txt data for discovered nodes - NL_TEST_ASSERT(inSuite, nodeData.commissionData.longDiscriminator == 22345); - NL_TEST_ASSERT(inSuite, nodeData.commissionData.vendorId == 321); - NL_TEST_ASSERT(inSuite, nodeData.commissionData.productId == 654); - NL_TEST_ASSERT(inSuite, strcmp(nodeData.commissionData.deviceName, "mytest") == 0); + NL_TEST_ASSERT(inSuite, nodeData.nodeData.longDiscriminator == 22345); + NL_TEST_ASSERT(inSuite, nodeData.nodeData.vendorId == 321); + NL_TEST_ASSERT(inSuite, nodeData.nodeData.productId == 654); + NL_TEST_ASSERT(inSuite, strcmp(nodeData.nodeData.deviceName, "mytest") == 0); } const nlTest sTests[] = { diff --git a/src/lib/dnssd/tests/TestTxtFields.cpp b/src/lib/dnssd/tests/TestTxtFields.cpp index 95f13b5d60c091..4593a4903b1a01 100644 --- a/src/lib/dnssd/tests/TestTxtFields.cpp +++ b/src/lib/dnssd/tests/TestTxtFields.cpp @@ -304,20 +304,20 @@ void TestGetCommissionerPasscode(nlTestSuite * inSuite, void * inContext) bool NodeDataIsEmpty(const DiscoveredNodeData & node) { - if (node.commissionData.longDiscriminator != 0 || node.commissionData.vendorId != 0 || node.commissionData.productId != 0 || - node.commissionData.commissioningMode != 0 || node.commissionData.deviceType != 0 || - node.commissionData.rotatingIdLen != 0 || node.commissionData.pairingHint != 0 || - node.resolutionData.mrpRetryIntervalIdle.HasValue() || node.resolutionData.mrpRetryIntervalActive.HasValue() || - node.resolutionData.mrpRetryActiveThreshold.HasValue() || node.resolutionData.isICDOperatingAsLIT.HasValue() || - node.resolutionData.supportsTcp || node.commissionData.commissionerPasscode != 0) + if (node.nodeData.longDiscriminator != 0 || node.nodeData.vendorId != 0 || node.nodeData.productId != 0 || + node.nodeData.commissioningMode != 0 || node.nodeData.deviceType != 0 || node.nodeData.rotatingIdLen != 0 || + node.nodeData.pairingHint != 0 || node.resolutionData.mrpRetryIntervalIdle.HasValue() || + node.resolutionData.mrpRetryIntervalActive.HasValue() || node.resolutionData.mrpRetryActiveThreshold.HasValue() || + node.resolutionData.isICDOperatingAsLIT.HasValue() || node.resolutionData.supportsTcp || + node.nodeData.commissionerPasscode != 0) { return false; } - if (strcmp(node.commissionData.deviceName, "") != 0 || strcmp(node.commissionData.pairingInstruction, "") != 0) + if (strcmp(node.nodeData.deviceName, "") != 0 || strcmp(node.nodeData.pairingInstruction, "") != 0) { return false; } - for (uint8_t id : node.commissionData.rotatingId) + for (uint8_t id : node.nodeData.rotatingId) { if (id != 0) { @@ -337,78 +337,78 @@ void TestFillDiscoveredNodeDataFromTxt(nlTestSuite * inSuite, void * inContext) // Long discriminator strcpy(key, "D"); strcpy(val, "840"); - FillNodeDataFromTxt(GetSpan(key), GetSpan(val), filled.commissionData); - NL_TEST_ASSERT(inSuite, filled.commissionData.longDiscriminator == 840); - filled.commissionData.longDiscriminator = 0; + FillNodeDataFromTxt(GetSpan(key), GetSpan(val), filled.nodeData); + NL_TEST_ASSERT(inSuite, filled.nodeData.longDiscriminator == 840); + filled.nodeData.longDiscriminator = 0; NL_TEST_ASSERT(inSuite, NodeDataIsEmpty(filled)); // vendor and product strcpy(key, "VP"); strcpy(val, "123+456"); - FillNodeDataFromTxt(GetSpan(key), GetSpan(val), filled.commissionData); - NL_TEST_ASSERT(inSuite, filled.commissionData.vendorId == 123); - NL_TEST_ASSERT(inSuite, filled.commissionData.productId == 456); - filled.commissionData.vendorId = 0; - filled.commissionData.productId = 0; + FillNodeDataFromTxt(GetSpan(key), GetSpan(val), filled.nodeData); + NL_TEST_ASSERT(inSuite, filled.nodeData.vendorId == 123); + NL_TEST_ASSERT(inSuite, filled.nodeData.productId == 456); + filled.nodeData.vendorId = 0; + filled.nodeData.productId = 0; NL_TEST_ASSERT(inSuite, NodeDataIsEmpty(filled)); // Commissioning mode strcpy(key, "CM"); strcpy(val, "1"); - FillNodeDataFromTxt(GetSpan(key), GetSpan(val), filled.commissionData); - NL_TEST_ASSERT(inSuite, filled.commissionData.commissioningMode == 1); - filled.commissionData.commissioningMode = 0; + FillNodeDataFromTxt(GetSpan(key), GetSpan(val), filled.nodeData); + NL_TEST_ASSERT(inSuite, filled.nodeData.commissioningMode == 1); + filled.nodeData.commissioningMode = 0; NL_TEST_ASSERT(inSuite, NodeDataIsEmpty(filled)); // Commissioning mode strcpy(key, "CP"); strcpy(val, "1"); - FillNodeDataFromTxt(GetSpan(key), GetSpan(val), filled.commissionData); - NL_TEST_ASSERT(inSuite, filled.commissionData.commissionerPasscode == 1); - filled.commissionData.commissionerPasscode = 0; + FillNodeDataFromTxt(GetSpan(key), GetSpan(val), filled.nodeData); + NL_TEST_ASSERT(inSuite, filled.nodeData.commissionerPasscode == 1); + filled.nodeData.commissionerPasscode = 0; NL_TEST_ASSERT(inSuite, NodeDataIsEmpty(filled)); // Device type strcpy(key, "DT"); strcpy(val, "1"); - FillNodeDataFromTxt(GetSpan(key), GetSpan(val), filled.commissionData); - NL_TEST_ASSERT(inSuite, filled.commissionData.deviceType == 1); - filled.commissionData.deviceType = 0; + FillNodeDataFromTxt(GetSpan(key), GetSpan(val), filled.nodeData); + NL_TEST_ASSERT(inSuite, filled.nodeData.deviceType == 1); + filled.nodeData.deviceType = 0; NL_TEST_ASSERT(inSuite, NodeDataIsEmpty(filled)); // Device name strcpy(key, "DN"); strcpy(val, "abc"); - FillNodeDataFromTxt(GetSpan(key), GetSpan(val), filled.commissionData); - NL_TEST_ASSERT(inSuite, strcmp(filled.commissionData.deviceName, "abc") == 0); - memset(filled.commissionData.deviceName, 0, sizeof(filled.commissionData.deviceName)); + FillNodeDataFromTxt(GetSpan(key), GetSpan(val), filled.nodeData); + NL_TEST_ASSERT(inSuite, strcmp(filled.nodeData.deviceName, "abc") == 0); + memset(filled.nodeData.deviceName, 0, sizeof(filled.nodeData.deviceName)); NL_TEST_ASSERT(inSuite, NodeDataIsEmpty(filled)); // Rotating device id strcpy(key, "RI"); strcpy(val, "1A2B"); - FillNodeDataFromTxt(GetSpan(key), GetSpan(val), filled.commissionData); - NL_TEST_ASSERT(inSuite, filled.commissionData.rotatingId[0] == 0x1A); - NL_TEST_ASSERT(inSuite, filled.commissionData.rotatingId[1] == 0x2B); - NL_TEST_ASSERT(inSuite, filled.commissionData.rotatingIdLen == 2); - filled.commissionData.rotatingIdLen = 0; - memset(filled.commissionData.rotatingId, 0, sizeof(filled.commissionData.rotatingId)); + FillNodeDataFromTxt(GetSpan(key), GetSpan(val), filled.nodeData); + NL_TEST_ASSERT(inSuite, filled.nodeData.rotatingId[0] == 0x1A); + NL_TEST_ASSERT(inSuite, filled.nodeData.rotatingId[1] == 0x2B); + NL_TEST_ASSERT(inSuite, filled.nodeData.rotatingIdLen == 2); + filled.nodeData.rotatingIdLen = 0; + memset(filled.nodeData.rotatingId, 0, sizeof(filled.nodeData.rotatingId)); NL_TEST_ASSERT(inSuite, NodeDataIsEmpty(filled)); // Pairing instruction strcpy(key, "PI"); strcpy(val, "hint"); - FillNodeDataFromTxt(GetSpan(key), GetSpan(val), filled.commissionData); - NL_TEST_ASSERT(inSuite, strcmp(filled.commissionData.pairingInstruction, "hint") == 0); - memset(filled.commissionData.pairingInstruction, 0, sizeof(filled.commissionData.pairingInstruction)); + FillNodeDataFromTxt(GetSpan(key), GetSpan(val), filled.nodeData); + NL_TEST_ASSERT(inSuite, strcmp(filled.nodeData.pairingInstruction, "hint") == 0); + memset(filled.nodeData.pairingInstruction, 0, sizeof(filled.nodeData.pairingInstruction)); NL_TEST_ASSERT(inSuite, NodeDataIsEmpty(filled)); // Pairing hint strcpy(key, "PH"); strcpy(val, "1"); - FillNodeDataFromTxt(GetSpan(key), GetSpan(val), filled.commissionData); - NL_TEST_ASSERT(inSuite, filled.commissionData.pairingHint == 1); - filled.commissionData.pairingHint = 0; + FillNodeDataFromTxt(GetSpan(key), GetSpan(val), filled.nodeData); + NL_TEST_ASSERT(inSuite, filled.nodeData.pairingHint == 1); + filled.nodeData.pairingHint = 0; NL_TEST_ASSERT(inSuite, NodeDataIsEmpty(filled)); } diff --git a/src/lib/shell/commands/Dns.cpp b/src/lib/shell/commands/Dns.cpp index 6abb2dc0393fec..14955335daaad0 100644 --- a/src/lib/shell/commands/Dns.cpp +++ b/src/lib/shell/commands/Dns.cpp @@ -40,7 +40,7 @@ Shell::Engine sShellDnsBrowseSubcommands; Shell::Engine sShellDnsSubcommands; Dnssd::ResolverProxy sResolverProxy; -class DnsShellResolverDelegate : public Dnssd::CommissioningResolveDelegate, public AddressResolve::NodeListener +class DnsShellResolverDelegate : public Dnssd::DiscoverNodeDelegate, public AddressResolve::NodeListener { public: DnsShellResolverDelegate() { mSelfHandle.SetListener(this); } @@ -92,20 +92,20 @@ class DnsShellResolverDelegate : public Dnssd::CommissioningResolveDelegate, pub } char rotatingId[Dnssd::kMaxRotatingIdLen * 2 + 1]; - Encoding::BytesToUppercaseHexString(nodeData.commissionData.rotatingId, nodeData.commissionData.rotatingIdLen, rotatingId, + Encoding::BytesToUppercaseHexString(nodeData.nodeData.rotatingId, nodeData.nodeData.rotatingIdLen, rotatingId, sizeof(rotatingId)); streamer_printf(streamer_get(), "DNS browse succeeded: \r\n"); + streamer_printf(streamer_get(), " Node Type: %u\r\n", nodeData.nodeType); streamer_printf(streamer_get(), " Hostname: %s\r\n", nodeData.resolutionData.hostName); - streamer_printf(streamer_get(), " Vendor ID: %u\r\n", nodeData.commissionData.vendorId); - streamer_printf(streamer_get(), " Product ID: %u\r\n", nodeData.commissionData.productId); - streamer_printf(streamer_get(), " Long discriminator: %u\r\n", nodeData.commissionData.longDiscriminator); - streamer_printf(streamer_get(), " Device type: %u\r\n", nodeData.commissionData.deviceType); - streamer_printf(streamer_get(), " Device name: %s\n", nodeData.commissionData.deviceName); - streamer_printf(streamer_get(), " Commissioning mode: %d\r\n", - static_cast(nodeData.commissionData.commissioningMode)); - streamer_printf(streamer_get(), " Pairing hint: %u\r\n", nodeData.commissionData.pairingHint); - streamer_printf(streamer_get(), " Pairing instruction: %s\r\n", nodeData.commissionData.pairingInstruction); + streamer_printf(streamer_get(), " Vendor ID: %u\r\n", nodeData.nodeData.vendorId); + streamer_printf(streamer_get(), " Product ID: %u\r\n", nodeData.nodeData.productId); + streamer_printf(streamer_get(), " Long discriminator: %u\r\n", nodeData.nodeData.longDiscriminator); + streamer_printf(streamer_get(), " Device type: %u\r\n", nodeData.nodeData.deviceType); + streamer_printf(streamer_get(), " Device name: %s\n", nodeData.nodeData.deviceName); + streamer_printf(streamer_get(), " Commissioning mode: %d\r\n", static_cast(nodeData.nodeData.commissioningMode)); + streamer_printf(streamer_get(), " Pairing hint: %u\r\n", nodeData.nodeData.pairingHint); + streamer_printf(streamer_get(), " Pairing instruction: %s\r\n", nodeData.nodeData.pairingInstruction); streamer_printf(streamer_get(), " Rotating ID %s\r\n", rotatingId); auto retryInterval = nodeData.resolutionData.GetMrpRetryIntervalIdle(); @@ -237,7 +237,7 @@ CHIP_ERROR BrowseHandler(int argc, char ** argv) } sResolverProxy.Init(DeviceLayer::UDPEndPointManager()); - sResolverProxy.SetCommissioningDelegate(&sDnsShellResolverDelegate); + sResolverProxy.SetDiscoveryDelegate(&sDnsShellResolverDelegate); return sShellDnsBrowseSubcommands.ExecCommand(argc, argv); } diff --git a/src/platform/Darwin/DnssdContexts.cpp b/src/platform/Darwin/DnssdContexts.cpp index 27a9d8158c0d20..46c7bb34fc4365 100644 --- a/src/platform/Darwin/DnssdContexts.cpp +++ b/src/platform/Darwin/DnssdContexts.cpp @@ -478,7 +478,7 @@ ResolveContext::ResolveContext(void * cbContext, DnssdResolveCallback cb, chip:: consumerCounter = std::move(consumerCounterToUse); } -ResolveContext::ResolveContext(CommissioningResolveDelegate * delegate, chip::Inet::IPAddressType cbAddressType, +ResolveContext::ResolveContext(DiscoverNodeDelegate * delegate, chip::Inet::IPAddressType cbAddressType, const char * instanceNameToResolve, std::shared_ptr && consumerCounterToUse) : browseThatCausedResolve(nullptr) { @@ -608,7 +608,7 @@ bool ResolveContext::TryReportingResultsForInterfaceIndex(uint32_t interfaceInde auto addresses = Span(ips.data(), ips.size()); if (nullptr == callback) { - auto delegate = static_cast(context); + auto delegate = static_cast(context); DiscoveredNodeData nodeData; service.ToDiscoveredNodeData(addresses, nodeData); delegate->OnNodeDiscovered(nodeData); diff --git a/src/platform/Darwin/DnssdImpl.cpp b/src/platform/Darwin/DnssdImpl.cpp index e9314f7fa76c0d..a9dccf21ef47f5 100644 --- a/src/platform/Darwin/DnssdImpl.cpp +++ b/src/platform/Darwin/DnssdImpl.cpp @@ -408,7 +408,7 @@ static CHIP_ERROR Resolve(void * context, DnssdResolveCallback callback, uint32_ return Resolve(sdCtx, interfaceId, addressType, type, name, domain); } -static CHIP_ERROR Resolve(CommissioningResolveDelegate * delegate, uint32_t interfaceId, chip::Inet::IPAddressType addressType, +static CHIP_ERROR Resolve(DiscoverNodeDelegate * delegate, uint32_t interfaceId, chip::Inet::IPAddressType addressType, const char * type, const char * name) { auto counterHolder = GetCounterHolder(name); @@ -570,7 +570,7 @@ CHIP_ERROR ChipDnssdResolve(DnssdService * service, chip::Inet::InterfaceId inte return Resolve(context, callback, interfaceId, service->mAddressType, regtype.c_str(), service->mName, domain); } -CHIP_ERROR ChipDnssdResolve(DnssdService * service, chip::Inet::InterfaceId interface, CommissioningResolveDelegate * delegate) +CHIP_ERROR ChipDnssdResolve(DnssdService * service, chip::Inet::InterfaceId interface, DiscoverNodeDelegate * delegate) { VerifyOrReturnError(service != nullptr, CHIP_ERROR_INVALID_ARGUMENT); VerifyOrReturnError(IsSupportedProtocol(service->mProtocol), CHIP_ERROR_INVALID_ARGUMENT); diff --git a/src/platform/Darwin/DnssdImpl.h b/src/platform/Darwin/DnssdImpl.h index 351926a7705dde..de5419b0bf7907 100644 --- a/src/platform/Darwin/DnssdImpl.h +++ b/src/platform/Darwin/DnssdImpl.h @@ -274,8 +274,8 @@ struct ResolveContext : public GenericContext ResolveContext(void * cbContext, DnssdResolveCallback cb, chip::Inet::IPAddressType cbAddressType, const char * instanceNameToResolve, BrowseContext * browseCausingResolve, std::shared_ptr && consumerCounterToUse); - ResolveContext(CommissioningResolveDelegate * delegate, chip::Inet::IPAddressType cbAddressType, - const char * instanceNameToResolve, std::shared_ptr && consumerCounterToUse); + ResolveContext(DiscoverNodeDelegate * delegate, chip::Inet::IPAddressType cbAddressType, const char * instanceNameToResolve, + std::shared_ptr && consumerCounterToUse); virtual ~ResolveContext(); void DispatchFailure(const char * errorStr, CHIP_ERROR err) override; diff --git a/src/protocols/user_directed_commissioning/UserDirectedCommissioningServer.cpp b/src/protocols/user_directed_commissioning/UserDirectedCommissioningServer.cpp index 9e787124507536..f63a10c94965f5 100644 --- a/src/protocols/user_directed_commissioning/UserDirectedCommissioningServer.cpp +++ b/src/protocols/user_directed_commissioning/UserDirectedCommissioningServer.cpp @@ -405,17 +405,16 @@ void UserDirectedCommissioningServer::OnCommissionableNodeFound(const Dnssd::Dis if (nodeData.resolutionData.numIPs == 0) { ChipLogError(AppServer, "OnCommissionableNodeFound no IP addresses returned for instance name=%s", - nodeData.commissionData.instanceName); + nodeData.nodeData.instanceName); return; } if (nodeData.resolutionData.port == 0) { - ChipLogError(AppServer, "OnCommissionableNodeFound no port returned for instance name=%s", - nodeData.commissionData.instanceName); + ChipLogError(AppServer, "OnCommissionableNodeFound no port returned for instance name=%s", nodeData.nodeData.instanceName); return; } - UDCClientState * client = mUdcClients.FindUDCClientState(nodeData.commissionData.instanceName); + UDCClientState * client = mUdcClients.FindUDCClientState(nodeData.nodeData.instanceName); if (client != nullptr && client->GetUDCClientProcessingState() == UDCClientProcessingState::kDiscoveringNode) { ChipLogDetail(AppServer, "OnCommissionableNodeFound instance: name=%s old_state=%d new_state=%d", client->GetInstanceName(), @@ -458,17 +457,17 @@ void UserDirectedCommissioningServer::OnCommissionableNodeFound(const Dnssd::Dis if (!foundV6) { ChipLogError(AppServer, "OnCommissionableNodeFound no v6 returned for instance name=%s", - nodeData.commissionData.instanceName); + nodeData.nodeData.instanceName); client->SetPeerAddress( chip::Transport::PeerAddress::UDP(nodeData.resolutionData.ipAddress[0], nodeData.resolutionData.port)); } #endif // INET_CONFIG_ENABLE_IPV4 - client->SetDeviceName(nodeData.commissionData.deviceName); - client->SetLongDiscriminator(nodeData.commissionData.longDiscriminator); - client->SetVendorId(nodeData.commissionData.vendorId); - client->SetProductId(nodeData.commissionData.productId); - client->SetRotatingId(nodeData.commissionData.rotatingId, nodeData.commissionData.rotatingIdLen); + client->SetDeviceName(nodeData.nodeData.deviceName); + client->SetLongDiscriminator(nodeData.nodeData.longDiscriminator); + client->SetVendorId(nodeData.nodeData.vendorId); + client->SetProductId(nodeData.nodeData.productId); + client->SetRotatingId(nodeData.nodeData.rotatingId, nodeData.nodeData.rotatingIdLen); // Call the registered mUserConfirmationProvider, if any. if (mUserConfirmationProvider != nullptr) diff --git a/src/protocols/user_directed_commissioning/tests/TestUdcMessages.cpp b/src/protocols/user_directed_commissioning/tests/TestUdcMessages.cpp index f7e7c2ab4a65d9..9c171b5efad5b8 100644 --- a/src/protocols/user_directed_commissioning/tests/TestUdcMessages.cpp +++ b/src/protocols/user_directed_commissioning/tests/TestUdcMessages.cpp @@ -86,15 +86,15 @@ void TestUDCServerUserConfirmationProvider(nlTestSuite * inSuite, void * inConte nodeData1.resolutionData.port = 5540; nodeData1.resolutionData.ipAddress[0] = address; nodeData1.resolutionData.numIPs = 1; - Platform::CopyString(nodeData1.commissionData.instanceName, instanceName1); + Platform::CopyString(nodeData1.nodeData.instanceName, instanceName1); Dnssd::DiscoveredNodeData nodeData2; - nodeData2.resolutionData.port = 5540; - nodeData2.resolutionData.ipAddress[0] = address; - nodeData2.resolutionData.numIPs = 1; - nodeData2.commissionData.longDiscriminator = disc2; - Platform::CopyString(nodeData2.commissionData.instanceName, instanceName2); - Platform::CopyString(nodeData2.commissionData.deviceName, deviceName2); + nodeData2.resolutionData.port = 5540; + nodeData2.resolutionData.ipAddress[0] = address; + nodeData2.resolutionData.numIPs = 1; + nodeData2.nodeData.longDiscriminator = disc2; + Platform::CopyString(nodeData2.nodeData.instanceName, instanceName2); + Platform::CopyString(nodeData2.nodeData.deviceName, deviceName2); // test empty UserConfirmationProvider udcServer.OnCommissionableNodeFound(nodeData2); From d623e400a45095d08ed79b623ce0be95806523f3 Mon Sep 17 00:00:00 2001 From: Arkadiusz Bokowy Date: Wed, 10 Apr 2024 08:35:34 +0200 Subject: [PATCH 017/468] BTP engine unit test (#32897) * Port BTP engine test from OpenWeave project * Copyrights from origin project --- src/ble/tests/BUILD.gn | 1 + src/ble/tests/TestBtpEngine.cpp | 181 ++++++++++++++++++++++++++++++++ 2 files changed, 182 insertions(+) create mode 100644 src/ble/tests/TestBtpEngine.cpp diff --git a/src/ble/tests/BUILD.gn b/src/ble/tests/BUILD.gn index 5bf06600e97da1..687ad7be8f4167 100644 --- a/src/ble/tests/BUILD.gn +++ b/src/ble/tests/BUILD.gn @@ -23,6 +23,7 @@ chip_test_suite("tests") { test_sources = [ "TestBleErrorStr.cpp", "TestBleUUID.cpp", + "TestBtpEngine.cpp", ] cflags = [ "-Wconversion" ] diff --git a/src/ble/tests/TestBtpEngine.cpp b/src/ble/tests/TestBtpEngine.cpp new file mode 100644 index 00000000000000..945c794bb01559 --- /dev/null +++ b/src/ble/tests/TestBtpEngine.cpp @@ -0,0 +1,181 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * Copyright (c) 2018 Google LLC. + * 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. + */ + +#include +#include + +#include +#include +#include +#include + +#include + +using namespace chip; +using namespace chip::Ble; + +namespace { + +class TestBtpEngine : public ::testing::Test +{ +public: + static void SetUpTestSuite() { ASSERT_EQ(chip::Platform::MemoryInit(), CHIP_NO_ERROR); } + static void TearDownTestSuite() { chip::Platform::MemoryShutdown(); } + + void SetUp() + { + ASSERT_EQ(mBtpEngine.Init(nullptr, false), CHIP_NO_ERROR); + ChipLogDetail(Test, "### Initial BTP Engine State:"); + mBtpEngine.LogState(); + } + + void TearDown() + { + ChipLogDetail(Test, "### Final BTP Engine State:"); + mBtpEngine.LogState(); + } + + Ble::BtpEngine mBtpEngine; +}; + +TEST_F(TestBtpEngine, HandleCharacteristicReceivedOnePacket) +{ + constexpr uint8_t packetData0[] = { + to_underlying(BtpEngine::HeaderFlags::kStartMessage) | to_underlying(BtpEngine::HeaderFlags::kEndMessage), + 0x01, + 0x01, + 0x00, + 0xff, // payload + }; + + auto packet0 = System::PacketBufferHandle::NewWithData(packetData0, sizeof(packetData0)); + EXPECT_EQ(packet0->DataLength(), 5); + + SequenceNumber_t receivedAck; + bool didReceiveAck; + EXPECT_EQ(mBtpEngine.HandleCharacteristicReceived(std::move(packet0), receivedAck, didReceiveAck), CHIP_NO_ERROR); + EXPECT_EQ(mBtpEngine.RxState(), BtpEngine::kState_Complete); +} + +TEST_F(TestBtpEngine, HandleCharacteristicReceivedTwoPacket) +{ + constexpr uint8_t packetData0[] = { to_underlying(BtpEngine::HeaderFlags::kStartMessage), 0x01, 0x02, 0x00, 0xfe }; + constexpr uint8_t packetData1[] = { to_underlying(BtpEngine::HeaderFlags::kEndMessage), 0x02, 0xff }; + + auto packet0 = System::PacketBufferHandle::NewWithData(packetData0, sizeof(packetData0)); + EXPECT_EQ(packet0->DataLength(), 5); + + SequenceNumber_t receivedAck; + bool didReceiveAck; + EXPECT_EQ(mBtpEngine.HandleCharacteristicReceived(std::move(packet0), receivedAck, didReceiveAck), CHIP_NO_ERROR); + EXPECT_EQ(mBtpEngine.RxState(), BtpEngine::kState_InProgress); + + auto packet1 = System::PacketBufferHandle::NewWithData(packetData1, sizeof(packetData1)); + EXPECT_EQ(packet1->DataLength(), 3); + + EXPECT_EQ(mBtpEngine.HandleCharacteristicReceived(std::move(packet1), receivedAck, didReceiveAck), CHIP_NO_ERROR); + EXPECT_EQ(mBtpEngine.RxState(), BtpEngine::kState_Complete); +} + +TEST_F(TestBtpEngine, HandleCharacteristicReceivedThreePacket) +{ + constexpr uint8_t packetData0[] = { to_underlying(BtpEngine::HeaderFlags::kStartMessage), 0x01, 0x03, 0x00, 0xfd }; + constexpr uint8_t packetData1[] = { to_underlying(BtpEngine::HeaderFlags::kContinueMessage), 0x02, 0xfe }; + constexpr uint8_t packetData2[] = { to_underlying(BtpEngine::HeaderFlags::kEndMessage), 0x03, 0xff }; + + auto packet0 = System::PacketBufferHandle::NewWithData(packetData0, sizeof(packetData0)); + EXPECT_EQ(packet0->DataLength(), 5); + + SequenceNumber_t receivedAck; + bool didReceiveAck; + EXPECT_EQ(mBtpEngine.HandleCharacteristicReceived(std::move(packet0), receivedAck, didReceiveAck), CHIP_NO_ERROR); + EXPECT_EQ(mBtpEngine.RxState(), BtpEngine::kState_InProgress); + + auto packet1 = System::PacketBufferHandle::NewWithData(packetData1, sizeof(packetData1)); + EXPECT_EQ(packet1->DataLength(), 3); + + EXPECT_EQ(mBtpEngine.HandleCharacteristicReceived(std::move(packet1), receivedAck, didReceiveAck), CHIP_NO_ERROR); + EXPECT_EQ(mBtpEngine.RxState(), BtpEngine::kState_InProgress); + + auto packet2 = System::PacketBufferHandle::NewWithData(packetData2, sizeof(packetData2)); + EXPECT_EQ(packet2->DataLength(), 3); + + EXPECT_EQ(mBtpEngine.HandleCharacteristicReceived(std::move(packet2), receivedAck, didReceiveAck), CHIP_NO_ERROR); + EXPECT_EQ(mBtpEngine.RxState(), BtpEngine::kState_Complete); +} + +TEST_F(TestBtpEngine, HandleCharacteristicSendOnePacket) +{ + auto packet0 = System::PacketBufferHandle::New(10); + packet0->SetDataLength(1); + + auto data0 = packet0->Start(); + ASSERT_NE(data0, nullptr); + std::iota(data0, data0 + 1, 0); + + EXPECT_TRUE(mBtpEngine.HandleCharacteristicSend(packet0.Retain(), false)); + EXPECT_EQ(mBtpEngine.TxState(), BtpEngine::kState_Complete); + EXPECT_EQ(packet0->DataLength(), 5); +} + +TEST_F(TestBtpEngine, HandleCharacteristicSendTwoPacket) +{ + auto packet0 = System::PacketBufferHandle::New(30); + packet0->SetDataLength(30); + + auto data0 = packet0->Start(); + ASSERT_NE(data0, nullptr); + std::iota(data0, data0 + 30, 0); + + EXPECT_TRUE(mBtpEngine.HandleCharacteristicSend(packet0.Retain(), false)); + EXPECT_EQ(mBtpEngine.TxState(), BtpEngine::kState_InProgress); + EXPECT_EQ(packet0->DataLength(), 20); + + EXPECT_TRUE(mBtpEngine.HandleCharacteristicSend(nullptr, false)); + EXPECT_EQ(mBtpEngine.TxState(), BtpEngine::kState_Complete); + EXPECT_EQ(packet0->DataLength(), 16); +} + +// Send 40-byte payload. +// Packet0: 4 byte header + 16 byte payload +// Packet1: 2 byte header + 18 byte payload +// Packet2: 2 byte header + 6 byte payload +TEST_F(TestBtpEngine, HandleCharacteristicSendThreePacket) +{ + auto packet0 = System::PacketBufferHandle::New(40); + packet0->SetDataLength(40); + + auto data0 = packet0->Start(); + ASSERT_NE(data0, nullptr); + std::iota(data0, data0 + 40, 0); + + EXPECT_TRUE(mBtpEngine.HandleCharacteristicSend(packet0.Retain(), false)); + EXPECT_EQ(mBtpEngine.TxState(), BtpEngine::kState_InProgress); + EXPECT_EQ(packet0->DataLength(), 20); + + EXPECT_TRUE(mBtpEngine.HandleCharacteristicSend(nullptr, false)); + EXPECT_EQ(mBtpEngine.TxState(), BtpEngine::kState_InProgress); + EXPECT_EQ(packet0->DataLength(), 20); + + EXPECT_TRUE(mBtpEngine.HandleCharacteristicSend(nullptr, false)); + EXPECT_EQ(mBtpEngine.TxState(), BtpEngine::kState_Complete); + EXPECT_EQ(packet0->DataLength(), 8); +} + +} // namespace From 7af9863cfa8088142cee240118ae649a09ff3d42 Mon Sep 17 00:00:00 2001 From: Alex Tsitsiura Date: Wed, 10 Apr 2024 10:00:23 +0300 Subject: [PATCH 018/468] [Telink] Improve B95 (TLSR9258A) & Update builds to docker version 47 (#32899) * telink: b95: update DTS for B95 - update dts for pwm , gpio ,and button . Signed-off-by: Haiwen Xia * [Telink] Remove B95 retention from CI * [Telink] Update builds to docker version 47 --------- Signed-off-by: Haiwen Xia Co-authored-by: Haiwen Xia --- .github/workflows/bloat_check.yaml | 2 +- .github/workflows/build.yaml | 10 +-- .github/workflows/chef.yaml | 8 +- .github/workflows/cirque.yaml | 2 +- .github/workflows/doxygen.yaml | 2 +- .github/workflows/examples-ameba.yaml | 2 +- .github/workflows/examples-asr.yaml | 2 +- .github/workflows/examples-bouffalolab.yaml | 2 +- .github/workflows/examples-cc13xx_26xx.yaml | 2 +- .github/workflows/examples-cc32xx.yaml | 2 +- .github/workflows/examples-efr32.yaml | 2 +- .github/workflows/examples-esp32.yaml | 4 +- .github/workflows/examples-infineon.yaml | 2 +- .github/workflows/examples-linux-arm.yaml | 2 +- .github/workflows/examples-linux-imx.yaml | 2 +- .../workflows/examples-linux-standalone.yaml | 2 +- .github/workflows/examples-mbed.yaml | 2 +- .github/workflows/examples-mw320.yaml | 2 +- .github/workflows/examples-nrfconnect.yaml | 2 +- .github/workflows/examples-nxp.yaml | 2 +- .github/workflows/examples-openiotsdk.yaml | 2 +- .github/workflows/examples-qpg.yaml | 2 +- .github/workflows/examples-rw61x.yaml | 2 +- .github/workflows/examples-stm32.yaml | 2 +- .github/workflows/examples-telink.yaml | 10 +-- .github/workflows/examples-tizen.yaml | 2 +- .github/workflows/full-android.yaml | 2 +- .github/workflows/fuzzing-build.yaml | 2 +- .github/workflows/java-tests.yaml | 2 +- .github/workflows/lint.yml | 2 +- .github/workflows/minimal-build.yaml | 2 +- .github/workflows/qemu.yaml | 4 +- .github/workflows/release_artifacts.yaml | 4 +- .github/workflows/smoketest-android.yaml | 2 +- .github/workflows/tests.yaml | 4 +- .github/workflows/unit_integration_test.yaml | 2 +- .github/workflows/zap_regeneration.yaml | 2 +- .github/workflows/zap_templates.yaml | 2 +- examples/all-clusters-app/ameba/README.md | 4 +- .../all-clusters-minimal-app/ameba/README.md | 4 +- examples/light-switch-app/ameba/README.md | 4 +- examples/lighting-app/ameba/README.md | 4 +- examples/ota-requestor-app/ameba/README.md | 4 +- examples/pigweed-app/ameba/README.md | 4 +- integrations/cloudbuild/chef.yaml | 8 +- integrations/cloudbuild/smoke-test.yaml | 14 ++-- src/platform/telink/tlsr9258a.overlay | 83 +++++++++++-------- src/test_driver/tizen/README.md | 4 +- 48 files changed, 126 insertions(+), 113 deletions(-) diff --git a/.github/workflows/bloat_check.yaml b/.github/workflows/bloat_check.yaml index 7b97c51ca8be31..a5a059ec7b9cbb 100644 --- a/.github/workflows/bloat_check.yaml +++ b/.github/workflows/bloat_check.yaml @@ -34,7 +34,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build:46 + image: ghcr.io/project-chip/chip-build:47 steps: - name: Checkout diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 3ba46848909d8d..0616a9bb7f7acd 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -42,7 +42,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:46 + image: ghcr.io/project-chip/chip-build:47 volumes: - "/:/runner-root-volume" - "/tmp/log_output:/tmp/test_logs" @@ -138,7 +138,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:46 + image: ghcr.io/project-chip/chip-build:47 volumes: - "/:/runner-root-volume" - "/tmp/log_output:/tmp/test_logs" @@ -281,7 +281,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:46 + image: ghcr.io/project-chip/chip-build:47 volumes: - "/:/runner-root-volume" - "/tmp/log_output:/tmp/test_logs" @@ -342,7 +342,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:46 + image: ghcr.io/project-chip/chip-build:47 volumes: - "/:/runner-root-volume" - "/tmp/log_output:/tmp/test_logs" @@ -451,7 +451,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:46 + image: ghcr.io/project-chip/chip-build:47 volumes: - "/:/runner-root-volume" - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/chef.yaml b/.github/workflows/chef.yaml index b2119552c7924a..f69ed74e523421 100644 --- a/.github/workflows/chef.yaml +++ b/.github/workflows/chef.yaml @@ -35,7 +35,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:46 + image: ghcr.io/project-chip/chip-build:47 options: --user root steps: @@ -56,7 +56,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-esp32:46 + image: ghcr.io/project-chip/chip-build-esp32:47 options: --user root steps: @@ -77,7 +77,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-nrf-platform:46 + image: ghcr.io/project-chip/chip-build-nrf-platform:47 options: --user root steps: @@ -98,7 +98,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-telink:46 + image: ghcr.io/project-chip/chip-build-telink:47 options: --user root steps: diff --git a/.github/workflows/cirque.yaml b/.github/workflows/cirque.yaml index 4da74b74bcae18..e61bdd8778d209 100644 --- a/.github/workflows/cirque.yaml +++ b/.github/workflows/cirque.yaml @@ -42,7 +42,7 @@ jobs: # need to run with privilege, which isn't supported by job.XXX.contaner # https://github.com/actions/container-action/issues/2 # container: - # image: ghcr.io/project-chip/chip-build-cirque:46 + # image: ghcr.io/project-chip/chip-build-cirque:47 # volumes: # - "/tmp:/tmp" # - "/dev/pts:/dev/pts" diff --git a/.github/workflows/doxygen.yaml b/.github/workflows/doxygen.yaml index e94296b45be733..90a1ee02c6ffd7 100644 --- a/.github/workflows/doxygen.yaml +++ b/.github/workflows/doxygen.yaml @@ -81,7 +81,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build-doxygen:46 + image: ghcr.io/project-chip/chip-build-doxygen:47 if: github.actor != 'restyled-io[bot]' diff --git a/.github/workflows/examples-ameba.yaml b/.github/workflows/examples-ameba.yaml index 0beab0cc0aa8a3..ff405b963c1827 100644 --- a/.github/workflows/examples-ameba.yaml +++ b/.github/workflows/examples-ameba.yaml @@ -38,7 +38,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-ameba:46 + image: ghcr.io/project-chip/chip-build-ameba:47 options: --user root steps: diff --git a/.github/workflows/examples-asr.yaml b/.github/workflows/examples-asr.yaml index 6708f2221ea2d4..55f14bc003a278 100644 --- a/.github/workflows/examples-asr.yaml +++ b/.github/workflows/examples-asr.yaml @@ -36,7 +36,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-asr:46 + image: ghcr.io/project-chip/chip-build-asr:47 options: --user root steps: diff --git a/.github/workflows/examples-bouffalolab.yaml b/.github/workflows/examples-bouffalolab.yaml index 2cba36cc443b6e..7599fb1738c884 100644 --- a/.github/workflows/examples-bouffalolab.yaml +++ b/.github/workflows/examples-bouffalolab.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-bouffalolab:46 + image: ghcr.io/project-chip/chip-build-bouffalolab:47 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-cc13xx_26xx.yaml b/.github/workflows/examples-cc13xx_26xx.yaml index 1e259824a6b72a..cd045b5cd3d45d 100644 --- a/.github/workflows/examples-cc13xx_26xx.yaml +++ b/.github/workflows/examples-cc13xx_26xx.yaml @@ -36,7 +36,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-ti:46 + image: ghcr.io/project-chip/chip-build-ti:47 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-cc32xx.yaml b/.github/workflows/examples-cc32xx.yaml index 4e11072e711e03..112f79c429e526 100644 --- a/.github/workflows/examples-cc32xx.yaml +++ b/.github/workflows/examples-cc32xx.yaml @@ -39,7 +39,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-ti:46 + image: ghcr.io/project-chip/chip-build-ti:47 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-efr32.yaml b/.github/workflows/examples-efr32.yaml index 8586542fc6242d..019807f32164c0 100644 --- a/.github/workflows/examples-efr32.yaml +++ b/.github/workflows/examples-efr32.yaml @@ -40,7 +40,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-efr32:46 + image: ghcr.io/project-chip/chip-build-efr32:47 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-esp32.yaml b/.github/workflows/examples-esp32.yaml index 33637e81068194..be0cecc263f740 100644 --- a/.github/workflows/examples-esp32.yaml +++ b/.github/workflows/examples-esp32.yaml @@ -36,7 +36,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-esp32:46 + image: ghcr.io/project-chip/chip-build-esp32:47 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" @@ -126,7 +126,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-esp32:46 + image: ghcr.io/project-chip/chip-build-esp32:47 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-infineon.yaml b/.github/workflows/examples-infineon.yaml index 240db045f051e4..c06f6181b4aac1 100644 --- a/.github/workflows/examples-infineon.yaml +++ b/.github/workflows/examples-infineon.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-infineon:46 + image: ghcr.io/project-chip/chip-build-infineon:47 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-linux-arm.yaml b/.github/workflows/examples-linux-arm.yaml index 8ca577410ac37d..bc9d3025a8369f 100644 --- a/.github/workflows/examples-linux-arm.yaml +++ b/.github/workflows/examples-linux-arm.yaml @@ -36,7 +36,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-crosscompile:46 + image: ghcr.io/project-chip/chip-build-crosscompile:47 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-linux-imx.yaml b/.github/workflows/examples-linux-imx.yaml index 772765e1e110f7..cd52f099b39bc5 100644 --- a/.github/workflows/examples-linux-imx.yaml +++ b/.github/workflows/examples-linux-imx.yaml @@ -36,7 +36,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-imx:46 + image: ghcr.io/project-chip/chip-build-imx:47 steps: - name: Checkout diff --git a/.github/workflows/examples-linux-standalone.yaml b/.github/workflows/examples-linux-standalone.yaml index 832afae53b3851..28f0ad19dbbe45 100644 --- a/.github/workflows/examples-linux-standalone.yaml +++ b/.github/workflows/examples-linux-standalone.yaml @@ -36,7 +36,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:46 + image: ghcr.io/project-chip/chip-build:47 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-mbed.yaml b/.github/workflows/examples-mbed.yaml index 2da09b78003fa0..6c20b6374ec183 100644 --- a/.github/workflows/examples-mbed.yaml +++ b/.github/workflows/examples-mbed.yaml @@ -42,7 +42,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-mbed-os:46 + image: ghcr.io/project-chip/chip-build-mbed-os:47 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-mw320.yaml b/.github/workflows/examples-mw320.yaml index 7513c8fb477c09..9135074a39da79 100644 --- a/.github/workflows/examples-mw320.yaml +++ b/.github/workflows/examples-mw320.yaml @@ -39,7 +39,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:46 + image: ghcr.io/project-chip/chip-build:47 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-nrfconnect.yaml b/.github/workflows/examples-nrfconnect.yaml index d8a5f15fb0e4b4..ad0993852ac613 100644 --- a/.github/workflows/examples-nrfconnect.yaml +++ b/.github/workflows/examples-nrfconnect.yaml @@ -39,7 +39,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-nrf-platform:46 + image: ghcr.io/project-chip/chip-build-nrf-platform:47 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-nxp.yaml b/.github/workflows/examples-nxp.yaml index 01ff636753d4b1..63165f8db1df31 100644 --- a/.github/workflows/examples-nxp.yaml +++ b/.github/workflows/examples-nxp.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-k32w:46 + image: ghcr.io/project-chip/chip-build-k32w:47 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-openiotsdk.yaml b/.github/workflows/examples-openiotsdk.yaml index e61e06761a1a16..9ddaea33b6291b 100644 --- a/.github/workflows/examples-openiotsdk.yaml +++ b/.github/workflows/examples-openiotsdk.yaml @@ -40,7 +40,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-openiotsdk:46 + image: ghcr.io/project-chip/chip-build-openiotsdk:47 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" options: --privileged diff --git a/.github/workflows/examples-qpg.yaml b/.github/workflows/examples-qpg.yaml index 8e7b28727c5591..5d61bccda1fdac 100644 --- a/.github/workflows/examples-qpg.yaml +++ b/.github/workflows/examples-qpg.yaml @@ -39,7 +39,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:46 + image: ghcr.io/project-chip/chip-build:47 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-rw61x.yaml b/.github/workflows/examples-rw61x.yaml index 7c13186dcaf7dc..b7d308f577882d 100644 --- a/.github/workflows/examples-rw61x.yaml +++ b/.github/workflows/examples-rw61x.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-rw61x:46 + image: ghcr.io/project-chip/chip-build-rw61x:47 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-stm32.yaml b/.github/workflows/examples-stm32.yaml index c1af5e399cddec..58ccf9760fbe75 100644 --- a/.github/workflows/examples-stm32.yaml +++ b/.github/workflows/examples-stm32.yaml @@ -40,7 +40,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:46 + image: ghcr.io/project-chip/chip-build:47 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-telink.yaml b/.github/workflows/examples-telink.yaml index 563a450aa6ed1a..c2dc5a1b43a1c4 100644 --- a/.github/workflows/examples-telink.yaml +++ b/.github/workflows/examples-telink.yaml @@ -38,7 +38,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-telink:46 + image: ghcr.io/project-chip/chip-build-telink:47 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" @@ -177,13 +177,13 @@ jobs: - name: clean out build output run: rm -rf ./out - - name: Build example Telink (B95 retention) Pump App + - name: Build example Telink (B95) Pump App run: | ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py --target 'telink-tlsr9258a_retention-pump' build" + "./scripts/build/build_examples.py --target 'telink-tlsr9258a-pump' build" .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - telink tlsr9258a_retention pump-app \ - out/telink-tlsr9258a_retention-pump/zephyr/zephyr.elf \ + telink tlsr9258a pump-app \ + out/telink-tlsr9258a-pump/zephyr/zephyr.elf \ /tmp/bloat_reports/ - name: clean out build output diff --git a/.github/workflows/examples-tizen.yaml b/.github/workflows/examples-tizen.yaml index b3d584de22f45f..2b8cf469fdaa87 100644 --- a/.github/workflows/examples-tizen.yaml +++ b/.github/workflows/examples-tizen.yaml @@ -36,7 +36,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-tizen:46 + image: ghcr.io/project-chip/chip-build-tizen:47 options: --user root volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/full-android.yaml b/.github/workflows/full-android.yaml index 4c54b4be121491..e5c72de20a0b13 100644 --- a/.github/workflows/full-android.yaml +++ b/.github/workflows/full-android.yaml @@ -38,7 +38,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-android:46 + image: ghcr.io/project-chip/chip-build-android:47 volumes: - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/fuzzing-build.yaml b/.github/workflows/fuzzing-build.yaml index 4ba9c49d744aa0..18a2f182e7f3a6 100644 --- a/.github/workflows/fuzzing-build.yaml +++ b/.github/workflows/fuzzing-build.yaml @@ -33,7 +33,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:46 + image: ghcr.io/project-chip/chip-build:47 volumes: - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/java-tests.yaml b/.github/workflows/java-tests.yaml index ce3ceb0e292721..32d5de468a296d 100644 --- a/.github/workflows/java-tests.yaml +++ b/.github/workflows/java-tests.yaml @@ -42,7 +42,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build-java:46 + image: ghcr.io/project-chip/chip-build-java:47 options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 net.ipv4.conf.all.forwarding=0 net.ipv6.conf.all.forwarding=0" diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 7601ec0d7495b9..576e2dab268229 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -35,7 +35,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:46 + image: ghcr.io/project-chip/chip-build:47 steps: - name: Checkout diff --git a/.github/workflows/minimal-build.yaml b/.github/workflows/minimal-build.yaml index e6514bb72f7cc0..d5f705f35427de 100644 --- a/.github/workflows/minimal-build.yaml +++ b/.github/workflows/minimal-build.yaml @@ -33,7 +33,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build-minimal:46 + image: ghcr.io/project-chip/chip-build-minimal:47 steps: - name: Checkout diff --git a/.github/workflows/qemu.yaml b/.github/workflows/qemu.yaml index ba52f767485371..534c46f3c206a1 100644 --- a/.github/workflows/qemu.yaml +++ b/.github/workflows/qemu.yaml @@ -40,7 +40,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-esp32-qemu:46 + image: ghcr.io/project-chip/chip-build-esp32-qemu:47 volumes: - "/tmp/log_output:/tmp/test_logs" @@ -80,7 +80,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-tizen-qemu:46 + image: ghcr.io/project-chip/chip-build-tizen-qemu:47 volumes: - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/release_artifacts.yaml b/.github/workflows/release_artifacts.yaml index 78b50ad8033cad..1622808396cee8 100644 --- a/.github/workflows/release_artifacts.yaml +++ b/.github/workflows/release_artifacts.yaml @@ -32,7 +32,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build-esp32:46 + image: ghcr.io/project-chip/chip-build-esp32:47 steps: - name: Checkout @@ -64,7 +64,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build-efr32:46 + image: ghcr.io/project-chip/chip-build-efr32:47 steps: - name: Checkout uses: actions/checkout@v4 diff --git a/.github/workflows/smoketest-android.yaml b/.github/workflows/smoketest-android.yaml index d9d81abca4644f..37a84e5f49535a 100644 --- a/.github/workflows/smoketest-android.yaml +++ b/.github/workflows/smoketest-android.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-android:46 + image: ghcr.io/project-chip/chip-build-android:47 volumes: - "/:/runner-root-volume" - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index d7639273132898..ea38e5e6e1dcb8 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -49,7 +49,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build:46 + image: ghcr.io/project-chip/chip-build:47 options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1" @@ -439,7 +439,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build:46 + image: ghcr.io/project-chip/chip-build:47 options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 net.ipv4.conf.all.forwarding=0 net.ipv6.conf.all.forwarding=0" diff --git a/.github/workflows/unit_integration_test.yaml b/.github/workflows/unit_integration_test.yaml index d2e2af12adea65..b4778381fab1b4 100644 --- a/.github/workflows/unit_integration_test.yaml +++ b/.github/workflows/unit_integration_test.yaml @@ -39,7 +39,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build:46 + image: ghcr.io/project-chip/chip-build:47 volumes: - "/:/runner-root-volume" - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/zap_regeneration.yaml b/.github/workflows/zap_regeneration.yaml index 93b966fc314b34..670d711cade843 100644 --- a/.github/workflows/zap_regeneration.yaml +++ b/.github/workflows/zap_regeneration.yaml @@ -30,7 +30,7 @@ jobs: runs-on: ubuntu-20.04 container: - image: ghcr.io/project-chip/chip-build:46 + image: ghcr.io/project-chip/chip-build:47 defaults: run: shell: sh diff --git a/.github/workflows/zap_templates.yaml b/.github/workflows/zap_templates.yaml index 07c5f64afe591a..ce7b5946985144 100644 --- a/.github/workflows/zap_templates.yaml +++ b/.github/workflows/zap_templates.yaml @@ -34,7 +34,7 @@ jobs: runs-on: ubuntu-20.04 container: - image: ghcr.io/project-chip/chip-build:46 + image: ghcr.io/project-chip/chip-build:47 defaults: run: shell: sh diff --git a/examples/all-clusters-app/ameba/README.md b/examples/all-clusters-app/ameba/README.md index f54a5344020ac7..48f327611f0891 100644 --- a/examples/all-clusters-app/ameba/README.md +++ b/examples/all-clusters-app/ameba/README.md @@ -27,11 +27,11 @@ The CHIP demo application is supported on - Pull docker image: - $ docker pull ghcr.io/project-chip/chip-build-ameba:46 + $ docker pull ghcr.io/project-chip/chip-build-ameba:47 - Run docker container: - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:46 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:47 - Setup build environment: diff --git a/examples/all-clusters-minimal-app/ameba/README.md b/examples/all-clusters-minimal-app/ameba/README.md index 6daa6820ff9cdb..f6f6c9206ae4b4 100644 --- a/examples/all-clusters-minimal-app/ameba/README.md +++ b/examples/all-clusters-minimal-app/ameba/README.md @@ -27,13 +27,13 @@ The CHIP demo application is supported on - Pull docker image: ``` - $ docker pull ghcr.io/project-chip/chip-build-ameba:46 + $ docker pull ghcr.io/project-chip/chip-build-ameba:47 ``` - Run docker container: ``` - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:46 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:47 ``` - Setup build environment: diff --git a/examples/light-switch-app/ameba/README.md b/examples/light-switch-app/ameba/README.md index 4437e4c27e9245..5af9d94f2c5983 100644 --- a/examples/light-switch-app/ameba/README.md +++ b/examples/light-switch-app/ameba/README.md @@ -26,11 +26,11 @@ The CHIP demo application is supported on - Pull docker image: - $ docker pull ghcr.io/project-chip/chip-build-ameba:46 + $ docker pull ghcr.io/project-chip/chip-build-ameba:47 - Run docker container: - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:46 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:47 - Setup build environment: diff --git a/examples/lighting-app/ameba/README.md b/examples/lighting-app/ameba/README.md index 36fbe0f9d3c600..b496e1cde4ae91 100644 --- a/examples/lighting-app/ameba/README.md +++ b/examples/lighting-app/ameba/README.md @@ -23,11 +23,11 @@ The CHIP demo application is supported on - Pull docker image: - $ docker pull ghcr.io/project-chip/chip-build-ameba:46 + $ docker pull ghcr.io/project-chip/chip-build-ameba:47 - Run docker container: - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:46 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:47 - Setup build environment: diff --git a/examples/ota-requestor-app/ameba/README.md b/examples/ota-requestor-app/ameba/README.md index 260c41fc4c5ed7..aef1e40ab7e566 100644 --- a/examples/ota-requestor-app/ameba/README.md +++ b/examples/ota-requestor-app/ameba/README.md @@ -6,11 +6,11 @@ A prototype application that demonstrates OTA Requestor capabilities. - Pull docker image: - $ docker pull ghcr.io/project-chip/chip-build-ameba:46 + $ docker pull ghcr.io/project-chip/chip-build-ameba:47 - Run docker container: - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:46 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:47 - Setup build environment: diff --git a/examples/pigweed-app/ameba/README.md b/examples/pigweed-app/ameba/README.md index ebd350d5bda1d6..49c7de27831809 100644 --- a/examples/pigweed-app/ameba/README.md +++ b/examples/pigweed-app/ameba/README.md @@ -31,11 +31,11 @@ following features are available: - Pull docker image: - $ docker pull ghcr.io/project-chip/chip-build-ameba:46 + $ docker pull ghcr.io/project-chip/chip-build-ameba:47 - Run docker container: - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:46 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:47 - Setup build environment: diff --git a/integrations/cloudbuild/chef.yaml b/integrations/cloudbuild/chef.yaml index 050acdf6416eb4..5a7e98ca56c8d3 100644 --- a/integrations/cloudbuild/chef.yaml +++ b/integrations/cloudbuild/chef.yaml @@ -1,5 +1,5 @@ steps: - - name: "ghcr.io/project-chip/chip-build-vscode:46" + - name: "ghcr.io/project-chip/chip-build-vscode:47" entrypoint: "bash" args: - "-c" @@ -7,7 +7,7 @@ steps: git config --global --add safe.directory "*" python scripts/checkout_submodules.py --shallow --recursive --platform esp32 nrfconnect silabs linux android id: Submodules - - name: "ghcr.io/project-chip/chip-build-vscode:46" + - name: "ghcr.io/project-chip/chip-build-vscode:47" # NOTE: silabs boostrap is NOT done with the rest as it requests a conflicting # jinja2 version (asks for 3.1.3 when constraints.txt asks for 3.0.3) env: @@ -23,7 +23,7 @@ steps: - name: pwenv path: /pwenv timeout: 900s - - name: "ghcr.io/project-chip/chip-build-vscode:46" + - name: "ghcr.io/project-chip/chip-build-vscode:47" env: - PW_ENVIRONMENT_ROOT=/pwenv args: @@ -38,7 +38,7 @@ steps: - name: pwenv path: /pwenv - - name: "ghcr.io/project-chip/chip-build-vscode:46" + - name: "ghcr.io/project-chip/chip-build-vscode:47" env: - PW_ENVIRONMENT_ROOT=/pwenv args: diff --git a/integrations/cloudbuild/smoke-test.yaml b/integrations/cloudbuild/smoke-test.yaml index 26126671432389..5003d089257366 100644 --- a/integrations/cloudbuild/smoke-test.yaml +++ b/integrations/cloudbuild/smoke-test.yaml @@ -1,5 +1,5 @@ steps: - - name: "ghcr.io/project-chip/chip-build-vscode:46" + - name: "ghcr.io/project-chip/chip-build-vscode:47" entrypoint: "bash" args: - "-c" @@ -7,7 +7,7 @@ steps: git config --global --add safe.directory "*" python scripts/checkout_submodules.py --shallow --recursive --platform esp32 nrfconnect silabs linux android id: Submodules - - name: "ghcr.io/project-chip/chip-build-vscode:46" + - name: "ghcr.io/project-chip/chip-build-vscode:47" # NOTE: silabs boostrap is NOT done with the rest as it requests a conflicting # jinja2 version (asks for 3.1.3 when constraints.txt asks for 3.0.3) env: @@ -24,7 +24,7 @@ steps: path: /pwenv timeout: 900s - - name: "ghcr.io/project-chip/chip-build-vscode:46" + - name: "ghcr.io/project-chip/chip-build-vscode:47" id: ESP32 env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -45,7 +45,7 @@ steps: volumes: - name: pwenv path: /pwenv - - name: "ghcr.io/project-chip/chip-build-vscode:46" + - name: "ghcr.io/project-chip/chip-build-vscode:47" id: NRFConnect env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -66,7 +66,7 @@ steps: - name: pwenv path: /pwenv - - name: "ghcr.io/project-chip/chip-build-vscode:46" + - name: "ghcr.io/project-chip/chip-build-vscode:47" id: EFR32 env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -88,7 +88,7 @@ steps: - name: pwenv path: /pwenv - - name: "ghcr.io/project-chip/chip-build-vscode:46" + - name: "ghcr.io/project-chip/chip-build-vscode:47" id: Linux env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -141,7 +141,7 @@ steps: - name: pwenv path: /pwenv - - name: "ghcr.io/project-chip/chip-build-vscode:46" + - name: "ghcr.io/project-chip/chip-build-vscode:47" id: Android env: - PW_ENVIRONMENT_ROOT=/pwenv diff --git a/src/platform/telink/tlsr9258a.overlay b/src/platform/telink/tlsr9258a.overlay index b794576ea02ae9..21918dc0fe06c5 100644 --- a/src/platform/telink/tlsr9258a.overlay +++ b/src/platform/telink/tlsr9258a.overlay @@ -1,48 +1,61 @@ / { - aliases { - system-state-led = &led_red; - pwm-led0 = &pwm_led0; - pwm-led1 = &pwm_led1; - pwm-led2 = &pwm_led2; - pwm-led3 = &pwm_led3; + /* Short TL_Key3 (J6 pin 31) to ground (J4 pin 3, 5, 9) */ + key_pool { + compatible = "gpio-keys"; + + inp { + gpios = <&gpiod 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, + <&gpiod 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + }; }; - pwm_leds { - /delete-node/ pwm_led_0; - pwm_led0: pwm_led_0 { - pwms = <&pwm0 0 PWM_MSEC(20) PWM_POLARITY_NORMAL>; - label = "PWM LED Blue"; + key_matrix { + compatible = "gpio-keys"; + + col { + gpios = <&gpiod 5 GPIO_ACTIVE_HIGH>, + <&gpiod 7 GPIO_ACTIVE_HIGH>; }; - pwm_led1: pwm_led_1 { - pwms = <&pwm0 3 PWM_MSEC(20) PWM_POLARITY_NORMAL>; - label = "PWM LED Green"; + + row { + gpios = <&gpiod 4 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>, + <&gpiod 6 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>; }; - pwm_led2: pwm_led_2 { - pwms = <&pwm0 2 PWM_MSEC(20) PWM_POLARITY_NORMAL>; - label = "PWM LED Red"; + }; + + led_pool { + compatible = "gpio-leds"; + + out { + gpios = <&gpioc 3 GPIO_ACTIVE_HIGH>; + }; + }; + + pwm_pool { + compatible = "pwm-leds"; + out { + pwms = <&pwm0 2 PWM_MSEC(20) PWM_POLARITY_NORMAL>, + <&pwm0 0 PWM_MSEC(20) PWM_POLARITY_NORMAL>, + <&pwm0 1 PWM_MSEC(20) PWM_POLARITY_NORMAL>; }; - pwm_led3: pwm_led_3 { - pwms = <&pwm0 1 PWM_MSEC(20) PWM_POLARITY_NORMAL>; - label = "PWM IDENTIFY LED Green"; - }; - }; + }; +}; + +&pwm0 { + /* On board RGB LEDs */ + pinctrl-ch0 = <&pwm_ch0_pc1_default>; + pinctrl-ch2 = <&pwm_ch1_pc0_default>; + pinctrl-ch1 = <&pwm_ch2_pc2_default>; }; &pinctrl { - pwm_ch0_pd0_default: pwm_ch0_pd0_default { - pinmux = ; + pwm_ch0_pc1_default: pwm_ch0_pc1_default { + pinmux = ; }; - pwm_ch1_pd1_default: pwm_ch1_pd1_default { - pinmux = ; + pwm_ch1_pc0_default: pwm_ch1_pc0_default { + pinmux = ; }; - pwm_ch2_pe2_default: pwm_ch2_pe2_default { - pinmux = ; + pwm_ch2_pc2_default: pwm_ch2_pc2_default { + pinmux = ; }; - pwm_ch3_pe0_default: pwm_ch3_pe0_default { - pinmux = ; - }; -}; - -&pwm0 { - pinctrl-0 = <&pwm_ch0_pd0_default &pwm_ch1_pd1_default &pwm_ch2_pe2_default &pwm_ch3_pe0_default>; }; diff --git a/src/test_driver/tizen/README.md b/src/test_driver/tizen/README.md index 080d9c70f407ed..10389252b8a8de 100644 --- a/src/test_driver/tizen/README.md +++ b/src/test_driver/tizen/README.md @@ -12,7 +12,7 @@ image from hub.docker.com or build it locally using the provided Dockerfile in ```sh # Pull the image from hub.docker.com -docker pull ghcr.io/project-chip/chip-build-tizen-qemu:46 +docker pull ghcr.io/project-chip/chip-build-tizen-qemu:47 ``` ## Building and Running Tests on QEMU @@ -21,7 +21,7 @@ All steps described below should be done inside the docker container. ```sh docker run -it --rm --name chip-tizen-qemu \ - ghcr.io/project-chip/chip-build-tizen-qemu:46 /bin/bash + ghcr.io/project-chip/chip-build-tizen-qemu:47 /bin/bash ``` ### Clone the connectedhomeip repository From 7aa77485e55311e7c6c38b823ed965069ec7f5c9 Mon Sep 17 00:00:00 2001 From: Karsten Sperling <113487422+ksperling-apple@users.noreply.github.com> Date: Wed, 10 Apr 2024 22:20:25 +1200 Subject: [PATCH 019/468] Darwin: PlatformManagerImpl improvements (#32904) * Small improvements to TestPlatformMgr.cpp Use NL_TEST_ASSERT_SUCCESS when checking errors Add a few more assertions * Add AtomicGlobal as a thread-safe variant of Global It is simply an alias for the same type if CHIP_CONFIG_GLOBALS_LAZY_INIT is not enabled, as the eager implementation of Global is thread-safe anyway. Use "friend" instead of "friend class" where the type might be an alias. * Darwin: PlatformManagerImpl improvements Make PlatformMgr[Impl]() thread-safe by using an AtomicGlobal Make GetWorkQueue() thread-safe by creating the queue in the constructor Make {Start,Stop}EventLoopTask thread-safe using an atomic for state Signal the sempahore only if non-null, no matter where stop is called from Other minor tweaks * Don't reference std::call_once unless CHIP_CONFIG_GLOBALS_LAZY_INIT=1 --- src/lib/core/Global.h | 86 +++++++++++++--- src/lib/dnssd/Discovery_ImplPlatform.h | 2 +- src/platform/Darwin/DnssdImpl.h | 2 +- src/platform/Darwin/PlatformManagerImpl.cpp | 108 +++++++------------- src/platform/Darwin/PlatformManagerImpl.h | 32 +++--- src/platform/tests/TestPlatformMgr.cpp | 34 +++--- 6 files changed, 147 insertions(+), 117 deletions(-) diff --git a/src/lib/core/Global.h b/src/lib/core/Global.h index 26de6b58381ccd..ddecf2bbeddb5b 100644 --- a/src/lib/core/Global.h +++ b/src/lib/core/Global.h @@ -19,9 +19,48 @@ #include +#include #include +#if CHIP_SYSTEM_CONFIG_USE_DISPATCH +#include +#endif // CHIP_SYSTEM_CONFIG_USE_DISPATCH + namespace chip { +namespace detail { + +#if CHIP_CONFIG_GLOBALS_LAZY_INIT + +struct NonAtomicOnce +{ + bool mInitialized = false; + void call(void (*func)(void *), void * context) + { + if (!mInitialized) + { + mInitialized = true; + func(context); + } + } +}; + +struct AtomicOnce +{ +// dispatch_once (if available) is more efficient than std::call_once because +// it takes advantage of the additional assumption that the dispatch_once_t +// is allocated within a static / global. +#if CHIP_SYSTEM_CONFIG_USE_DISPATCH + dispatch_once_t mOnce = 0; + void call(void (*func)(void *), void * context) { dispatch_once_f(&mOnce, context, func); } +#else // CHIP_SYSTEM_CONFIG_USE_DISPATCH + std::once_flag mOnce; + void call(void (*func)(void *), void * context) { std::call_once(mOnce, func, context); } +#endif +}; + +#endif // CHIP_CONFIG_GLOBALS_LAZY_INIT + +} // namespace detail /** * A wrapper for global object that enables initialization and destruction to @@ -29,9 +68,16 @@ namespace chip { * * The contained object of type T is default constructed, possibly lazily. * - * This class is generally NOT thread-safe; external synchronization is required. + * Values of this type MUST be globals or static class members. + * + * This class is not thread-safe; external synchronization is required. + * @see AtomicGlobal for a thread-safe variant. */ +#if CHIP_CONFIG_GLOBALS_LAZY_INIT +template +#else // CHIP_CONFIG_GLOBALS_LAZY_INIT template +#endif // CHIP_CONFIG_GLOBALS_LAZY_INIT class Global { public: @@ -40,6 +86,11 @@ class Global T & get() { return _get(); } T * operator->() { return &_get(); } + // Globals are not copyable or movable + Global(const Global &) = delete; + Global(const Global &&) = delete; + Global & operator=(const Global &) = delete; + #if CHIP_CONFIG_GLOBALS_LAZY_INIT public: constexpr Global() = default; @@ -49,24 +100,22 @@ class Global // Zero-initialize everything. We should technically leave mStorage uninitialized, // but that can sometimes cause clang to be unable to constant-initialize the object. alignas(T) unsigned char mStorage[sizeof(T)] = {}; - bool mInitialized = false; - - T & _value() { return *reinterpret_cast(mStorage); } + OnceStrategy mOnce; T & _get() { - if (!mInitialized) - { - new (mStorage) T(); - mInitialized = true; + T * value = reinterpret_cast(mStorage); + mOnce.call(&create, value); + return *value; + } + static void create(void * value) + { + new (value) T(); #if !CHIP_CONFIG_GLOBALS_NO_DESTRUCT - CHIP_CXA_ATEXIT(&destroy, this); + CHIP_CXA_ATEXIT(&destroy, value); #endif // CHIP_CONFIG_GLOBALS_NO_DESTRUCT - } - return _value(); } - - static void destroy(void * context) { static_cast *>(context)->_value().~T(); } + static void destroy(void * value) { static_cast(value)->~T(); } #else // CHIP_CONFIG_GLOBALS_LAZY_INIT public: @@ -100,4 +149,15 @@ class Global #endif // CHIP_CONFIG_GLOBALS_LAZY_INIT }; +/** + * A variant of Global that is thread-safe. + */ +template +using AtomicGlobal = +#if CHIP_CONFIG_GLOBALS_LAZY_INIT + Global; +#else // CHIP_CONFIG_GLOBALS_LAZY_INIT + Global; // eager globals are already thread-safe +#endif // CHIP_CONFIG_GLOBALS_LAZY_INIT + } // namespace chip diff --git a/src/lib/dnssd/Discovery_ImplPlatform.h b/src/lib/dnssd/Discovery_ImplPlatform.h index c6ba929801ba7b..34fedf831b5ecf 100644 --- a/src/lib/dnssd/Discovery_ImplPlatform.h +++ b/src/lib/dnssd/Discovery_ImplPlatform.h @@ -95,7 +95,7 @@ class DiscoveryImplPlatform : public ServiceAdvertiser, public Resolver uint8_t mCommissionableInstanceName[sizeof(uint64_t)]; OperationalResolveDelegate * mOperationalDelegate = nullptr; - friend class Global; + friend Global; static Global sManager; }; diff --git a/src/platform/Darwin/DnssdImpl.h b/src/platform/Darwin/DnssdImpl.h index de5419b0bf7907..3cf48db33545a5 100644 --- a/src/platform/Darwin/DnssdImpl.h +++ b/src/platform/Darwin/DnssdImpl.h @@ -131,7 +131,7 @@ class MdnsContexts private: MdnsContexts() = default; - friend class Global; + friend Global; static Global sInstance; std::vector mContexts; diff --git a/src/platform/Darwin/PlatformManagerImpl.cpp b/src/platform/Darwin/PlatformManagerImpl.cpp index d0289f7b7e0a18..b7dc8b681fa8e8 100644 --- a/src/platform/Darwin/PlatformManagerImpl.cpp +++ b/src/platform/Darwin/PlatformManagerImpl.cpp @@ -31,6 +31,7 @@ #endif #include +#include #include // Include the non-inline definitions for the GenericPlatformManagerImpl<> template, @@ -39,22 +40,28 @@ #include #include -#import "PlatformMetricKeys.h" using namespace chip::Tracing::DarwinPlatform; namespace chip { namespace DeviceLayer { -Global PlatformManagerImpl::sInstance; +AtomicGlobal PlatformManagerImpl::sInstance; -CHIP_ERROR PlatformManagerImpl::_InitChipStack() +PlatformManagerImpl::PlatformManagerImpl() : + mWorkQueue(dispatch_queue_create("org.csa-iot.matter.workqueue", + dispatch_queue_attr_make_with_qos_class(DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL, + QOS_CLASS_USER_INITIATED, QOS_MIN_RELATIVE_PRIORITY))) { - CHIP_ERROR err; + // Tag our queue for IsWorkQueueCurrentQueue() + dispatch_queue_set_specific(mWorkQueue, this, this, nullptr); + dispatch_suspend(mWorkQueue); +} +CHIP_ERROR PlatformManagerImpl::_InitChipStack() +{ // Initialize the configuration system. #if !CHIP_DISABLE_PLATFORM_KVS - err = Internal::PosixConfig::Init(); - SuccessOrExit(err); + ReturnErrorOnFailure(Internal::PosixConfig::Init()); #endif // CHIP_DISABLE_PLATFORM_KVS #if !CHIP_SYSTEM_CONFIG_USE_LIBEV @@ -64,8 +71,7 @@ CHIP_ERROR PlatformManagerImpl::_InitChipStack() // Call _InitChipStack() on the generic implementation base class // to finish the initialization process. - err = Internal::GenericPlatformManagerImpl::_InitChipStack(); - SuccessOrExit(err); + ReturnErrorOnFailure(Internal::GenericPlatformManagerImpl::_InitChipStack()); #if !CHIP_DISABLE_PLATFORM_KVS // Now set up our device instance info provider. We couldn't do that @@ -74,53 +80,36 @@ CHIP_ERROR PlatformManagerImpl::_InitChipStack() #endif // CHIP_DISABLE_PLATFORM_KVS mStartTime = System::SystemClock().GetMonotonicTimestamp(); - -exit: - return err; + return CHIP_NO_ERROR; } CHIP_ERROR PlatformManagerImpl::_StartEventLoopTask() { - if (mIsWorkQueueSuspended) - { - mIsWorkQueueSuspended = false; - dispatch_resume(mWorkQueue); - } - + auto expected = WorkQueueState::kSuspended; + VerifyOrReturnError(mWorkQueueState.compare_exchange_strong(expected, WorkQueueState::kRunning), CHIP_ERROR_INCORRECT_STATE); + dispatch_resume(mWorkQueue); return CHIP_NO_ERROR; }; CHIP_ERROR PlatformManagerImpl::_StopEventLoopTask() { - if (!mIsWorkQueueSuspended && !mIsWorkQueueSuspensionPending) - { - mIsWorkQueueSuspensionPending = true; - if (!IsWorkQueueCurrentQueue()) - { - // dispatch_sync is used in order to guarantee serialization of the caller with - // respect to any tasks that might already be on the queue, or running. - dispatch_sync(mWorkQueue, ^{ - dispatch_suspend(mWorkQueue); - }); - - mIsWorkQueueSuspended = true; - mIsWorkQueueSuspensionPending = false; - } - else + auto expected = WorkQueueState::kRunning; + VerifyOrReturnError(mWorkQueueState.compare_exchange_strong(expected, WorkQueueState::kSuspensionPending), + CHIP_ERROR_INCORRECT_STATE); + + // We need to dispatch to the work queue to ensure any currently queued jobs + // finish executing. When called from outside the work queue we also need to + // wait for them to complete before returning to the caller, so we use + // dispatch_sync in that case. + (IsWorkQueueCurrentQueue() ? dispatch_async : dispatch_sync)(mWorkQueue, ^{ + dispatch_suspend(mWorkQueue); + mWorkQueueState.store(WorkQueueState::kSuspended); + auto * semaphore = mRunLoopSem; + if (semaphore != nullptr) { - // We are called from a task running on our work queue. Dispatch async, - // so we don't deadlock ourselves. Note that we do have to dispatch to - // guarantee that we don't signal the semaphore until we have ensured - // that no more tasks will run on the queue. - dispatch_async(mWorkQueue, ^{ - dispatch_suspend(mWorkQueue); - mIsWorkQueueSuspended = true; - mIsWorkQueueSuspensionPending = false; - dispatch_semaphore_signal(mRunLoopSem); - }); + dispatch_semaphore_signal(semaphore); } - } - + }); return CHIP_NO_ERROR; } @@ -147,14 +136,9 @@ void PlatformManagerImpl::_Shutdown() CHIP_ERROR PlatformManagerImpl::_PostEvent(const ChipDeviceEvent * event) { - if (mWorkQueue == nullptr) - { - return CHIP_ERROR_INCORRECT_STATE; - } - const ChipDeviceEvent eventCopy = *event; dispatch_async(mWorkQueue, ^{ - Impl()->DispatchEvent(&eventCopy); + DispatchEvent(&eventCopy); }); return CHIP_NO_ERROR; } @@ -162,32 +146,14 @@ CHIP_ERROR PlatformManagerImpl::_PostEvent(const ChipDeviceEvent * event) #if CHIP_STACK_LOCK_TRACKING_ENABLED bool PlatformManagerImpl::_IsChipStackLockedByCurrentThread() const { - // If we have no work queue, or it's suspended, then we assume our caller - // knows what they are doing in terms of their own concurrency. - return !mWorkQueue || mIsWorkQueueSuspended || IsWorkQueueCurrentQueue(); + // Assume our caller knows what they are doing in terms of concurrency if the work queue is suspended. + return IsWorkQueueCurrentQueue() || mWorkQueueState.load() == WorkQueueState::kSuspended; }; #endif -static int sPlatformManagerKey; // We use pointer to this as key. - -dispatch_queue_t PlatformManagerImpl::GetWorkQueue() -{ - if (mWorkQueue == nullptr) - { - mWorkQueue = - dispatch_queue_create(CHIP_CONTROLLER_QUEUE, - dispatch_queue_attr_make_with_qos_class(DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL, - QOS_CLASS_USER_INITIATED, QOS_MIN_RELATIVE_PRIORITY)); - dispatch_suspend(mWorkQueue); - dispatch_queue_set_specific(mWorkQueue, &sPlatformManagerKey, this, nullptr); - mIsWorkQueueSuspended = true; - } - return mWorkQueue; -} - bool PlatformManagerImpl::IsWorkQueueCurrentQueue() const { - return dispatch_get_specific(&sPlatformManagerKey) == this; + return dispatch_get_specific(this) == this; } CHIP_ERROR PlatformManagerImpl::StartBleScan(BleScannerDelegate * delegate) diff --git a/src/platform/Darwin/PlatformManagerImpl.h b/src/platform/Darwin/PlatformManagerImpl.h index 7f3aba0b1a7b8e..12b515ae83d42f 100644 --- a/src/platform/Darwin/PlatformManagerImpl.h +++ b/src/platform/Darwin/PlatformManagerImpl.h @@ -26,10 +26,9 @@ #include #include +#include #include -static constexpr const char * const CHIP_CONTROLLER_QUEUE = "org.csa-iot.matter.framework.controller.workqueue"; - namespace chip { namespace DeviceLayer { @@ -47,7 +46,7 @@ class PlatformManagerImpl final : public PlatformManager, public Internal::Gener public: // ===== Platform-specific members that may be accessed directly by the application. - dispatch_queue_t GetWorkQueue(); + dispatch_queue_t GetWorkQueue() { return mWorkQueue; } bool IsWorkQueueCurrentQueue() const; CHIP_ERROR StartBleScan(BleScannerDelegate * delegate = nullptr); @@ -80,21 +79,26 @@ class PlatformManagerImpl final : public PlatformManager, public Internal::Gener friend PlatformManager & PlatformMgr(void); friend PlatformManagerImpl & PlatformMgrImpl(void); - static Global sInstance; + friend AtomicGlobal; + static AtomicGlobal sInstance; + + PlatformManagerImpl(); System::Clock::Timestamp mStartTime = System::Clock::kZero; - dispatch_queue_t mWorkQueue = nullptr; - // Semaphore used to implement blocking behavior in _RunEventLoop. - dispatch_semaphore_t mRunLoopSem; + dispatch_queue_t mWorkQueue; - bool mIsWorkQueueSuspended = false; - // TODO: mIsWorkQueueSuspensionPending might need to be an atomic and use - // atomic ops, if we're worried about calls to StopEventLoopTask() from - // multiple threads racing somehow... - bool mIsWorkQueueSuspensionPending = false; + enum class WorkQueueState + { + kSuspended, + kRunning, + kSuspensionPending, + }; - inline ImplClass * Impl() { return static_cast(this); } + std::atomic mWorkQueueState = WorkQueueState::kSuspended; + + // Semaphore used to implement blocking behavior in _RunEventLoop. + dispatch_semaphore_t mRunLoopSem; }; /** @@ -112,7 +116,7 @@ inline PlatformManager & PlatformMgr(void) * Returns the platform-specific implementation of the PlatformManager singleton object. * * chip applications can use this to gain access to features of the PlatformManager - * that are specific to the ESP32 platform. + * that are specific to the platform. */ inline PlatformManagerImpl & PlatformMgrImpl(void) { diff --git a/src/platform/tests/TestPlatformMgr.cpp b/src/platform/tests/TestPlatformMgr.cpp index 89bad3b4c535f0..87c7913ebb7c3b 100644 --- a/src/platform/tests/TestPlatformMgr.cpp +++ b/src/platform/tests/TestPlatformMgr.cpp @@ -32,6 +32,7 @@ #include #include +#include #include #include #include @@ -60,14 +61,12 @@ static void TestPlatformMgr_BasicEventLoopTask(nlTestSuite * inSuite, void * inC { std::atomic counterRun{ 0 }; - CHIP_ERROR err = PlatformMgr().InitChipStack(); - NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); + NL_TEST_ASSERT_SUCCESS(inSuite, PlatformMgr().InitChipStack()); // Start/stop the event loop task a few times. for (size_t i = 0; i < 3; i++) { - err = PlatformMgr().StartEventLoopTask(); - NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); + NL_TEST_ASSERT_SUCCESS(inSuite, PlatformMgr().StartEventLoopTask()); std::atomic counterSync{ 2 }; @@ -99,8 +98,7 @@ static void TestPlatformMgr_BasicEventLoopTask(nlTestSuite * inSuite, void * inC for (size_t t = 0; counterSync != 0 && t < 1000; t++) chip::test_utils::SleepMillis(1); - err = PlatformMgr().StopEventLoopTask(); - NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); + NL_TEST_ASSERT_SUCCESS(inSuite, PlatformMgr().StopEventLoopTask()); // Sleep for a short time to allow the event loop to stop. // Note, in some platform implementations the event loop thread @@ -115,26 +113,28 @@ static void TestPlatformMgr_BasicEventLoopTask(nlTestSuite * inSuite, void * inC } static bool stopRan; +static CHIP_ERROR stopResult = CHIP_NO_ERROR; static void StopTheLoop(intptr_t) { // Testing the return value here would involve multi-threaded access to the // nlTestSuite, and it's not clear whether that's OK. - stopRan = true; - PlatformMgr().StopEventLoopTask(); + stopRan = true; + stopResult = PlatformMgr().StopEventLoopTask(); } static void TestPlatformMgr_BasicRunEventLoop(nlTestSuite * inSuite, void * inContext) { stopRan = false; - CHIP_ERROR err = PlatformMgr().InitChipStack(); - NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); + NL_TEST_ASSERT_SUCCESS(inSuite, PlatformMgr().InitChipStack()); PlatformMgr().ScheduleWork(StopTheLoop); + NL_TEST_ASSERT(inSuite, !stopRan); PlatformMgr().RunEventLoop(); NL_TEST_ASSERT(inSuite, stopRan); + NL_TEST_ASSERT_SUCCESS(inSuite, stopResult); PlatformMgr().Shutdown(); } @@ -152,12 +152,13 @@ static void TestPlatformMgr_RunEventLoopTwoTasks(nlTestSuite * inSuite, void * i stopRan = false; sleepRan = false; - CHIP_ERROR err = PlatformMgr().InitChipStack(); - NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); + NL_TEST_ASSERT_SUCCESS(inSuite, PlatformMgr().InitChipStack()); PlatformMgr().ScheduleWork(SleepSome); PlatformMgr().ScheduleWork(StopTheLoop); + NL_TEST_ASSERT(inSuite, !stopRan); + NL_TEST_ASSERT(inSuite, !sleepRan); PlatformMgr().RunEventLoop(); NL_TEST_ASSERT(inSuite, stopRan); NL_TEST_ASSERT(inSuite, sleepRan); @@ -177,11 +178,12 @@ static void TestPlatformMgr_RunEventLoopStopBeforeSleep(nlTestSuite * inSuite, v stopRan = false; sleepRan = false; - CHIP_ERROR err = PlatformMgr().InitChipStack(); - NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); + NL_TEST_ASSERT_SUCCESS(inSuite, PlatformMgr().InitChipStack()); PlatformMgr().ScheduleWork(StopAndSleep); + NL_TEST_ASSERT(inSuite, !stopRan); + NL_TEST_ASSERT(inSuite, !sleepRan); PlatformMgr().RunEventLoop(); NL_TEST_ASSERT(inSuite, stopRan); NL_TEST_ASSERT(inSuite, sleepRan); @@ -206,10 +208,8 @@ void DeviceEventHandler(const ChipDeviceEvent * event, intptr_t arg) static void TestPlatformMgr_AddEventHandler(nlTestSuite * inSuite, void * inContext) { - CHIP_ERROR error; sEventRecieved = 0; - error = PlatformMgr().AddEventHandler(DeviceEventHandler, 12345); - NL_TEST_ASSERT(inSuite, error == CHIP_NO_ERROR); + NL_TEST_ASSERT_SUCCESS(inSuite, PlatformMgr().AddEventHandler(DeviceEventHandler, 12345)); #if 0 while (sEventRecieved == 0) From e05d08e553978cf07f809d2227a2c5f588229f8e Mon Sep 17 00:00:00 2001 From: C Freeman Date: Wed, 10 Apr 2024 08:26:09 -0400 Subject: [PATCH 020/468] TC-RR-1.1: Allow proper commissioning from TH (#32468) * TC-RR-1.1: Allow proper commissioning from TH This test set required commissioning parameters in the command line runner, which weren't being picked up by the test harness when it commissioned. I have moved these to be default so that we can commission once and run all the tests. Also removed the ability to set parameters in this way because it will always result in test harness weirdness. * Add back argv for parsing config params Supports TH implementation. --- src/python_testing/TC_RR_1_1.py | 2 +- src/python_testing/matter_testing_support.py | 28 +++++++------------- 2 files changed, 11 insertions(+), 19 deletions(-) diff --git a/src/python_testing/TC_RR_1_1.py b/src/python_testing/TC_RR_1_1.py index 98db3c3aae5fbd..004022b108e6e0 100644 --- a/src/python_testing/TC_RR_1_1.py +++ b/src/python_testing/TC_RR_1_1.py @@ -871,4 +871,4 @@ async def read_heap_statistics(self, dev_ctrl): if __name__ == "__main__": - default_matter_test_main(maximize_cert_chains=True, controller_cat_tags=[0x0001_0001]) + default_matter_test_main() diff --git a/src/python_testing/matter_testing_support.py b/src/python_testing/matter_testing_support.py index 4affea32c81ec5..f56acdcd61d040 100644 --- a/src/python_testing/matter_testing_support.py +++ b/src/python_testing/matter_testing_support.py @@ -374,7 +374,9 @@ class MatterTestConfig: discriminators: Optional[List[int]] = None setup_passcodes: Optional[List[int]] = None commissionee_ip_address_just_for_testing: Optional[str] = None - maximize_cert_chains: bool = False + # By default, we start with maximized cert chains, as required for RR-1.1. + # This allows cert tests to be run without re-commissioning for RR-1.1. + maximize_cert_chains: bool = True qr_code_content: Optional[str] = None manual_code: Optional[str] = None @@ -390,7 +392,10 @@ class MatterTestConfig: # Node ID to use for controller/commissioner controller_node_id: int = _DEFAULT_CONTROLLER_NODE_ID # CAT Tags for default controller/commissioner - controller_cat_tags: List[int] = field(default_factory=list) + # By default, we commission with CAT tags specified for RR-1.1 + # so the cert tests can be run without re-commissioning the device + # for this one test. This can be overwritten from the command line + controller_cat_tags: List[int] = field(default_factory=lambda: [0x0001_0001]) # Fabric ID which to use fabric_id: int = 1 @@ -1416,7 +1421,7 @@ def convert_args_to_matter_config(args: argparse.Namespace) -> MatterTestConfig: return config -def parse_matter_test_args(argv: List[str]) -> MatterTestConfig: +def parse_matter_test_args(argv: Optional[List[str]] = None) -> MatterTestConfig: parser = argparse.ArgumentParser(description='Matter standalone Python test') basic_group = parser.add_argument_group(title="Basic arguments", description="Overall test execution arguments") @@ -1613,7 +1618,7 @@ def _commission_device(self, i) -> bool: raise ValueError("Invalid commissioning method %s!" % conf.commissioning_method) -def default_matter_test_main(argv=None, **kwargs): +def default_matter_test_main(): """Execute the test class in a test module. This is the default entry point for running a test script file directly. In this case, only one test class in a test script is allowed. @@ -1623,26 +1628,13 @@ def default_matter_test_main(argv=None, **kwargs): ... if __name__ == '__main__': default_matter_test_main.main() - Args: - argv: A list that is then parsed as command line args. If None, defaults to sys.argv """ - matter_test_config = parse_matter_test_args(argv) - - # Allow override of command line from optional arguments - if not matter_test_config.controller_cat_tags and "controller_cat_tags" in kwargs: - matter_test_config.controller_cat_tags = kwargs["controller_cat_tags"] + matter_test_config = parse_matter_test_args() # Find the test class in the test script. test_class = _find_test_class() - # This is required in case we need any testing with maximized certificate chains. - # We need *all* issuers from the start, even for default controller, to use - # maximized chains, before MatterStackState init, others some stale certs - # may not chain properly. - if "maximize_cert_chains" in kwargs: - matter_test_config.maximize_cert_chains = kwargs["maximize_cert_chains"] - hooks = InternalTestRunnerHooks() run_tests(test_class, matter_test_config, hooks) From ee6c9e9821e8f51852f2c376ee6073f5c4ff7581 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Wed, 10 Apr 2024 13:31:32 -0400 Subject: [PATCH 021/468] Take CASE BUSY delay into account when scheduling retries in Matter.framework. (#32920) --- src/darwin/Framework/CHIP/MTRBaseDevice.mm | 4 +-- .../Framework/CHIP/MTRCallbackBridgeBase.h | 6 ++--- src/darwin/Framework/CHIP/MTRDevice.mm | 27 ++++++++++++++----- .../CHIP/MTRDeviceConnectionBridge.h | 12 ++++++--- .../CHIP/MTRDeviceConnectionBridge.mm | 10 ++++--- .../Framework/CHIP/MTRDeviceController.mm | 12 ++++----- 6 files changed, 46 insertions(+), 25 deletions(-) diff --git a/src/darwin/Framework/CHIP/MTRBaseDevice.mm b/src/darwin/Framework/CHIP/MTRBaseDevice.mm index cb93d2db5d0e5b..ccefbb18497414 100644 --- a/src/darwin/Framework/CHIP/MTRBaseDevice.mm +++ b/src/darwin/Framework/CHIP/MTRBaseDevice.mm @@ -365,7 +365,7 @@ - (void)subscribeWithQueue:(dispatch_queue_t)queue [self.deviceController getSessionForNode:self.nodeID completion:^(ExchangeManager * _Nullable exchangeManager, const Optional & session, - NSError * _Nullable error) { + NSError * _Nullable error, NSNumber * _Nullable retryDelay) { if (error != nil) { dispatch_async(queue, ^{ errorHandler(error); @@ -1603,7 +1603,7 @@ - (void)subscribeToAttributePaths:(NSArray * _Nullabl [self.deviceController getSessionForNode:self.nodeID completion:^(ExchangeManager * _Nullable exchangeManager, const Optional & session, - NSError * _Nullable error) { + NSError * _Nullable error, NSNumber * _Nullable retryDelay) { if (error != nil) { dispatch_async(queue, ^{ reportHandler(nil, error); diff --git a/src/darwin/Framework/CHIP/MTRCallbackBridgeBase.h b/src/darwin/Framework/CHIP/MTRCallbackBridgeBase.h index d113b5dedc86a1..6631e2d132bb54 100644 --- a/src/darwin/Framework/CHIP/MTRCallbackBridgeBase.h +++ b/src/darwin/Framework/CHIP/MTRCallbackBridgeBase.h @@ -83,7 +83,7 @@ class MTRCallbackBridgeBase { [device.deviceController getSessionForCommissioneeDevice:device.nodeID completion:^(chip::Messaging::ExchangeManager * exchangeManager, - const chip::Optional & session, NSError * error) { + const chip::Optional & session, NSError * _Nullable error, NSNumber * _Nullable retryDelay) { MaybeDoAction(exchangeManager, session, error); }]; } @@ -93,8 +93,8 @@ class MTRCallbackBridgeBase { LogRequestStart(); [controller getSessionForNode:nodeID - completion:^(chip::Messaging::ExchangeManager * exchangeManager, - const chip::Optional & session, NSError * error) { + completion:^(chip::Messaging::ExchangeManager * _Nullable exchangeManager, + const chip::Optional & session, NSError * _Nullable error, NSNumber * _Nullable retryDelay) { MaybeDoAction(exchangeManager, session, error); }]; } diff --git a/src/darwin/Framework/CHIP/MTRDevice.mm b/src/darwin/Framework/CHIP/MTRDevice.mm index 17916610a27688..a5ae3904156367 100644 --- a/src/darwin/Framework/CHIP/MTRDevice.mm +++ b/src/darwin/Framework/CHIP/MTRDevice.mm @@ -771,7 +771,7 @@ - (void)_handleResubscriptionNeeded [self _changeState:MTRDeviceStateUnknown]; } -- (void)_handleSubscriptionReset +- (void)_handleSubscriptionReset:(NSNumber * _Nullable)retryDelay { std::lock_guard lock(_lock); // if there is no delegate then also do not retry @@ -790,17 +790,29 @@ - (void)_handleSubscriptionReset self.reattemptingSubscription = YES; + NSTimeInterval secondsToWait; if (_lastSubscriptionAttemptWait < MTRDEVICE_SUBSCRIPTION_ATTEMPT_MIN_WAIT_SECONDS) { _lastSubscriptionAttemptWait = MTRDEVICE_SUBSCRIPTION_ATTEMPT_MIN_WAIT_SECONDS; + secondsToWait = _lastSubscriptionAttemptWait; + } else if (retryDelay != nil) { + // The device responded but is currently busy. Reset our backoff + // counter, so that we don't end up waiting for a long time if the next + // attempt fails for some reason, and retry after whatever time period + // the device told us to use. + _lastSubscriptionAttemptWait = 0; + secondsToWait = retryDelay.doubleValue; + MTR_LOG_INFO("%@ resetting resubscribe attempt counter, and delaying by the server-provided delay: %f", + self, secondsToWait); } else { _lastSubscriptionAttemptWait *= 2; if (_lastSubscriptionAttemptWait > MTRDEVICE_SUBSCRIPTION_ATTEMPT_MAX_WAIT_SECONDS) { _lastSubscriptionAttemptWait = MTRDEVICE_SUBSCRIPTION_ATTEMPT_MAX_WAIT_SECONDS; } + secondsToWait = _lastSubscriptionAttemptWait; } - MTR_LOG_DEFAULT("%@ scheduling to reattempt subscription in %u seconds", self, _lastSubscriptionAttemptWait); - dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t) (_lastSubscriptionAttemptWait * NSEC_PER_SEC)), self.queue, ^{ + MTR_LOG_DEFAULT("%@ scheduling to reattempt subscription in %f seconds", self, secondsToWait); + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t) (secondsToWait * NSEC_PER_SEC)), self.queue, ^{ os_unfair_lock_lock(&self->_lock); [self _reattemptSubscriptionNowIfNeeded]; os_unfair_lock_unlock(&self->_lock); @@ -1133,12 +1145,13 @@ - (void)_setupSubscription [_deviceController getSessionForNode:_nodeID.unsignedLongLongValue completion:^(chip::Messaging::ExchangeManager * _Nullable exchangeManager, - const chip::Optional & session, NSError * _Nullable error) { + const chip::Optional & session, NSError * _Nullable error, + NSNumber * _Nullable retryDelay) { if (error != nil) { MTR_LOG_ERROR("%@ getSessionForNode error %@", self, error); dispatch_async(self.queue, ^{ [self _handleSubscriptionError:error]; - [self _handleSubscriptionReset]; + [self _handleSubscriptionReset:retryDelay]; }); return; } @@ -1193,7 +1206,7 @@ - (void)_setupSubscription dispatch_async(self.queue, ^{ // OnDone - [self _handleSubscriptionReset]; + [self _handleSubscriptionReset:nil]; }); os_unfair_lock_unlock(&self->_lock); }, @@ -1300,7 +1313,7 @@ - (void)_setupSubscription MTR_LOG_ERROR("%@ SendAutoResubscribeRequest error %@", self, error); dispatch_async(self.queue, ^{ [self _handleSubscriptionError:error]; - [self _handleSubscriptionReset]; + [self _handleSubscriptionReset:nil]; }); return; diff --git a/src/darwin/Framework/CHIP/MTRDeviceConnectionBridge.h b/src/darwin/Framework/CHIP/MTRDeviceConnectionBridge.h index 01d248102b692d..e4d2dda652d0d0 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceConnectionBridge.h +++ b/src/darwin/Framework/CHIP/MTRDeviceConnectionBridge.h @@ -19,6 +19,7 @@ #import +#include #include #include #include @@ -27,9 +28,12 @@ NS_ASSUME_NONNULL_BEGIN // Either exchangeManager will be non-nil and session will have a value, or -// error will be non-nil. +// error will be non-nil. If error is non-nil, retryDelay might be non-nil. In +// that case it will contain an NSTimeInterval indicating how long consumers +// should delay before trying again (e.g. based on the information communicated +// in a BUSY response). typedef void (^MTRInternalDeviceConnectionCallback)(chip::Messaging::ExchangeManager * _Nullable exchangeManager, - const chip::Optional & session, NSError * _Nullable error); + const chip::Optional & session, NSError * _Nullable error, NSNumber * _Nullable retryDelay); /** * Helper to establish or look up a CASE session and hand its session @@ -62,11 +66,11 @@ class MTRDeviceConnectionBridge : public chip::ReferenceCounted mOnConnected; - chip::Callback::Callback mOnConnectFailed; + chip::Callback::Callback mOnConnectFailed; static void OnConnected( void * context, chip::Messaging::ExchangeManager & exchangeMgr, const chip::SessionHandle & sessionHandle); - static void OnConnectionFailure(void * context, const chip::ScopedNodeId & peerId, CHIP_ERROR error); + static void OnConnectionFailure(void * context, const chip::OperationalSessionSetup::ConnnectionFailureInfo & failureInfo); }; NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTRDeviceConnectionBridge.mm b/src/darwin/Framework/CHIP/MTRDeviceConnectionBridge.mm index 490fe3e7bb4443..3fa1c45028adcd 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceConnectionBridge.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceConnectionBridge.mm @@ -23,13 +23,17 @@ void * context, chip::Messaging::ExchangeManager & exchangeMgr, const chip::SessionHandle & sessionHandle) { auto * object = static_cast(context); - object->mCompletionHandler(&exchangeMgr, chip::MakeOptional(*sessionHandle->AsSecureSession()), nil); + object->mCompletionHandler(&exchangeMgr, chip::MakeOptional(*sessionHandle->AsSecureSession()), nil, nil); object->Release(); } -void MTRDeviceConnectionBridge::OnConnectionFailure(void * context, const chip::ScopedNodeId & peerId, CHIP_ERROR error) +void MTRDeviceConnectionBridge::OnConnectionFailure(void * context, const chip::OperationalSessionSetup::ConnnectionFailureInfo & failureInfo) { + NSNumber * retryDelay; + if (failureInfo.requestedBusyDelay.HasValue()) { + retryDelay = @(static_cast(failureInfo.requestedBusyDelay.Value().count()) / MSEC_PER_SEC); + } auto * object = static_cast(context); - object->mCompletionHandler(nil, chip::NullOptional, [MTRError errorForCHIPErrorCode:error]); + object->mCompletionHandler(nil, chip::NullOptional, [MTRError errorForCHIPErrorCode:failureInfo.error], retryDelay); object->Release(); } diff --git a/src/darwin/Framework/CHIP/MTRDeviceController.mm b/src/darwin/Framework/CHIP/MTRDeviceController.mm index 961b6f87694536..28a70bd347caf8 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceController.mm @@ -1205,7 +1205,7 @@ - (void)getSessionForNode:(chip::NodeId)nodeID completion:(MTRInternalDeviceConn connectionBridge->connect(commissioner, nodeID); } errorHandler:^(NSError * error) { - completion(nullptr, chip::NullOptional, error); + completion(nullptr, chip::NullOptional, error, nil); }]; } @@ -1216,20 +1216,20 @@ - (void)getSessionForCommissioneeDevice:(chip::NodeId)deviceID completion:(MTRIn chip::CommissioneeDeviceProxy * deviceProxy; CHIP_ERROR err = commissioner->GetDeviceBeingCommissioned(deviceID, &deviceProxy); if (err != CHIP_NO_ERROR) { - completion(nullptr, chip::NullOptional, [MTRError errorForCHIPErrorCode:err]); + completion(nullptr, chip::NullOptional, [MTRError errorForCHIPErrorCode:err], nil); return; } chip::Optional session = deviceProxy->GetSecureSession(); if (!session.HasValue() || !session.Value()->AsSecureSession()->IsPASESession()) { - completion(nullptr, chip::NullOptional, [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]); + completion(nullptr, chip::NullOptional, [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE], nil); return; } - completion(deviceProxy->GetExchangeManager(), session, nil); + completion(deviceProxy->GetExchangeManager(), session, nil, nil); } errorHandler:^(NSError * error) { - completion(nullptr, chip::NullOptional, error); + completion(nullptr, chip::NullOptional, error, nil); }]; } @@ -1609,7 +1609,7 @@ - (BOOL)getBaseDevice:(uint64_t)deviceID queue:(dispatch_queue_t)queue completio // that we are running. [self getSessionForNode:deviceID completion:^(chip::Messaging::ExchangeManager * _Nullable exchangeManager, - const chip::Optional & session, NSError * _Nullable error) { + const chip::Optional & session, NSError * _Nullable error, NSNumber * _Nullable retryDelay) { // Create an MTRBaseDevice for the node id involved, now that our // CASE session is primed. We don't actually care about the session // information here. From 5236e27d4a925dbc5fa8d6e822fb5e93bcd28d64 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Wed, 10 Apr 2024 14:50:03 -0400 Subject: [PATCH 022/468] Optimize out no-op writes in attribute-table. (#31162) * Optimize out no-op writes in attribute-table. This way we don't mark things dirty if they have not changed. Does best-effort optimizing out of string values that are unchanged, only for strings that we know can fit into our fixed-size buffer. Fixes https://github.com/project-chip/connectedhomeip/issues/29136 * Address review comments. * Fix things so going from null to empty string is considered a change. --- .github/workflows/tests.yaml | 4 +- scripts/tests/chiptest/__init__.py | 1 + ...rposefulFailureExtraReportingOnToggle.yaml | 58 + src/app/util/af-types.h | 12 + src/app/util/attribute-table-detail.h | 34 - src/app/util/attribute-table.cpp | 145 +- src/app/util/attribute-table.h | 12 + .../app/attributes/Accessors-src.zapt | 46 +- .../templates/app/attributes/Accessors.zapt | 6 + .../python/test/test_scripts/base.py | 9 +- .../zap-generated/attributes/Accessors.cpp | 15814 ++++++++++++++++ .../zap-generated/attributes/Accessors.h | 1538 ++ 12 files changed, 17623 insertions(+), 56 deletions(-) create mode 100644 src/app/tests/suites/TestPurposefulFailureExtraReportingOnToggle.yaml diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index ea38e5e6e1dcb8..281ac5c76a2ab1 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -249,7 +249,7 @@ jobs: --chip-tool ./out/linux-x64-chip-tool${CHIP_TOOL_VARIANT}-${BUILD_VARIANT}/chip-tool \ run \ --iterations 1 \ - --expected-failures 2 \ + --expected-failures 3 \ --keep-going \ --test-timeout-seconds 120 \ --all-clusters-app ./out/linux-x64-all-clusters-${BUILD_VARIANT}/chip-all-clusters-app \ @@ -400,7 +400,7 @@ jobs: --chip-tool ./out/darwin-x64-chip-tool${CHIP_TOOL_VARIANT}-${BUILD_VARIANT}/chip-tool \ run \ --iterations 1 \ - --expected-failures 2 \ + --expected-failures 3 \ --keep-going \ --test-timeout-seconds 120 \ --all-clusters-app ./out/darwin-x64-all-clusters-${BUILD_VARIANT}/chip-all-clusters-app \ diff --git a/scripts/tests/chiptest/__init__.py b/scripts/tests/chiptest/__init__.py index 83408d3ec54816..623017e2e2dd97 100644 --- a/scripts/tests/chiptest/__init__.py +++ b/scripts/tests/chiptest/__init__.py @@ -277,6 +277,7 @@ def _GetPurposefulFailureTests() -> Set[str]: """Tests that fail in YAML on purpose.""" return { "TestPurposefulFailureEqualities.yaml", + "TestPurposefulFailureExtraReportingOnToggle.yaml", "TestPurposefulFailureNotNullConstraint.yaml", } diff --git a/src/app/tests/suites/TestPurposefulFailureExtraReportingOnToggle.yaml b/src/app/tests/suites/TestPurposefulFailureExtraReportingOnToggle.yaml new file mode 100644 index 00000000000000..46345752aace08 --- /dev/null +++ b/src/app/tests/suites/TestPurposefulFailureExtraReportingOnToggle.yaml @@ -0,0 +1,58 @@ +# Copyright (c) 2024 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. + +name: + Test that "passes" if turning on On/Off cluster reports Level Control things + +config: + nodeId: 0x12344321 + cluster: "On/Off" + endpoint: 1 + # We expect our test to time out, so set a timeout that's not too long, but + # long enough that if the server does report the attribute change we will + # almost certianly see it. + timeout: 5 + +tests: + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: "Turn off the light" + command: "Off" + + - label: "Subscribe LevelControl RemainingTime Attribute" + command: "subscribeAttribute" + cluster: "LevelControl" + attribute: "RemainingTime" + minInterval: 0 + maxInterval: 5 + response: + value: 0 + + - label: "Turn on the light to see attribute change, if any" + command: "On" + + - label: "Check for attribute report" + command: "waitForReport" + cluster: "LevelControl" + attribute: "RemainingTime" + # This test should fail, since there should be no reporting for an + # attribute that did not actually change. + response: + value: 0 diff --git a/src/app/util/af-types.h b/src/app/util/af-types.h index 0c343185f70576..ffffdfb129de13 100644 --- a/src/app/util/af-types.h +++ b/src/app/util/af-types.h @@ -297,3 +297,15 @@ typedef chip::Protocols::InteractionModel::Status (*EmberAfClusterPreAttributeCh #define MAX_INT16U_VALUE (0xFFFF) /** @} END addtogroup */ + +namespace chip { +namespace app { + +enum class MarkAttributeDirty +{ + kIfChanged, + kNo, +}; + +} // namespace app +} // namespace chip diff --git a/src/app/util/attribute-table-detail.h b/src/app/util/attribute-table-detail.h index d60c2821a105de..d755f9cd23cbac 100644 --- a/src/app/util/attribute-table-detail.h +++ b/src/app/util/attribute-table-detail.h @@ -30,37 +30,3 @@ chip::Protocols::InteractionModel::Status emAfWriteAttributeExternal(chip::EndpointId endpoint, chip::ClusterId cluster, chip::AttributeId attributeID, uint8_t * dataPtr, EmberAfAttributeType dataType); - -/** - * @brief write an attribute, performing all the checks. - * - * This function will attempt to write the attribute value from - * the provided pointer. This function will only check that the - * attribute exists. If it does it will write the value into - * the attribute table for the given attribute. - * - * This function will not check to see if the attribute is - * writable since the read only / writable characteristic - * of an attribute only pertains to external devices writing - * over the air. Because this function is being called locally - * it assumes that the device knows what it is doing and has permission - * to perform the given operation. - * - * if true is passed in for overrideReadOnlyAndDataType then the data type is - * not checked and the read-only flag is ignored. This mode is meant for - * testing or setting the initial value of the attribute on the device. - * - * this returns: - * - Status::UnsupportedEndpoint: if endpoint isn't supported by the device. - * - Status::UnsupportedCluster: if cluster isn't supported on the endpoint. - * - Status::UnsupportedAttribute: if attribute isn't supported in the cluster. - * - Status::InvalidDataType: if the data type passed in doesnt match the type - * stored in the attribute table - * - Status::UnsupportedWrite: if the attribute isnt writable - * - Status::ConstraintError: if the value is set out of the allowable range for - * the attribute - * - Status::Success: if the attribute was found and successfully written - */ -chip::Protocols::InteractionModel::Status emAfWriteAttribute(chip::EndpointId endpoint, chip::ClusterId cluster, - chip::AttributeId attributeID, uint8_t * data, - EmberAfAttributeType dataType, bool overrideReadOnlyAndDataType); diff --git a/src/app/util/attribute-table.cpp b/src/app/util/attribute-table.cpp index 0f5b33c476679b..57b5f43d35071f 100644 --- a/src/app/util/attribute-table.cpp +++ b/src/app/util/attribute-table.cpp @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -37,9 +38,9 @@ using chip::Protocols::InteractionModel::Status; using namespace chip; +using namespace chip::app; namespace { - // Zigbee spec says types between signed 8 bit and signed 64 bit bool emberAfIsTypeSigned(EmberAfAttributeType dataType) { @@ -134,18 +135,58 @@ int8_t emberAfCompareValues(const uint8_t * val1, const uint8_t * val2, uint16_t return 0; } -} // namespace +/** + * @brief write an attribute, performing all the checks. + * + * This function will attempt to write the attribute value from + * the provided pointer. This function will only check that the + * attribute exists. If it does it will write the value into + * the attribute table for the given attribute. + * + * This function will not check to see if the attribute is + * writable since the read only / writable characteristic + * of an attribute only pertains to external devices writing + * over the air. Because this function is being called locally + * it assumes that the device knows what it is doing and has permission + * to perform the given operation. + * + * if true is passed in for overrideReadOnlyAndDataType then the data type is + * not checked and the read-only flag is ignored. This mode is meant for + * testing or setting the initial value of the attribute on the device. + * + * this returns: + * - Status::UnsupportedEndpoint: if endpoint isn't supported by the device. + * - Status::UnsupportedCluster: if cluster isn't supported on the endpoint. + * - Status::UnsupportedAttribute: if attribute isn't supported in the cluster. + * - Status::InvalidDataType: if the data type passed in doesnt match the type + * stored in the attribute table + * - Status::UnsupportedWrite: if the attribute isnt writable + * - Status::ConstraintError: if the value is set out of the allowable range for + * the attribute + * - Status::Success: if the attribute was found and successfully written + */ +Status emAfWriteAttribute(EndpointId endpoint, ClusterId cluster, AttributeId attributeID, uint8_t * data, + EmberAfAttributeType dataType, bool overrideReadOnlyAndDataType, MarkAttributeDirty markDirty); +} // anonymous namespace Status emAfWriteAttributeExternal(EndpointId endpoint, ClusterId cluster, AttributeId attributeID, uint8_t * dataPtr, EmberAfAttributeType dataType) { - return emAfWriteAttribute(endpoint, cluster, attributeID, dataPtr, dataType, false /* override read-only */); + return emAfWriteAttribute(endpoint, cluster, attributeID, dataPtr, dataType, false /* override read-only */, + MarkAttributeDirty::kIfChanged); } Status emberAfWriteAttribute(EndpointId endpoint, ClusterId cluster, AttributeId attributeID, uint8_t * dataPtr, EmberAfAttributeType dataType) { - return emAfWriteAttribute(endpoint, cluster, attributeID, dataPtr, dataType, true /* override read-only */); + return emAfWriteAttribute(endpoint, cluster, attributeID, dataPtr, dataType, true /* override read-only */, + MarkAttributeDirty::kIfChanged); +} + +Status emberAfWriteAttribute(EndpointId endpoint, ClusterId cluster, AttributeId attributeID, uint8_t * dataPtr, + EmberAfAttributeType dataType, MarkAttributeDirty markDirty) +{ + return emAfWriteAttribute(endpoint, cluster, attributeID, dataPtr, dataType, true /* override read-only */, markDirty); } //------------------------------------------------------------------------------ @@ -207,8 +248,78 @@ static bool IsNullValue(const uint8_t * data, uint16_t dataLen, bool isAttribute return false; } +namespace { + +/** + * Helper function to determine whether the attribute value for the given + * attribute is changing. On success, the isChanging outparam will be set to + * whether the value is changing. + */ +Status AttributeValueIsChanging(EndpointId endpoint, ClusterId cluster, AttributeId attributeID, + const EmberAfAttributeMetadata * metadata, uint8_t * newValueData, bool * isChanging) +{ + EmberAfAttributeType attributeType = metadata->attributeType; + + // We don't know how to size our buffer for strings in general, but if the + // string happens to fit into our fixed-size buffer, great. + size_t valueSize = metadata->size; + constexpr size_t kMaxValueSize = 16; // ipv6adr + if (valueSize > kMaxValueSize) + { + if (emberAfIsStringAttributeType(attributeType) || emberAfIsLongStringAttributeType(attributeType)) + { + // It's a string that may not fit in our buffer. Just claim it's + // changing, since we have no way to tell. + *isChanging = true; + return Status::Success; + } + + // Very much unexpected + ChipLogError(Zcl, "Attribute type %d has too-large size %u", attributeType, static_cast(valueSize)); + return Status::ConstraintError; + } + + uint8_t oldValueBuffer[kMaxValueSize]; + // Cast to uint16_t is safe, because we checked valueSize <= kMaxValueSize above. + if (emberAfReadAttribute(endpoint, cluster, attributeID, oldValueBuffer, static_cast(valueSize)) != Status::Success) + { + // We failed to read the old value, so flag the value as changing to be safe. + *isChanging = true; + return Status::Success; + } + + if (emberAfIsStringAttributeType(attributeType)) + { + size_t oldLength = emberAfStringLength(oldValueBuffer); + size_t newLength = emberAfStringLength(newValueData); + // The first byte of the buffer is the string length, and + // oldLength/newLength refer to the number of bytes after that. We want + // to include that first byte in our comparison, because null and empty + // string have different values there but both return 0 from + // emberAfStringLength. + *isChanging = (oldLength != newLength) || (memcmp(oldValueBuffer, newValueData, oldLength + 1) != 0); + } + else if (emberAfIsLongStringAttributeType(attributeType)) + { + size_t oldLength = emberAfLongStringLength(oldValueBuffer); + size_t newLength = emberAfLongStringLength(newValueData); + // The first two bytes of the buffer are the string length, and + // oldLength/newLength refer to the number of bytes after that. We want + // to include those first two bytes in our comparison, because null and + // empty string have different values there but both return 0 from + // emberAfLongStringLength. + *isChanging = (oldLength != newLength) || (memcmp(oldValueBuffer, newValueData, oldLength + 2) != 0); + } + else + { + *isChanging = (memcmp(newValueData, oldValueBuffer, valueSize) != 0); + } + + return Status::Success; +} + Status emAfWriteAttribute(EndpointId endpoint, ClusterId cluster, AttributeId attributeID, uint8_t * data, - EmberAfAttributeType dataType, bool overrideReadOnlyAndDataType) + EmberAfAttributeType dataType, bool overrideReadOnlyAndDataType, MarkAttributeDirty markDirty) { const EmberAfAttributeMetadata * metadata = nullptr; EmberAfAttributeSearchRecord record; @@ -286,12 +397,25 @@ Status emAfWriteAttribute(EndpointId endpoint, ClusterId cluster, AttributeId at } } + // Check whether anything is actually changing, before we do any work here. + bool valueChanging; + Status imStatus = AttributeValueIsChanging(endpoint, cluster, attributeID, metadata, data, &valueChanging); + if (imStatus != Status::Success) + { + return imStatus; + } + + if (!valueChanging) + { + // Just do nothing. + return Status::Success; + } + const app::ConcreteAttributePath attributePath(endpoint, cluster, attributeID); // Pre write attribute callback for all attribute changes, // regardless of cluster. - Protocols::InteractionModel::Status imStatus = - MatterPreAttributeChangeCallback(attributePath, dataType, emberAfAttributeSize(metadata), data); + imStatus = MatterPreAttributeChangeCallback(attributePath, dataType, emberAfAttributeSize(metadata), data); if (imStatus != Protocols::InteractionModel::Status::Success) { return imStatus; @@ -328,7 +452,10 @@ Status emAfWriteAttribute(EndpointId endpoint, ClusterId cluster, AttributeId at // The callee will weed out attributes that do not need to be stored. emAfSaveAttributeToStorageIfNeeded(data, endpoint, cluster, metadata); - MatterReportingAttributeChangeCallback(endpoint, cluster, attributeID); + if (markDirty != MarkAttributeDirty::kNo) + { + MatterReportingAttributeChangeCallback(endpoint, cluster, attributeID); + } // Post write attribute callback for all attributes changes, regardless // of cluster. @@ -341,6 +468,8 @@ Status emAfWriteAttribute(EndpointId endpoint, ClusterId cluster, AttributeId at return Status::Success; } +} // anonymous namespace + Status emberAfReadAttribute(EndpointId endpoint, ClusterId cluster, AttributeId attributeID, uint8_t * dataPtr, uint16_t readLength) { const EmberAfAttributeMetadata * metadata = nullptr; diff --git a/src/app/util/attribute-table.h b/src/app/util/attribute-table.h index 16825dd04b84cf..0527e855d4350d 100644 --- a/src/app/util/attribute-table.h +++ b/src/app/util/attribute-table.h @@ -17,6 +17,7 @@ #pragma once +#include #include #include #include @@ -44,6 +45,17 @@ chip::Protocols::InteractionModel::Status emberAfWriteAttribute(chip::EndpointId chip::AttributeId attributeID, uint8_t * dataPtr, EmberAfAttributeType dataType); +/** + * A version of emberAfWriteAttribute that allows controlling when the attribute + * should be marked dirty. This is an overload, not an optional argument, to + * reduce codesize at all the callsites that want to write without doing + * anything special to control the dirty marking. + */ +chip::Protocols::InteractionModel::Status emberAfWriteAttribute(chip::EndpointId endpoint, chip::ClusterId cluster, + chip::AttributeId attributeID, uint8_t * dataPtr, + EmberAfAttributeType dataType, + chip::app::MarkAttributeDirty markDirty); + /** * @brief Read the attribute value, performing all the checks. * diff --git a/src/app/zap-templates/templates/app/attributes/Accessors-src.zapt b/src/app/zap-templates/templates/app/attributes/Accessors-src.zapt index ca8b77d70de4c3..4a2ca16e49d960 100644 --- a/src/app/zap-templates/templates/app/attributes/Accessors-src.zapt +++ b/src/app/zap-templates/templates/app/attributes/Accessors-src.zapt @@ -93,8 +93,9 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, {{accessorGet return status; {{/if}} } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, {{zapTypeToEncodableClusterObjectType type ns=parent.name forceNotNullable=true forceNotOptional=true}} value) -{ + +{{! Has a passMarkDirty boolean argument that controls which overload of emberAfWriteAttribute we call }} +{{#*inline "setBody"}} {{~#if (isString type)}} {{~#*inline "lengthType"}}uint{{#if (isShortString type)}}8{{else}}16{{/if}}_t{{/inline}} static_assert({{maxLength}} < NumericAttributeTraits<{{>lengthType}}>::kNullValue, @@ -108,7 +109,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, {{zapTypeToEn Encoding::LittleEndian::Put16(zclString, length); {{/if}} memcpy(&zclString[{{>sizingBytes}}], value.data(), value.size()); - return emberAfWriteAttribute(endpoint, {{>clusterId}}, Id, zclString, ZCL_{{typeAsDelimitedMacro type}}_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, {{>clusterId}}, Id, zclString, ZCL_{{typeAsDelimitedMacro type}}_ATTRIBUTE_TYPE{{#if passMarkDirty}}, markDirty{{/if}}); {{else}} using Traits = NumericAttributeTraits<{{accessorTraitType type}}>; if (!Traits::CanRepresentValue(/* isNullable = */ {{isNullable}}, value)) @@ -118,23 +119,52 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, {{zapTypeToEn Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, {{>clusterId}}, Id, writable, ZCL_{{typeAsDelimitedMacro type}}_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, {{>clusterId}}, Id, writable, ZCL_{{typeAsDelimitedMacro type}}_ATTRIBUTE_TYPE{{#if passMarkDirty}}, markDirty{{/if}}); {{/if}} +{{/inline}} + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, {{zapTypeToEncodableClusterObjectType type ns=parent.name forceNotNullable=true forceNotOptional=true}} value, MarkAttributeDirty markDirty) +{ + {{> setBody passMarkDirty=true}} } -{{#if isNullable}} -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, {{zapTypeToEncodableClusterObjectType type ns=parent.name forceNotNullable=true forceNotOptional=true}} value) { + {{> setBody passMarkDirty=false}} +} + +{{#if isNullable}} +{{! Has a passMarkDirty boolean argument that controls which overload of emberAfWriteAttribute we call }} +{{#*inline "setNullBody"}} {{#if (isString type)}} uint8_t zclString[{{>sizingBytes}}] = { {{#if (isShortString type)}}0xFF{{else}}0xFF, 0xFF{{/if}} }; - return emberAfWriteAttribute(endpoint, {{>clusterId}}, Id, zclString, ZCL_{{typeAsDelimitedMacro type}}_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, {{>clusterId}}, Id, zclString, ZCL_{{typeAsDelimitedMacro type}}_ATTRIBUTE_TYPE{{#if passMarkDirty}}, markDirty{{/if}}); {{else}} using Traits = NumericAttributeTraits<{{accessorTraitType type}}>; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, {{>clusterId}}, Id, writable, ZCL_{{typeAsDelimitedMacro type}}_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, {{>clusterId}}, Id, writable, ZCL_{{typeAsDelimitedMacro type}}_ATTRIBUTE_TYPE{{#if passMarkDirty}}, markDirty{{/if}}); {{/if}} +{{/inline}} + +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + {{> setNullBody passMarkDirty=true}} +} + +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +{ + {{> setNullBody passMarkDirty=false}} +} + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, {{zapTypeToEncodableClusterObjectType type ns=parent.name isArgument=true forceNotOptional=true}} value, MarkAttributeDirty markDirty) +{ + if (value.IsNull()) { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); } Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, {{zapTypeToEncodableClusterObjectType type ns=parent.name isArgument=true forceNotOptional=true}} value) diff --git a/src/app/zap-templates/templates/app/attributes/Accessors.zapt b/src/app/zap-templates/templates/app/attributes/Accessors.zapt index be70fb092983ec..fd8c4fad3dc87a 100644 --- a/src/app/zap-templates/templates/app/attributes/Accessors.zapt +++ b/src/app/zap-templates/templates/app/attributes/Accessors.zapt @@ -16,6 +16,7 @@ namespace chip { namespace app { + namespace Clusters { {{#zcl_clusters}} @@ -28,10 +29,15 @@ namespace Attributes { {{#unless (isStrEqual storagePolicy "attributeAccessInterface")}} namespace {{asUpperCamelCase label}} { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, {{accessorGetterType this}} value); // {{type}} +{{! NOTE: Adding an optional arg instead of an overload can break API + consumers that are using the function type (e.g. in templates). }} Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, {{zapTypeToEncodableClusterObjectType type ns=parent.name forceNotNullable=true forceNotOptional=true}} value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, {{zapTypeToEncodableClusterObjectType type ns=parent.name forceNotNullable=true forceNotOptional=true}} value, MarkAttributeDirty markDirty); {{#if isNullable}} Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, {{zapTypeToEncodableClusterObjectType type ns=parent.name isArgument=true forceNotOptional=true}} value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, {{zapTypeToEncodableClusterObjectType type ns=parent.name isArgument=true forceNotOptional=true}} value, MarkAttributeDirty markDirty); {{/if}} } // namespace {{asUpperCamelCase label}} diff --git a/src/controller/python/test/test_scripts/base.py b/src/controller/python/test/test_scripts/base.py index ed091858d289a8..6d4017a5b70ed8 100644 --- a/src/controller/python/test/test_scripts/base.py +++ b/src/controller/python/test/test_scripts/base.py @@ -749,9 +749,9 @@ def OnValueChange(path: Attribute.TypedAttributePath, transaction: Attribute.Sub # # Now write the attribute from fabric2, give it some time before checking if the report - # was received. + # was received. Use a different value from before, so there is an actual change. # - await self.devCtrl2.WriteAttribute(nodeid, [(1, Clusters.UnitTesting.Attributes.Int8u(4))]) + await self.devCtrl2.WriteAttribute(nodeid, [(1, Clusters.UnitTesting.Attributes.Int8u(5))]) time.sleep(2) sub.Shutdown() @@ -761,7 +761,8 @@ def OnValueChange(path: Attribute.TypedAttributePath, transaction: Attribute.Sub return False # - # Do the same test again, but reversing the roles of fabric1 and fabric2. + # Do the same test again, but reversing the roles of fabric1 and fabric2. And again + # writing a different value, so there is an actual value change. # self.logger.info("Testing fabric-isolated CASE eviction (reverse)") @@ -773,7 +774,7 @@ def OnValueChange(path: Attribute.TypedAttributePath, transaction: Attribute.Sub self.devCtrl.CloseSession(nodeid) await self.devCtrl.ReadAttribute(nodeid, [(Clusters.BasicInformation.Attributes.ClusterRevision)]) - await self.devCtrl.WriteAttribute(nodeid, [(1, Clusters.UnitTesting.Attributes.Int8u(4))]) + await self.devCtrl.WriteAttribute(nodeid, [(1, Clusters.UnitTesting.Attributes.Int8u(6))]) time.sleep(2) sub.Shutdown() 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 ba32e7c0f9fd01..78c93070ca6d03 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 @@ -56,6 +56,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Identify::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -87,6 +101,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Cl *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Identify::IdentifyTypeEnum value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Identify::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Identify::IdentifyTypeEnum value) { using Traits = NumericAttributeTraits; @@ -118,6 +147,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Identify::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -149,6 +192,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Identify::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -187,6 +244,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status +Set(chip::EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Groups::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value) { @@ -219,6 +291,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Groups::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -250,6 +336,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Groups::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -287,6 +387,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::OnOff::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) { using Traits = NumericAttributeTraits; @@ -318,6 +432,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::OnOff::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) { using Traits = NumericAttributeTraits; @@ -349,6 +477,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::OnOff::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -380,6 +522,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::OnOff::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -415,6 +571,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::OnOff::StartUpOnOffEnum value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::OnOff::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::OnOff::StartUpOnOffEnum value) { using Traits = NumericAttributeTraits; @@ -428,6 +599,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl return emberAfWriteAttribute(endpoint, Clusters::OnOff::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::OnOff::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -437,6 +617,18 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::OnOff::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { @@ -466,6 +658,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::OnOff::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -497,6 +703,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::OnOff::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -535,6 +755,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::OnOffSwitchConfiguration::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -567,6 +802,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::OnOffSwitchConfiguration::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -599,6 +849,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::OnOffSwitchConfiguration::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -631,6 +896,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::OnOffSwitchConfiguration::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -672,6 +952,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -685,6 +979,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -694,6 +997,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -723,6 +1037,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -755,6 +1083,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -787,6 +1129,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -819,6 +1175,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -851,6 +1221,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -883,6 +1267,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -916,6 +1314,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status +Set(chip::EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value) { @@ -949,6 +1362,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -984,6 +1411,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -997,6 +1438,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -1006,6 +1456,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -1038,6 +1499,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -1051,6 +1526,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu return emberAfWriteAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -1060,6 +1544,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -1092,6 +1587,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -1105,6 +1614,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu return emberAfWriteAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -1114,6 +1632,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -1146,6 +1675,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -1159,6 +1702,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -1168,6 +1720,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -1200,6 +1763,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -1213,6 +1790,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -1222,6 +1808,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -1251,6 +1848,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -1283,6 +1894,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -1323,8 +1948,23 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Mutable value.reduce_size(length); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) +{ + + static_assert(16 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 16, Protocols::InteractionModel::Status::ConstraintError); + uint8_t zclString[16 + 1]; + auto length = static_cast(value.size()); + Encoding::Put8(zclString, length); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteAttribute(endpoint, Clusters::BinaryInputBasic::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value) { + static_assert(16 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); VerifyOrReturnError(value.size() <= 16, Protocols::InteractionModel::Status::ConstraintError); uint8_t zclString[16 + 1]; @@ -1355,8 +1995,23 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Mutable value.reduce_size(length); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) +{ + + static_assert(16 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 16, Protocols::InteractionModel::Status::ConstraintError); + uint8_t zclString[16 + 1]; + auto length = static_cast(value.size()); + Encoding::Put8(zclString, length); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteAttribute(endpoint, Clusters::BinaryInputBasic::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value) { + static_assert(16 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); VerifyOrReturnError(value.size() <= 16, Protocols::InteractionModel::Status::ConstraintError); uint8_t zclString[16 + 1]; @@ -1387,8 +2042,23 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Mutable value.reduce_size(length); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) +{ + + static_assert(16 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 16, Protocols::InteractionModel::Status::ConstraintError); + uint8_t zclString[16 + 1]; + auto length = static_cast(value.size()); + Encoding::Put8(zclString, length); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteAttribute(endpoint, Clusters::BinaryInputBasic::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value) { + static_assert(16 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); VerifyOrReturnError(value.size() <= 16, Protocols::InteractionModel::Status::ConstraintError); uint8_t zclString[16 + 1]; @@ -1417,6 +2087,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::BinaryInputBasic::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) { using Traits = NumericAttributeTraits; @@ -1449,6 +2133,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::BinaryInputBasic::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -1481,6 +2179,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::BinaryInputBasic::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) { using Traits = NumericAttributeTraits; @@ -1513,6 +2225,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::BinaryInputBasic::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -1545,6 +2271,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::BinaryInputBasic::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -1577,6 +2317,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::BinaryInputBasic::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -1609,6 +2363,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::BinaryInputBasic::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -1641,6 +2409,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::BinaryInputBasic::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -1679,6 +2461,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::PulseWidthModulation::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -1711,6 +2508,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::PulseWidthModulation::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -1752,6 +2563,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Binding::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -1783,6 +2608,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Binding::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -1821,6 +2660,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::AccessControl::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -1861,8 +2714,22 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Mutable value.reduce_size(length); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) +{ + + static_assert(512 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 512, Protocols::InteractionModel::Status::ConstraintError); + uint8_t zclString[512 + 2]; + auto length = static_cast(value.size()); + Encoding::LittleEndian::Put16(zclString, length); + memcpy(&zclString[2], value.data(), value.size()); + return emberAfWriteAttribute(endpoint, Clusters::Actions::Id, Id, zclString, ZCL_LONG_CHAR_STRING_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value) { + static_assert(512 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); VerifyOrReturnError(value.size() <= 512, Protocols::InteractionModel::Status::ConstraintError); uint8_t zclString[512 + 2]; @@ -1890,6 +2757,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Actions::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -1921,6 +2802,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Actions::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -1961,8 +2856,23 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Mutable value.reduce_size(length); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) +{ + + static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 32, Protocols::InteractionModel::Status::ConstraintError); + uint8_t zclString[32 + 1]; + auto length = static_cast(value.size()); + Encoding::Put8(zclString, length); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteAttribute(endpoint, Clusters::BasicInformation::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value) { + static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); VerifyOrReturnError(value.size() <= 32, Protocols::InteractionModel::Status::ConstraintError); uint8_t zclString[32 + 1]; @@ -1991,6 +2901,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::BasicInformation::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) { using Traits = NumericAttributeTraits; @@ -2023,6 +2947,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::BasicInformation::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) { using Traits = NumericAttributeTraits; @@ -2055,6 +2993,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::BasicInformation::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -2087,6 +3039,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::BasicInformation::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -2125,6 +3091,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::OtaSoftwareUpdateProvider::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -2157,6 +3138,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::OtaSoftwareUpdateProvider::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -2195,6 +3191,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::OtaSoftwareUpdateRequestor::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) { using Traits = NumericAttributeTraits; @@ -2228,6 +3239,22 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status +Set(chip::EndpointId endpoint, chip::app::Clusters::OtaSoftwareUpdateRequestor::UpdateStateEnum value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::OtaSoftwareUpdateRequestor::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::OtaSoftwareUpdateRequestor::UpdateStateEnum value) { @@ -2264,6 +3291,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::OtaSoftwareUpdateRequestor::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -2277,6 +3319,16 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::OtaSoftwareUpdateRequestor::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::OtaSoftwareUpdateRequestor::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -2286,6 +3338,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::OtaSoftwareUpdateRequestor::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -2315,6 +3378,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::OtaSoftwareUpdateRequestor::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -2347,6 +3425,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::OtaSoftwareUpdateRequestor::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -2387,8 +3480,23 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Mutable value.reduce_size(length); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) +{ + + static_assert(35 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 35, Protocols::InteractionModel::Status::ConstraintError); + uint8_t zclString[35 + 1]; + auto length = static_cast(value.size()); + Encoding::Put8(zclString, length); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteAttribute(endpoint, Clusters::LocalizationConfiguration::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value) { + static_assert(35 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); VerifyOrReturnError(value.size() <= 35, Protocols::InteractionModel::Status::ConstraintError); uint8_t zclString[35 + 1]; @@ -2417,6 +3525,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::LocalizationConfiguration::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -2449,6 +3572,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::LocalizationConfiguration::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -2488,6 +3626,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status +Set(chip::EndpointId endpoint, chip::app::Clusters::TimeFormatLocalization::HourFormatEnum value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::TimeFormatLocalization::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::TimeFormatLocalization::HourFormatEnum value) { @@ -2522,6 +3675,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status +Set(chip::EndpointId endpoint, chip::app::Clusters::TimeFormatLocalization::CalendarTypeEnum value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::TimeFormatLocalization::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::TimeFormatLocalization::CalendarTypeEnum value) { @@ -2555,6 +3723,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::TimeFormatLocalization::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -2587,6 +3770,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::TimeFormatLocalization::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -2625,6 +3823,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Cl *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::UnitLocalization::TempUnitEnum value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::UnitLocalization::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::UnitLocalization::TempUnitEnum value) { using Traits = NumericAttributeTraits; @@ -2657,6 +3870,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::UnitLocalization::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -2689,6 +3916,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::UnitLocalization::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -2727,6 +3968,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::PowerSourceConfiguration::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -2759,6 +4015,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::PowerSourceConfiguration::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -2797,6 +4068,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Cl *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::PowerSourceStatusEnum value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::PowerSourceStatusEnum value) { using Traits = NumericAttributeTraits; @@ -2829,6 +4115,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -2863,8 +4163,22 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Mutable value.reduce_size(length); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) +{ + + static_assert(60 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 60, Protocols::InteractionModel::Status::ConstraintError); + uint8_t zclString[60 + 1]; + auto length = static_cast(value.size()); + Encoding::Put8(zclString, length); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value) { + static_assert(60 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); VerifyOrReturnError(value.size() <= 60, Protocols::InteractionModel::Status::ConstraintError); uint8_t zclString[60 + 1]; @@ -2896,6 +4210,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -2909,6 +4237,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -2918,6 +4255,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -2950,6 +4298,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -2963,6 +4325,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -2972,6 +4343,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -3001,6 +4383,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Cl *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::WiredCurrentTypeEnum value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::WiredCurrentTypeEnum value) { using Traits = NumericAttributeTraits; @@ -3036,6 +4433,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -3049,6 +4460,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -3058,6 +4478,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -3087,6 +4518,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -3119,6 +4564,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -3151,6 +4610,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) { using Traits = NumericAttributeTraits; @@ -3186,6 +4659,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -3199,6 +4686,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -3208,6 +4704,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -3240,6 +4747,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -3253,6 +4774,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -3262,6 +4792,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -3294,6 +4835,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -3307,6 +4862,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -3316,6 +4880,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -3345,6 +4920,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Cl *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::BatChargeLevelEnum value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::BatChargeLevelEnum value) { using Traits = NumericAttributeTraits; @@ -3377,6 +4967,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) { using Traits = NumericAttributeTraits; @@ -3409,6 +5013,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Cl *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::BatReplaceabilityEnum value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::BatReplaceabilityEnum value) { using Traits = NumericAttributeTraits; @@ -3441,6 +5060,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) { using Traits = NumericAttributeTraits; @@ -3475,8 +5108,22 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Mutable value.reduce_size(length); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) +{ + + static_assert(60 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 60, Protocols::InteractionModel::Status::ConstraintError); + uint8_t zclString[60 + 1]; + auto length = static_cast(value.size()); + Encoding::Put8(zclString, length); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value) { + static_assert(60 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); VerifyOrReturnError(value.size() <= 60, Protocols::InteractionModel::Status::ConstraintError); uint8_t zclString[60 + 1]; @@ -3506,6 +5153,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::BatCommonDesignationEnum value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_ENUM16_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::BatCommonDesignationEnum value) { using Traits = NumericAttributeTraits; @@ -3540,8 +5202,22 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Mutable value.reduce_size(length); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) +{ + + static_assert(20 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 20, Protocols::InteractionModel::Status::ConstraintError); + uint8_t zclString[20 + 1]; + auto length = static_cast(value.size()); + Encoding::Put8(zclString, length); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value) { + static_assert(20 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); VerifyOrReturnError(value.size() <= 20, Protocols::InteractionModel::Status::ConstraintError); uint8_t zclString[20 + 1]; @@ -3572,8 +5248,22 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Mutable value.reduce_size(length); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) +{ + + static_assert(20 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 20, Protocols::InteractionModel::Status::ConstraintError); + uint8_t zclString[20 + 1]; + auto length = static_cast(value.size()); + Encoding::Put8(zclString, length); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value) { + static_assert(20 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); VerifyOrReturnError(value.size() <= 20, Protocols::InteractionModel::Status::ConstraintError); uint8_t zclString[20 + 1]; @@ -3603,6 +5293,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::BatApprovedChemistryEnum value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_ENUM16_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::BatApprovedChemistryEnum value) { using Traits = NumericAttributeTraits; @@ -3635,6 +5340,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -3667,6 +5386,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -3699,6 +5432,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Cl *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::BatChargeStateEnum value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::BatChargeStateEnum value) { using Traits = NumericAttributeTraits; @@ -3734,6 +5482,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -3747,6 +5509,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -3756,6 +5527,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -3785,6 +5567,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) { using Traits = NumericAttributeTraits; @@ -3820,6 +5616,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -3833,6 +5643,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -3842,6 +5661,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -3871,6 +5701,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -3903,6 +5747,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -3941,6 +5799,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint64_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::GeneralCommissioning::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value) { using Traits = NumericAttributeTraits; @@ -3973,6 +5845,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::GeneralCommissioning::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -4005,6 +5892,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::GeneralCommissioning::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -4043,6 +5944,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::NetworkCommissioning::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -4075,6 +5990,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::NetworkCommissioning::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -4107,6 +6036,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::NetworkCommissioning::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -4139,6 +6082,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::NetworkCommissioning::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) { using Traits = NumericAttributeTraits; @@ -4176,6 +6133,22 @@ Get(chip::EndpointId endpoint, } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::app::Clusters::NetworkCommissioning::NetworkCommissioningStatusEnum value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::NetworkCommissioning::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::NetworkCommissioning::NetworkCommissioningStatusEnum value) { @@ -4190,6 +6163,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, return emberAfWriteAttribute(endpoint, Clusters::NetworkCommissioning::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::NetworkCommissioning::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -4199,6 +6181,19 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::NetworkCommissioning::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status +Set(chip::EndpointId endpoint, + const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) @@ -4240,8 +6235,23 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu span.reduce_size(length); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpan value, MarkAttributeDirty markDirty) +{ + + static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 32, Protocols::InteractionModel::Status::ConstraintError); + uint8_t zclString[32 + 1]; + auto length = static_cast(value.size()); + Encoding::Put8(zclString, length); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteAttribute(endpoint, Clusters::NetworkCommissioning::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpan value) { + static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); VerifyOrReturnError(value.size() <= 32, Protocols::InteractionModel::Status::ConstraintError); uint8_t zclString[32 + 1]; @@ -4251,12 +6261,30 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpa return emberAfWriteAttribute(endpoint, Clusters::NetworkCommissioning::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + uint8_t zclString[1] = { 0xFF }; + return emberAfWriteAttribute(endpoint, Clusters::NetworkCommissioning::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { uint8_t zclString[1] = { 0xFF }; return emberAfWriteAttribute(endpoint, Clusters::NetworkCommissioning::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -4289,6 +6317,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::NetworkCommissioning::Id, Id, writable, ZCL_INT32S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int32_t value) { using Traits = NumericAttributeTraits; @@ -4302,6 +6344,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int32_t value return emberAfWriteAttribute(endpoint, Clusters::NetworkCommissioning::Id, Id, writable, ZCL_INT32S_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::NetworkCommissioning::Id, Id, writable, ZCL_INT32S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -4311,6 +6362,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::NetworkCommissioning::Id, Id, writable, ZCL_INT32S_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -4341,6 +6403,23 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::BitMask value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::NetworkCommissioning::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value) { @@ -4374,6 +6453,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::NetworkCommissioning::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -4406,6 +6499,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::NetworkCommissioning::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -4438,6 +6546,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::NetworkCommissioning::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -4476,6 +6598,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DiagnosticLogs::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -4508,6 +6644,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DiagnosticLogs::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -4546,6 +6696,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::GeneralDiagnostics::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) { using Traits = NumericAttributeTraits; @@ -4584,6 +6748,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::SoftwareDiagnostics::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -4622,6 +6800,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -4654,6 +6847,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -4692,6 +6900,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -4724,6 +6947,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -4762,6 +7000,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::EthernetNetworkDiagnostics::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -4794,6 +7047,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::EthernetNetworkDiagnostics::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -4832,6 +7100,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Cl *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::TimeSynchronization::TimeSourceEnum value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::TimeSynchronization::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::TimeSynchronization::TimeSourceEnum value) { using Traits = NumericAttributeTraits; @@ -4865,6 +7148,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status +Set(chip::EndpointId endpoint, chip::app::Clusters::TimeSynchronization::TimeZoneDatabaseEnum value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::TimeSynchronization::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::TimeSynchronization::TimeZoneDatabaseEnum value) { @@ -4898,6 +7196,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::TimeSynchronization::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) { using Traits = NumericAttributeTraits; @@ -4930,6 +7242,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::TimeSynchronization::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) { using Traits = NumericAttributeTraits; @@ -4962,6 +7288,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::TimeSynchronization::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -4994,6 +7334,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::TimeSynchronization::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -5034,8 +7388,23 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Mutable value.reduce_size(length); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) +{ + + static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 32, Protocols::InteractionModel::Status::ConstraintError); + uint8_t zclString[32 + 1]; + auto length = static_cast(value.size()); + Encoding::Put8(zclString, length); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteAttribute(endpoint, Clusters::BridgedDeviceBasicInformation::Id, Id, zclString, + ZCL_CHAR_STRING_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value) { + static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); VerifyOrReturnError(value.size() <= 32, Protocols::InteractionModel::Status::ConstraintError); uint8_t zclString[32 + 1]; @@ -5065,6 +7434,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::VendorI *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::VendorId value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::BridgedDeviceBasicInformation::Id, Id, writable, ZCL_VENDOR_ID_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::VendorId value) { using Traits = NumericAttributeTraits; @@ -5099,8 +7483,23 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Mutable value.reduce_size(length); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) +{ + + static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 32, Protocols::InteractionModel::Status::ConstraintError); + uint8_t zclString[32 + 1]; + auto length = static_cast(value.size()); + Encoding::Put8(zclString, length); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteAttribute(endpoint, Clusters::BridgedDeviceBasicInformation::Id, Id, zclString, + ZCL_CHAR_STRING_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value) { + static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); VerifyOrReturnError(value.size() <= 32, Protocols::InteractionModel::Status::ConstraintError); uint8_t zclString[32 + 1]; @@ -5132,8 +7531,23 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Mutable value.reduce_size(length); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) +{ + + static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 32, Protocols::InteractionModel::Status::ConstraintError); + uint8_t zclString[32 + 1]; + auto length = static_cast(value.size()); + Encoding::Put8(zclString, length); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteAttribute(endpoint, Clusters::BridgedDeviceBasicInformation::Id, Id, zclString, + ZCL_CHAR_STRING_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value) { + static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); VerifyOrReturnError(value.size() <= 32, Protocols::InteractionModel::Status::ConstraintError); uint8_t zclString[32 + 1]; @@ -5163,6 +7577,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::BridgedDeviceBasicInformation::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -5197,8 +7626,23 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Mutable value.reduce_size(length); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) +{ + + static_assert(64 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 64, Protocols::InteractionModel::Status::ConstraintError); + uint8_t zclString[64 + 1]; + auto length = static_cast(value.size()); + Encoding::Put8(zclString, length); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteAttribute(endpoint, Clusters::BridgedDeviceBasicInformation::Id, Id, zclString, + ZCL_CHAR_STRING_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value) { + static_assert(64 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); VerifyOrReturnError(value.size() <= 64, Protocols::InteractionModel::Status::ConstraintError); uint8_t zclString[64 + 1]; @@ -5228,6 +7672,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::BridgedDeviceBasicInformation::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -5262,8 +7721,23 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Mutable value.reduce_size(length); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) +{ + + static_assert(64 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 64, Protocols::InteractionModel::Status::ConstraintError); + uint8_t zclString[64 + 1]; + auto length = static_cast(value.size()); + Encoding::Put8(zclString, length); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteAttribute(endpoint, Clusters::BridgedDeviceBasicInformation::Id, Id, zclString, + ZCL_CHAR_STRING_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value) { + static_assert(64 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); VerifyOrReturnError(value.size() <= 64, Protocols::InteractionModel::Status::ConstraintError); uint8_t zclString[64 + 1]; @@ -5295,8 +7769,23 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Mutable value.reduce_size(length); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) +{ + + static_assert(16 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 16, Protocols::InteractionModel::Status::ConstraintError); + uint8_t zclString[16 + 1]; + auto length = static_cast(value.size()); + Encoding::Put8(zclString, length); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteAttribute(endpoint, Clusters::BridgedDeviceBasicInformation::Id, Id, zclString, + ZCL_CHAR_STRING_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value) { + static_assert(16 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); VerifyOrReturnError(value.size() <= 16, Protocols::InteractionModel::Status::ConstraintError); uint8_t zclString[16 + 1]; @@ -5328,8 +7817,23 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Mutable value.reduce_size(length); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) +{ + + static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 32, Protocols::InteractionModel::Status::ConstraintError); + uint8_t zclString[32 + 1]; + auto length = static_cast(value.size()); + Encoding::Put8(zclString, length); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteAttribute(endpoint, Clusters::BridgedDeviceBasicInformation::Id, Id, zclString, + ZCL_CHAR_STRING_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value) { + static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); VerifyOrReturnError(value.size() <= 32, Protocols::InteractionModel::Status::ConstraintError); uint8_t zclString[32 + 1]; @@ -5361,8 +7865,23 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Mutable value.reduce_size(length); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) +{ + + static_assert(256 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 256, Protocols::InteractionModel::Status::ConstraintError); + uint8_t zclString[256 + 2]; + auto length = static_cast(value.size()); + Encoding::LittleEndian::Put16(zclString, length); + memcpy(&zclString[2], value.data(), value.size()); + return emberAfWriteAttribute(endpoint, Clusters::BridgedDeviceBasicInformation::Id, Id, zclString, + ZCL_LONG_CHAR_STRING_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value) { + static_assert(256 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); VerifyOrReturnError(value.size() <= 256, Protocols::InteractionModel::Status::ConstraintError); uint8_t zclString[256 + 2]; @@ -5394,8 +7913,23 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Mutable value.reduce_size(length); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) +{ + + static_assert(64 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 64, Protocols::InteractionModel::Status::ConstraintError); + uint8_t zclString[64 + 1]; + auto length = static_cast(value.size()); + Encoding::Put8(zclString, length); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteAttribute(endpoint, Clusters::BridgedDeviceBasicInformation::Id, Id, zclString, + ZCL_CHAR_STRING_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value) { + static_assert(64 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); VerifyOrReturnError(value.size() <= 64, Protocols::InteractionModel::Status::ConstraintError); uint8_t zclString[64 + 1]; @@ -5427,8 +7961,23 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Mutable value.reduce_size(length); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) +{ + + static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 32, Protocols::InteractionModel::Status::ConstraintError); + uint8_t zclString[32 + 1]; + auto length = static_cast(value.size()); + Encoding::Put8(zclString, length); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteAttribute(endpoint, Clusters::BridgedDeviceBasicInformation::Id, Id, zclString, + ZCL_CHAR_STRING_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value) { + static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); VerifyOrReturnError(value.size() <= 32, Protocols::InteractionModel::Status::ConstraintError); uint8_t zclString[32 + 1]; @@ -5458,6 +8007,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::BridgedDeviceBasicInformation::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) { using Traits = NumericAttributeTraits; @@ -5492,8 +8056,23 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Mutable value.reduce_size(length); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) +{ + + static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 32, Protocols::InteractionModel::Status::ConstraintError); + uint8_t zclString[32 + 1]; + auto length = static_cast(value.size()); + Encoding::Put8(zclString, length); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteAttribute(endpoint, Clusters::BridgedDeviceBasicInformation::Id, Id, zclString, + ZCL_CHAR_STRING_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value) { + static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); VerifyOrReturnError(value.size() <= 32, Protocols::InteractionModel::Status::ConstraintError); uint8_t zclString[32 + 1]; @@ -5523,6 +8102,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::BridgedDeviceBasicInformation::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -5555,6 +8149,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::BridgedDeviceBasicInformation::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -5592,6 +8201,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Switch::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -5623,6 +8246,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Switch::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -5654,6 +8291,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Switch::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -5685,6 +8336,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Switch::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -5716,6 +8381,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Switch::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -5754,6 +8433,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::AdministratorCommissioning::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -5786,6 +8480,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::AdministratorCommissioning::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -5824,6 +8533,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::OperationalCredentials::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -5856,6 +8580,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::OperationalCredentials::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -5898,6 +8637,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::FixedLabel::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -5930,6 +8683,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::FixedLabel::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -5968,6 +8735,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::UserLabel::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -6000,6 +8781,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::UserLabel::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -6038,6 +8833,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ProxyConfiguration::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -6070,6 +8879,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ProxyConfiguration::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -6108,6 +8931,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ProxyDiscovery::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -6140,6 +8977,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ProxyDiscovery::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -6178,6 +9029,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ProxyValid::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -6210,6 +9075,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ProxyValid::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -6248,6 +9127,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::BooleanState::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) { using Traits = NumericAttributeTraits; @@ -6280,6 +9173,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::BooleanState::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -6312,6 +9219,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::BooleanState::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -6351,6 +9272,22 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::BitMask value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::IcdManagement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value) { @@ -6386,8 +9323,22 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Mutable value.reduce_size(length); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) +{ + + static_assert(128 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 128, Protocols::InteractionModel::Status::ConstraintError); + uint8_t zclString[128 + 1]; + auto length = static_cast(value.size()); + Encoding::Put8(zclString, length); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteAttribute(endpoint, Clusters::IcdManagement::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value) { + static_assert(128 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); VerifyOrReturnError(value.size() <= 128, Protocols::InteractionModel::Status::ConstraintError); uint8_t zclString[128 + 1]; @@ -6416,6 +9367,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Cl *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::IcdManagement::OperatingModeEnum value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::IcdManagement::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::IcdManagement::OperatingModeEnum value) { using Traits = NumericAttributeTraits; @@ -6448,6 +9414,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::IcdManagement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -6480,6 +9460,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::IcdManagement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -6517,6 +9511,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Timer::Id, Id, writable, ZCL_ELAPSED_S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -6548,6 +9556,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Timer::Id, Id, writable, ZCL_ELAPSED_S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -6579,6 +9601,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Cl *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Timer::TimerStatusEnum value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Timer::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Timer::TimerStatusEnum value) { using Traits = NumericAttributeTraits; @@ -6610,6 +9647,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Timer::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -6641,6 +9692,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Timer::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -6679,6 +9744,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::OvenCavityOperationalState::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -6711,6 +9791,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::OvenCavityOperationalState::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -6748,6 +9843,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::OvenMode::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -6782,6 +9891,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::OvenMode::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -6795,6 +9918,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::OvenMode::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::OvenMode::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -6804,6 +9936,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::OvenMode::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -6835,6 +9978,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::OvenMode::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -6848,6 +10005,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::OvenMode::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::OvenMode::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -6857,6 +10023,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::OvenMode::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -6885,6 +10062,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::OvenMode::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -6916,6 +10107,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::OvenMode::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -6958,6 +10163,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, } return status; } + +Protocols::InteractionModel::Status +Set(chip::EndpointId endpoint, chip::app::Clusters::LaundryDryerControls::DrynessLevelEnum value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::LaundryDryerControls::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::LaundryDryerControls::DrynessLevelEnum value) { @@ -6972,6 +10192,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, return emberAfWriteAttribute(endpoint, Clusters::LaundryDryerControls::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::LaundryDryerControls::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -6981,6 +10210,19 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::LaundryDryerControls::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status +Set(chip::EndpointId endpoint, + const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) @@ -7012,6 +10254,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::LaundryDryerControls::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -7044,6 +10301,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::LaundryDryerControls::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -7084,8 +10355,22 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Mutable value.reduce_size(length); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) +{ + + static_assert(64 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 64, Protocols::InteractionModel::Status::ConstraintError); + uint8_t zclString[64 + 1]; + auto length = static_cast(value.size()); + Encoding::Put8(zclString, length); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteAttribute(endpoint, Clusters::ModeSelect::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value) { + static_assert(64 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); VerifyOrReturnError(value.size() <= 64, Protocols::InteractionModel::Status::ConstraintError); uint8_t zclString[64 + 1]; @@ -7117,6 +10402,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ModeSelect::Id, Id, writable, ZCL_ENUM16_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -7130,6 +10429,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu return emberAfWriteAttribute(endpoint, Clusters::ModeSelect::Id, Id, writable, ZCL_ENUM16_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::ModeSelect::Id, Id, writable, ZCL_ENUM16_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -7139,6 +10447,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::ModeSelect::Id, Id, writable, ZCL_ENUM16_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -7168,6 +10487,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ModeSelect::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -7203,6 +10536,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ModeSelect::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -7216,6 +10563,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::ModeSelect::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::ModeSelect::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -7225,6 +10581,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::ModeSelect::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -7257,6 +10624,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ModeSelect::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -7270,6 +10651,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::ModeSelect::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::ModeSelect::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -7279,6 +10669,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::ModeSelect::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -7308,6 +10709,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ModeSelect::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -7340,6 +10755,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ModeSelect::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -7378,6 +10807,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::LaundryWasherMode::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -7416,6 +10859,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id, Id, writable, + ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -7458,6 +10916,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::LaundryWasherControls::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -7471,6 +10943,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::LaundryWasherControls::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::LaundryWasherControls::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -7480,6 +10961,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::LaundryWasherControls::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -7510,6 +11002,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status +Set(chip::EndpointId endpoint, chip::app::Clusters::LaundryWasherControls::NumberOfRinsesEnum value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::LaundryWasherControls::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::LaundryWasherControls::NumberOfRinsesEnum value) { @@ -7543,6 +11050,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::LaundryWasherControls::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -7575,6 +11097,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::LaundryWasherControls::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -7613,6 +11149,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::RvcRunMode::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -7651,6 +11201,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::RvcCleanMode::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -7689,6 +11253,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::TemperatureControl::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -7721,6 +11300,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::TemperatureControl::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -7753,6 +11347,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::TemperatureControl::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -7785,6 +11394,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::TemperatureControl::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -7817,6 +11441,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::TemperatureControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -7849,6 +11487,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::TemperatureControl::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -7881,6 +11533,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::TemperatureControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -7920,6 +11586,22 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::BitMask value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::RefrigeratorAlarm::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value) { @@ -7954,6 +11636,22 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::BitMask value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::RefrigeratorAlarm::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value) { @@ -7988,6 +11686,22 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::BitMask value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::RefrigeratorAlarm::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value) { @@ -8021,6 +11735,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::RefrigeratorAlarm::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -8053,6 +11781,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::RefrigeratorAlarm::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -8091,6 +11833,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DishwasherMode::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -8129,6 +11885,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::AirQuality::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -8167,6 +11937,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Cl *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::SmokeCoAlarm::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum value) { using Traits = NumericAttributeTraits; @@ -8199,6 +11984,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Cl *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::SmokeCoAlarm::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value) { using Traits = NumericAttributeTraits; @@ -8231,6 +12031,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Cl *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::SmokeCoAlarm::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value) { using Traits = NumericAttributeTraits; @@ -8263,6 +12078,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Cl *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::SmokeCoAlarm::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value) { using Traits = NumericAttributeTraits; @@ -8295,6 +12125,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Cl *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::MuteStateEnum value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::SmokeCoAlarm::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::MuteStateEnum value) { using Traits = NumericAttributeTraits; @@ -8327,6 +12172,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::SmokeCoAlarm::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) { using Traits = NumericAttributeTraits; @@ -8359,6 +12218,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::SmokeCoAlarm::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) { using Traits = NumericAttributeTraits; @@ -8391,6 +12264,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Cl *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::EndOfServiceEnum value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::SmokeCoAlarm::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::EndOfServiceEnum value) { using Traits = NumericAttributeTraits; @@ -8423,6 +12311,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Cl *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::SmokeCoAlarm::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value) { using Traits = NumericAttributeTraits; @@ -8455,6 +12358,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Cl *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::SmokeCoAlarm::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value) { using Traits = NumericAttributeTraits; @@ -8488,6 +12406,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::ContaminationStateEnum value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::SmokeCoAlarm::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::ContaminationStateEnum value) { using Traits = NumericAttributeTraits; @@ -8520,6 +12453,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Cl *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::SensitivityEnum value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::SmokeCoAlarm::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::SensitivityEnum value) { using Traits = NumericAttributeTraits; @@ -8552,6 +12500,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::SmokeCoAlarm::Id, Id, writable, ZCL_EPOCH_S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -8584,6 +12546,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::SmokeCoAlarm::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -8616,6 +12592,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::SmokeCoAlarm::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -8655,6 +12645,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status +Set(chip::EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DishwasherAlarm::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value) { @@ -8689,6 +12694,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status +Set(chip::EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DishwasherAlarm::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value) { @@ -8723,6 +12743,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status +Set(chip::EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DishwasherAlarm::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value) { @@ -8757,6 +12792,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status +Set(chip::EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DishwasherAlarm::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value) { @@ -8790,6 +12840,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DishwasherAlarm::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -8822,6 +12886,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DishwasherAlarm::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -8860,6 +12938,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::MicrowaveOvenMode::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -8898,6 +12990,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::MicrowaveOvenControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -8936,6 +13042,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::OperationalState::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -8968,6 +13088,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::OperationalState::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -9006,6 +13140,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::RvcOperationalState::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -9038,6 +13186,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::RvcOperationalState::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -9079,6 +13241,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::NodeId value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ScenesManagement::Id, Id, writable, ZCL_NODE_ID_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::NodeId value) { using Traits = NumericAttributeTraits; @@ -9092,6 +13268,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::NodeId return emberAfWriteAttribute(endpoint, Clusters::ScenesManagement::Id, Id, writable, ZCL_NODE_ID_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::ScenesManagement::Id, Id, writable, ZCL_NODE_ID_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -9101,6 +13286,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::ScenesManagement::Id, Id, writable, ZCL_NODE_ID_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -9130,6 +13326,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ScenesManagement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -9162,6 +13372,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ScenesManagement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -9194,6 +13418,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ScenesManagement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -9232,6 +13470,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::HepaFilterMonitoring::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -9270,6 +13522,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ActivatedCarbonFilterMonitoring::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -9308,6 +13575,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::BooleanStateConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -9340,6 +13622,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::BooleanStateConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -9373,6 +13670,23 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::BitMask value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::BooleanStateConfiguration::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value) { @@ -9407,6 +13721,23 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::BitMask value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::BooleanStateConfiguration::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value) { @@ -9441,6 +13772,23 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::BitMask value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::BooleanStateConfiguration::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value) { @@ -9475,6 +13823,23 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::BitMask value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::BooleanStateConfiguration::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value) { @@ -9509,6 +13874,23 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::BitMask value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::BooleanStateConfiguration::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value) { @@ -9542,6 +13924,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::BooleanStateConfiguration::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -9574,6 +13971,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::BooleanStateConfiguration::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -9615,6 +14027,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_ELAPSED_S_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -9628,6 +14055,16 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_ELAPSED_S_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_ELAPSED_S_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -9637,6 +14074,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_ELAPSED_S_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -9669,6 +14117,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_ELAPSED_S_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -9682,6 +14145,16 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_ELAPSED_S_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_ELAPSED_S_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -9691,6 +14164,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_ELAPSED_S_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -9723,6 +14207,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_EPOCH_US_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value) { using Traits = NumericAttributeTraits; @@ -9736,6 +14235,16 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t valu return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_EPOCH_US_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_EPOCH_US_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -9745,6 +14254,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_EPOCH_US_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -9778,6 +14298,23 @@ Get(chip::EndpointId endpoint, DataModel::Nullable; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::ValveConfigurationAndControl::ValveStateEnum value) { @@ -9792,6 +14329,16 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -9801,6 +14348,19 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status +Set(chip::EndpointId endpoint, + const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) @@ -9836,6 +14396,23 @@ Get(chip::EndpointId endpoint, DataModel::Nullable; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::ValveConfigurationAndControl::ValveStateEnum value) { @@ -9850,6 +14427,16 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -9859,6 +14446,19 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status +Set(chip::EndpointId endpoint, + const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) @@ -9893,6 +14493,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_PERCENT_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent value) { using Traits = NumericAttributeTraits; @@ -9906,6 +14521,16 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_PERCENT_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_PERCENT_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -9915,6 +14540,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_PERCENT_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -9947,6 +14583,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_PERCENT_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent value) { using Traits = NumericAttributeTraits; @@ -9960,6 +14611,16 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_PERCENT_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_PERCENT_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -9969,6 +14630,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_PERCENT_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -9998,6 +14670,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Percent *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_PERCENT_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent value) { using Traits = NumericAttributeTraits; @@ -10031,6 +14718,23 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::BitMask value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value) { @@ -10064,6 +14768,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -10096,6 +14815,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -10128,6 +14862,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -10166,6 +14915,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalPowerMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -10204,6 +14968,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalEnergyMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -10242,6 +15021,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DemandResponseLoadControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -10274,6 +15068,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DemandResponseLoadControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -10306,6 +15115,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DemandResponseLoadControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -10338,6 +15162,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DemandResponseLoadControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -10370,6 +15209,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DemandResponseLoadControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -10402,6 +15256,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DemandResponseLoadControl::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -10434,6 +15303,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DemandResponseLoadControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -10471,6 +15355,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Messages::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -10502,6 +15400,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Messages::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -10540,6 +15452,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DeviceEnergyManagement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -10578,6 +15505,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::EnergyEvse::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -10616,6 +15557,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::EnergyPreference::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -10648,6 +15603,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::EnergyPreference::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -10680,6 +15649,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::EnergyPreference::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -10712,6 +15695,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::EnergyPreference::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -10750,6 +15747,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::PowerTopology::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -10791,6 +15802,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::EnergyEvseMode::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -10804,6 +15829,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::EnergyEvseMode::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::EnergyEvseMode::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -10813,6 +15847,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::EnergyEvseMode::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -10845,6 +15890,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::EnergyEvseMode::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -10858,6 +15917,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::EnergyEvseMode::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::EnergyEvseMode::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -10867,6 +15935,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::EnergyEvseMode::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -10896,6 +15975,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::EnergyEvseMode::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -10937,6 +16030,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DeviceEnergyManagementMode::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -10950,6 +16058,16 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::DeviceEnergyManagementMode::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::DeviceEnergyManagementMode::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -10959,6 +16077,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::DeviceEnergyManagementMode::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -10991,6 +16120,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DeviceEnergyManagementMode::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -11004,6 +16148,16 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::DeviceEnergyManagementMode::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::DeviceEnergyManagementMode::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -11013,6 +16167,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::DeviceEnergyManagementMode::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -11042,6 +16207,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DeviceEnergyManagementMode::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -11083,6 +16263,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::DoorLock::DlLockState value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::DoorLock::DlLockState value) { using Traits = NumericAttributeTraits; @@ -11096,6 +16291,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -11105,6 +16309,18 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { @@ -11134,6 +16350,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Cl *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::DoorLock::DlLockType value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::DoorLock::DlLockType value) { using Traits = NumericAttributeTraits; @@ -11165,6 +16396,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) { using Traits = NumericAttributeTraits; @@ -11200,6 +16445,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::DoorLock::DoorStateEnum value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::DoorLock::DoorStateEnum value) { using Traits = NumericAttributeTraits; @@ -11213,6 +16473,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -11222,6 +16491,18 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { @@ -11251,6 +16532,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -11282,6 +16577,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -11313,6 +16622,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -11344,6 +16667,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -11375,6 +16712,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -11406,6 +16757,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -11437,6 +16802,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -11468,6 +16847,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -11499,6 +16892,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -11530,6 +16937,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -11561,6 +16982,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -11592,6 +17027,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -11623,6 +17072,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -11655,6 +17118,22 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::BitMask value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value) { @@ -11687,6 +17166,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -11721,8 +17214,22 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Mutable value.reduce_size(length); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) +{ + + static_assert(3 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 3, Protocols::InteractionModel::Status::ConstraintError); + uint8_t zclString[3 + 1]; + auto length = static_cast(value.size()); + Encoding::Put8(zclString, length); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value) { + static_assert(3 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); VerifyOrReturnError(value.size() <= 3, Protocols::InteractionModel::Status::ConstraintError); uint8_t zclString[3 + 1]; @@ -11750,6 +17257,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -11781,6 +17302,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -11812,6 +17347,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -11843,6 +17392,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Cl *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::DoorLock::OperatingModeEnum value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::DoorLock::OperatingModeEnum value) { using Traits = NumericAttributeTraits; @@ -11875,6 +17439,22 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::BitMask value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value) { @@ -11908,6 +17488,22 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::BitMask value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value) { @@ -11940,6 +17536,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) { using Traits = NumericAttributeTraits; @@ -11971,6 +17581,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) { using Traits = NumericAttributeTraits; @@ -12002,6 +17626,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) { using Traits = NumericAttributeTraits; @@ -12033,6 +17671,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) { using Traits = NumericAttributeTraits; @@ -12065,6 +17717,22 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::BitMask value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value) { @@ -12097,6 +17765,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -12128,6 +17810,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -12159,6 +17855,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) { using Traits = NumericAttributeTraits; @@ -12190,6 +17900,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) { using Traits = NumericAttributeTraits; @@ -12221,6 +17945,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -12263,8 +18001,22 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu span.reduce_size(length); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpan value, MarkAttributeDirty markDirty) +{ + + static_assert(65 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 65, Protocols::InteractionModel::Status::ConstraintError); + uint8_t zclString[65 + 1]; + auto length = static_cast(value.size()); + Encoding::Put8(zclString, length); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpan value) { + static_assert(65 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); VerifyOrReturnError(value.size() <= 65, Protocols::InteractionModel::Status::ConstraintError); uint8_t zclString[65 + 1]; @@ -12274,12 +18026,29 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpa return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + uint8_t zclString[1] = { 0xFF }; + return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { uint8_t zclString[1] = { 0xFF }; return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -12319,8 +18088,22 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu span.reduce_size(length); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpan value, MarkAttributeDirty markDirty) +{ + + static_assert(16 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 16, Protocols::InteractionModel::Status::ConstraintError); + uint8_t zclString[16 + 1]; + auto length = static_cast(value.size()); + Encoding::Put8(zclString, length); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpan value) { + static_assert(16 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); VerifyOrReturnError(value.size() <= 16, Protocols::InteractionModel::Status::ConstraintError); uint8_t zclString[16 + 1]; @@ -12330,12 +18113,29 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpa return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + uint8_t zclString[1] = { 0xFF }; + return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { uint8_t zclString[1] = { 0xFF }; return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -12367,8 +18167,22 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Mutable value.reduce_size(length); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpan value, MarkAttributeDirty markDirty) +{ + + static_assert(16 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 16, Protocols::InteractionModel::Status::ConstraintError); + uint8_t zclString[16 + 1]; + auto length = static_cast(value.size()); + Encoding::Put8(zclString, length); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpan value) { + static_assert(16 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); VerifyOrReturnError(value.size() <= 16, Protocols::InteractionModel::Status::ConstraintError); uint8_t zclString[16 + 1]; @@ -12407,8 +18221,22 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu span.reduce_size(length); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpan value, MarkAttributeDirty markDirty) +{ + + static_assert(16 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 16, Protocols::InteractionModel::Status::ConstraintError); + uint8_t zclString[16 + 1]; + auto length = static_cast(value.size()); + Encoding::Put8(zclString, length); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpan value) { + static_assert(16 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); VerifyOrReturnError(value.size() <= 16, Protocols::InteractionModel::Status::ConstraintError); uint8_t zclString[16 + 1]; @@ -12418,12 +18246,29 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpa return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + uint8_t zclString[1] = { 0xFF }; + return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { uint8_t zclString[1] = { 0xFF }; return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -12452,6 +18297,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -12483,6 +18342,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -12514,6 +18387,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -12545,6 +18432,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -12576,6 +18477,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -12614,6 +18529,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Cl *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::WindowCovering::Type value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::WindowCovering::Type value) { using Traits = NumericAttributeTraits; @@ -12646,6 +18576,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -12678,6 +18622,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -12713,6 +18671,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -12726,6 +18698,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -12735,6 +18716,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -12767,6 +18759,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -12780,6 +18786,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -12789,6 +18804,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -12818,6 +18844,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -12850,6 +18890,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -12883,6 +18937,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status +Set(chip::EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value) { @@ -12919,6 +18988,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_PERCENT_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent value) { using Traits = NumericAttributeTraits; @@ -12932,6 +19015,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_PERCENT_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_PERCENT_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -12941,6 +19033,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_PERCENT_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -12973,6 +19076,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_PERCENT_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent value) { using Traits = NumericAttributeTraits; @@ -12986,6 +19103,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_PERCENT_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_PERCENT_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -12995,6 +19121,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_PERCENT_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -13025,6 +19162,22 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::BitMask value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value) { @@ -13061,6 +19214,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent100ths value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_PERCENT100THS_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent100ths value) { using Traits = NumericAttributeTraits; @@ -13074,6 +19241,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_PERCENT100THS_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_PERCENT100THS_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -13083,6 +19259,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_PERCENT100THS_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status +Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { @@ -13116,6 +19303,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent100ths value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_PERCENT100THS_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent100ths value) { using Traits = NumericAttributeTraits; @@ -13129,6 +19330,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_PERCENT100THS_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_PERCENT100THS_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -13138,6 +19348,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_PERCENT100THS_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status +Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { @@ -13168,6 +19389,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Cl *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::WindowCovering::EndProductType value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::WindowCovering::EndProductType value) { using Traits = NumericAttributeTraits; @@ -13203,6 +19439,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent100ths value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_PERCENT100THS_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent100ths value) { using Traits = NumericAttributeTraits; @@ -13216,6 +19466,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_PERCENT100THS_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_PERCENT100THS_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -13225,6 +19484,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_PERCENT100THS_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status +Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { @@ -13258,6 +19528,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent100ths value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_PERCENT100THS_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent100ths value) { using Traits = NumericAttributeTraits; @@ -13271,6 +19555,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_PERCENT100THS_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_PERCENT100THS_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -13280,6 +19573,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_PERCENT100THS_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status +Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { @@ -13310,6 +19614,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -13342,6 +19660,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -13374,6 +19706,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -13406,6 +19752,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -13438,6 +19798,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::BitMask *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value) { using Traits = NumericAttributeTraits>; @@ -13471,6 +19846,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status +Set(chip::EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value) { @@ -13504,6 +19894,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -13536,6 +19940,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -13574,6 +19992,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::BarrierControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -13606,6 +20038,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::BarrierControl::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -13638,6 +20084,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::BarrierControl::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -13670,6 +20130,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::BarrierControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -13702,6 +20176,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::BarrierControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -13734,6 +20222,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::BarrierControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -13766,6 +20268,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::BarrierControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -13798,6 +20314,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::BarrierControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -13830,6 +20360,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::BarrierControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -13862,6 +20406,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::BarrierControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -13894,6 +20452,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::BarrierControl::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -13926,6 +20498,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::BarrierControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -13967,6 +20553,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -13980,6 +20581,16 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -13989,6 +20600,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -14021,6 +20643,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -14034,6 +20671,16 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -14043,6 +20690,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -14075,6 +20733,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -14088,6 +20761,16 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -14097,6 +20780,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -14129,6 +20823,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -14142,6 +20851,16 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -14151,6 +20870,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -14183,6 +20913,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -14196,6 +20941,16 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -14205,6 +20960,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -14237,6 +21003,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -14250,6 +21031,16 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -14259,6 +21050,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -14291,6 +21093,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -14304,6 +21121,16 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -14313,6 +21140,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -14345,6 +21183,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -14358,6 +21211,16 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -14367,6 +21230,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -14399,6 +21273,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -14412,6 +21301,16 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -14421,6 +21320,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -14453,6 +21363,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -14466,6 +21391,16 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -14475,6 +21410,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -14507,6 +21453,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -14520,6 +21481,16 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -14529,6 +21500,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -14561,6 +21543,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -14574,6 +21571,16 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -14583,6 +21590,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -14615,6 +21633,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -14628,6 +21661,16 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -14637,6 +21680,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -14667,6 +21721,23 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::BitMask value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value) { @@ -14701,6 +21772,23 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::app::Clusters::PumpConfigurationAndControl::OperationModeEnum value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::PumpConfigurationAndControl::OperationModeEnum value) { @@ -14735,6 +21823,23 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::app::Clusters::PumpConfigurationAndControl::ControlModeEnum value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::PumpConfigurationAndControl::ControlModeEnum value) { @@ -14771,6 +21876,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -14784,6 +21904,16 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -14793,6 +21923,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -14825,6 +21966,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -14838,6 +21994,16 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -14847,6 +22013,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -14879,6 +22056,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT24U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits>; @@ -14892,6 +22084,16 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT24U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT24U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits>; @@ -14901,6 +22103,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT24U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -14933,6 +22146,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT24U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits>; @@ -14946,6 +22174,16 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT24U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT24U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits>; @@ -14955,6 +22193,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT24U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -14987,6 +22236,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -15000,6 +22264,16 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -15009,6 +22283,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -15039,6 +22324,23 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::app::Clusters::PumpConfigurationAndControl::OperationModeEnum value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::PumpConfigurationAndControl::OperationModeEnum value) { @@ -15073,6 +22375,23 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::app::Clusters::PumpConfigurationAndControl::ControlModeEnum value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::PumpConfigurationAndControl::ControlModeEnum value) { @@ -15106,6 +22425,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -15138,6 +22472,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -15179,6 +22528,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -15192,6 +22555,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -15201,6 +22573,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -15233,6 +22616,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -15246,6 +22643,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -15255,6 +22661,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -15284,6 +22701,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -15316,6 +22747,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -15348,6 +22793,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -15380,6 +22839,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -15412,6 +22885,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -15444,6 +22931,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -15476,6 +22977,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -15508,6 +23023,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -15540,6 +23069,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int8_t * valu *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value) { using Traits = NumericAttributeTraits; @@ -15572,6 +23115,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -15604,6 +23161,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -15636,6 +23207,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -15668,6 +23253,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -15700,6 +23299,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -15732,6 +23345,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -15764,6 +23391,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -15796,6 +23437,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -15828,6 +23483,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int8_t * valu *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value) { using Traits = NumericAttributeTraits; @@ -15861,6 +23530,22 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::BitMask value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value) { @@ -15895,6 +23580,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status +Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ControlSequenceOfOperationEnum value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ControlSequenceOfOperationEnum value) { @@ -15928,6 +23628,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Cl *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::SystemModeEnum value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::SystemModeEnum value) { using Traits = NumericAttributeTraits; @@ -15961,6 +23676,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ThermostatRunningModeEnum value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ThermostatRunningModeEnum value) { using Traits = NumericAttributeTraits; @@ -15993,6 +23723,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Cl *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::StartOfWeekEnum value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::StartOfWeekEnum value) { using Traits = NumericAttributeTraits; @@ -16025,6 +23770,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -16057,6 +23816,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -16090,6 +23863,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status +Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::TemperatureSetpointHoldEnum value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::TemperatureSetpointHoldEnum value) { @@ -16126,6 +23914,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -16139,6 +23941,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -16148,6 +23959,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -16178,6 +24000,22 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::BitMask value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value) { @@ -16212,6 +24050,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status +Set(chip::EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value) { @@ -16246,6 +24099,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::SetpointChangeSourceEnum value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::SetpointChangeSourceEnum value) { using Traits = NumericAttributeTraits; @@ -16281,6 +24149,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -16294,6 +24176,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -16303,6 +24194,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -16332,6 +24234,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_EPOCH_S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -16367,6 +24283,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -16380,6 +24310,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -16389,6 +24328,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -16421,6 +24371,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -16434,6 +24398,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -16443,6 +24416,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -16475,6 +24459,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -16488,6 +24486,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -16497,6 +24504,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -16529,6 +24547,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -16542,6 +24574,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -16551,6 +24592,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -16583,6 +24635,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -16596,6 +24662,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -16605,6 +24680,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -16637,6 +24723,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -16650,6 +24750,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -16659,6 +24768,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -16688,6 +24808,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -16720,6 +24854,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Cl *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACTypeEnum value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACTypeEnum value) { using Traits = NumericAttributeTraits; @@ -16752,6 +24901,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -16784,6 +24947,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Cl *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACRefrigerantTypeEnum value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACRefrigerantTypeEnum value) { using Traits = NumericAttributeTraits; @@ -16816,6 +24994,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Cl *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACCompressorTypeEnum value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACCompressorTypeEnum value) { using Traits = NumericAttributeTraits; @@ -16849,6 +25042,22 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::BitMask value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value) { @@ -16882,6 +25091,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Cl *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACLouverPositionEnum value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACLouverPositionEnum value) { using Traits = NumericAttributeTraits; @@ -16917,6 +25141,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -16930,6 +25168,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -16939,6 +25186,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -16968,6 +25226,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Cl *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACCapacityFormatEnum value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACCapacityFormatEnum value) { using Traits = NumericAttributeTraits; @@ -17000,6 +25273,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -17032,6 +25319,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -17064,6 +25365,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -17099,6 +25414,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -17112,6 +25441,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -17121,6 +25459,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -17160,8 +25509,22 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu span.reduce_size(length); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpan value, MarkAttributeDirty markDirty) +{ + + static_assert(16 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 16, Protocols::InteractionModel::Status::ConstraintError); + uint8_t zclString[16 + 1]; + auto length = static_cast(value.size()); + Encoding::Put8(zclString, length); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpan value) { + static_assert(16 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); VerifyOrReturnError(value.size() <= 16, Protocols::InteractionModel::Status::ConstraintError); uint8_t zclString[16 + 1]; @@ -17171,12 +25534,29 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpa return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + uint8_t zclString[1] = { 0xFF }; + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { uint8_t zclString[1] = { 0xFF }; return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -17216,8 +25596,22 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu span.reduce_size(length); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpan value, MarkAttributeDirty markDirty) +{ + + static_assert(16 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 16, Protocols::InteractionModel::Status::ConstraintError); + uint8_t zclString[16 + 1]; + auto length = static_cast(value.size()); + Encoding::Put8(zclString, length); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpan value) { + static_assert(16 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); VerifyOrReturnError(value.size() <= 16, Protocols::InteractionModel::Status::ConstraintError); uint8_t zclString[16 + 1]; @@ -17227,12 +25621,29 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpa return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + uint8_t zclString[1] = { 0xFF }; + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { uint8_t zclString[1] = { 0xFF }; return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -17262,6 +25673,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) { using Traits = NumericAttributeTraits; @@ -17295,6 +25720,22 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::BitMask value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value) { @@ -17331,6 +25772,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_EPOCH_S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -17344,6 +25799,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_EPOCH_S_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_EPOCH_S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -17353,6 +25817,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_EPOCH_S_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -17382,6 +25857,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -17414,6 +25903,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -17452,6 +25955,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Cl *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::FanControl::FanModeEnum value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::FanControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::FanControl::FanModeEnum value) { using Traits = NumericAttributeTraits; @@ -17484,6 +26002,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Cl *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::FanControl::FanModeSequenceEnum value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::FanControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::FanControl::FanModeSequenceEnum value) { using Traits = NumericAttributeTraits; @@ -17519,6 +26052,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::FanControl::Id, Id, writable, ZCL_PERCENT_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent value) { using Traits = NumericAttributeTraits; @@ -17532,6 +26079,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent return emberAfWriteAttribute(endpoint, Clusters::FanControl::Id, Id, writable, ZCL_PERCENT_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::FanControl::Id, Id, writable, ZCL_PERCENT_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -17541,6 +26097,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::FanControl::Id, Id, writable, ZCL_PERCENT_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -17570,6 +26137,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Percent *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::FanControl::Id, Id, writable, ZCL_PERCENT_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent value) { using Traits = NumericAttributeTraits; @@ -17602,6 +26183,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::FanControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -17637,6 +26232,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::FanControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -17650,6 +26259,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::FanControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::FanControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -17659,6 +26277,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::FanControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -17688,6 +26317,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::FanControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -17721,6 +26364,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::FanControl::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value) { using Traits = NumericAttributeTraits>; @@ -17754,6 +26412,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::FanControl::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value) { using Traits = NumericAttributeTraits>; @@ -17787,6 +26460,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::FanControl::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value) { using Traits = NumericAttributeTraits>; @@ -17820,6 +26508,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::FanControl::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value) { using Traits = NumericAttributeTraits>; @@ -17852,6 +26555,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Cl *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::FanControl::AirflowDirectionEnum value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::FanControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::FanControl::AirflowDirectionEnum value) { using Traits = NumericAttributeTraits; @@ -17884,6 +26602,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::FanControl::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -17916,6 +26648,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::FanControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -17955,6 +26701,23 @@ Get(chip::EndpointId endpoint, chip::app::Clusters::ThermostatUserInterfaceConfi *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::app::Clusters::ThermostatUserInterfaceConfiguration::TemperatureDisplayModeEnum value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ThermostatUserInterfaceConfiguration::Id, Id, writable, + ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::ThermostatUserInterfaceConfiguration::TemperatureDisplayModeEnum value) { @@ -17990,6 +26753,23 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::app::Clusters::ThermostatUserInterfaceConfiguration::KeypadLockoutEnum value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ThermostatUserInterfaceConfiguration::Id, Id, writable, + ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::ThermostatUserInterfaceConfiguration::KeypadLockoutEnum value) { @@ -18026,6 +26806,24 @@ Get(chip::EndpointId endpoint, chip::app::Clusters::ThermostatUserInterfaceConfi *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status +Set(chip::EndpointId endpoint, chip::app::Clusters::ThermostatUserInterfaceConfiguration::ScheduleProgrammingVisibilityEnum value, + MarkAttributeDirty markDirty) +{ + using Traits = + NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ThermostatUserInterfaceConfiguration::Id, Id, writable, + ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::ThermostatUserInterfaceConfiguration::ScheduleProgrammingVisibilityEnum value) { @@ -18061,6 +26859,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ThermostatUserInterfaceConfiguration::Id, Id, writable, + ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -18094,6 +26907,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ThermostatUserInterfaceConfiguration::Id, Id, writable, + ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -18133,6 +26961,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -18165,6 +27007,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -18197,6 +27053,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -18229,6 +27099,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -18261,6 +27145,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -18293,6 +27191,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -18327,8 +27239,22 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Mutable value.reduce_size(length); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) +{ + + static_assert(254 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 254, Protocols::InteractionModel::Status::ConstraintError); + uint8_t zclString[254 + 1]; + auto length = static_cast(value.size()); + Encoding::Put8(zclString, length); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value) { + static_assert(254 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); VerifyOrReturnError(value.size() <= 254, Protocols::InteractionModel::Status::ConstraintError); uint8_t zclString[254 + 1]; @@ -18357,6 +27283,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -18389,6 +27329,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -18421,6 +27375,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -18456,6 +27424,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -18469,6 +27451,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -18478,6 +27469,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -18507,6 +27509,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -18539,6 +27555,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -18574,6 +27604,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -18587,6 +27631,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -18596,6 +27649,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -18625,6 +27689,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -18657,6 +27735,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -18692,6 +27784,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -18705,6 +27811,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -18714,6 +27829,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -18743,6 +27869,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -18775,6 +27915,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -18810,6 +27964,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -18823,6 +27991,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -18832,6 +28009,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -18861,6 +28049,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -18893,6 +28095,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -18928,6 +28144,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -18941,6 +28171,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -18950,6 +28189,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -18979,6 +28229,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -19011,6 +28275,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -19046,6 +28324,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -19059,6 +28351,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -19068,6 +28369,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -19097,6 +28409,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -19129,6 +28455,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -19164,6 +28504,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -19177,6 +28531,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -19186,6 +28549,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -19215,6 +28589,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -19247,6 +28635,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -19279,6 +28681,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -19311,6 +28727,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -19346,6 +28776,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -19359,6 +28803,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -19368,6 +28821,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -19397,6 +28861,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -19429,6 +28907,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -19464,6 +28956,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -19477,6 +28983,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -19486,6 +29001,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -19515,6 +29041,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -19547,6 +29087,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -19582,6 +29136,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -19595,6 +29163,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -19604,6 +29181,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -19633,6 +29221,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -19665,6 +29267,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -19697,6 +29313,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -19729,6 +29359,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -19761,6 +29405,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -19793,6 +29451,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -19825,6 +29497,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -19857,6 +29543,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -19889,6 +29589,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -19921,6 +29635,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -19953,6 +29681,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -19988,6 +29730,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -20001,6 +29757,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -20010,6 +29775,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -20039,6 +29815,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -20071,6 +29861,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -20109,6 +29913,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -20141,6 +29959,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -20174,6 +30006,22 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::BitMask value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value) { @@ -20207,6 +30055,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -20239,6 +30101,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -20274,6 +30150,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -20287,6 +30177,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -20296,6 +30195,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -20328,6 +30238,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -20341,6 +30265,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -20350,6 +30283,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -20379,6 +30323,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -20413,8 +30371,23 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Mutable value.reduce_size(length); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) +{ + + static_assert(16 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 16, Protocols::InteractionModel::Status::ConstraintError); + uint8_t zclString[16 + 1]; + auto length = static_cast(value.size()); + Encoding::Put8(zclString, length); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value) { + static_assert(16 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); VerifyOrReturnError(value.size() <= 16, Protocols::InteractionModel::Status::ConstraintError); uint8_t zclString[16 + 1]; @@ -20445,8 +30418,23 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Mutable value.reduce_size(length); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) +{ + + static_assert(16 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 16, Protocols::InteractionModel::Status::ConstraintError); + uint8_t zclString[16 + 1]; + auto length = static_cast(value.size()); + Encoding::Put8(zclString, length); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value) { + static_assert(16 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); VerifyOrReturnError(value.size() <= 16, Protocols::InteractionModel::Status::ConstraintError); uint8_t zclString[16 + 1]; @@ -20478,6 +30466,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT24U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits>; @@ -20491,6 +30493,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu return emberAfWriteAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT24U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT24U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits>; @@ -20500,6 +30511,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT24U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -20532,6 +30554,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT24U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits>; @@ -20545,6 +30581,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu return emberAfWriteAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT24U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT24U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits>; @@ -20554,6 +30599,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT24U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -20584,6 +30640,22 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::BitMask value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value) { @@ -20620,6 +30692,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT24U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits>; @@ -20633,6 +30719,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu return emberAfWriteAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT24U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT24U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits>; @@ -20642,6 +30737,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT24U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -20671,6 +30777,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -20703,6 +30824,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -20744,6 +30879,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::IlluminanceMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -20757,6 +30907,16 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu return emberAfWriteAttribute(endpoint, Clusters::IlluminanceMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::IlluminanceMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -20766,6 +30926,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::IlluminanceMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -20798,6 +30969,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::IlluminanceMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -20811,6 +30997,16 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu return emberAfWriteAttribute(endpoint, Clusters::IlluminanceMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::IlluminanceMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -20820,6 +31016,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::IlluminanceMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -20852,6 +31059,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::IlluminanceMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -20865,6 +31087,16 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu return emberAfWriteAttribute(endpoint, Clusters::IlluminanceMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::IlluminanceMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -20874,6 +31106,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::IlluminanceMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -20903,6 +31146,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::IlluminanceMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -20939,6 +31197,21 @@ Get(chip::EndpointId endpoint, DataModel::Nullable; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::IlluminanceMeasurement::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::IlluminanceMeasurement::LightSensorTypeEnum value) { @@ -20953,6 +31226,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, return emberAfWriteAttribute(endpoint, Clusters::IlluminanceMeasurement::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::IlluminanceMeasurement::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -20962,6 +31244,19 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::IlluminanceMeasurement::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status +Set(chip::EndpointId endpoint, + const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) @@ -20993,6 +31288,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::IlluminanceMeasurement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -21025,6 +31335,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::IlluminanceMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -21066,6 +31391,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::TemperatureMeasurement::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -21079,6 +31419,16 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value return emberAfWriteAttribute(endpoint, Clusters::TemperatureMeasurement::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::TemperatureMeasurement::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -21088,6 +31438,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::TemperatureMeasurement::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -21120,6 +31481,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::TemperatureMeasurement::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -21133,6 +31509,16 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value return emberAfWriteAttribute(endpoint, Clusters::TemperatureMeasurement::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::TemperatureMeasurement::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -21142,6 +31528,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::TemperatureMeasurement::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -21174,6 +31571,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::TemperatureMeasurement::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -21187,6 +31599,16 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value return emberAfWriteAttribute(endpoint, Clusters::TemperatureMeasurement::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::TemperatureMeasurement::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -21196,6 +31618,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::TemperatureMeasurement::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -21225,6 +31658,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::TemperatureMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -21257,6 +31705,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::TemperatureMeasurement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -21289,6 +31752,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::TemperatureMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -21330,6 +31808,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -21343,6 +31835,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value return emberAfWriteAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -21352,6 +31853,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -21384,6 +31896,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -21397,6 +31923,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value return emberAfWriteAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -21406,6 +31941,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -21438,6 +31984,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -21451,6 +32011,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value return emberAfWriteAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -21460,6 +32029,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -21489,6 +32069,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -21524,6 +32118,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -21537,6 +32145,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value return emberAfWriteAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -21546,6 +32163,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -21578,6 +32206,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -21591,6 +32233,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value return emberAfWriteAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -21600,6 +32251,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -21632,6 +32294,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -21645,6 +32321,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value return emberAfWriteAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -21654,6 +32339,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -21683,6 +32379,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -21715,6 +32425,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int8_t * valu *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT8S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value) { using Traits = NumericAttributeTraits; @@ -21747,6 +32471,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -21779,6 +32517,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -21820,6 +32572,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::FlowMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -21833,6 +32599,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu return emberAfWriteAttribute(endpoint, Clusters::FlowMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::FlowMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -21842,6 +32617,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::FlowMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -21874,6 +32660,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::FlowMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -21887,6 +32687,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu return emberAfWriteAttribute(endpoint, Clusters::FlowMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::FlowMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -21896,6 +32705,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::FlowMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -21928,6 +32748,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::FlowMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -21941,6 +32775,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu return emberAfWriteAttribute(endpoint, Clusters::FlowMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::FlowMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -21950,6 +32793,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::FlowMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -21979,6 +32833,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::FlowMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -22011,6 +32879,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::FlowMeasurement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -22043,6 +32925,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::FlowMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -22084,6 +32980,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::RelativeHumidityMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -22097,6 +33008,16 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu return emberAfWriteAttribute(endpoint, Clusters::RelativeHumidityMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::RelativeHumidityMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -22106,6 +33027,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::RelativeHumidityMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -22138,6 +33070,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::RelativeHumidityMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -22151,6 +33098,16 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu return emberAfWriteAttribute(endpoint, Clusters::RelativeHumidityMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::RelativeHumidityMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -22160,6 +33117,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::RelativeHumidityMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -22192,6 +33160,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::RelativeHumidityMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -22205,6 +33188,16 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu return emberAfWriteAttribute(endpoint, Clusters::RelativeHumidityMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::RelativeHumidityMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -22214,6 +33207,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::RelativeHumidityMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -22243,6 +33247,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::RelativeHumidityMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -22275,6 +33294,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::RelativeHumidityMeasurement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -22307,6 +33341,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::RelativeHumidityMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -22346,6 +33395,22 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::BitMask value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value) { @@ -22380,6 +33445,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status +Set(chip::EndpointId endpoint, chip::app::Clusters::OccupancySensing::OccupancySensorTypeEnum value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::OccupancySensing::OccupancySensorTypeEnum value) { @@ -22414,6 +33494,22 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::BitMask value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value) { @@ -22447,6 +33543,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -22479,6 +33589,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -22511,6 +33635,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -22543,6 +33681,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -22575,6 +33727,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -22607,6 +33773,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -22639,6 +33819,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -22671,6 +33865,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -22703,6 +33911,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -22735,6 +33957,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -22767,6 +34003,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -22805,6 +34055,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::CarbonMonoxideConcentrationMeasurement::Id, Id, writable, + ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -22844,6 +34109,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::CarbonDioxideConcentrationMeasurement::Id, Id, writable, + ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -22883,6 +34163,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::NitrogenDioxideConcentrationMeasurement::Id, Id, writable, + ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -22922,6 +34217,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::OzoneConcentrationMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -22960,6 +34270,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Pm25ConcentrationMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -22998,6 +34323,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::FormaldehydeConcentrationMeasurement::Id, Id, writable, + ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -23037,6 +34377,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Pm1ConcentrationMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -23075,6 +34430,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Pm10ConcentrationMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -23113,6 +34483,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, Id, writable, + ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -23152,6 +34537,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::RadonConcentrationMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -23192,8 +34592,22 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Mutable value.reduce_size(length); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) +{ + + static_assert(12 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 12, Protocols::InteractionModel::Status::ConstraintError); + uint8_t zclString[12 + 1]; + auto length = static_cast(value.size()); + Encoding::Put8(zclString, length); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteAttribute(endpoint, Clusters::WakeOnLan::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value) { + static_assert(12 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); VerifyOrReturnError(value.size() <= 12, Protocols::InteractionModel::Status::ConstraintError); uint8_t zclString[12 + 1]; @@ -23224,8 +34638,22 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Mutable value.reduce_size(length); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpan value, MarkAttributeDirty markDirty) +{ + + static_assert(16 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 16, Protocols::InteractionModel::Status::ConstraintError); + uint8_t zclString[16 + 1]; + auto length = static_cast(value.size()); + Encoding::Put8(zclString, length); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteAttribute(endpoint, Clusters::WakeOnLan::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpan value) { + static_assert(16 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); VerifyOrReturnError(value.size() <= 16, Protocols::InteractionModel::Status::ConstraintError); uint8_t zclString[16 + 1]; @@ -23254,6 +34682,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::WakeOnLan::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -23286,6 +34728,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::WakeOnLan::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -23323,6 +34779,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Channel::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -23354,6 +34824,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Channel::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -23392,6 +34876,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::TargetNavigator::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -23424,6 +34922,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::TargetNavigator::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -23456,6 +34968,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::TargetNavigator::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -23494,6 +35020,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Cl *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::MediaPlayback::PlaybackStateEnum value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::MediaPlayback::PlaybackStateEnum value) { using Traits = NumericAttributeTraits; @@ -23529,6 +35070,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_EPOCH_US_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value) { using Traits = NumericAttributeTraits; @@ -23542,6 +35097,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t valu return emberAfWriteAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_EPOCH_US_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_EPOCH_US_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -23551,6 +35115,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_EPOCH_US_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -23583,6 +35158,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value) { using Traits = NumericAttributeTraits; @@ -23596,6 +35185,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t valu return emberAfWriteAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -23605,6 +35203,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -23634,6 +35243,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, float * value *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, float value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, float value) { using Traits = NumericAttributeTraits; @@ -23669,6 +35292,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value) { using Traits = NumericAttributeTraits; @@ -23682,6 +35319,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t valu return emberAfWriteAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -23691,6 +35337,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -23723,6 +35380,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value) { using Traits = NumericAttributeTraits; @@ -23736,6 +35407,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t valu return emberAfWriteAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -23745,6 +35425,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -23774,6 +35465,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -23806,6 +35511,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -23844,6 +35563,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::MediaInput::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -23876,6 +35609,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::MediaInput::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -23908,6 +35655,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::MediaInput::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -23945,6 +35706,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::LowPower::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -23976,6 +35751,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::LowPower::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -24014,6 +35803,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::KeypadInput::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -24046,6 +35849,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::KeypadInput::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -24085,6 +35902,22 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::BitMask value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ContentLauncher::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value) { @@ -24118,6 +35951,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ContentLauncher::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -24150,6 +35997,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ContentLauncher::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -24188,6 +36049,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::AudioOutput::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -24220,6 +36095,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::AudioOutput::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -24252,6 +36141,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::AudioOutput::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -24290,6 +36193,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ApplicationLauncher::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -24322,6 +36239,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ApplicationLauncher::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -24362,8 +36293,23 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Mutable value.reduce_size(length); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) +{ + + static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 32, Protocols::InteractionModel::Status::ConstraintError); + uint8_t zclString[32 + 1]; + auto length = static_cast(value.size()); + Encoding::Put8(zclString, length); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value) { + static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); VerifyOrReturnError(value.size() <= 32, Protocols::InteractionModel::Status::ConstraintError); uint8_t zclString[32 + 1]; @@ -24392,6 +36338,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::VendorI *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::VendorId value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, writable, ZCL_VENDOR_ID_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::VendorId value) { using Traits = NumericAttributeTraits; @@ -24426,8 +36386,23 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Mutable value.reduce_size(length); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) +{ + + static_assert(256 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 256, Protocols::InteractionModel::Status::ConstraintError); + uint8_t zclString[256 + 2]; + auto length = static_cast(value.size()); + Encoding::LittleEndian::Put16(zclString, length); + memcpy(&zclString[2], value.data(), value.size()); + return emberAfWriteAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, zclString, ZCL_LONG_CHAR_STRING_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value) { + static_assert(256 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); VerifyOrReturnError(value.size() <= 256, Protocols::InteractionModel::Status::ConstraintError); uint8_t zclString[256 + 2]; @@ -24456,6 +36431,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -24489,6 +36478,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status +Set(chip::EndpointId endpoint, chip::app::Clusters::ApplicationBasic::ApplicationStatusEnum value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::ApplicationBasic::ApplicationStatusEnum value) { @@ -24524,8 +36528,23 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Mutable value.reduce_size(length); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) +{ + + static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 32, Protocols::InteractionModel::Status::ConstraintError); + uint8_t zclString[32 + 1]; + auto length = static_cast(value.size()); + Encoding::Put8(zclString, length); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value) { + static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); VerifyOrReturnError(value.size() <= 32, Protocols::InteractionModel::Status::ConstraintError); uint8_t zclString[32 + 1]; @@ -24554,6 +36573,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -24586,6 +36619,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -24624,6 +36671,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::AccountLogin::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -24656,6 +36717,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::AccountLogin::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -24694,6 +36769,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ContentControl::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) { using Traits = NumericAttributeTraits; @@ -24728,8 +36817,22 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Mutable value.reduce_size(length); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) +{ + + static_assert(8 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 8, Protocols::InteractionModel::Status::ConstraintError); + uint8_t zclString[8 + 1]; + auto length = static_cast(value.size()); + Encoding::Put8(zclString, length); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteAttribute(endpoint, Clusters::ContentControl::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value) { + static_assert(8 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); VerifyOrReturnError(value.size() <= 8, Protocols::InteractionModel::Status::ConstraintError); uint8_t zclString[8 + 1]; @@ -24760,8 +36863,22 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Mutable value.reduce_size(length); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) +{ + + static_assert(8 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 8, Protocols::InteractionModel::Status::ConstraintError); + uint8_t zclString[8 + 1]; + auto length = static_cast(value.size()); + Encoding::Put8(zclString, length); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteAttribute(endpoint, Clusters::ContentControl::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value) { + static_assert(8 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); VerifyOrReturnError(value.size() <= 8, Protocols::InteractionModel::Status::ConstraintError); uint8_t zclString[8 + 1]; @@ -24790,6 +36907,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ContentControl::Id, Id, writable, ZCL_ELAPSED_S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -24822,6 +36953,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ContentControl::Id, Id, writable, ZCL_ELAPSED_S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -24854,6 +36999,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ContentControl::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) { using Traits = NumericAttributeTraits; @@ -24886,6 +37045,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ContentControl::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -24918,6 +37091,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ContentControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -24956,6 +37143,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ContentAppObserver::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -24988,6 +37189,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ContentAppObserver::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -25026,6 +37241,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -25058,6 +37288,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -25090,6 +37334,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -25122,6 +37380,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -25154,6 +37426,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -25186,6 +37472,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -25218,6 +37518,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -25250,6 +37564,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -25282,6 +37610,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -25314,6 +37656,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -25346,6 +37702,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -25378,6 +37748,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -25410,6 +37794,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -25442,6 +37840,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -25474,6 +37886,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -25506,6 +37932,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -25538,6 +37978,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -25570,6 +38024,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -25602,6 +38070,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -25634,6 +38116,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -25666,6 +38162,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int32_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT32S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int32_t value) { using Traits = NumericAttributeTraits; @@ -25698,6 +38208,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int32_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT32S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int32_t value) { using Traits = NumericAttributeTraits; @@ -25730,6 +38254,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -25762,6 +38300,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -25794,6 +38346,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -25826,6 +38392,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -25858,6 +38438,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -25890,6 +38484,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -25922,6 +38530,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -25954,6 +38576,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -25986,6 +38622,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -26018,6 +38668,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -26050,6 +38714,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -26082,6 +38760,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -26114,6 +38806,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -26146,6 +38852,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -26178,6 +38898,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -26210,6 +38944,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -26242,6 +38990,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -26274,6 +39036,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int8_t * valu *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT8S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value) { using Traits = NumericAttributeTraits; @@ -26306,6 +39082,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int8_t * valu *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT8S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value) { using Traits = NumericAttributeTraits; @@ -26338,6 +39128,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -26370,6 +39174,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -26402,6 +39220,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -26434,6 +39266,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -26466,6 +39312,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -26498,6 +39358,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -26530,6 +39404,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -26562,6 +39450,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -26594,6 +39496,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -26626,6 +39542,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -26658,6 +39588,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -26690,6 +39634,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -26722,6 +39680,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -26754,6 +39726,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -26786,6 +39772,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -26818,6 +39818,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -26850,6 +39864,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int8_t * valu *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT8S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value) { using Traits = NumericAttributeTraits; @@ -26882,6 +39910,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -26914,6 +39956,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -26946,6 +40002,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -26978,6 +40048,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -27010,6 +40094,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -27042,6 +40140,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -27074,6 +40186,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -27106,6 +40232,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -27138,6 +40278,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -27170,6 +40324,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -27202,6 +40370,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -27234,6 +40416,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -27266,6 +40462,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -27298,6 +40509,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -27330,6 +40555,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -27362,6 +40601,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -27394,6 +40648,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -27426,6 +40694,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -27458,6 +40740,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -27490,6 +40786,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -27522,6 +40832,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -27554,6 +40878,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -27586,6 +40924,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -27618,6 +40970,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -27650,6 +41016,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -27682,6 +41062,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -27714,6 +41108,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -27746,6 +41154,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -27778,6 +41200,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -27810,6 +41246,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -27842,6 +41292,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -27874,6 +41338,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -27906,6 +41384,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -27938,6 +41430,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -27970,6 +41476,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -28002,6 +41522,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -28034,6 +41568,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -28066,6 +41614,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -28098,6 +41660,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -28130,6 +41706,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -28162,6 +41752,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int8_t * valu *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT8S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value) { using Traits = NumericAttributeTraits; @@ -28194,6 +41798,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -28226,6 +41844,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -28258,6 +41890,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -28290,6 +41936,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -28322,6 +41982,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -28354,6 +42028,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -28386,6 +42074,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -28418,6 +42120,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -28450,6 +42166,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -28482,6 +42212,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -28514,6 +42258,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -28546,6 +42304,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -28578,6 +42350,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -28610,6 +42396,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -28642,6 +42442,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -28674,6 +42488,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -28706,6 +42534,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -28738,6 +42580,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -28770,6 +42626,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -28802,6 +42672,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -28834,6 +42718,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -28866,6 +42764,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int8_t * valu *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT8S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value) { using Traits = NumericAttributeTraits; @@ -28898,6 +42810,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -28930,6 +42856,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -28962,6 +42902,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -28994,6 +42948,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -29026,6 +42994,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -29058,6 +43040,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -29090,6 +43086,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -29122,6 +43132,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -29154,6 +43179,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -29192,6 +43231,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) { using Traits = NumericAttributeTraits; @@ -29225,6 +43278,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status +Set(chip::EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value) { @@ -29259,6 +43327,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status +Set(chip::EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value) { @@ -29293,6 +43376,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status +Set(chip::EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value) { @@ -29327,6 +43425,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status +Set(chip::EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_BITMAP64_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value) { @@ -29360,6 +43473,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -29392,6 +43519,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -29424,6 +43565,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT24U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits>; @@ -29456,6 +43611,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -29488,6 +43657,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint64_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT40U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value) { using Traits = NumericAttributeTraits>; @@ -29520,6 +43703,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint64_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT48U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value) { using Traits = NumericAttributeTraits>; @@ -29552,6 +43749,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint64_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT56U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value) { using Traits = NumericAttributeTraits>; @@ -29584,6 +43795,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint64_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value) { using Traits = NumericAttributeTraits; @@ -29616,6 +43841,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int8_t * valu *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT8S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value) { using Traits = NumericAttributeTraits; @@ -29648,6 +43887,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -29680,6 +43933,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int32_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT24S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int32_t value) { using Traits = NumericAttributeTraits>; @@ -29712,6 +43979,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int32_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT32S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int32_t value) { using Traits = NumericAttributeTraits; @@ -29744,6 +44025,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int64_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT40S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value) { using Traits = NumericAttributeTraits>; @@ -29776,6 +44071,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int64_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT48S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value) { using Traits = NumericAttributeTraits>; @@ -29808,6 +44117,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int64_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT56S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value) { using Traits = NumericAttributeTraits>; @@ -29840,6 +44163,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int64_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT64S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value) { using Traits = NumericAttributeTraits; @@ -29872,6 +44209,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -29904,6 +44255,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_ENUM16_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -29936,6 +44301,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, float * value *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, float value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, float value) { using Traits = NumericAttributeTraits; @@ -29968,6 +44347,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, double * valu *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, double value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_DOUBLE_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, double value) { using Traits = NumericAttributeTraits; @@ -30002,8 +44395,22 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Mutable value.reduce_size(length); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpan value, MarkAttributeDirty markDirty) +{ + + static_assert(10 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 10, Protocols::InteractionModel::Status::ConstraintError); + uint8_t zclString[10 + 1]; + auto length = static_cast(value.size()); + Encoding::Put8(zclString, length); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpan value) { + static_assert(10 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); VerifyOrReturnError(value.size() <= 10, Protocols::InteractionModel::Status::ConstraintError); uint8_t zclString[10 + 1]; @@ -30034,8 +44441,23 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Mutable value.reduce_size(length); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpan value, MarkAttributeDirty markDirty) +{ + + static_assert(1000 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 1000, Protocols::InteractionModel::Status::ConstraintError); + uint8_t zclString[1000 + 2]; + auto length = static_cast(value.size()); + Encoding::LittleEndian::Put16(zclString, length); + memcpy(&zclString[2], value.data(), value.size()); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, zclString, ZCL_LONG_OCTET_STRING_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpan value) { + static_assert(1000 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); VerifyOrReturnError(value.size() <= 1000, Protocols::InteractionModel::Status::ConstraintError); uint8_t zclString[1000 + 2]; @@ -30066,8 +44488,22 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Mutable value.reduce_size(length); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) +{ + + static_assert(10 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 10, Protocols::InteractionModel::Status::ConstraintError); + uint8_t zclString[10 + 1]; + auto length = static_cast(value.size()); + Encoding::Put8(zclString, length); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value) { + static_assert(10 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); VerifyOrReturnError(value.size() <= 10, Protocols::InteractionModel::Status::ConstraintError); uint8_t zclString[10 + 1]; @@ -30098,8 +44534,23 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Mutable value.reduce_size(length); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) +{ + + static_assert(1000 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 1000, Protocols::InteractionModel::Status::ConstraintError); + uint8_t zclString[1000 + 2]; + auto length = static_cast(value.size()); + Encoding::LittleEndian::Put16(zclString, length); + memcpy(&zclString[2], value.data(), value.size()); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, zclString, ZCL_LONG_CHAR_STRING_ATTRIBUTE_TYPE, + markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value) { + static_assert(1000 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); VerifyOrReturnError(value.size() <= 1000, Protocols::InteractionModel::Status::ConstraintError); uint8_t zclString[1000 + 2]; @@ -30128,6 +44579,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint64_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_EPOCH_US_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value) { using Traits = NumericAttributeTraits; @@ -30160,6 +44625,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_EPOCH_S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -30192,6 +44671,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::VendorI *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::VendorId value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_VENDOR_ID_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::VendorId value) { using Traits = NumericAttributeTraits; @@ -30224,6 +44717,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Cl *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::UnitTesting::SimpleEnum value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::UnitTesting::SimpleEnum value) { using Traits = NumericAttributeTraits; @@ -30256,6 +44764,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -30288,6 +44810,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int8_t * valu *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT8S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value) { using Traits = NumericAttributeTraits; @@ -30320,6 +44856,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -30352,6 +44902,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -30384,6 +44948,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) { using Traits = NumericAttributeTraits; @@ -30416,6 +44994,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) { using Traits = NumericAttributeTraits; @@ -30451,6 +45043,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) { using Traits = NumericAttributeTraits; @@ -30464,6 +45070,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -30473,6 +45088,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -30506,6 +45132,21 @@ Get(chip::EndpointId endpoint, DataModel::Nullable value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value) { @@ -30520,6 +45161,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits>; @@ -30529,6 +45179,19 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status +Set(chip::EndpointId endpoint, + const chip::app::DataModel::Nullable> & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable> & value) @@ -30564,6 +45227,21 @@ Get(chip::EndpointId endpoint, DataModel::Nullable value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value) { @@ -30578,6 +45256,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits>; @@ -30587,6 +45274,19 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status +Set(chip::EndpointId endpoint, + const chip::app::DataModel::Nullable> & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable> & value) @@ -30622,6 +45322,21 @@ Get(chip::EndpointId endpoint, DataModel::Nullable value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value) { @@ -30636,6 +45351,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits>; @@ -30645,6 +45369,19 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status +Set(chip::EndpointId endpoint, + const chip::app::DataModel::Nullable> & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable> & value) @@ -30680,6 +45417,21 @@ Get(chip::EndpointId endpoint, DataModel::Nullable value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_BITMAP64_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value) { @@ -30694,6 +45446,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_BITMAP64_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_BITMAP64_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits>; @@ -30703,6 +45464,19 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_BITMAP64_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status +Set(chip::EndpointId endpoint, + const chip::app::DataModel::Nullable> & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable> & value) @@ -30737,6 +45511,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -30750,6 +45538,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -30759,6 +45556,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -30791,6 +45599,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -30804,6 +45626,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -30813,6 +45644,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -30845,6 +45687,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT24U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits>; @@ -30858,6 +45714,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT24U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT24U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits>; @@ -30867,6 +45732,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT24U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -30899,6 +45775,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -30912,6 +45802,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -30921,6 +45820,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -30953,6 +45863,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT40U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value) { using Traits = NumericAttributeTraits>; @@ -30966,6 +45890,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t valu return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT40U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT40U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits>; @@ -30975,6 +45908,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT40U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -31007,6 +45951,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT48U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value) { using Traits = NumericAttributeTraits>; @@ -31020,6 +45978,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t valu return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT48U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT48U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits>; @@ -31029,6 +45996,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT48U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -31061,6 +46039,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT56U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value) { using Traits = NumericAttributeTraits>; @@ -31074,6 +46066,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t valu return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT56U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT56U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits>; @@ -31083,6 +46084,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT56U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -31115,6 +46127,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value) { using Traits = NumericAttributeTraits; @@ -31128,6 +46154,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t valu return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -31137,6 +46172,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -31169,6 +46215,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT8S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value) { using Traits = NumericAttributeTraits; @@ -31182,6 +46242,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value) return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT8S_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT8S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -31191,6 +46260,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT8S_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -31223,6 +46303,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -31236,6 +46330,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -31245,6 +46348,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -31277,6 +46391,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT24S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int32_t value) { using Traits = NumericAttributeTraits>; @@ -31290,6 +46418,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int32_t value return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT24S_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT24S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits>; @@ -31299,6 +46436,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT24S_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -31331,6 +46479,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT32S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int32_t value) { using Traits = NumericAttributeTraits; @@ -31344,6 +46506,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int32_t value return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT32S_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT32S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -31353,6 +46524,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT32S_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -31385,6 +46567,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT40S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value) { using Traits = NumericAttributeTraits>; @@ -31398,6 +46594,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT40S_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT40S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits>; @@ -31407,6 +46612,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT40S_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -31439,6 +46655,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT48S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value) { using Traits = NumericAttributeTraits>; @@ -31452,6 +46682,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT48S_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT48S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits>; @@ -31461,6 +46700,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT48S_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -31493,6 +46743,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT56S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value) { using Traits = NumericAttributeTraits>; @@ -31506,6 +46770,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT56S_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits>; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT56S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits>; @@ -31515,6 +46788,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT56S_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -31547,6 +46831,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT64S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value) { using Traits = NumericAttributeTraits; @@ -31560,6 +46858,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT64S_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT64S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -31569,6 +46876,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT64S_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -31601,6 +46919,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -31614,6 +46946,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -31623,6 +46964,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -31655,6 +47007,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_ENUM16_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -31668,6 +47034,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_ENUM16_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_ENUM16_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -31677,6 +47052,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_ENUM16_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -31709,6 +47095,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, float value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, float value) { using Traits = NumericAttributeTraits; @@ -31722,6 +47122,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, float value) return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -31731,6 +47140,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -31763,6 +47183,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, double value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_DOUBLE_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, double value) { using Traits = NumericAttributeTraits; @@ -31776,6 +47210,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, double value) return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_DOUBLE_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_DOUBLE_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -31785,6 +47228,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_DOUBLE_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -31824,8 +47278,22 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu span.reduce_size(length); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpan value, MarkAttributeDirty markDirty) +{ + + static_assert(10 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 10, Protocols::InteractionModel::Status::ConstraintError); + uint8_t zclString[10 + 1]; + auto length = static_cast(value.size()); + Encoding::Put8(zclString, length); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpan value) { + static_assert(10 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); VerifyOrReturnError(value.size() <= 10, Protocols::InteractionModel::Status::ConstraintError); uint8_t zclString[10 + 1]; @@ -31835,12 +47303,29 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpa return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + uint8_t zclString[1] = { 0xFF }; + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { uint8_t zclString[1] = { 0xFF }; return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -31880,8 +47365,22 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu span.reduce_size(length); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) +{ + + static_assert(10 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 10, Protocols::InteractionModel::Status::ConstraintError); + uint8_t zclString[10 + 1]; + auto length = static_cast(value.size()); + Encoding::Put8(zclString, length); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value) { + static_assert(10 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); VerifyOrReturnError(value.size() <= 10, Protocols::InteractionModel::Status::ConstraintError); uint8_t zclString[10 + 1]; @@ -31891,12 +47390,29 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpa return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + uint8_t zclString[1] = { 0xFF }; + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { uint8_t zclString[1] = { 0xFF }; return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -31930,6 +47446,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::UnitTesting::SimpleEnum value, + MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::UnitTesting::SimpleEnum value) { using Traits = NumericAttributeTraits; @@ -31943,6 +47474,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -31952,6 +47492,18 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { @@ -31985,6 +47537,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -31998,6 +47564,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -32007,6 +47582,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -32039,6 +47625,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT8S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value) { using Traits = NumericAttributeTraits; @@ -32052,6 +47652,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value) return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT8S_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT8S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -32061,6 +47670,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT8S_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -32093,6 +47713,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -32106,6 +47740,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -32115,6 +47758,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -32147,6 +47801,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu } return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; @@ -32160,6 +47828,15 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) { using Traits = NumericAttributeTraits; @@ -32169,6 +47846,17 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) +{ + if (value.IsNull()) + { + return SetNull(endpoint, markDirty); + } + + return Set(endpoint, value.Value(), markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -32198,6 +47886,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -32230,6 +47932,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -32262,6 +47978,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -32294,6 +48024,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; @@ -32332,6 +48076,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::FaultInjection::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -32364,6 +48122,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::FaultInjection::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; @@ -32402,6 +48174,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::SampleMei::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) { using Traits = NumericAttributeTraits; @@ -32434,6 +48220,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::SampleMei::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; @@ -32466,6 +48266,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va *value = Traits::StorageToWorking(temp); return status; } + +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::SampleMei::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); +} + Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; 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 3a35e3511a6747..e51fb1999e9ce8 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 @@ -33,6 +33,7 @@ namespace chip { namespace app { + namespace Clusters { namespace Identify { @@ -41,22 +42,27 @@ namespace Attributes { namespace IdentifyTime { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace IdentifyTime namespace IdentifyType { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::Identify::IdentifyTypeEnum * value); // IdentifyTypeEnum Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Identify::IdentifyTypeEnum value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Identify::IdentifyTypeEnum value, + MarkAttributeDirty markDirty); } // namespace IdentifyType namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -70,16 +76,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::BitMask * value); // NameSupportBitmap Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value); +Protocols::InteractionModel::Status +Set(chip::EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty); } // namespace NameSupport namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -91,40 +101,52 @@ namespace Attributes { namespace OnOff { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value); // boolean Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty); } // namespace OnOff namespace GlobalSceneControl { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value); // boolean Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty); } // namespace GlobalSceneControl namespace OnTime { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace OnTime namespace OffWaitTime { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace OffWaitTime namespace StartUpOnOff { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // StartUpOnOffEnum Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::OnOff::StartUpOnOffEnum value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::OnOff::StartUpOnOffEnum value, + MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace StartUpOnOff namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -136,21 +158,25 @@ namespace Attributes { namespace SwitchType { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // enum8 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace SwitchType namespace SwitchActions { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // enum8 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace SwitchActions namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -162,38 +188,48 @@ namespace Attributes { namespace CurrentLevel { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace CurrentLevel namespace RemainingTime { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace RemainingTime namespace MinLevel { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace MinLevel namespace MaxLevel { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace MaxLevel namespace CurrentFrequency { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace CurrentFrequency namespace MinFrequency { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace MinFrequency namespace MaxFrequency { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace MaxFrequency namespace Options { @@ -201,56 +237,81 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::BitMask * value); // OptionsBitmap Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value); +Protocols::InteractionModel::Status +Set(chip::EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty); } // namespace Options namespace OnOffTransitionTime { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace OnOffTransitionTime namespace OnLevel { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace OnLevel namespace OnTransitionTime { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace OnTransitionTime namespace OffTransitionTime { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace OffTransitionTime namespace DefaultMoveRate { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace DefaultMoveRate namespace StartUpCurrentLevel { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace StartUpCurrentLevel namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -262,56 +323,67 @@ namespace Attributes { namespace ActiveText { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); } // namespace ActiveText namespace Description { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); } // namespace Description namespace InactiveText { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); } // namespace InactiveText namespace OutOfService { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value); // boolean Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty); } // namespace OutOfService namespace Polarity { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // enum8 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace Polarity namespace PresentValue { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value); // boolean Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty); } // namespace PresentValue namespace Reliability { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // enum8 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace Reliability namespace StatusFlags { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // bitmap8 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace StatusFlags namespace ApplicationType { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // int32u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace ApplicationType namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -323,11 +395,13 @@ namespace Attributes { namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -343,11 +417,13 @@ namespace Attributes { namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -359,6 +435,7 @@ namespace Attributes { namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap } // namespace Attributes @@ -370,16 +447,19 @@ namespace Attributes { namespace SetupURL { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // long_char_string Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); } // namespace SetupURL namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -391,26 +471,31 @@ namespace Attributes { namespace NodeLabel { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); } // namespace NodeLabel namespace LocalConfigDisabled { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value); // boolean Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty); } // namespace LocalConfigDisabled namespace Reachable { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value); // boolean Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty); } // namespace Reachable namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -422,11 +507,13 @@ namespace Attributes { namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -438,6 +525,7 @@ namespace Attributes { namespace UpdatePossible { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value); // boolean Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty); } // namespace UpdatePossible namespace UpdateState { @@ -445,23 +533,32 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::OtaSoftwareUpdateRequestor::UpdateStateEnum * value); // UpdateStateEnum Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::OtaSoftwareUpdateRequestor::UpdateStateEnum value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::app::Clusters::OtaSoftwareUpdateRequestor::UpdateStateEnum value, + MarkAttributeDirty markDirty); } // namespace UpdateState namespace UpdateStateProgress { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace UpdateStateProgress namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -473,16 +570,19 @@ namespace Attributes { namespace ActiveLocale { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); } // namespace ActiveLocale namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -496,6 +596,8 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::TimeFormatLocalization::HourFormatEnum * value); // HourFormatEnum Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::TimeFormatLocalization::HourFormatEnum value); +Protocols::InteractionModel::Status +Set(chip::EndpointId endpoint, chip::app::Clusters::TimeFormatLocalization::HourFormatEnum value, MarkAttributeDirty markDirty); } // namespace HourFormat namespace ActiveCalendarType { @@ -503,16 +605,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::TimeFormatLocalization::CalendarTypeEnum * value); // CalendarTypeEnum Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::TimeFormatLocalization::CalendarTypeEnum value); +Protocols::InteractionModel::Status +Set(chip::EndpointId endpoint, chip::app::Clusters::TimeFormatLocalization::CalendarTypeEnum value, MarkAttributeDirty markDirty); } // namespace ActiveCalendarType namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -525,16 +631,20 @@ namespace TemperatureUnit { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::UnitLocalization::TempUnitEnum * value); // TempUnitEnum Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::UnitLocalization::TempUnitEnum value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::UnitLocalization::TempUnitEnum value, + MarkAttributeDirty markDirty); } // namespace TemperatureUnit namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -546,11 +656,13 @@ namespace Attributes { namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -563,106 +675,146 @@ namespace Status { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::PowerSourceStatusEnum * value); // PowerSourceStatusEnum Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::PowerSourceStatusEnum value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::PowerSourceStatusEnum value, + MarkAttributeDirty markDirty); } // namespace Status namespace Order { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace Order namespace Description { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); } // namespace Description namespace WiredAssessedInputVoltage { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int32u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace WiredAssessedInputVoltage namespace WiredAssessedInputFrequency { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace WiredAssessedInputFrequency namespace WiredCurrentType { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::WiredCurrentTypeEnum * value); // WiredCurrentTypeEnum Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::WiredCurrentTypeEnum value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::WiredCurrentTypeEnum value, + MarkAttributeDirty markDirty); } // namespace WiredCurrentType namespace WiredAssessedCurrent { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int32u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace WiredAssessedCurrent namespace WiredNominalVoltage { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // int32u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace WiredNominalVoltage namespace WiredMaximumCurrent { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // int32u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace WiredMaximumCurrent namespace WiredPresent { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value); // boolean Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty); } // namespace WiredPresent namespace BatVoltage { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int32u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace BatVoltage namespace BatPercentRemaining { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace BatPercentRemaining namespace BatTimeRemaining { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int32u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace BatTimeRemaining namespace BatChargeLevel { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::BatChargeLevelEnum * value); // BatChargeLevelEnum Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::BatChargeLevelEnum value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::BatChargeLevelEnum value, + MarkAttributeDirty markDirty); } // namespace BatChargeLevel namespace BatReplacementNeeded { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value); // boolean Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty); } // namespace BatReplacementNeeded namespace BatReplaceability { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::BatReplaceabilityEnum * value); // BatReplaceabilityEnum Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::BatReplaceabilityEnum value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::BatReplaceabilityEnum value, + MarkAttributeDirty markDirty); } // namespace BatReplaceability namespace BatPresent { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value); // boolean Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty); } // namespace BatPresent namespace BatReplacementDescription { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); } // namespace BatReplacementDescription namespace BatCommonDesignation { @@ -670,16 +822,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::BatCommonDesignationEnum * value); // BatCommonDesignationEnum Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::BatCommonDesignationEnum value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::BatCommonDesignationEnum value, + MarkAttributeDirty markDirty); } // namespace BatCommonDesignation namespace BatANSIDesignation { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); } // namespace BatANSIDesignation namespace BatIECDesignation { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); } // namespace BatIECDesignation namespace BatApprovedChemistry { @@ -687,51 +843,68 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::BatApprovedChemistryEnum * value); // BatApprovedChemistryEnum Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::BatApprovedChemistryEnum value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::BatApprovedChemistryEnum value, + MarkAttributeDirty markDirty); } // namespace BatApprovedChemistry namespace BatCapacity { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // int32u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace BatCapacity namespace BatQuantity { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace BatQuantity namespace BatChargeState { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::BatChargeStateEnum * value); // BatChargeStateEnum Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::BatChargeStateEnum value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::BatChargeStateEnum value, + MarkAttributeDirty markDirty); } // namespace BatChargeState namespace BatTimeToFullCharge { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int32u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace BatTimeToFullCharge namespace BatFunctionalWhileCharging { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value); // boolean Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty); } // namespace BatFunctionalWhileCharging namespace BatChargingCurrent { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int32u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace BatChargingCurrent namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -743,16 +916,19 @@ namespace Attributes { namespace Breadcrumb { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint64_t * value); // int64u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty); } // namespace Breadcrumb namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -764,21 +940,25 @@ namespace Attributes { namespace MaxNetworks { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace MaxNetworks namespace ScanMaxTimeSeconds { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace ScanMaxTimeSeconds namespace ConnectMaxTimeSeconds { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace ConnectMaxTimeSeconds namespace InterfaceEnabled { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value); // boolean Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty); } // namespace InterfaceEnabled namespace LastNetworkingStatus { @@ -788,25 +968,41 @@ Get(chip::EndpointId endpoint, value); // NetworkCommissioningStatusEnum Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::NetworkCommissioning::NetworkCommissioningStatusEnum value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::app::Clusters::NetworkCommissioning::NetworkCommissioningStatusEnum value, + MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status +Set(chip::EndpointId endpoint, + const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace LastNetworkingStatus namespace LastNetworkID { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // octet_string Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpan value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpan value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace LastNetworkID namespace LastConnectErrorValue { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int32s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int32_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace LastConnectErrorValue namespace SupportedThreadFeatures { @@ -815,21 +1011,27 @@ Get(chip::EndpointId endpoint, chip::BitMask * value); // ThreadCapabilitiesBitmap Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::BitMask value, + MarkAttributeDirty markDirty); } // namespace SupportedThreadFeatures namespace ThreadVersion { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ThreadVersion namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -841,11 +1043,13 @@ namespace Attributes { namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -857,6 +1061,7 @@ namespace Attributes { namespace TestEventTriggersEnabled { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value); // boolean Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty); } // namespace TestEventTriggersEnabled } // namespace Attributes @@ -868,6 +1073,7 @@ namespace Attributes { namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -879,11 +1085,13 @@ namespace Attributes { namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -895,11 +1103,13 @@ namespace Attributes { namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -911,11 +1121,13 @@ namespace Attributes { namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -928,6 +1140,8 @@ namespace TimeSource { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::TimeSynchronization::TimeSourceEnum * value); // TimeSourceEnum Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::TimeSynchronization::TimeSourceEnum value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::TimeSynchronization::TimeSourceEnum value, + MarkAttributeDirty markDirty); } // namespace TimeSource namespace TimeZoneDatabase { @@ -935,26 +1149,32 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::TimeSynchronization::TimeZoneDatabaseEnum * value); // TimeZoneDatabaseEnum Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::TimeSynchronization::TimeZoneDatabaseEnum value); +Protocols::InteractionModel::Status +Set(chip::EndpointId endpoint, chip::app::Clusters::TimeSynchronization::TimeZoneDatabaseEnum value, MarkAttributeDirty markDirty); } // namespace TimeZoneDatabase namespace NTPServerAvailable { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value); // boolean Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty); } // namespace NTPServerAvailable namespace SupportsDNSResolve { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value); // boolean Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty); } // namespace SupportsDNSResolve namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -966,86 +1186,103 @@ namespace Attributes { namespace VendorName { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); } // namespace VendorName namespace VendorID { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::VendorId * value); // vendor_id Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::VendorId value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::VendorId value, MarkAttributeDirty markDirty); } // namespace VendorID namespace ProductName { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); } // namespace ProductName namespace NodeLabel { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); } // namespace NodeLabel namespace HardwareVersion { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace HardwareVersion namespace HardwareVersionString { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); } // namespace HardwareVersionString namespace SoftwareVersion { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // int32u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace SoftwareVersion namespace SoftwareVersionString { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); } // namespace SoftwareVersionString namespace ManufacturingDate { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); } // namespace ManufacturingDate namespace PartNumber { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); } // namespace PartNumber namespace ProductURL { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // long_char_string Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); } // namespace ProductURL namespace ProductLabel { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); } // namespace ProductLabel namespace SerialNumber { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); } // namespace SerialNumber namespace Reachable { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value); // boolean Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty); } // namespace Reachable namespace UniqueID { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); } // namespace UniqueID namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -1057,26 +1294,31 @@ namespace Attributes { namespace NumberOfPositions { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace NumberOfPositions namespace CurrentPosition { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace CurrentPosition namespace MultiPressMax { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace MultiPressMax namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -1088,11 +1330,13 @@ namespace Attributes { namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -1104,11 +1348,13 @@ namespace Attributes { namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -1124,11 +1370,13 @@ namespace Attributes { namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -1140,11 +1388,13 @@ namespace Attributes { namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -1156,11 +1406,13 @@ namespace Attributes { namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -1172,11 +1424,13 @@ namespace Attributes { namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -1188,11 +1442,13 @@ namespace Attributes { namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -1204,16 +1460,19 @@ namespace Attributes { namespace StateValue { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value); // boolean Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty); } // namespace StateValue namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -1228,27 +1487,35 @@ Get(chip::EndpointId endpoint, chip::BitMask * value); // UserActiveModeTriggerBitmap Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::BitMask value, + MarkAttributeDirty markDirty); } // namespace UserActiveModeTriggerHint namespace UserActiveModeTriggerInstruction { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); } // namespace UserActiveModeTriggerInstruction namespace OperatingMode { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::IcdManagement::OperatingModeEnum * value); // OperatingModeEnum Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::IcdManagement::OperatingModeEnum value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::IcdManagement::OperatingModeEnum value, + MarkAttributeDirty markDirty); } // namespace OperatingMode namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -1260,27 +1527,33 @@ namespace Attributes { namespace SetTime { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // elapsed_s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace SetTime namespace TimeRemaining { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // elapsed_s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace TimeRemaining namespace TimerState { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::Timer::TimerStatusEnum * value); // TimerStatusEnum Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Timer::TimerStatusEnum value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Timer::TimerStatusEnum value, + MarkAttributeDirty markDirty); } // namespace TimerState namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -1292,11 +1565,13 @@ namespace Attributes { namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -1308,30 +1583,41 @@ namespace Attributes { namespace CurrentMode { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace CurrentMode namespace StartUpMode { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace StartUpMode namespace OnMode { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace OnMode namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -1346,20 +1632,29 @@ Get(chip::EndpointId endpoint, DataModel::Nullable & value); // DrynessLevelEnum Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::LaundryDryerControls::DrynessLevelEnum value); +Protocols::InteractionModel::Status +Set(chip::EndpointId endpoint, chip::app::Clusters::LaundryDryerControls::DrynessLevelEnum value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status +Set(chip::EndpointId endpoint, + const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace SelectedDrynessLevel namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -1371,42 +1666,58 @@ namespace Attributes { namespace Description { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); } // namespace Description namespace StandardNamespace { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // enum16 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace StandardNamespace namespace CurrentMode { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace CurrentMode namespace StartUpMode { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace StartUpMode namespace OnMode { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace OnMode namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -1418,6 +1729,7 @@ namespace Attributes { namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -1429,6 +1741,7 @@ namespace Attributes { namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -1440,8 +1753,12 @@ namespace Attributes { namespace SpinSpeedCurrent { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace SpinSpeedCurrent namespace NumberOfRinses { @@ -1449,16 +1766,20 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::LaundryWasherControls::NumberOfRinsesEnum * value); // NumberOfRinsesEnum Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::LaundryWasherControls::NumberOfRinsesEnum value); +Protocols::InteractionModel::Status +Set(chip::EndpointId endpoint, chip::app::Clusters::LaundryWasherControls::NumberOfRinsesEnum value, MarkAttributeDirty markDirty); } // namespace NumberOfRinses namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -1470,6 +1791,7 @@ namespace Attributes { namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -1481,6 +1803,7 @@ namespace Attributes { namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -1492,36 +1815,43 @@ namespace Attributes { namespace TemperatureSetpoint { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // temperature Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace TemperatureSetpoint namespace MinTemperature { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // temperature Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace MinTemperature namespace MaxTemperature { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // temperature Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace MaxTemperature namespace Step { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // temperature Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace Step namespace SelectedTemperatureLevel { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace SelectedTemperatureLevel namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -1535,6 +1865,9 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::BitMask * value); // AlarmBitmap Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::BitMask value, + MarkAttributeDirty markDirty); } // namespace Mask namespace State { @@ -1542,6 +1875,9 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::BitMask * value); // AlarmBitmap Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::BitMask value, + MarkAttributeDirty markDirty); } // namespace State namespace Supported { @@ -1549,16 +1885,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::BitMask * value); // AlarmBitmap Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::BitMask value, + MarkAttributeDirty markDirty); } // namespace Supported namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -1570,6 +1911,7 @@ namespace Attributes { namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -1581,6 +1923,7 @@ namespace Attributes { namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -1593,85 +1936,110 @@ namespace ExpressedState { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum * value); // ExpressedStateEnum Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum value, + MarkAttributeDirty markDirty); } // namespace ExpressedState namespace SmokeState { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum * value); // AlarmStateEnum Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value, + MarkAttributeDirty markDirty); } // namespace SmokeState namespace COState { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum * value); // AlarmStateEnum Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value, + MarkAttributeDirty markDirty); } // namespace COState namespace BatteryAlert { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum * value); // AlarmStateEnum Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value, + MarkAttributeDirty markDirty); } // namespace BatteryAlert namespace DeviceMuted { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::MuteStateEnum * value); // MuteStateEnum Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::MuteStateEnum value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::MuteStateEnum value, + MarkAttributeDirty markDirty); } // namespace DeviceMuted namespace TestInProgress { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value); // boolean Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty); } // namespace TestInProgress namespace HardwareFaultAlert { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value); // boolean Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty); } // namespace HardwareFaultAlert namespace EndOfServiceAlert { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::EndOfServiceEnum * value); // EndOfServiceEnum Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::EndOfServiceEnum value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::EndOfServiceEnum value, + MarkAttributeDirty markDirty); } // namespace EndOfServiceAlert namespace InterconnectSmokeAlarm { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum * value); // AlarmStateEnum Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value, + MarkAttributeDirty markDirty); } // namespace InterconnectSmokeAlarm namespace InterconnectCOAlarm { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum * value); // AlarmStateEnum Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value, + MarkAttributeDirty markDirty); } // namespace InterconnectCOAlarm namespace ContaminationState { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::ContaminationStateEnum * value); // ContaminationStateEnum Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::ContaminationStateEnum value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::ContaminationStateEnum value, + MarkAttributeDirty markDirty); } // namespace ContaminationState namespace SmokeSensitivityLevel { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::SensitivityEnum * value); // SensitivityEnum Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::SensitivityEnum value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::SensitivityEnum value, + MarkAttributeDirty markDirty); } // namespace SmokeSensitivityLevel namespace ExpiryDate { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // epoch_s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace ExpiryDate namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -1685,6 +2053,9 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::BitMask * value); // AlarmBitmap Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::BitMask value, + MarkAttributeDirty markDirty); } // namespace Mask namespace Latch { @@ -1692,6 +2063,9 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::BitMask * value); // AlarmBitmap Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::BitMask value, + MarkAttributeDirty markDirty); } // namespace Latch namespace State { @@ -1699,6 +2073,9 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::BitMask * value); // AlarmBitmap Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::BitMask value, + MarkAttributeDirty markDirty); } // namespace State namespace Supported { @@ -1706,16 +2083,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::BitMask * value); // AlarmBitmap Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::BitMask value, + MarkAttributeDirty markDirty); } // namespace Supported namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -1727,6 +2109,7 @@ namespace Attributes { namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -1738,6 +2121,7 @@ namespace Attributes { namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -1749,11 +2133,13 @@ namespace Attributes { namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -1765,11 +2151,13 @@ namespace Attributes { namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -1781,23 +2169,30 @@ namespace Attributes { namespace LastConfiguredBy { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // node_id Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::NodeId value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::NodeId value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace LastConfiguredBy namespace SceneTableSize { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace SceneTableSize namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -1809,6 +2204,7 @@ namespace Attributes { namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -1820,6 +2216,7 @@ namespace Attributes { namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -1831,11 +2228,13 @@ namespace Attributes { namespace SupportedSensitivityLevels { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace SupportedSensitivityLevels namespace DefaultSensitivityLevel { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace DefaultSensitivityLevel namespace AlarmsActive { @@ -1844,6 +2243,9 @@ Get(chip::EndpointId endpoint, chip::BitMask * value); // AlarmModeBitmap Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::BitMask value, + MarkAttributeDirty markDirty); } // namespace AlarmsActive namespace AlarmsSuppressed { @@ -1852,6 +2254,9 @@ Get(chip::EndpointId endpoint, chip::BitMask * value); // AlarmModeBitmap Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::BitMask value, + MarkAttributeDirty markDirty); } // namespace AlarmsSuppressed namespace AlarmsEnabled { @@ -1860,6 +2265,9 @@ Get(chip::EndpointId endpoint, chip::BitMask * value); // AlarmModeBitmap Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::BitMask value, + MarkAttributeDirty markDirty); } // namespace AlarmsEnabled namespace AlarmsSupported { @@ -1868,6 +2276,9 @@ Get(chip::EndpointId endpoint, chip::BitMask * value); // AlarmModeBitmap Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::BitMask value, + MarkAttributeDirty markDirty); } // namespace AlarmsSupported namespace SensorFault { @@ -1876,16 +2287,21 @@ Get(chip::EndpointId endpoint, chip::BitMask * value); // SensorFaultBitmap Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::BitMask value, + MarkAttributeDirty markDirty); } // namespace SensorFault namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -1897,22 +2313,34 @@ namespace Attributes { namespace OpenDuration { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // elapsed_s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace OpenDuration namespace DefaultOpenDuration { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // elapsed_s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace DefaultOpenDuration namespace AutoCloseTime { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // epoch_us Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace AutoCloseTime namespace CurrentState { @@ -1921,10 +2349,18 @@ Get(chip::EndpointId endpoint, DataModel::Nullable & value); // ValveStateEnum Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::ValveConfigurationAndControl::ValveStateEnum value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::app::Clusters::ValveConfigurationAndControl::ValveStateEnum value, + MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status +Set(chip::EndpointId endpoint, + const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace CurrentState namespace TargetState { @@ -1933,29 +2369,46 @@ Get(chip::EndpointId endpoint, DataModel::Nullable & value); // ValveStateEnum Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::ValveConfigurationAndControl::ValveStateEnum value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::app::Clusters::ValveConfigurationAndControl::ValveStateEnum value, + MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status +Set(chip::EndpointId endpoint, + const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace TargetState namespace CurrentLevel { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // percent Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace CurrentLevel namespace TargetLevel { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // percent Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace TargetLevel namespace DefaultOpenLevel { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Percent * value); // percent Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent value, MarkAttributeDirty markDirty); } // namespace DefaultOpenLevel namespace ValveFault { @@ -1964,21 +2417,27 @@ Get(chip::EndpointId endpoint, chip::BitMask * value); // ValveFaultBitmap Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::BitMask value, + MarkAttributeDirty markDirty); } // namespace ValveFault namespace LevelStep { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace LevelStep namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -1990,6 +2449,7 @@ namespace Attributes { namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -2001,6 +2461,7 @@ namespace Attributes { namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -2012,36 +2473,43 @@ namespace Attributes { namespace NumberOfLoadControlPrograms { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace NumberOfLoadControlPrograms namespace NumberOfEventsPerProgram { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace NumberOfEventsPerProgram namespace NumberOfTransitions { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace NumberOfTransitions namespace DefaultRandomStart { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace DefaultRandomStart namespace DefaultRandomDuration { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace DefaultRandomDuration namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -2053,11 +2521,13 @@ namespace Attributes { namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -2069,6 +2539,7 @@ namespace Attributes { namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -2080,6 +2551,7 @@ namespace Attributes { namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -2091,21 +2563,25 @@ namespace Attributes { namespace CurrentEnergyBalance { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace CurrentEnergyBalance namespace CurrentLowPowerModeSensitivity { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace CurrentLowPowerModeSensitivity namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -2117,6 +2593,7 @@ namespace Attributes { namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -2128,20 +2605,29 @@ namespace Attributes { namespace StartUpMode { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace StartUpMode namespace OnMode { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace OnMode namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -2153,20 +2639,29 @@ namespace Attributes { namespace StartUpMode { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace StartUpMode namespace OnMode { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace OnMode namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -2179,93 +2674,121 @@ namespace LockState { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // DlLockState Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::DoorLock::DlLockState value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::DoorLock::DlLockState value, + MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace LockState namespace LockType { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::DoorLock::DlLockType * value); // DlLockType Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::DoorLock::DlLockType value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::DoorLock::DlLockType value, + MarkAttributeDirty markDirty); } // namespace LockType namespace ActuatorEnabled { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value); // boolean Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty); } // namespace ActuatorEnabled namespace DoorState { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // DoorStateEnum Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::DoorLock::DoorStateEnum value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::DoorLock::DoorStateEnum value, + MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace DoorState namespace DoorOpenEvents { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // int32u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace DoorOpenEvents namespace DoorClosedEvents { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // int32u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace DoorClosedEvents namespace OpenPeriod { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace OpenPeriod namespace NumberOfTotalUsersSupported { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace NumberOfTotalUsersSupported namespace NumberOfPINUsersSupported { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace NumberOfPINUsersSupported namespace NumberOfRFIDUsersSupported { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace NumberOfRFIDUsersSupported namespace NumberOfWeekDaySchedulesSupportedPerUser { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace NumberOfWeekDaySchedulesSupportedPerUser namespace NumberOfYearDaySchedulesSupportedPerUser { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace NumberOfYearDaySchedulesSupportedPerUser namespace NumberOfHolidaySchedulesSupported { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace NumberOfHolidaySchedulesSupported namespace MaxPINCodeLength { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace MaxPINCodeLength namespace MinPINCodeLength { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace MinPINCodeLength namespace MaxRFIDCodeLength { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace MaxRFIDCodeLength namespace MinRFIDCodeLength { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace MinRFIDCodeLength namespace CredentialRulesSupport { @@ -2273,37 +2796,47 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::BitMask * value); // DlCredentialRuleMask Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::BitMask value, + MarkAttributeDirty markDirty); } // namespace CredentialRulesSupport namespace NumberOfCredentialsSupportedPerUser { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace NumberOfCredentialsSupportedPerUser namespace Language { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); } // namespace Language namespace LEDSettings { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace LEDSettings namespace AutoRelockTime { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // int32u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace AutoRelockTime namespace SoundVolume { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace SoundVolume namespace OperatingMode { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::DoorLock::OperatingModeEnum * value); // OperatingModeEnum Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::DoorLock::OperatingModeEnum value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::DoorLock::OperatingModeEnum value, + MarkAttributeDirty markDirty); } // namespace OperatingMode namespace SupportedOperatingModes { @@ -2312,6 +2845,9 @@ Get(chip::EndpointId endpoint, chip::BitMask * value); // DlSupportedOperatingModes Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::BitMask value, + MarkAttributeDirty markDirty); } // namespace SupportedOperatingModes namespace DefaultConfigurationRegister { @@ -2320,26 +2856,33 @@ Get(chip::EndpointId endpoint, chip::BitMask * value); // DlDefaultConfigurationRegister Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::BitMask value, + MarkAttributeDirty markDirty); } // namespace DefaultConfigurationRegister namespace EnableLocalProgramming { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value); // boolean Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty); } // namespace EnableLocalProgramming namespace EnableOneTouchLocking { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value); // boolean Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty); } // namespace EnableOneTouchLocking namespace EnableInsideStatusLED { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value); // boolean Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty); } // namespace EnableInsideStatusLED namespace EnablePrivacyModeButton { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value); // boolean Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty); } // namespace EnablePrivacyModeButton namespace LocalProgrammingFeatures { @@ -2348,85 +2891,111 @@ Get(chip::EndpointId endpoint, chip::BitMask * value); // DlLocalProgrammingFeatures Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::BitMask value, + MarkAttributeDirty markDirty); } // namespace LocalProgrammingFeatures namespace WrongCodeEntryLimit { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace WrongCodeEntryLimit namespace UserCodeTemporaryDisableTime { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace UserCodeTemporaryDisableTime namespace SendPINOverTheAir { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value); // boolean Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty); } // namespace SendPINOverTheAir namespace RequirePINforRemoteOperation { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value); // boolean Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty); } // namespace RequirePINforRemoteOperation namespace ExpiringUserTimeout { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ExpiringUserTimeout namespace AliroReaderVerificationKey { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // octet_string Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpan value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpan value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace AliroReaderVerificationKey namespace AliroReaderGroupIdentifier { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // octet_string Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpan value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpan value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace AliroReaderGroupIdentifier namespace AliroReaderGroupSubIdentifier { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableByteSpan & value); // octet_string Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpan value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpan value, MarkAttributeDirty markDirty); } // namespace AliroReaderGroupSubIdentifier namespace AliroGroupResolvingKey { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // octet_string Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpan value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpan value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace AliroGroupResolvingKey namespace AliroBLEAdvertisingVersion { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace AliroBLEAdvertisingVersion namespace NumberOfAliroCredentialIssuerKeysSupported { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace NumberOfAliroCredentialIssuerKeysSupported namespace NumberOfAliroEndpointKeysSupported { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace NumberOfAliroEndpointKeysSupported namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -2438,40 +3007,54 @@ namespace Attributes { namespace Type { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::WindowCovering::Type * value); // Type Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::WindowCovering::Type value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::WindowCovering::Type value, + MarkAttributeDirty markDirty); } // namespace Type namespace PhysicalClosedLimitLift { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace PhysicalClosedLimitLift namespace PhysicalClosedLimitTilt { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace PhysicalClosedLimitTilt namespace CurrentPositionLift { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace CurrentPositionLift namespace CurrentPositionTilt { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace CurrentPositionTilt namespace NumberOfActuationsLift { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace NumberOfActuationsLift namespace NumberOfActuationsTilt { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace NumberOfActuationsTilt namespace ConfigStatus { @@ -2479,20 +3062,31 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::BitMask * value); // ConfigStatus Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::BitMask value, + MarkAttributeDirty markDirty); } // namespace ConfigStatus namespace CurrentPositionLiftPercentage { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // percent Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace CurrentPositionLiftPercentage namespace CurrentPositionTiltPercentage { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // percent Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace CurrentPositionTiltPercentage namespace OperationalStatus { @@ -2500,74 +3094,101 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::BitMask * value); // OperationalStatus Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::BitMask value, + MarkAttributeDirty markDirty); } // namespace OperationalStatus namespace TargetPositionLiftPercent100ths { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // percent100ths Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent100ths value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent100ths value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status +Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace TargetPositionLiftPercent100ths namespace TargetPositionTiltPercent100ths { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // percent100ths Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent100ths value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent100ths value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status +Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace TargetPositionTiltPercent100ths namespace EndProductType { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::WindowCovering::EndProductType * value); // EndProductType Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::WindowCovering::EndProductType value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::WindowCovering::EndProductType value, + MarkAttributeDirty markDirty); } // namespace EndProductType namespace CurrentPositionLiftPercent100ths { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // percent100ths Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent100ths value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent100ths value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status +Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace CurrentPositionLiftPercent100ths namespace CurrentPositionTiltPercent100ths { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // percent100ths Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent100ths value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent100ths value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status +Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace CurrentPositionTiltPercent100ths namespace InstalledOpenLimitLift { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace InstalledOpenLimitLift namespace InstalledClosedLimitLift { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace InstalledClosedLimitLift namespace InstalledOpenLimitTilt { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace InstalledOpenLimitTilt namespace InstalledClosedLimitTilt { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace InstalledClosedLimitTilt namespace Mode { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::BitMask * value); // Mode Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value, + MarkAttributeDirty markDirty); } // namespace Mode namespace SafetyStatus { @@ -2575,16 +3196,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::BitMask * value); // SafetyStatus Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::BitMask value, + MarkAttributeDirty markDirty); } // namespace SafetyStatus namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -2596,61 +3222,73 @@ namespace Attributes { namespace BarrierMovingState { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // enum8 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace BarrierMovingState namespace BarrierSafetyStatus { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // bitmap16 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace BarrierSafetyStatus namespace BarrierCapabilities { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // bitmap8 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace BarrierCapabilities namespace BarrierOpenEvents { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace BarrierOpenEvents namespace BarrierCloseEvents { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace BarrierCloseEvents namespace BarrierCommandOpenEvents { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace BarrierCommandOpenEvents namespace BarrierCommandCloseEvents { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace BarrierCommandCloseEvents namespace BarrierOpenPeriod { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace BarrierOpenPeriod namespace BarrierClosePeriod { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace BarrierClosePeriod namespace BarrierPosition { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace BarrierPosition namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -2662,92 +3300,144 @@ namespace Attributes { namespace MaxPressure { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace MaxPressure namespace MaxSpeed { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace MaxSpeed namespace MaxFlow { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace MaxFlow namespace MinConstPressure { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace MinConstPressure namespace MaxConstPressure { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace MaxConstPressure namespace MinCompPressure { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace MinCompPressure namespace MaxCompPressure { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace MaxCompPressure namespace MinConstSpeed { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace MinConstSpeed namespace MaxConstSpeed { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace MaxConstSpeed namespace MinConstFlow { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace MinConstFlow namespace MaxConstFlow { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace MaxConstFlow namespace MinConstTemp { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace MinConstTemp namespace MaxConstTemp { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace MaxConstTemp namespace PumpStatus { @@ -2756,6 +3446,9 @@ Get(chip::EndpointId endpoint, chip::BitMask * value); // PumpStatusBitmap Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::BitMask value, + MarkAttributeDirty markDirty); } // namespace PumpStatus namespace EffectiveOperationMode { @@ -2763,6 +3456,9 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::PumpConfigurationAndControl::OperationModeEnum * value); // OperationModeEnum Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::PumpConfigurationAndControl::OperationModeEnum value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::app::Clusters::PumpConfigurationAndControl::OperationModeEnum value, + MarkAttributeDirty markDirty); } // namespace EffectiveOperationMode namespace EffectiveControlMode { @@ -2770,41 +3466,64 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::PumpConfigurationAndControl::ControlModeEnum * value); // ControlModeEnum Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::PumpConfigurationAndControl::ControlModeEnum value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::app::Clusters::PumpConfigurationAndControl::ControlModeEnum value, + MarkAttributeDirty markDirty); } // namespace EffectiveControlMode namespace Capacity { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace Capacity namespace Speed { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace Speed namespace LifetimeRunningHours { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int24u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace LifetimeRunningHours namespace Power { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int24u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace Power namespace LifetimeEnergyConsumed { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int32u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace LifetimeEnergyConsumed namespace OperationMode { @@ -2812,6 +3531,9 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::PumpConfigurationAndControl::OperationModeEnum * value); // OperationModeEnum Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::PumpConfigurationAndControl::OperationModeEnum value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::app::Clusters::PumpConfigurationAndControl::OperationModeEnum value, + MarkAttributeDirty markDirty); } // namespace OperationMode namespace ControlMode { @@ -2819,16 +3541,21 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::PumpConfigurationAndControl::ControlModeEnum * value); // ControlModeEnum Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::PumpConfigurationAndControl::ControlModeEnum value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::app::Clusters::PumpConfigurationAndControl::ControlModeEnum value, + MarkAttributeDirty markDirty); } // namespace ControlMode namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -2840,105 +3567,131 @@ namespace Attributes { namespace LocalTemperature { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // temperature Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace LocalTemperature namespace OutdoorTemperature { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // temperature Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace OutdoorTemperature namespace Occupancy { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // bitmap8 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace Occupancy namespace AbsMinHeatSetpointLimit { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // temperature Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace AbsMinHeatSetpointLimit namespace AbsMaxHeatSetpointLimit { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // temperature Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace AbsMaxHeatSetpointLimit namespace AbsMinCoolSetpointLimit { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // temperature Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace AbsMinCoolSetpointLimit namespace AbsMaxCoolSetpointLimit { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // temperature Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace AbsMaxCoolSetpointLimit namespace PICoolingDemand { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace PICoolingDemand namespace PIHeatingDemand { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace PIHeatingDemand namespace HVACSystemTypeConfiguration { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // bitmap8 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace HVACSystemTypeConfiguration namespace LocalTemperatureCalibration { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int8_t * value); // int8s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value, MarkAttributeDirty markDirty); } // namespace LocalTemperatureCalibration namespace OccupiedCoolingSetpoint { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace OccupiedCoolingSetpoint namespace OccupiedHeatingSetpoint { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace OccupiedHeatingSetpoint namespace UnoccupiedCoolingSetpoint { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace UnoccupiedCoolingSetpoint namespace UnoccupiedHeatingSetpoint { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace UnoccupiedHeatingSetpoint namespace MinHeatSetpointLimit { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace MinHeatSetpointLimit namespace MaxHeatSetpointLimit { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace MaxHeatSetpointLimit namespace MinCoolSetpointLimit { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace MinCoolSetpointLimit namespace MaxCoolSetpointLimit { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace MaxCoolSetpointLimit namespace MinSetpointDeadBand { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int8_t * value); // int8s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value, MarkAttributeDirty markDirty); } // namespace MinSetpointDeadBand namespace RemoteSensing { @@ -2946,6 +3699,9 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::BitMask * value); // RemoteSensingBitmap Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::BitMask value, + MarkAttributeDirty markDirty); } // namespace RemoteSensing namespace ControlSequenceOfOperation { @@ -2954,12 +3710,16 @@ Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ControlSequenceOfOperationEnum * value); // ControlSequenceOfOperationEnum Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ControlSequenceOfOperationEnum value); +Protocols::InteractionModel::Status +Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ControlSequenceOfOperationEnum value, MarkAttributeDirty markDirty); } // namespace ControlSequenceOfOperation namespace SystemMode { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::SystemModeEnum * value); // SystemModeEnum Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::SystemModeEnum value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::SystemModeEnum value, + MarkAttributeDirty markDirty); } // namespace SystemMode namespace ThermostatRunningMode { @@ -2967,22 +3727,28 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ThermostatRunningModeEnum * value); // ThermostatRunningModeEnum Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ThermostatRunningModeEnum value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ThermostatRunningModeEnum value, + MarkAttributeDirty markDirty); } // namespace ThermostatRunningMode namespace StartOfWeek { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::StartOfWeekEnum * value); // StartOfWeekEnum Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::StartOfWeekEnum value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::StartOfWeekEnum value, + MarkAttributeDirty markDirty); } // namespace StartOfWeek namespace NumberOfWeeklyTransitions { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace NumberOfWeeklyTransitions namespace NumberOfDailyTransitions { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace NumberOfDailyTransitions namespace TemperatureSetpointHold { @@ -2990,13 +3756,19 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::TemperatureSetpointHoldEnum * value); // TemperatureSetpointHoldEnum Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::TemperatureSetpointHoldEnum value); +Protocols::InteractionModel::Status +Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::TemperatureSetpointHoldEnum value, MarkAttributeDirty markDirty); } // namespace TemperatureSetpointHold namespace TemperatureSetpointHoldDuration { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace TemperatureSetpointHoldDuration namespace ThermostatProgrammingOperationMode { @@ -3005,6 +3777,9 @@ Get(chip::EndpointId endpoint, chip::BitMask * value); // ProgrammingOperationModeBitmap Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::BitMask value, + MarkAttributeDirty markDirty); } // namespace ThermostatProgrammingOperationMode namespace ThermostatRunningState { @@ -3012,94 +3787,136 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::BitMask * value); // RelayStateBitmap Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::BitMask value, + MarkAttributeDirty markDirty); } // namespace ThermostatRunningState namespace SetpointChangeSource { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::SetpointChangeSourceEnum * value); // SetpointChangeSourceEnum Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::SetpointChangeSourceEnum value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::SetpointChangeSourceEnum value, + MarkAttributeDirty markDirty); } // namespace SetpointChangeSource namespace SetpointChangeAmount { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace SetpointChangeAmount namespace SetpointChangeSourceTimestamp { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // epoch_s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace SetpointChangeSourceTimestamp namespace OccupiedSetback { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace OccupiedSetback namespace OccupiedSetbackMin { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace OccupiedSetbackMin namespace OccupiedSetbackMax { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace OccupiedSetbackMax namespace UnoccupiedSetback { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace UnoccupiedSetback namespace UnoccupiedSetbackMin { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace UnoccupiedSetbackMin namespace UnoccupiedSetbackMax { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace UnoccupiedSetbackMax namespace EmergencyHeatDelta { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace EmergencyHeatDelta namespace ACType { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACTypeEnum * value); // ACTypeEnum Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACTypeEnum value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACTypeEnum value, + MarkAttributeDirty markDirty); } // namespace ACType namespace ACCapacity { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ACCapacity namespace ACRefrigerantType { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACRefrigerantTypeEnum * value); // ACRefrigerantTypeEnum Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACRefrigerantTypeEnum value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACRefrigerantTypeEnum value, + MarkAttributeDirty markDirty); } // namespace ACRefrigerantType namespace ACCompressorType { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACCompressorTypeEnum * value); // ACCompressorTypeEnum Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACCompressorTypeEnum value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACCompressorTypeEnum value, + MarkAttributeDirty markDirty); } // namespace ACCompressorType namespace ACErrorCode { @@ -3107,68 +3924,95 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::BitMask * value); // ACErrorCodeBitmap Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::BitMask value, + MarkAttributeDirty markDirty); } // namespace ACErrorCode namespace ACLouverPosition { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACLouverPositionEnum * value); // ACLouverPositionEnum Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACLouverPositionEnum value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACLouverPositionEnum value, + MarkAttributeDirty markDirty); } // namespace ACLouverPosition namespace ACCoilTemperature { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // temperature Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace ACCoilTemperature namespace ACCapacityformat { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACCapacityFormatEnum * value); // ACCapacityFormatEnum Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACCapacityFormatEnum value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACCapacityFormatEnum value, + MarkAttributeDirty markDirty); } // namespace ACCapacityformat namespace NumberOfPresets { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace NumberOfPresets namespace NumberOfSchedules { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace NumberOfSchedules namespace NumberOfScheduleTransitions { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace NumberOfScheduleTransitions namespace NumberOfScheduleTransitionPerDay { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace NumberOfScheduleTransitionPerDay namespace ActivePresetHandle { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // octet_string Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpan value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpan value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace ActivePresetHandle namespace ActiveScheduleHandle { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // octet_string Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpan value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpan value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace ActiveScheduleHandle namespace PresetsSchedulesEditable { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value); // boolean Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty); } // namespace PresetsSchedulesEditable namespace TemperatureSetpointHoldPolicy { @@ -3177,23 +4021,32 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, value); // TemperatureSetpointHoldPolicyBitmap Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::BitMask value, + MarkAttributeDirty markDirty); } // namespace TemperatureSetpointHoldPolicy namespace SetpointHoldExpiryTimestamp { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // epoch_s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace SetpointHoldExpiryTimestamp namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -3206,41 +4059,56 @@ namespace FanMode { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::FanControl::FanModeEnum * value); // FanModeEnum Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::FanControl::FanModeEnum value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::FanControl::FanModeEnum value, + MarkAttributeDirty markDirty); } // namespace FanMode namespace FanModeSequence { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::FanControl::FanModeSequenceEnum * value); // FanModeSequenceEnum Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::FanControl::FanModeSequenceEnum value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::FanControl::FanModeSequenceEnum value, + MarkAttributeDirty markDirty); } // namespace FanModeSequence namespace PercentSetting { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // percent Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace PercentSetting namespace PercentCurrent { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Percent * value); // percent Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent value, MarkAttributeDirty markDirty); } // namespace PercentCurrent namespace SpeedMax { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace SpeedMax namespace SpeedSetting { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace SpeedSetting namespace SpeedCurrent { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace SpeedCurrent namespace RockSupport { @@ -3248,6 +4116,8 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::BitMask * value); // RockBitmap Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value, + MarkAttributeDirty markDirty); } // namespace RockSupport namespace RockSetting { @@ -3255,6 +4125,8 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::BitMask * value); // RockBitmap Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value, + MarkAttributeDirty markDirty); } // namespace RockSetting namespace WindSupport { @@ -3262,6 +4134,8 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::BitMask * value); // WindBitmap Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value, + MarkAttributeDirty markDirty); } // namespace WindSupport namespace WindSetting { @@ -3269,22 +4143,28 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::BitMask * value); // WindBitmap Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value, + MarkAttributeDirty markDirty); } // namespace WindSetting namespace AirflowDirection { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::FanControl::AirflowDirectionEnum * value); // AirflowDirectionEnum Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::FanControl::AirflowDirectionEnum value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::FanControl::AirflowDirectionEnum value, + MarkAttributeDirty markDirty); } // namespace AirflowDirection namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -3299,6 +4179,9 @@ Get(chip::EndpointId endpoint, chip::app::Clusters::ThermostatUserInterfaceConfiguration::TemperatureDisplayModeEnum * value); // TemperatureDisplayModeEnum Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::ThermostatUserInterfaceConfiguration::TemperatureDisplayModeEnum value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::app::Clusters::ThermostatUserInterfaceConfiguration::TemperatureDisplayModeEnum value, + MarkAttributeDirty markDirty); } // namespace TemperatureDisplayMode namespace KeypadLockout { @@ -3307,6 +4190,9 @@ Get(chip::EndpointId endpoint, chip::app::Clusters::ThermostatUserInterfaceConfiguration::KeypadLockoutEnum * value); // KeypadLockoutEnum Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::ThermostatUserInterfaceConfiguration::KeypadLockoutEnum value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::app::Clusters::ThermostatUserInterfaceConfiguration::KeypadLockoutEnum value, + MarkAttributeDirty markDirty); } // namespace KeypadLockout namespace ScheduleProgrammingVisibility { @@ -3316,16 +4202,21 @@ Get(chip::EndpointId endpoint, value); // ScheduleProgrammingVisibilityEnum Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::ThermostatUserInterfaceConfiguration::ScheduleProgrammingVisibilityEnum value); +Protocols::InteractionModel::Status +Set(chip::EndpointId endpoint, chip::app::Clusters::ThermostatUserInterfaceConfiguration::ScheduleProgrammingVisibilityEnum value, + MarkAttributeDirty markDirty); } // namespace ScheduleProgrammingVisibility namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -3337,293 +4228,380 @@ namespace Attributes { namespace CurrentHue { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace CurrentHue namespace CurrentSaturation { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace CurrentSaturation namespace RemainingTime { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace RemainingTime namespace CurrentX { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace CurrentX namespace CurrentY { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace CurrentY namespace DriftCompensation { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // enum8 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace DriftCompensation namespace CompensationText { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); } // namespace CompensationText namespace ColorTemperatureMireds { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ColorTemperatureMireds namespace ColorMode { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // enum8 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace ColorMode namespace Options { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // bitmap8 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace Options namespace NumberOfPrimaries { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace NumberOfPrimaries namespace Primary1X { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace Primary1X namespace Primary1Y { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace Primary1Y namespace Primary1Intensity { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace Primary1Intensity namespace Primary2X { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace Primary2X namespace Primary2Y { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace Primary2Y namespace Primary2Intensity { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace Primary2Intensity namespace Primary3X { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace Primary3X namespace Primary3Y { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace Primary3Y namespace Primary3Intensity { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace Primary3Intensity namespace Primary4X { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace Primary4X namespace Primary4Y { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace Primary4Y namespace Primary4Intensity { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace Primary4Intensity namespace Primary5X { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace Primary5X namespace Primary5Y { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace Primary5Y namespace Primary5Intensity { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace Primary5Intensity namespace Primary6X { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace Primary6X namespace Primary6Y { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace Primary6Y namespace Primary6Intensity { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace Primary6Intensity namespace WhitePointX { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace WhitePointX namespace WhitePointY { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace WhitePointY namespace ColorPointRX { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ColorPointRX namespace ColorPointRY { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ColorPointRY namespace ColorPointRIntensity { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace ColorPointRIntensity namespace ColorPointGX { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ColorPointGX namespace ColorPointGY { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ColorPointGY namespace ColorPointGIntensity { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace ColorPointGIntensity namespace ColorPointBX { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ColorPointBX namespace ColorPointBY { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ColorPointBY namespace ColorPointBIntensity { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace ColorPointBIntensity namespace EnhancedCurrentHue { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace EnhancedCurrentHue namespace EnhancedColorMode { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // enum8 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace EnhancedColorMode namespace ColorLoopActive { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace ColorLoopActive namespace ColorLoopDirection { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace ColorLoopDirection namespace ColorLoopTime { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ColorLoopTime namespace ColorLoopStartEnhancedHue { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ColorLoopStartEnhancedHue namespace ColorLoopStoredEnhancedHue { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ColorLoopStoredEnhancedHue namespace ColorCapabilities { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // bitmap16 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ColorCapabilities namespace ColorTempPhysicalMinMireds { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ColorTempPhysicalMinMireds namespace ColorTempPhysicalMaxMireds { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ColorTempPhysicalMaxMireds namespace CoupleColorTempToLevelMinMireds { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace CoupleColorTempToLevelMinMireds namespace StartUpColorTemperatureMireds { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace StartUpColorTemperatureMireds namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -3635,11 +4613,13 @@ namespace Attributes { namespace PhysicalMinLevel { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace PhysicalMinLevel namespace PhysicalMaxLevel { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace PhysicalMaxLevel namespace BallastStatus { @@ -3648,59 +4628,83 @@ Get(chip::EndpointId endpoint, chip::BitMask * value); // BallastStatusBitmap Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::BitMask value, + MarkAttributeDirty markDirty); } // namespace BallastStatus namespace MinLevel { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace MinLevel namespace MaxLevel { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace MaxLevel namespace IntrinsicBallastFactor { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace IntrinsicBallastFactor namespace BallastFactorAdjustment { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace BallastFactorAdjustment namespace LampQuantity { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace LampQuantity namespace LampType { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); } // namespace LampType namespace LampManufacturer { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); } // namespace LampManufacturer namespace LampRatedHours { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int24u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace LampRatedHours namespace LampBurnHours { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int24u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace LampBurnHours namespace LampAlarmMode { @@ -3709,23 +4713,32 @@ Get(chip::EndpointId endpoint, chip::BitMask * value); // LampAlarmModeBitmap Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::BitMask value, + MarkAttributeDirty markDirty); } // namespace LampAlarmMode namespace LampBurnHoursTripPoint { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int24u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace LampBurnHoursTripPoint namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -3737,27 +4750,40 @@ namespace Attributes { namespace MeasuredValue { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace MeasuredValue namespace MinMeasuredValue { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace MinMeasuredValue namespace MaxMeasuredValue { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace MaxMeasuredValue namespace Tolerance { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace Tolerance namespace LightSensorType { @@ -3766,20 +4792,30 @@ Get(chip::EndpointId endpoint, DataModel::Nullable & value); // LightSensorTypeEnum Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::IlluminanceMeasurement::LightSensorTypeEnum value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::app::Clusters::IlluminanceMeasurement::LightSensorTypeEnum value, + MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status +Set(chip::EndpointId endpoint, + const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace LightSensorType namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -3791,37 +4827,52 @@ namespace Attributes { namespace MeasuredValue { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // temperature Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace MeasuredValue namespace MinMeasuredValue { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // temperature Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace MinMeasuredValue namespace MaxMeasuredValue { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // temperature Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace MaxMeasuredValue namespace Tolerance { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace Tolerance namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -3833,68 +4884,97 @@ namespace Attributes { namespace MeasuredValue { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace MeasuredValue namespace MinMeasuredValue { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace MinMeasuredValue namespace MaxMeasuredValue { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace MaxMeasuredValue namespace Tolerance { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace Tolerance namespace ScaledValue { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace ScaledValue namespace MinScaledValue { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace MinScaledValue namespace MaxScaledValue { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace MaxScaledValue namespace ScaledTolerance { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ScaledTolerance namespace Scale { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int8_t * value); // int8s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value, MarkAttributeDirty markDirty); } // namespace Scale namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -3906,37 +4986,52 @@ namespace Attributes { namespace MeasuredValue { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace MeasuredValue namespace MinMeasuredValue { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace MinMeasuredValue namespace MaxMeasuredValue { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace MaxMeasuredValue namespace Tolerance { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace Tolerance namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -3948,37 +5043,52 @@ namespace Attributes { namespace MeasuredValue { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace MeasuredValue namespace MinMeasuredValue { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace MinMeasuredValue namespace MaxMeasuredValue { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace MaxMeasuredValue namespace Tolerance { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace Tolerance namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -3992,6 +5102,9 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::BitMask * value); // OccupancyBitmap Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::BitMask value, + MarkAttributeDirty markDirty); } // namespace Occupancy namespace OccupancySensorType { @@ -3999,6 +5112,8 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::OccupancySensing::OccupancySensorTypeEnum * value); // OccupancySensorTypeEnum Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::OccupancySensing::OccupancySensorTypeEnum value); +Protocols::InteractionModel::Status +Set(chip::EndpointId endpoint, chip::app::Clusters::OccupancySensing::OccupancySensorTypeEnum value, MarkAttributeDirty markDirty); } // namespace OccupancySensorType namespace OccupancySensorTypeBitmap { @@ -4007,61 +5122,75 @@ Get(chip::EndpointId endpoint, chip::BitMask * value); // OccupancySensorTypeBitmap Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::BitMask value, + MarkAttributeDirty markDirty); } // namespace OccupancySensorTypeBitmap namespace PIROccupiedToUnoccupiedDelay { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace PIROccupiedToUnoccupiedDelay namespace PIRUnoccupiedToOccupiedDelay { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace PIRUnoccupiedToOccupiedDelay namespace PIRUnoccupiedToOccupiedThreshold { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace PIRUnoccupiedToOccupiedThreshold namespace UltrasonicOccupiedToUnoccupiedDelay { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace UltrasonicOccupiedToUnoccupiedDelay namespace UltrasonicUnoccupiedToOccupiedDelay { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace UltrasonicUnoccupiedToOccupiedDelay namespace UltrasonicUnoccupiedToOccupiedThreshold { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace UltrasonicUnoccupiedToOccupiedThreshold namespace PhysicalContactOccupiedToUnoccupiedDelay { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace PhysicalContactOccupiedToUnoccupiedDelay namespace PhysicalContactUnoccupiedToOccupiedDelay { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace PhysicalContactUnoccupiedToOccupiedDelay namespace PhysicalContactUnoccupiedToOccupiedThreshold { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace PhysicalContactUnoccupiedToOccupiedThreshold namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -4073,6 +5202,7 @@ namespace Attributes { namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -4084,6 +5214,7 @@ namespace Attributes { namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -4095,6 +5226,7 @@ namespace Attributes { namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -4106,6 +5238,7 @@ namespace Attributes { namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -4117,6 +5250,7 @@ namespace Attributes { namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -4128,6 +5262,7 @@ namespace Attributes { namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -4139,6 +5274,7 @@ namespace Attributes { namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -4150,6 +5286,7 @@ namespace Attributes { namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -4161,6 +5298,7 @@ namespace Attributes { namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -4172,6 +5310,7 @@ namespace Attributes { namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -4183,21 +5322,25 @@ namespace Attributes { namespace MACAddress { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); } // namespace MACAddress namespace LinkLocalAddress { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableByteSpan & value); // octet_string Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpan value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpan value, MarkAttributeDirty markDirty); } // namespace LinkLocalAddress namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -4209,11 +5352,13 @@ namespace Attributes { namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -4225,16 +5370,19 @@ namespace Attributes { namespace CurrentTarget { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace CurrentTarget namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -4247,49 +5395,70 @@ namespace CurrentState { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::MediaPlayback::PlaybackStateEnum * value); // PlaybackStateEnum Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::MediaPlayback::PlaybackStateEnum value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::MediaPlayback::PlaybackStateEnum value, + MarkAttributeDirty markDirty); } // namespace CurrentState namespace StartTime { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // epoch_us Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace StartTime namespace Duration { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int64u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace Duration namespace PlaybackSpeed { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, float * value); // single Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, float value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, float value, MarkAttributeDirty markDirty); } // namespace PlaybackSpeed namespace SeekRangeEnd { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int64u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace SeekRangeEnd namespace SeekRangeStart { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int64u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace SeekRangeStart namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -4301,16 +5470,19 @@ namespace Attributes { namespace CurrentInput { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace CurrentInput namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -4322,11 +5494,13 @@ namespace Attributes { namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -4338,11 +5512,13 @@ namespace Attributes { namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -4357,16 +5533,21 @@ Get(chip::EndpointId endpoint, chip::BitMask * value); // SupportedProtocolsBitmap Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::BitMask value, + MarkAttributeDirty markDirty); } // namespace SupportedStreamingProtocols namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -4378,16 +5559,19 @@ namespace Attributes { namespace CurrentOutput { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace CurrentOutput namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -4399,11 +5583,13 @@ namespace Attributes { namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -4415,21 +5601,25 @@ namespace Attributes { namespace VendorName { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); } // namespace VendorName namespace VendorID { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::VendorId * value); // vendor_id Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::VendorId value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::VendorId value, MarkAttributeDirty markDirty); } // namespace VendorID namespace ApplicationName { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // long_char_string Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); } // namespace ApplicationName namespace ProductID { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ProductID namespace Status { @@ -4437,21 +5627,26 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::ApplicationBasic::ApplicationStatusEnum * value); // ApplicationStatusEnum Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::ApplicationBasic::ApplicationStatusEnum value); +Protocols::InteractionModel::Status +Set(chip::EndpointId endpoint, chip::app::Clusters::ApplicationBasic::ApplicationStatusEnum value, MarkAttributeDirty markDirty); } // namespace Status namespace ApplicationVersion { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); } // namespace ApplicationVersion namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -4463,11 +5658,13 @@ namespace Attributes { namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -4479,41 +5676,49 @@ namespace Attributes { namespace Enabled { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value); // boolean Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty); } // namespace Enabled namespace OnDemandRatingThreshold { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); } // namespace OnDemandRatingThreshold namespace ScheduledContentRatingThreshold { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); } // namespace ScheduledContentRatingThreshold namespace ScreenDailyTime { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // elapsed_s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace ScreenDailyTime namespace RemainingScreenTime { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // elapsed_s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace RemainingScreenTime namespace BlockUnrated { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value); // boolean Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty); } // namespace BlockUnrated namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -4525,11 +5730,13 @@ namespace Attributes { namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -4541,651 +5748,781 @@ namespace Attributes { namespace MeasurementType { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace MeasurementType namespace DcVoltage { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace DcVoltage namespace DcVoltageMin { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace DcVoltageMin namespace DcVoltageMax { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace DcVoltageMax namespace DcCurrent { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace DcCurrent namespace DcCurrentMin { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace DcCurrentMin namespace DcCurrentMax { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace DcCurrentMax namespace DcPower { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace DcPower namespace DcPowerMin { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace DcPowerMin namespace DcPowerMax { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace DcPowerMax namespace DcVoltageMultiplier { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace DcVoltageMultiplier namespace DcVoltageDivisor { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace DcVoltageDivisor namespace DcCurrentMultiplier { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace DcCurrentMultiplier namespace DcCurrentDivisor { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace DcCurrentDivisor namespace DcPowerMultiplier { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace DcPowerMultiplier namespace DcPowerDivisor { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace DcPowerDivisor namespace AcFrequency { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace AcFrequency namespace AcFrequencyMin { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace AcFrequencyMin namespace AcFrequencyMax { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace AcFrequencyMax namespace NeutralCurrent { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace NeutralCurrent namespace TotalActivePower { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int32_t * value); // int32s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int32_t value, MarkAttributeDirty markDirty); } // namespace TotalActivePower namespace TotalReactivePower { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int32_t * value); // int32s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int32_t value, MarkAttributeDirty markDirty); } // namespace TotalReactivePower namespace TotalApparentPower { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // int32u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace TotalApparentPower namespace Measured1stHarmonicCurrent { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace Measured1stHarmonicCurrent namespace Measured3rdHarmonicCurrent { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace Measured3rdHarmonicCurrent namespace Measured5thHarmonicCurrent { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace Measured5thHarmonicCurrent namespace Measured7thHarmonicCurrent { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace Measured7thHarmonicCurrent namespace Measured9thHarmonicCurrent { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace Measured9thHarmonicCurrent namespace Measured11thHarmonicCurrent { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace Measured11thHarmonicCurrent namespace MeasuredPhase1stHarmonicCurrent { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace MeasuredPhase1stHarmonicCurrent namespace MeasuredPhase3rdHarmonicCurrent { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace MeasuredPhase3rdHarmonicCurrent namespace MeasuredPhase5thHarmonicCurrent { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace MeasuredPhase5thHarmonicCurrent namespace MeasuredPhase7thHarmonicCurrent { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace MeasuredPhase7thHarmonicCurrent namespace MeasuredPhase9thHarmonicCurrent { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace MeasuredPhase9thHarmonicCurrent namespace MeasuredPhase11thHarmonicCurrent { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace MeasuredPhase11thHarmonicCurrent namespace AcFrequencyMultiplier { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace AcFrequencyMultiplier namespace AcFrequencyDivisor { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace AcFrequencyDivisor namespace PowerMultiplier { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // int32u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace PowerMultiplier namespace PowerDivisor { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // int32u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace PowerDivisor namespace HarmonicCurrentMultiplier { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int8_t * value); // int8s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value, MarkAttributeDirty markDirty); } // namespace HarmonicCurrentMultiplier namespace PhaseHarmonicCurrentMultiplier { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int8_t * value); // int8s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value, MarkAttributeDirty markDirty); } // namespace PhaseHarmonicCurrentMultiplier namespace InstantaneousVoltage { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace InstantaneousVoltage namespace InstantaneousLineCurrent { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace InstantaneousLineCurrent namespace InstantaneousActiveCurrent { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace InstantaneousActiveCurrent namespace InstantaneousReactiveCurrent { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace InstantaneousReactiveCurrent namespace InstantaneousPower { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace InstantaneousPower namespace RmsVoltage { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace RmsVoltage namespace RmsVoltageMin { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace RmsVoltageMin namespace RmsVoltageMax { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace RmsVoltageMax namespace RmsCurrent { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace RmsCurrent namespace RmsCurrentMin { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace RmsCurrentMin namespace RmsCurrentMax { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace RmsCurrentMax namespace ActivePower { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace ActivePower namespace ActivePowerMin { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace ActivePowerMin namespace ActivePowerMax { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace ActivePowerMax namespace ReactivePower { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace ReactivePower namespace ApparentPower { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ApparentPower namespace PowerFactor { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int8_t * value); // int8s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value, MarkAttributeDirty markDirty); } // namespace PowerFactor namespace AverageRmsVoltageMeasurementPeriod { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace AverageRmsVoltageMeasurementPeriod namespace AverageRmsUnderVoltageCounter { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace AverageRmsUnderVoltageCounter namespace RmsExtremeOverVoltagePeriod { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace RmsExtremeOverVoltagePeriod namespace RmsExtremeUnderVoltagePeriod { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace RmsExtremeUnderVoltagePeriod namespace RmsVoltageSagPeriod { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace RmsVoltageSagPeriod namespace RmsVoltageSwellPeriod { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace RmsVoltageSwellPeriod namespace AcVoltageMultiplier { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace AcVoltageMultiplier namespace AcVoltageDivisor { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace AcVoltageDivisor namespace AcCurrentMultiplier { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace AcCurrentMultiplier namespace AcCurrentDivisor { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace AcCurrentDivisor namespace AcPowerMultiplier { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace AcPowerMultiplier namespace AcPowerDivisor { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace AcPowerDivisor namespace OverloadAlarmsMask { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // bitmap8 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace OverloadAlarmsMask namespace VoltageOverload { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace VoltageOverload namespace CurrentOverload { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace CurrentOverload namespace AcOverloadAlarmsMask { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // bitmap16 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace AcOverloadAlarmsMask namespace AcVoltageOverload { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace AcVoltageOverload namespace AcCurrentOverload { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace AcCurrentOverload namespace AcActivePowerOverload { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace AcActivePowerOverload namespace AcReactivePowerOverload { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace AcReactivePowerOverload namespace AverageRmsOverVoltage { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace AverageRmsOverVoltage namespace AverageRmsUnderVoltage { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace AverageRmsUnderVoltage namespace RmsExtremeOverVoltage { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace RmsExtremeOverVoltage namespace RmsExtremeUnderVoltage { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace RmsExtremeUnderVoltage namespace RmsVoltageSag { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace RmsVoltageSag namespace RmsVoltageSwell { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace RmsVoltageSwell namespace LineCurrentPhaseB { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace LineCurrentPhaseB namespace ActiveCurrentPhaseB { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace ActiveCurrentPhaseB namespace ReactiveCurrentPhaseB { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace ReactiveCurrentPhaseB namespace RmsVoltagePhaseB { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace RmsVoltagePhaseB namespace RmsVoltageMinPhaseB { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace RmsVoltageMinPhaseB namespace RmsVoltageMaxPhaseB { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace RmsVoltageMaxPhaseB namespace RmsCurrentPhaseB { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace RmsCurrentPhaseB namespace RmsCurrentMinPhaseB { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace RmsCurrentMinPhaseB namespace RmsCurrentMaxPhaseB { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace RmsCurrentMaxPhaseB namespace ActivePowerPhaseB { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace ActivePowerPhaseB namespace ActivePowerMinPhaseB { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace ActivePowerMinPhaseB namespace ActivePowerMaxPhaseB { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace ActivePowerMaxPhaseB namespace ReactivePowerPhaseB { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace ReactivePowerPhaseB namespace ApparentPowerPhaseB { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ApparentPowerPhaseB namespace PowerFactorPhaseB { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int8_t * value); // int8s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value, MarkAttributeDirty markDirty); } // namespace PowerFactorPhaseB namespace AverageRmsVoltageMeasurementPeriodPhaseB { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace AverageRmsVoltageMeasurementPeriodPhaseB namespace AverageRmsOverVoltageCounterPhaseB { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace AverageRmsOverVoltageCounterPhaseB namespace AverageRmsUnderVoltageCounterPhaseB { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace AverageRmsUnderVoltageCounterPhaseB namespace RmsExtremeOverVoltagePeriodPhaseB { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace RmsExtremeOverVoltagePeriodPhaseB namespace RmsExtremeUnderVoltagePeriodPhaseB { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace RmsExtremeUnderVoltagePeriodPhaseB namespace RmsVoltageSagPeriodPhaseB { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace RmsVoltageSagPeriodPhaseB namespace RmsVoltageSwellPeriodPhaseB { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace RmsVoltageSwellPeriodPhaseB namespace LineCurrentPhaseC { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace LineCurrentPhaseC namespace ActiveCurrentPhaseC { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace ActiveCurrentPhaseC namespace ReactiveCurrentPhaseC { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace ReactiveCurrentPhaseC namespace RmsVoltagePhaseC { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace RmsVoltagePhaseC namespace RmsVoltageMinPhaseC { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace RmsVoltageMinPhaseC namespace RmsVoltageMaxPhaseC { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace RmsVoltageMaxPhaseC namespace RmsCurrentPhaseC { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace RmsCurrentPhaseC namespace RmsCurrentMinPhaseC { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace RmsCurrentMinPhaseC namespace RmsCurrentMaxPhaseC { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace RmsCurrentMaxPhaseC namespace ActivePowerPhaseC { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace ActivePowerPhaseC namespace ActivePowerMinPhaseC { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace ActivePowerMinPhaseC namespace ActivePowerMaxPhaseC { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace ActivePowerMaxPhaseC namespace ReactivePowerPhaseC { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace ReactivePowerPhaseC namespace ApparentPowerPhaseC { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ApparentPowerPhaseC namespace PowerFactorPhaseC { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int8_t * value); // int8s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value, MarkAttributeDirty markDirty); } // namespace PowerFactorPhaseC namespace AverageRmsVoltageMeasurementPeriodPhaseC { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace AverageRmsVoltageMeasurementPeriodPhaseC namespace AverageRmsOverVoltageCounterPhaseC { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace AverageRmsOverVoltageCounterPhaseC namespace AverageRmsUnderVoltageCounterPhaseC { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace AverageRmsUnderVoltageCounterPhaseC namespace RmsExtremeOverVoltagePeriodPhaseC { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace RmsExtremeOverVoltagePeriodPhaseC namespace RmsExtremeUnderVoltagePeriodPhaseC { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace RmsExtremeUnderVoltagePeriodPhaseC namespace RmsVoltageSagPeriodPhaseC { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace RmsVoltageSagPeriodPhaseC namespace RmsVoltageSwellPeriodPhaseC { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace RmsVoltageSwellPeriodPhaseC namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -5197,6 +6534,7 @@ namespace Attributes { namespace Boolean { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value); // boolean Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty); } // namespace Boolean namespace Bitmap8 { @@ -5204,6 +6542,8 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::BitMask * value); // Bitmap8MaskMap Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value); +Protocols::InteractionModel::Status +Set(chip::EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty); } // namespace Bitmap8 namespace Bitmap16 { @@ -5211,6 +6551,9 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::BitMask * value); // Bitmap16MaskMap Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::BitMask value, + MarkAttributeDirty markDirty); } // namespace Bitmap16 namespace Bitmap32 { @@ -5218,6 +6561,9 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::BitMask * value); // Bitmap32MaskMap Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::BitMask value, + MarkAttributeDirty markDirty); } // namespace Bitmap32 namespace Bitmap64 { @@ -5225,184 +6571,226 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::BitMask * value); // Bitmap64MaskMap Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::BitMask value, + MarkAttributeDirty markDirty); } // namespace Bitmap64 namespace Int8u { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace Int8u namespace Int16u { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace Int16u namespace Int24u { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // int24u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace Int24u namespace Int32u { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // int32u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace Int32u namespace Int40u { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint64_t * value); // int40u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty); } // namespace Int40u namespace Int48u { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint64_t * value); // int48u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty); } // namespace Int48u namespace Int56u { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint64_t * value); // int56u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty); } // namespace Int56u namespace Int64u { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint64_t * value); // int64u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty); } // namespace Int64u namespace Int8s { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int8_t * value); // int8s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value, MarkAttributeDirty markDirty); } // namespace Int8s namespace Int16s { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace Int16s namespace Int24s { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int32_t * value); // int24s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int32_t value, MarkAttributeDirty markDirty); } // namespace Int24s namespace Int32s { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int32_t * value); // int32s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int32_t value, MarkAttributeDirty markDirty); } // namespace Int32s namespace Int40s { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int64_t * value); // int40s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value, MarkAttributeDirty markDirty); } // namespace Int40s namespace Int48s { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int64_t * value); // int48s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value, MarkAttributeDirty markDirty); } // namespace Int48s namespace Int56s { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int64_t * value); // int56s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value, MarkAttributeDirty markDirty); } // namespace Int56s namespace Int64s { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int64_t * value); // int64s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value, MarkAttributeDirty markDirty); } // namespace Int64s namespace Enum8 { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // enum8 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace Enum8 namespace Enum16 { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // enum16 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace Enum16 namespace FloatSingle { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, float * value); // single Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, float value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, float value, MarkAttributeDirty markDirty); } // namespace FloatSingle namespace FloatDouble { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, double * value); // double Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, double value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, double value, MarkAttributeDirty markDirty); } // namespace FloatDouble namespace OctetString { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableByteSpan & value); // octet_string Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpan value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpan value, MarkAttributeDirty markDirty); } // namespace OctetString namespace LongOctetString { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableByteSpan & value); // long_octet_string Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpan value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpan value, MarkAttributeDirty markDirty); } // namespace LongOctetString namespace CharString { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); } // namespace CharString namespace LongCharString { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // long_char_string Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); } // namespace LongCharString namespace EpochUs { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint64_t * value); // epoch_us Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty); } // namespace EpochUs namespace EpochS { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // epoch_s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace EpochS namespace VendorId { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::VendorId * value); // vendor_id Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::VendorId value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::VendorId value, MarkAttributeDirty markDirty); } // namespace VendorId namespace EnumAttr { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::UnitTesting::SimpleEnum * value); // SimpleEnum Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::UnitTesting::SimpleEnum value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::UnitTesting::SimpleEnum value, + MarkAttributeDirty markDirty); } // namespace EnumAttr namespace RangeRestrictedInt8u { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace RangeRestrictedInt8u namespace RangeRestrictedInt8s { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int8_t * value); // int8s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value, MarkAttributeDirty markDirty); } // namespace RangeRestrictedInt8s namespace RangeRestrictedInt16u { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace RangeRestrictedInt16u namespace RangeRestrictedInt16s { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace RangeRestrictedInt16s namespace TimedWriteBoolean { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value); // boolean Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty); } // namespace TimedWriteBoolean namespace Unsupported { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value); // boolean Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty); } // namespace Unsupported namespace NullableBoolean { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // boolean Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace NullableBoolean namespace NullableBitmap8 { @@ -5411,10 +6799,17 @@ Get(chip::EndpointId endpoint, DataModel::Nullable> & value); // Bitmap8MaskMap Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value); +Protocols::InteractionModel::Status +Set(chip::EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable> & value); +Protocols::InteractionModel::Status +Set(chip::EndpointId endpoint, + const chip::app::DataModel::Nullable> & value, + MarkAttributeDirty markDirty); } // namespace NullableBitmap8 namespace NullableBitmap16 { @@ -5423,10 +6818,18 @@ Get(chip::EndpointId endpoint, DataModel::Nullable> & value); // Bitmap16MaskMap Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::BitMask value, + MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable> & value); +Protocols::InteractionModel::Status +Set(chip::EndpointId endpoint, + const chip::app::DataModel::Nullable> & value, + MarkAttributeDirty markDirty); } // namespace NullableBitmap16 namespace NullableBitmap32 { @@ -5435,10 +6838,18 @@ Get(chip::EndpointId endpoint, DataModel::Nullable> & value); // Bitmap32MaskMap Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::BitMask value, + MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable> & value); +Protocols::InteractionModel::Status +Set(chip::EndpointId endpoint, + const chip::app::DataModel::Nullable> & value, + MarkAttributeDirty markDirty); } // namespace NullableBitmap32 namespace NullableBitmap64 { @@ -5447,223 +6858,345 @@ Get(chip::EndpointId endpoint, DataModel::Nullable> & value); // Bitmap64MaskMap Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + chip::BitMask value, + MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable> & value); +Protocols::InteractionModel::Status +Set(chip::EndpointId endpoint, + const chip::app::DataModel::Nullable> & value, + MarkAttributeDirty markDirty); } // namespace NullableBitmap64 namespace NullableInt8u { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace NullableInt8u namespace NullableInt16u { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace NullableInt16u namespace NullableInt24u { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int24u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace NullableInt24u namespace NullableInt32u { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int32u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace NullableInt32u namespace NullableInt40u { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int40u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace NullableInt40u namespace NullableInt48u { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int48u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace NullableInt48u namespace NullableInt56u { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int56u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace NullableInt56u namespace NullableInt64u { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int64u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace NullableInt64u namespace NullableInt8s { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace NullableInt8s namespace NullableInt16s { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace NullableInt16s namespace NullableInt24s { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int24s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int32_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace NullableInt24s namespace NullableInt32s { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int32s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int32_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace NullableInt32s namespace NullableInt40s { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int40s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace NullableInt40s namespace NullableInt48s { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int48s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace NullableInt48s namespace NullableInt56s { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int56s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace NullableInt56s namespace NullableInt64s { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int64s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace NullableInt64s namespace NullableEnum8 { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // enum8 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace NullableEnum8 namespace NullableEnum16 { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // enum16 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace NullableEnum16 namespace NullableFloatSingle { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // single Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, float value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, float value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace NullableFloatSingle namespace NullableFloatDouble { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // double Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, double value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, double value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace NullableFloatDouble namespace NullableOctetString { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // octet_string Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpan value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpan value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace NullableOctetString namespace NullableCharString { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // char_string Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace NullableCharString namespace NullableEnumAttr { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // SimpleEnum Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::UnitTesting::SimpleEnum value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::UnitTesting::SimpleEnum value, + MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, + const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace NullableEnumAttr namespace NullableRangeRestrictedInt8u { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace NullableRangeRestrictedInt8u namespace NullableRangeRestrictedInt8s { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace NullableRangeRestrictedInt8s namespace NullableRangeRestrictedInt16u { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace NullableRangeRestrictedInt16u namespace NullableRangeRestrictedInt16s { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16s Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace NullableRangeRestrictedInt16s namespace WriteOnlyInt8u { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace WriteOnlyInt8u namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision namespace MeiInt8u { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace MeiInt8u } // namespace Attributes @@ -5675,11 +7208,13 @@ namespace Attributes { namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -5691,16 +7226,19 @@ namespace Attributes { namespace FlipFlop { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value); // boolean Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty); } // namespace FlipFlop namespace FeatureMap { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes From c6c8e678c928df5418ca33e7c437db8415ef1fd8 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Wed, 10 Apr 2024 16:09:29 -0400 Subject: [PATCH 023/468] Fix up mock ember implementation: (#32928) - provide data version function as described by attribute-storage.h - fix self-referencing structure copying for mock node configurations --- src/app/util/mock/MockNodeConfig.cpp | 7 +++++++ src/app/util/mock/MockNodeConfig.h | 4 ++++ src/app/util/mock/attribute-storage.cpp | 6 ++++++ 3 files changed, 17 insertions(+) diff --git a/src/app/util/mock/MockNodeConfig.cpp b/src/app/util/mock/MockNodeConfig.cpp index b4f6b1d27cfc5c..e7c04fa546e5c9 100644 --- a/src/app/util/mock/MockNodeConfig.cpp +++ b/src/app/util/mock/MockNodeConfig.cpp @@ -91,6 +91,13 @@ MockEndpointConfig::MockEndpointConfig(EndpointId aId, std::initializer_list aClusters = {}); + // Cluster-config is self-referntial: mEmberCluster.clusters references mEmberClusters + MockEndpointConfig(const MockEndpointConfig & other); + MockEndpointConfig & operator=(const MockEndpointConfig &) = delete; + const MockClusterConfig * clusterById(ClusterId clusterId, ptrdiff_t * outIndex = nullptr) const; const EmberAfEndpointType * emberEndpoint() const { return &mEmberEndpoint; } diff --git a/src/app/util/mock/attribute-storage.cpp b/src/app/util/mock/attribute-storage.cpp index d308316dd8fee5..6aa872956dbe7a 100644 --- a/src/app/util/mock/attribute-storage.cpp +++ b/src/app/util/mock/attribute-storage.cpp @@ -258,6 +258,12 @@ const EmberAfCluster * emberAfFindServerCluster(EndpointId endpointId, ClusterId return cluster->emberCluster(); } +DataVersion * emberAfDataVersionStorage(const chip::app::ConcreteClusterPath & aConcreteClusterPath) +{ + // shared data version storage + return &dataVersion; +} + namespace chip { namespace app { From 1cbd57d5523b5f5bd32ed54164fc79680a71051f Mon Sep 17 00:00:00 2001 From: achaulk-goog <107196446+achaulk-goog@users.noreply.github.com> Date: Wed, 10 Apr 2024 19:00:19 -0400 Subject: [PATCH 024/468] Only implement fault injection with NLFAULTINJECTION on (#32934) --- src/inet/tests/TestInetCommonOptions.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/inet/tests/TestInetCommonOptions.cpp b/src/inet/tests/TestInetCommonOptions.cpp index fc9c8df320a5c6..fdc79b11954a27 100644 --- a/src/inet/tests/TestInetCommonOptions.cpp +++ b/src/inet/tests/TestInetCommonOptions.cpp @@ -243,6 +243,7 @@ FaultInjectionOptions::FaultInjectionOptions() ExtraCleanupTimeMsec = 0; } +#if defined(CHIP_WITH_NLFAULTINJECTION) && CHIP_WITH_NLFAULTINJECTION bool FaultInjectionOptions::HandleOption(const char * progName, OptionSet * optSet, int id, const char * name, const char * arg) { using namespace nl::FaultInjection; @@ -292,3 +293,4 @@ bool FaultInjectionOptions::HandleOption(const char * progName, OptionSet * optS return true; } +#endif // defined(CHIP_WITH_NLFAULTINJECTION) && CHIP_WITH_NLFAULTINJECTION From 90663db39059875f96eda6554ed11046f27b012a Mon Sep 17 00:00:00 2001 From: Karsten Sperling <113487422+ksperling-apple@users.noreply.github.com> Date: Thu, 11 Apr 2024 15:04:57 +1200 Subject: [PATCH 025/468] Darwin: Leave the work queue running (#32923) * Darwin: Leave the work queue running Start the work queue when the MTRDeviceControllerFactory is initialized, and leave it running. This avoids having to conditionally dispatch to the work queue in various scenarios and lets us simplify controller startup and shutdown. * Fix UAF by shutting down OTA delegate before the controller --- .../CHIP/MTRDeviceControllerFactory.mm | 139 +++++++----------- 1 file changed, 52 insertions(+), 87 deletions(-) diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm index b31003c238bea5..dccce24e892531 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm @@ -215,6 +215,10 @@ - (instancetype)init return nil; } + // Start the work queue and leave it running. There is no performance + // cost to having an idle dispatch queue, and it simplifies our logic. + DeviceLayer::PlatformMgrImpl().StartEventLoopTask(); + _running = NO; _chipWorkQueue = DeviceLayer::PlatformMgrImpl().GetWorkQueue(); _controllerFactory = &DeviceControllerFactory::GetInstance(); @@ -326,6 +330,7 @@ - (void)cleanupInitObjects - (void)cleanupStartupObjects { + assertChipStackLockedByCurrentThread(); MTR_LOG_INFO("Cleaning startup objects in controller factory"); // Make sure the deinit order here is the reverse of the init order in @@ -379,7 +384,7 @@ - (CHIP_ERROR)_initFabricTable:(FabricTable &)fabricTable __block NSMutableArray * fabricList; __block BOOL listFilled = NO; - auto fillListBlock = ^{ + dispatch_sync(_chipWorkQueue, ^{ FabricTable fabricTable; CHIP_ERROR err = [self _initFabricTable:fabricTable]; if (err != CHIP_NO_ERROR) { @@ -399,22 +404,13 @@ - (CHIP_ERROR)_initFabricTable:(FabricTable &)fabricTable } listFilled = YES; - }; - - if ([_controllers count] > 0) { - // We have a controller running already, so our task queue is live. - // Make sure we run on that queue so we don't race against it. - dispatch_sync(_chipWorkQueue, fillListBlock); - } else { - // Not currently running the task queue; just run the block directly. - fillListBlock(); - } + }); if (listFilled == NO) { return nil; } - return [NSArray arrayWithArray:fabricList]; + return fabricList; } - (BOOL)startControllerFactory:(MTRDeviceControllerFactoryParams *)startupParams error:(NSError * __autoreleasing *)error @@ -433,18 +429,13 @@ - (BOOL)_startControllerFactory:(MTRDeviceControllerFactoryParams *)startupParam return YES; } - // Register any tracing backends. This has to be done before starting the event loop to run registering - // the tracing backend in the right queue context - StartupMetricsCollection(); - - DeviceLayer::PlatformMgrImpl().StartEventLoopTask(); - __block CHIP_ERROR errorCode = CHIP_NO_ERROR; dispatch_sync(_chipWorkQueue, ^{ if ([self isRunning]) { return; } + StartupMetricsCollection(); InitializeServerAccessControl(); if (startupParams.hasStorage) { @@ -550,17 +541,17 @@ - (BOOL)_startControllerFactory:(MTRDeviceControllerFactoryParams *)startupParam self->_running = YES; }); - // Make sure to stop the event loop again before returning, so we are not running it while we don't have any controllers. - DeviceLayer::PlatformMgrImpl().StopEventLoopTask(); - if (![self isRunning]) { - [self cleanupStartupObjects]; + dispatch_sync(_chipWorkQueue, ^{ + [self cleanupStartupObjects]; + }); if (error != nil) { *error = [MTRError errorForCHIPErrorCode:errorCode]; } + return NO; } - return [self isRunning]; + return YES; } - (void)stopControllerFactory @@ -575,10 +566,12 @@ - (void)stopControllerFactory [_controllers[0] shutdown]; } - MTR_LOG_INFO("Shutting down the Matter controller factory"); - _controllerFactory->Shutdown(); + dispatch_sync(_chipWorkQueue, ^{ + MTR_LOG_INFO("Shutting down the Matter controller factory"); + _controllerFactory->Shutdown(); - [self cleanupStartupObjects]; + [self cleanupStartupObjects]; + }); // NOTE: we do not call cleanupInitObjects because we can be restarted, and // that does not re-create the objects that we create inside init. @@ -686,9 +679,6 @@ - (MTRDeviceController * _Nullable)_startDeviceController:(MTRDeviceController * } if ([_controllers count] == 0) { - // Bringing up the first controller. Start the event loop now. If we - // fail to bring it up, its cleanup will stop the event loop again. - chip::DeviceLayer::PlatformMgrImpl().StartEventLoopTask(); dispatch_sync(_chipWorkQueue, ^{ self->_operationalBrowser = new MTROperationalBrowser(self, self->_chipWorkQueue); }); @@ -701,8 +691,9 @@ - (MTRDeviceController * _Nullable)_startDeviceController:(MTRDeviceController * os_unfair_lock_unlock(&_controllersLock); __block MTRDeviceControllerStartupParamsInternal * params = nil; - __block CHIP_ERROR fabricError = CHIP_NO_ERROR; + __block CHIP_ERROR fabricError = CHIP_ERROR_INTERNAL; + // Create a temporary FabricTable instance for the fabricChecker logic. // We want the block to end up with just a pointer to the fabric table, // since we know our on-stack instance will outlive the block. FabricTable fabricTableInstance; @@ -1039,18 +1030,6 @@ - (void)controllerShuttingDown:(MTRDeviceController *)controller return; } - if (_groupDataProvider != nullptr) { - dispatch_sync(_chipWorkQueue, ^{ - FabricIndex idx = [controller fabricIndex]; - if (idx != kUndefinedFabricIndex) { - // Clear out out group keys for this fabric index, just in case fabric - // indices get reused later. If a new controller is started on the - // same fabric it will be handed the IPK at that point. - self->_groupDataProvider->RemoveGroupKeys(idx); - } - }); - } - os_unfair_lock_lock(&_controllersLock); // Make sure to set _controllerBeingShutDown and do the remove in the same // locked section, so there is never a time when the controller is gone from @@ -1060,60 +1039,46 @@ - (void)controllerShuttingDown:(MTRDeviceController *)controller [_controllers removeObject:controller]; os_unfair_lock_unlock(&_controllersLock); - // Snapshot the controller's fabric index, if any, before it clears it - // out in shutDownCppController. - __block FabricIndex controllerFabricIndex = controller.fabricIndex; - - // This block runs either during sync dispatch to the Matter queue or after - // Matter queue shutdown, so it can touch any of our members without - // worrying about locking, since nothing else will race it. - auto sharedCleanupBlock = ^{ - assertChipStackLockedByCurrentThread(); - - [controller shutDownCppController]; - - self->_controllerBeingShutDown = nil; - if (self->_controllerBeingStarted == controller) { - controllerFabricIndex = self->_nextAvailableFabricIndex; - self->_controllerBeingStarted = nil; + // Do the controller shutdown on the Matter work queue. + dispatch_sync(_chipWorkQueue, ^{ + FabricIndex fabricIndex = controller.fabricIndex; + if (fabricIndex != kUndefinedFabricIndex) { + // Clear out out group keys for this fabric index, in case fabric + // indices get reused later. If a new controller is started on the + // same fabric it will be handed the IPK at that point. + self->_groupDataProvider->RemoveGroupKeys(fabricIndex); } - }; - if ([_controllers count] == 0) { - dispatch_sync(_chipWorkQueue, ^{ + // If there are no other controllers left, we can shut down some things. + // Do this before we shut down the controller itself, because the + // OtaProviderDelegateBridge uses some services provided by the system + // state without retaining it. + if (_controllers.count == 0) { delete self->_operationalBrowser; self->_operationalBrowser = nullptr; - }); - // That was our last controller. Stop the event loop before it - // shuts down, because shutdown of the last controller will tear - // down most of the world. - DeviceLayer::PlatformMgrImpl().StopEventLoopTask(); - - if (_otaProviderDelegateBridge) { - _otaProviderDelegateBridge->Shutdown(); - _otaProviderDelegateBridge.reset(); - } - if (_otaProviderEndpoint != nil) { - [_otaProviderEndpoint unregisterMatterEndpoint]; - [_otaProviderEndpoint invalidate]; - - [self removeServerEndpoint:_otaProviderEndpoint]; + if (_otaProviderDelegateBridge) { + _otaProviderDelegateBridge->Shutdown(); + _otaProviderDelegateBridge.reset(); + } - _otaProviderEndpoint = nil; + if (_otaProviderEndpoint != nil) { + [_otaProviderEndpoint unregisterMatterEndpoint]; + [_otaProviderEndpoint invalidate]; + [self removeServerEndpoint:_otaProviderEndpoint]; + _otaProviderEndpoint = nil; + } + } else if (_otaProviderDelegateBridge) { + _otaProviderDelegateBridge->ControllerShuttingDown(controller); } - sharedCleanupBlock(); - } else { - // Do the controller shutdown on the Matter work queue. - dispatch_sync(_chipWorkQueue, ^{ - if (_otaProviderDelegateBridge) { - _otaProviderDelegateBridge->ControllerShuttingDown(controller); - } + [controller shutDownCppController]; - sharedCleanupBlock(); - }); - } + self->_controllerBeingShutDown = nil; + if (self->_controllerBeingStarted == controller) { + self->_controllerBeingStarted = nil; + } + }); [controller deinitFromFactory]; } From 3c7c9b10fe58ea19514a91265f9261e3071f920d Mon Sep 17 00:00:00 2001 From: Wang Qixiang <43193572+wqx6@users.noreply.github.com> Date: Thu, 11 Apr 2024 12:13:15 +0800 Subject: [PATCH 026/468] Add checks for localization-configuration cluster and time-format-localization cluster init callback (#32747) * Add checks for localization-configuration cluster and time-format-localization cluster * Update src/app/clusters/time-format-localization-server/time-format-localization-server.cpp Co-authored-by: Boris Zbarsky --------- Co-authored-by: Boris Zbarsky --- .../localization-configuration-server.cpp | 2 +- .../time-format-localization-server.cpp | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/app/clusters/localization-configuration-server/localization-configuration-server.cpp b/src/app/clusters/localization-configuration-server/localization-configuration-server.cpp index 88283325c7c380..5f059e73b9a1d3 100644 --- a/src/app/clusters/localization-configuration-server/localization-configuration-server.cpp +++ b/src/app/clusters/localization-configuration-server/localization-configuration-server.cpp @@ -208,7 +208,7 @@ void emberAfLocalizationConfigurationClusterServerInitCallback(EndpointId endpoi it->Release(); - if (err == CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND) + if (err == CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND && validLocaleCached) { // If initial value is not one of the allowed values, write the valid value it. status = ActiveLocale::Set(endpoint, validLocale); diff --git a/src/app/clusters/time-format-localization-server/time-format-localization-server.cpp b/src/app/clusters/time-format-localization-server/time-format-localization-server.cpp index 08e90207760603..ff38290c21f8d4 100644 --- a/src/app/clusters/time-format-localization-server/time-format-localization-server.cpp +++ b/src/app/clusters/time-format-localization-server/time-format-localization-server.cpp @@ -78,6 +78,12 @@ class AutoReleaseIterator TimeFormatLocalizationAttrAccess gAttrAccess; +bool HasFeature(EndpointId endpoint, Feature feature) +{ + uint32_t featureMap; + return FeatureMap::Get(endpoint, &featureMap) == Status::Success ? (featureMap & to_underlying(feature)) : false; +} + CHIP_ERROR TimeFormatLocalizationAttrAccess::ReadSupportedCalendarTypes(AttributeValueEncoder & aEncoder) { DeviceLayer::DeviceInfoProvider * provider = DeviceLayer::GetDeviceInfoProvider(); @@ -202,6 +208,10 @@ Protocols::InteractionModel::Status MatterTimeFormatLocalizationClusterServerPre void emberAfTimeFormatLocalizationClusterServerInitCallback(EndpointId endpoint) { + if (!HasFeature(endpoint, Feature::kCalendarFormat)) + { + return; + } CalendarTypeEnum calendarType; CalendarTypeEnum validType; Status status = ActiveCalendarType::Get(endpoint, &calendarType); From 33e93f22eb19b3743dfc9bff1307dc2309f9970d Mon Sep 17 00:00:00 2001 From: erwinpan1 Date: Thu, 11 Apr 2024 17:07:59 +0800 Subject: [PATCH 027/468] Commit the draft to add_event in post attr change Commit the draft to add_event in post attribute change callback --- .../common/clusters/switch/SwitchDelegate.cpp | 187 +++++++++++ .../common/clusters/switch/SwitchDelegate.h | 43 +++ examples/chef/common/stubs.cpp | 59 +++- examples/chef/common/stubs.h | 61 ++++ .../rootnode_genericswitch_9866e35d0b.matter | 283 +++++++++++++++- .../rootnode_genericswitch_9866e35d0b.zap | 316 +++++++++++++++++- examples/chef/linux/BUILD.gn | 1 + 7 files changed, 936 insertions(+), 14 deletions(-) create mode 100644 examples/chef/common/clusters/switch/SwitchDelegate.cpp create mode 100644 examples/chef/common/clusters/switch/SwitchDelegate.h create mode 100644 examples/chef/common/stubs.h diff --git a/examples/chef/common/clusters/switch/SwitchDelegate.cpp b/examples/chef/common/clusters/switch/SwitchDelegate.cpp new file mode 100644 index 00000000000000..adf8ac02f2299f --- /dev/null +++ b/examples/chef/common/clusters/switch/SwitchDelegate.cpp @@ -0,0 +1,187 @@ +/* + * + * Copyright (c) 2022 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include +#include +#include +#include +#include "stubs.h" + +using namespace chip; +using namespace chip::app; +using namespace chip::app::Clusters; +using namespace chip::app::Clusters::Switch; +using namespace chip::DeviceLayer; + +class SwitchEventHandler +{ +public: + SwitchEventHandler(EndpointId endpoint):mEndpointId(endpoint){}; + + /** + * Should be called when the latching switch is moved to a new position. + */ + void OnSwitchLatchedHandler(uint8_t newPosition); + + /** + * Should be called when the momentary switch starts to be pressed. + */ + void OnSwitchInitialPressedHandler(uint8_t newPosition); + + /** + * Should be called when the momentary switch has been pressed for a "long" time. + */ + void OnSwitchLongPressedHandler(uint8_t newPosition); + + /** + * Should be called when the momentary switch has been released. + */ + void OnSwitchShortReleasedHandler(uint8_t previousPosition); + + /** + * Should be called when the momentary switch has been released after having been pressed for a long time. + */ + void OnSwitchLongReleasedHandler(uint8_t previousPosition); + + /** + * Should be called to indicate how many times the momentary switch has been pressed in a multi-press + * sequence, during that sequence. + */ + void OnSwitchMultiPressOngoingHandler(uint8_t newPosition, uint8_t count); + + /** + * Should be called to indicate how many times the momentary switch has been pressed in a multi-press + * sequence, after it has been detected that the sequence has ended. + */ + void OnSwitchMultiPressCompleteHandler(uint8_t previousPosition, uint8_t count); + +private: + EndpointId mEndpointId; +}; + + +void SwitchEventHandler::OnSwitchLatchedHandler(uint8_t newPosition) +{ + ChipLogDetail(NotSpecified, "The latching switch is moved to a new position:%d", newPosition); + + Clusters::SwitchServer::Instance().OnSwitchLatch(mEndpointId, newPosition); +} + +void SwitchEventHandler::OnSwitchInitialPressedHandler(uint8_t newPosition) +{ + ChipLogDetail(NotSpecified, "The new position when the momentary switch starts to be pressed:%d", newPosition); + + Clusters::SwitchServer::Instance().OnInitialPress(mEndpointId, newPosition); +} + +void SwitchEventHandler::OnSwitchLongPressedHandler(uint8_t newPosition) +{ + ChipLogDetail(NotSpecified, "The new position when the momentary switch has been pressed for a long time:%d", newPosition); + + Clusters::SwitchServer::Instance().OnLongPress(mEndpointId, newPosition); +} + +void SwitchEventHandler::OnSwitchShortReleasedHandler(uint8_t previousPosition) +{ + ChipLogDetail(NotSpecified, "The the previous value of the CurrentPosition when the momentary switch has been released:%d", + previousPosition); + + Clusters::SwitchServer::Instance().OnShortRelease(mEndpointId, previousPosition); +} + +void SwitchEventHandler::OnSwitchLongReleasedHandler(uint8_t previousPosition) +{ + ChipLogDetail(NotSpecified, + "The the previous value of the CurrentPosition when the momentary switch has been released after having been " + "pressed for a long time:%d", + previousPosition); + + Clusters::SwitchServer::Instance().OnLongRelease(mEndpointId, previousPosition); +} + +void SwitchEventHandler::OnSwitchMultiPressOngoingHandler(uint8_t newPosition, uint8_t count) +{ + ChipLogDetail(NotSpecified, "The new position when the momentary switch has been pressed in a multi-press sequence:%d", + newPosition); + ChipLogDetail(NotSpecified, "%d times the momentary switch has been pressed", count); + + Clusters::SwitchServer::Instance().OnMultiPressOngoing(mEndpointId, newPosition, count); +} + +void SwitchEventHandler::OnSwitchMultiPressCompleteHandler(uint8_t previousPosition, uint8_t count) +{ + ChipLogDetail(NotSpecified, "The previous position when the momentary switch has been pressed in a multi-press sequence:%d", + previousPosition); + ChipLogDetail(NotSpecified, "%d times the momentary switch has been pressed", count); + + Clusters::SwitchServer::Instance().OnMultiPressComplete(mEndpointId, previousPosition, count); +} + +static std::map gSwitchEventHandlers{}; + + +class SwitchAttributeDelegate : public AttributeDelegate +{ +public: + SwitchAttributeDelegate (ClusterId clusterId) : AttributeDelegate(clusterId) {} + + void PostAttributeChangeCallback(const chip::app::ConcreteAttributePath & attributePath, uint8_t type, uint16_t size, uint8_t * value) override; + +private: +}; + + +SwitchEventHandler * GetSwitchEventHandler(EndpointId endpointId) +{ + if (gSwitchEventHandlers.find(endpointId) == gSwitchEventHandlers.end()) { + return nullptr; + } + + return gSwitchEventHandlers[endpointId]; +} + +void SwitchAttributeDelegate::PostAttributeChangeCallback(const chip::app::ConcreteAttributePath & attributePath, uint8_t type, uint16_t size, uint8_t * value) +{ +printf("\033[41m %s, %d \033[0m \n", __func__, __LINE__); + ChipLogProgress(Zcl, "SwitchAttributeDelegate::PostAttributeChangeCallback Endpoint: %d, Cluster: " ChipLogFormatMEI ", Type: %u, length %u", attributePath.mEndpointId, ChipLogValueMEI(attributePath.mClusterId), type, size); + + switch (attributePath.mAttributeId) { + case Attributes::CurrentPosition::Id: { + SwitchEventHandler *eventHandler = GetSwitchEventHandler(attributePath.mEndpointId); + uint8_t newPosition = *value; + + if (eventHandler) { + eventHandler->OnSwitchLatchedHandler(newPosition); + } + } + break; + default: + break; + } +} + +void emberAfSwitchClusterInitCallback(EndpointId endpoint) +{ + ChipLogProgress(Zcl, "Chef: emberAfSwitchClusterInitCallback"); + gSwitchEventHandlers[endpoint] = new SwitchEventHandler(endpoint); + RegisterApplicationAttributeDelegate(Switch::Id, new SwitchAttributeDelegate(Switch::Id)); +printf("\033[44m %s, %d, Switch::ID=%u \033[0m \n", __func__, __LINE__, Switch::Id); +} + + diff --git a/examples/chef/common/clusters/switch/SwitchDelegate.h b/examples/chef/common/clusters/switch/SwitchDelegate.h new file mode 100644 index 00000000000000..b8fa13fba66ce6 --- /dev/null +++ b/examples/chef/common/clusters/switch/SwitchDelegate.h @@ -0,0 +1,43 @@ +/* + * + * Copyright (c) 2022 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include +#include + +#include + +namespace chip { +namespace app { +namespace Clusters { + +namespace Switch { + +} // namespace Switch +} // namespace Clusters +} // namespace app +} // namespace chip + + + +//class AllClustersCommandDelegate : public NamedPipeCommandDelegate +//{ +//public: +// void OnEventCommandReceived(const char * json) override; +//}; diff --git a/examples/chef/common/stubs.cpp b/examples/chef/common/stubs.cpp index 91a7b5a84d10e1..44380dec46d313 100644 --- a/examples/chef/common/stubs.cpp +++ b/examples/chef/common/stubs.cpp @@ -19,12 +19,36 @@ #include "chef-concentration-measurement.h" #endif +#include "stubs.h" +#include + using chip::app::DataModel::Nullable; using namespace chip; using namespace chip::app; using namespace chip::app::Clusters; +static std::map gApplicationAttributeDelegates{}; + +void chip::app::RegisterApplicationAttributeDelegate(ClusterId clusterId, AttributeDelegate * delegate) +{ + // TODO assert (gApplicationAttributeDelegates.find(clusterId) == gApplicationAttributeDelegates.end() ) + + gApplicationAttributeDelegates[clusterId] = delegate; + +} + + +AttributeDelegate * GetApplicationAttributeDelegate(ClusterId clusterId) +{ + if (gApplicationAttributeDelegates.find(clusterId) == gApplicationAttributeDelegates.end()) { + return nullptr; + } + + return gApplicationAttributeDelegates[clusterId]; +} + + Protocols::InteractionModel::Status emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId, const EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer, uint16_t maxReadLength) @@ -116,22 +140,33 @@ void emberAfPluginSmokeCoAlarmSelfTestRequestCommand(EndpointId endpointId) {} void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & attributePath, uint8_t type, uint16_t size, uint8_t * value) { - ClusterId clusterId = attributePath.mClusterId; - AttributeId attributeId = attributePath.mAttributeId; - ChipLogProgress(Zcl, "Cluster callback: " ChipLogFormatMEI, ChipLogValueMEI(clusterId)); +// AttributeId attributeId = attributePath.mAttributeId; + ChipLogProgress(Zcl, "MatterPostAttributeChangeCallback Endpoint: %d, Cluster: " ChipLogFormatMEI ", Type: %u, length %u", attributePath.mEndpointId, ChipLogValueMEI(attributePath.mClusterId), type, size); +printf("\033[41m %s, %d \033[0m \n", __func__, __LINE__); - if (clusterId == OnOff::Id && attributeId == OnOff::Attributes::OnOff::Id) - { - ChipLogProgress(Zcl, "OnOff attribute ID: " ChipLogFormatMEI " Type: %u Value: %u, length %u", ChipLogValueMEI(attributeId), - type, *value, size); + AttributeDelegate * delegate = GetApplicationAttributeDelegate(attributePath.mClusterId); + if (delegate) { + delegate->PostAttributeChangeCallback(attributePath, type, size, value); } - else if (clusterId == LevelControl::Id) - { - ChipLogProgress(Zcl, "Level Control attribute ID: " ChipLogFormatMEI " Type: %u Value: %u, length %u", - ChipLogValueMEI(attributeId), type, *value, size); - // WIP Apply attribute change to Light +#if 0 + switch (clusterId) { + case OnOff::Id: + ChipLogProgress(Zcl, "OnOff Cluster attribute ID: " ChipLogFormatMEI " Type: %u Value: %u, length %u", ChipLogValueMEI(attributeId), + type, *value, size); + break; + case LevelControl::Id: + ChipLogProgress(Zcl, "Level Control Cluster attribute ID: " ChipLogFormatMEI " Type: %u Value: %u, length %u", + ChipLogValueMEI(attributeId), type, *value, size); + break; + case Switch::Id: + ChipLogProgress(Zcl, "Switch Cluster attribute ID: " ChipLogFormatMEI " Type: %u Value: %u, length %u", + ChipLogValueMEI(attributeId), type, *value, size); + break; + default: + break; } +#endif } /** @brief OnOff Cluster Init diff --git a/examples/chef/common/stubs.h b/examples/chef/common/stubs.h new file mode 100644 index 00000000000000..036a236a1a7aaf --- /dev/null +++ b/examples/chef/common/stubs.h @@ -0,0 +1,61 @@ +/* + * + * Copyright (c) 2022 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include +#include + +namespace chip { +namespace app { + +class AttributeDelegate +{ +public: + AttributeDelegate (ClusterId clusterId) : mClusterId(clusterId) {} + /** + * xxxx + */ + virtual void PostAttributeChangeCallback(const chip::app::ConcreteAttributePath & attributePath, uint8_t type, uint16_t size, uint8_t * value) {} + /** + * xxxx + */ + virtual Protocols::InteractionModel::Status ExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId, const EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer) {return Protocols::InteractionModel::Status::Success;} + /** + * xxxx + */ + virtual Protocols::InteractionModel::Status ExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId, const EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer, uint16_t maxReadLength) {return Protocols::InteractionModel::Status::Success;} + + virtual ~AttributeDelegate() {} + +private: + ClusterId mClusterId; +}; + +void RegisterApplicationAttributeDelegate(ClusterId clusterId, AttributeDelegate * delegate); + +} // namespace app +} // namespace chip + + + +//class AllClustersCommandDelegate : public NamedPipeCommandDelegate +//{ +//public: +// void OnEventCommandReceived(const char * json) override; +//}; diff --git a/examples/chef/devices/rootnode_genericswitch_9866e35d0b.matter b/examples/chef/devices/rootnode_genericswitch_9866e35d0b.matter index 8e2d0166cc44a9..8452f079e59f4b 100644 --- a/examples/chef/devices/rootnode_genericswitch_9866e35d0b.matter +++ b/examples/chef/devices/rootnode_genericswitch_9866e35d0b.matter @@ -256,6 +256,265 @@ cluster BasicInformation = 40 { command MfgSpecificPing(): DefaultSuccess = 0; } +/** This cluster is used to describe the configuration and capabilities of a physical power source that provides power to the Node. */ +cluster PowerSource = 47 { + revision 1; // NOTE: Default/not specifically set + + enum BatApprovedChemistryEnum : enum16 { + kUnspecified = 0; + kAlkaline = 1; + kLithiumCarbonFluoride = 2; + kLithiumChromiumOxide = 3; + kLithiumCopperOxide = 4; + kLithiumIronDisulfide = 5; + kLithiumManganeseDioxide = 6; + kLithiumThionylChloride = 7; + kMagnesium = 8; + kMercuryOxide = 9; + kNickelOxyhydride = 10; + kSilverOxide = 11; + kZincAir = 12; + kZincCarbon = 13; + kZincChloride = 14; + kZincManganeseDioxide = 15; + kLeadAcid = 16; + kLithiumCobaltOxide = 17; + kLithiumIon = 18; + kLithiumIonPolymer = 19; + kLithiumIronPhosphate = 20; + kLithiumSulfur = 21; + kLithiumTitanate = 22; + kNickelCadmium = 23; + kNickelHydrogen = 24; + kNickelIron = 25; + kNickelMetalHydride = 26; + kNickelZinc = 27; + kSilverZinc = 28; + kSodiumIon = 29; + kSodiumSulfur = 30; + kZincBromide = 31; + kZincCerium = 32; + } + + enum BatChargeFaultEnum : enum8 { + kUnspecified = 0; + kAmbientTooHot = 1; + kAmbientTooCold = 2; + kBatteryTooHot = 3; + kBatteryTooCold = 4; + kBatteryAbsent = 5; + kBatteryOverVoltage = 6; + kBatteryUnderVoltage = 7; + kChargerOverVoltage = 8; + kChargerUnderVoltage = 9; + kSafetyTimeout = 10; + } + + enum BatChargeLevelEnum : enum8 { + kOK = 0; + kWarning = 1; + kCritical = 2; + } + + enum BatChargeStateEnum : enum8 { + kUnknown = 0; + kIsCharging = 1; + kIsAtFullCharge = 2; + kIsNotCharging = 3; + } + + enum BatCommonDesignationEnum : enum16 { + kUnspecified = 0; + kAAA = 1; + kAA = 2; + kC = 3; + kD = 4; + k4v5 = 5; + k6v0 = 6; + k9v0 = 7; + k12AA = 8; + kAAAA = 9; + kA = 10; + kB = 11; + kF = 12; + kN = 13; + kNo6 = 14; + kSubC = 15; + kA23 = 16; + kA27 = 17; + kBA5800 = 18; + kDuplex = 19; + k4SR44 = 20; + k523 = 21; + k531 = 22; + k15v0 = 23; + k22v5 = 24; + k30v0 = 25; + k45v0 = 26; + k67v5 = 27; + kJ = 28; + kCR123A = 29; + kCR2 = 30; + k2CR5 = 31; + kCRP2 = 32; + kCRV3 = 33; + kSR41 = 34; + kSR43 = 35; + kSR44 = 36; + kSR45 = 37; + kSR48 = 38; + kSR54 = 39; + kSR55 = 40; + kSR57 = 41; + kSR58 = 42; + kSR59 = 43; + kSR60 = 44; + kSR63 = 45; + kSR64 = 46; + kSR65 = 47; + kSR66 = 48; + kSR67 = 49; + kSR68 = 50; + kSR69 = 51; + kSR516 = 52; + kSR731 = 53; + kSR712 = 54; + kLR932 = 55; + kA5 = 56; + kA10 = 57; + kA13 = 58; + kA312 = 59; + kA675 = 60; + kAC41E = 61; + k10180 = 62; + k10280 = 63; + k10440 = 64; + k14250 = 65; + k14430 = 66; + k14500 = 67; + k14650 = 68; + k15270 = 69; + k16340 = 70; + kRCR123A = 71; + k17500 = 72; + k17670 = 73; + k18350 = 74; + k18500 = 75; + k18650 = 76; + k19670 = 77; + k25500 = 78; + k26650 = 79; + k32600 = 80; + } + + enum BatFaultEnum : enum8 { + kUnspecified = 0; + kOverTemp = 1; + kUnderTemp = 2; + } + + enum BatReplaceabilityEnum : enum8 { + kUnspecified = 0; + kNotReplaceable = 1; + kUserReplaceable = 2; + kFactoryReplaceable = 3; + } + + enum PowerSourceStatusEnum : enum8 { + kUnspecified = 0; + kActive = 1; + kStandby = 2; + kUnavailable = 3; + } + + enum WiredCurrentTypeEnum : enum8 { + kAC = 0; + kDC = 1; + } + + enum WiredFaultEnum : enum8 { + kUnspecified = 0; + kOverVoltage = 1; + kUnderVoltage = 2; + } + + bitmap Feature : bitmap32 { + kWired = 0x1; + kBattery = 0x2; + kRechargeable = 0x4; + kReplaceable = 0x8; + } + + struct BatChargeFaultChangeType { + BatChargeFaultEnum current[] = 0; + BatChargeFaultEnum previous[] = 1; + } + + struct BatFaultChangeType { + BatFaultEnum current[] = 0; + BatFaultEnum previous[] = 1; + } + + struct WiredFaultChangeType { + WiredFaultEnum current[] = 0; + WiredFaultEnum previous[] = 1; + } + + info event WiredFaultChange = 0 { + WiredFaultEnum current[] = 0; + WiredFaultEnum previous[] = 1; + } + + info event BatFaultChange = 1 { + BatFaultEnum current[] = 0; + BatFaultEnum previous[] = 1; + } + + info event BatChargeFaultChange = 2 { + BatChargeFaultEnum current[] = 0; + BatChargeFaultEnum previous[] = 1; + } + + readonly attribute PowerSourceStatusEnum status = 0; + readonly attribute int8u order = 1; + readonly attribute char_string<60> description = 2; + readonly attribute optional nullable int32u wiredAssessedInputVoltage = 3; + readonly attribute optional nullable int16u wiredAssessedInputFrequency = 4; + readonly attribute optional WiredCurrentTypeEnum wiredCurrentType = 5; + readonly attribute optional nullable int32u wiredAssessedCurrent = 6; + readonly attribute optional int32u wiredNominalVoltage = 7; + readonly attribute optional int32u wiredMaximumCurrent = 8; + readonly attribute optional boolean wiredPresent = 9; + readonly attribute optional WiredFaultEnum activeWiredFaults[] = 10; + readonly attribute optional nullable int32u batVoltage = 11; + readonly attribute optional nullable int8u batPercentRemaining = 12; + readonly attribute optional nullable int32u batTimeRemaining = 13; + readonly attribute optional BatChargeLevelEnum batChargeLevel = 14; + readonly attribute optional boolean batReplacementNeeded = 15; + readonly attribute optional BatReplaceabilityEnum batReplaceability = 16; + readonly attribute optional boolean batPresent = 17; + readonly attribute optional BatFaultEnum activeBatFaults[] = 18; + readonly attribute optional char_string<60> batReplacementDescription = 19; + readonly attribute optional BatCommonDesignationEnum batCommonDesignation = 20; + readonly attribute optional char_string<20> batANSIDesignation = 21; + readonly attribute optional char_string<20> batIECDesignation = 22; + readonly attribute optional BatApprovedChemistryEnum batApprovedChemistry = 23; + readonly attribute optional int32u batCapacity = 24; + readonly attribute optional int8u batQuantity = 25; + readonly attribute optional BatChargeStateEnum batChargeState = 26; + readonly attribute optional nullable int32u batTimeToFullCharge = 27; + readonly attribute optional boolean batFunctionalWhileCharging = 28; + readonly attribute optional nullable int32u batChargingCurrent = 29; + readonly attribute optional BatChargeFaultEnum activeBatChargeFaults[] = 30; + readonly attribute endpoint_no endpointList[] = 31; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + /** This cluster is used to manage global aspects of the Commissioning flow. */ cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set @@ -1196,9 +1455,31 @@ endpoint 1 { callback attribute clusterRevision; } + server cluster PowerSource { + persist attribute status default = 1; + persist attribute order default = 1; + persist attribute description default = "Battery"; + ram attribute batVoltage; + ram attribute batPercentRemaining; + ram attribute batTimeRemaining; + ram attribute batChargeLevel; + ram attribute batReplacementNeeded; + ram attribute batReplaceability; + ram attribute batPresent; + ram attribute batReplacementDescription; + persist attribute batQuantity default = 1; + callback attribute endpointList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0x0A; + ram attribute clusterRevision default = 1; + } + server cluster Switch { emits event SwitchLatched; - persist attribute numberOfPositions default = 2; + persist attribute numberOfPositions default = 5; persist attribute currentPosition default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; diff --git a/examples/chef/devices/rootnode_genericswitch_9866e35d0b.zap b/examples/chef/devices/rootnode_genericswitch_9866e35d0b.zap index 172c6d31772296..2a95e6fadaf61d 100644 --- a/examples/chef/devices/rootnode_genericswitch_9866e35d0b.zap +++ b/examples/chef/devices/rootnode_genericswitch_9866e35d0b.zap @@ -2273,6 +2273,320 @@ } ] }, + { + "name": "Power Source", + "code": 47, + "mfgCode": null, + "define": "POWER_SOURCE_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "Status", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "PowerSourceStatusEnum", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Order", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Description", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "Battery", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatVoltage", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatPercentRemaining", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatTimeRemaining", + "code": 13, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatChargeLevel", + "code": 14, + "mfgCode": null, + "side": "server", + "type": "BatChargeLevelEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatReplacementNeeded", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatReplaceability", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "BatReplaceabilityEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatPresent", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatReplacementDescription", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatQuantity", + "code": 25, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EndpointList", + "code": 31, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0A", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, { "name": "Switch", "code": 59, @@ -2291,7 +2605,7 @@ "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": "2", + "defaultValue": "5", "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/chef/linux/BUILD.gn b/examples/chef/linux/BUILD.gn index 264ced698b62e8..512cc859d45ad0 100644 --- a/examples/chef/linux/BUILD.gn +++ b/examples/chef/linux/BUILD.gn @@ -58,6 +58,7 @@ executable("${sample_name}") { "${project_dir}/common/clusters/low-power/LowPowerManager.cpp", "${project_dir}/common/clusters/media-input/MediaInputManager.cpp", "${project_dir}/common/clusters/media-playback/MediaPlaybackManager.cpp", + "${project_dir}/common/clusters/switch/SwitchDelegate.cpp", "${project_dir}/common/clusters/target-navigator/TargetNavigatorManager.cpp", "${project_dir}/common/clusters/wake-on-lan/WakeOnLanManager.cpp", "${project_dir}/common/stubs.cpp", From 09c4e9a1af0a19f59961c2a14afba9a91c7975b6 Mon Sep 17 00:00:00 2001 From: erwinpan1 Date: Thu, 11 Apr 2024 18:27:28 +0800 Subject: [PATCH 028/468] Add PreAttributeChangeCallback --- .../common/clusters/switch/SwitchDelegate.cpp | 14 +++++++++++++- examples/chef/common/stubs.cpp | 18 ++++++++++++++++++ examples/chef/common/stubs.h | 8 ++++++-- 3 files changed, 37 insertions(+), 3 deletions(-) diff --git a/examples/chef/common/clusters/switch/SwitchDelegate.cpp b/examples/chef/common/clusters/switch/SwitchDelegate.cpp index adf8ac02f2299f..511c51779ecbb2 100644 --- a/examples/chef/common/clusters/switch/SwitchDelegate.cpp +++ b/examples/chef/common/clusters/switch/SwitchDelegate.cpp @@ -141,8 +141,10 @@ class SwitchAttributeDelegate : public AttributeDelegate public: SwitchAttributeDelegate (ClusterId clusterId) : AttributeDelegate(clusterId) {} - void PostAttributeChangeCallback(const chip::app::ConcreteAttributePath & attributePath, uint8_t type, uint16_t size, uint8_t * value) override; + chip::Protocols::InteractionModel::Status PreAttributeChangeCallback(const chip::app::ConcreteAttributePath & attributePath, uint8_t type, uint16_t size, uint8_t * value) override; + void PostAttributeChangeCallback(const chip::app::ConcreteAttributePath & attributePath, uint8_t type, uint16_t size, uint8_t * value) override; + private: }; @@ -156,6 +158,16 @@ SwitchEventHandler * GetSwitchEventHandler(EndpointId endpointId) return gSwitchEventHandlers[endpointId]; } +chip::Protocols::InteractionModel::Status SwitchAttributeDelegate::PreAttributeChangeCallback(const chip::app::ConcreteAttributePath & attributePath, uint8_t type, uint16_t size, uint8_t * value) +{ + chip::Protocols::InteractionModel::Status ret = chip::Protocols::InteractionModel::Status::Success; +printf("\033[41m %s, %d \033[0m \n", __func__, __LINE__); + ChipLogProgress(Zcl, "SwitchAttributeDelegate::PostAttributeChangeCallback Endpoint: %d, Cluster: " ChipLogFormatMEI ", Type: %u, length %u", attributePath.mEndpointId, ChipLogValueMEI(attributePath.mClusterId), type, size); + + + return ret; +} + void SwitchAttributeDelegate::PostAttributeChangeCallback(const chip::app::ConcreteAttributePath & attributePath, uint8_t type, uint16_t size, uint8_t * value) { printf("\033[41m %s, %d \033[0m \n", __func__, __LINE__); diff --git a/examples/chef/common/stubs.cpp b/examples/chef/common/stubs.cpp index 44380dec46d313..dec32c340e8a52 100644 --- a/examples/chef/common/stubs.cpp +++ b/examples/chef/common/stubs.cpp @@ -137,6 +137,24 @@ Protocols::InteractionModel::Status emberAfExternalAttributeWriteCallback(Endpoi void emberAfPluginSmokeCoAlarmSelfTestRequestCommand(EndpointId endpointId) {} + +chip::Protocols::InteractionModel::Status +MatterPreAttributeChangeCallback(const chip::app::ConcreteAttributePath & attributePath, uint8_t type, uint16_t size, + uint8_t * value) +{ + chip::Protocols::InteractionModel::Status ret = chip::Protocols::InteractionModel::Status::Success; + + ChipLogProgress(Zcl, "MatterPostAttributeChangeCallback Endpoint: %d, Cluster: " ChipLogFormatMEI ", Type: %u, length %u", attributePath.mEndpointId, ChipLogValueMEI(attributePath.mClusterId), type, size); +printf("\033[41m %s, %d \033[0m \n", __func__, __LINE__); + + AttributeDelegate * delegate = GetApplicationAttributeDelegate(attributePath.mClusterId); + if (delegate) { + ret = delegate->PreAttributeChangeCallback(attributePath, type, size, value); + } + + return ret; +} + void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & attributePath, uint8_t type, uint16_t size, uint8_t * value) { diff --git a/examples/chef/common/stubs.h b/examples/chef/common/stubs.h index 036a236a1a7aaf..4f039830024c4c 100644 --- a/examples/chef/common/stubs.h +++ b/examples/chef/common/stubs.h @@ -28,6 +28,12 @@ class AttributeDelegate { public: AttributeDelegate (ClusterId clusterId) : mClusterId(clusterId) {} + + virtual ~AttributeDelegate() {} + /** + * xxxx + */ + virtual chip::Protocols::InteractionModel::Status PreAttributeChangeCallback(const chip::app::ConcreteAttributePath & attributePath, uint8_t type, uint16_t size, uint8_t * value) { return chip::Protocols::InteractionModel::Status::Success; } /** * xxxx */ @@ -41,8 +47,6 @@ class AttributeDelegate */ virtual Protocols::InteractionModel::Status ExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId, const EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer, uint16_t maxReadLength) {return Protocols::InteractionModel::Status::Success;} - virtual ~AttributeDelegate() {} - private: ClusterId mClusterId; }; From 981de99cae4564f9c21dcd1093e74306145e0699 Mon Sep 17 00:00:00 2001 From: lpbeliveau-silabs <112982107+lpbeliveau-silabs@users.noreply.github.com> Date: Thu, 11 Apr 2024 09:39:39 -0400 Subject: [PATCH 029/468] Level Control revert to revision 5 (#32931) --- .../lighting-app/silabs/data_model/lighting-thread-app.matter | 2 +- examples/lighting-app/silabs/data_model/lighting-thread-app.zap | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/lighting-app/silabs/data_model/lighting-thread-app.matter b/examples/lighting-app/silabs/data_model/lighting-thread-app.matter index 60b6480176d518..0cb630900c3ddf 100644 --- a/examples/lighting-app/silabs/data_model/lighting-thread-app.matter +++ b/examples/lighting-app/silabs/data_model/lighting-thread-app.matter @@ -2355,7 +2355,7 @@ endpoint 1 { callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 3; - ram attribute clusterRevision default = 6; + ram attribute clusterRevision default = 5; handle command MoveToLevel; handle command Move; diff --git a/examples/lighting-app/silabs/data_model/lighting-thread-app.zap b/examples/lighting-app/silabs/data_model/lighting-thread-app.zap index 9e293bcd3032d1..437aac9d67bdac 100644 --- a/examples/lighting-app/silabs/data_model/lighting-thread-app.zap +++ b/examples/lighting-app/silabs/data_model/lighting-thread-app.zap @@ -4288,7 +4288,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "6", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, From b6c47f67d91a5900dd37f6c5f5de0a3cd8b02ad0 Mon Sep 17 00:00:00 2001 From: mkardous-silabs <84793247+mkardous-silabs@users.noreply.github.com> Date: Thu, 11 Apr 2024 09:54:41 -0400 Subject: [PATCH 030/468] [Silabs] Refactor Silabs Test Event Trigger impl to be compliant with its requirements (#32927) * refactor test event trigger for efr32 hardware * remove 917 specific code * port test event trigger changes to 917 build.gn * clean up * Fix build and remove test key when not in debug build * add missing dependency * fix syncing typo --- .../light-switch-app/silabs/openthread.gni | 2 +- .../silabs/build_for_wifi_args.gni | 2 +- examples/lit-icd-app/silabs/openthread.gni | 2 +- .../lock-app/silabs/build_for_wifi_args.gni | 2 +- examples/lock-app/silabs/openthread.gni | 2 +- examples/platform/silabs/MatterConfig.cpp | 32 +--- examples/platform/silabs/SiWx917/BUILD.gn | 51 +++-- .../silabs/SilabsDeviceDataProvider.cpp | 180 ++++-------------- .../silabs/SilabsDeviceDataProvider.h | 9 +- .../silabs/SilabsTestEventTriggerDelegate.cpp | 10 +- .../silabs/SilabsTestEventTriggerDelegate.h | 8 +- examples/platform/silabs/efr32/BUILD.gn | 49 +++-- examples/smoke-co-alarm-app/silabs/README.md | 6 +- .../silabs/build_for_wifi_args.gni | 14 ++ .../smoke-co-alarm-app/silabs/openthread.gni | 19 ++ examples/window-app/silabs/openthread.gni | 2 +- src/platform/silabs/SilabsConfig.h | 57 +++--- 17 files changed, 200 insertions(+), 247 deletions(-) diff --git a/examples/light-switch-app/silabs/openthread.gni b/examples/light-switch-app/silabs/openthread.gni index 17cc5885460379..30c7efbde3d623 100644 --- a/examples/light-switch-app/silabs/openthread.gni +++ b/examples/light-switch-app/silabs/openthread.gni @@ -28,7 +28,7 @@ openthread_external_platform = # ICD Default configurations chip_enable_icd_server = true chip_subscription_timeout_resumption = false -sl_use_subscription_synching = true +sl_use_subscription_syncing = true # Openthread Configuration flags sl_ot_idle_interval_ms = 15000 # 15s Idle Intervals diff --git a/examples/lit-icd-app/silabs/build_for_wifi_args.gni b/examples/lit-icd-app/silabs/build_for_wifi_args.gni index 3531a31ffde406..cdc711cdc1c252 100644 --- a/examples/lit-icd-app/silabs/build_for_wifi_args.gni +++ b/examples/lit-icd-app/silabs/build_for_wifi_args.gni @@ -26,7 +26,7 @@ app_data_model = "${chip_root}/examples/lit-icd-app/lit-icd-common" # ICD Default configurations chip_enable_icd_server = true chip_subscription_timeout_resumption = false -sl_use_subscription_synching = true +sl_use_subscription_syncing = true icd_enforce_sit_slow_poll_limit = true chip_enable_icd_lit = true diff --git a/examples/lit-icd-app/silabs/openthread.gni b/examples/lit-icd-app/silabs/openthread.gni index 9d06737d622a2d..4b49740513c555 100644 --- a/examples/lit-icd-app/silabs/openthread.gni +++ b/examples/lit-icd-app/silabs/openthread.gni @@ -29,7 +29,7 @@ openthread_external_platform = # ICD Default configurations chip_enable_icd_server = true chip_subscription_timeout_resumption = false -sl_use_subscription_synching = true +sl_use_subscription_syncing = true icd_enforce_sit_slow_poll_limit = true chip_icd_report_on_active_mode = true chip_enable_icd_lit = true diff --git a/examples/lock-app/silabs/build_for_wifi_args.gni b/examples/lock-app/silabs/build_for_wifi_args.gni index 25c5a2435d332f..84596e9258fbcc 100644 --- a/examples/lock-app/silabs/build_for_wifi_args.gni +++ b/examples/lock-app/silabs/build_for_wifi_args.gni @@ -24,7 +24,7 @@ app_data_model = "${chip_root}/examples/lock-app/lock-common" # ICD Default configurations chip_enable_icd_server = true chip_subscription_timeout_resumption = false -sl_use_subscription_synching = true +sl_use_subscription_syncing = true # ICD Matter Configuration flags sl_idle_mode_duration_s = 600 # 10min Idle Mode Duration diff --git a/examples/lock-app/silabs/openthread.gni b/examples/lock-app/silabs/openthread.gni index 3bfa566596aeaf..8d1c75d267238c 100644 --- a/examples/lock-app/silabs/openthread.gni +++ b/examples/lock-app/silabs/openthread.gni @@ -28,7 +28,7 @@ openthread_external_platform = # ICD Default configurations chip_enable_icd_server = true chip_subscription_timeout_resumption = false -sl_use_subscription_synching = true +sl_use_subscription_syncing = true # Openthread Configuration flags sl_ot_idle_interval_ms = 5000 # 5s Idle Intervals diff --git a/examples/platform/silabs/MatterConfig.cpp b/examples/platform/silabs/MatterConfig.cpp index 9be9f07fe3c759..d85f10d0612ea1 100644 --- a/examples/platform/silabs/MatterConfig.cpp +++ b/examples/platform/silabs/MatterConfig.cpp @@ -54,10 +54,13 @@ static chip::DeviceLayer::Internal::Efr32PsaOperationalKeystore gOperationalKeys #endif #include "SilabsDeviceDataProvider.h" -#include "SilabsTestEventTriggerDelegate.h" #include #include +#ifdef SL_MATTER_TEST_EVENT_TRIGGER_ENABLED +#include "SilabsTestEventTriggerDelegate.h" // nogncheck +#endif + #if CHIP_CONFIG_SYNCHRONOUS_REPORTS_ENABLED #include #else @@ -219,12 +222,6 @@ void SilabsMatterConfig::ConnectivityEventCallback(const ChipDeviceEvent * event } } -#if SILABS_TEST_EVENT_TRIGGER_ENABLED -static uint8_t sTestEventTriggerEnableKey[TestEventTriggerDelegate::kEnableKeyLength] = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, - 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, - 0xcc, 0xdd, 0xee, 0xff }; -#endif // SILABS_TEST_EVENT_TRIGGER_ENABLED - CHIP_ERROR SilabsMatterConfig::InitMatter(const char * appName) { CHIP_ERROR err; @@ -283,18 +280,10 @@ CHIP_ERROR SilabsMatterConfig::InitMatter(const char * appName) initParams.reportScheduler = &sReportScheduler; -#if SILABS_TEST_EVENT_TRIGGER_ENABLED - if (Encoding::HexToBytes(SILABS_TEST_EVENT_TRIGGER_ENABLE_KEY, strlen(SILABS_TEST_EVENT_TRIGGER_ENABLE_KEY), - sTestEventTriggerEnableKey, - TestEventTriggerDelegate::kEnableKeyLength) != TestEventTriggerDelegate::kEnableKeyLength) - { - SILABS_LOG("Failed to convert the EnableKey string to octstr type value"); - memset(sTestEventTriggerEnableKey, 0, sizeof(sTestEventTriggerEnableKey)); - } - // TODO(#31723): Show to customers that they can do `Server::GetInstance().GetTestEventTriggerDelegate().AddHandler()` - static SilabsTestEventTriggerDelegate sTestEventTriggerDelegate{ ByteSpan(sTestEventTriggerEnableKey) }; +#ifdef SL_MATTER_TEST_EVENT_TRIGGER_ENABLED + static SilabsTestEventTriggerDelegate sTestEventTriggerDelegate; initParams.testEventTriggerDelegate = &sTestEventTriggerDelegate; -#endif // SILABS_TEST_EVENT_TRIGGER_ENABLED +#endif // SL_MATTER_TEST_EVENT_TRIGGER_ENABLED #if CHIP_CRYPTO_PLATFORM && !(defined(SLI_SI91X_MCU_INTERFACE)) // When building with EFR32 crypto, use the opaque key store @@ -303,13 +292,6 @@ CHIP_ERROR SilabsMatterConfig::InitMatter(const char * appName) initParams.operationalKeystore = &gOperationalKeystore; #endif -#ifdef PERFORMANCE_TEST_ENABLED - // Set up Test Event Trigger command of the General Diagnostics cluster. Used only in performance testing - // TODO(#31723): Show to customers that they can do `Server::GetInstance().GetTestEventTriggerDelegate().AddHandler()` - static SilabsTestEventTriggerDelegate sTestEventTriggerDelegate{ ByteSpan(kTestEventTriggerEnableKey) }; - initParams.testEventTriggerDelegate = &sTestEventTriggerDelegate; -#endif - // Initialize the remaining (not overridden) providers to the SDK example defaults (void) initParams.InitializeStaticResourcesBeforeServerInit(); diff --git a/examples/platform/silabs/SiWx917/BUILD.gn b/examples/platform/silabs/SiWx917/BUILD.gn index 73e70c18e1d7f8..87df30d1a186c9 100644 --- a/examples/platform/silabs/SiWx917/BUILD.gn +++ b/examples/platform/silabs/SiWx917/BUILD.gn @@ -34,9 +34,6 @@ declare_args() { # Argument to force enable WPA3 security on rs91x rs91x_wpa3_transition = true - # use commissionable data for SiWx917 - siwx917_commissionable_data = false - #default WiFi SSID chip_default_wifi_ssid = "" @@ -44,11 +41,11 @@ declare_args() { chip_default_wifi_psk = "" # Enable TestEventTrigger in GeneralDiagnostics cluster - silabs_test_event_trigger_enabled = false + sl_enable_test_event_trigger = false # The EnableKey in hex string format used by TestEventTrigger command in - # GeneralDiagnostics cluster. The length of the string should be 32. - silabs_test_event_trigger_enable_key = "00112233445566778899aabbccddeeff" + # GeneralDiagnostics cluster. The length of the string should be 16 bytes. + sl_test_event_trigger_enable_key = "00112233445566778899AABBCCDDEEFF" } # Sanity check @@ -80,6 +77,30 @@ config("chip_examples_project_config") { ] } +config("test-event-trigger-config") { + defines = [ "SL_MATTER_TEST_EVENT_TRIGGER_ENABLED" ] + + if (is_debug) { + defines += [ "SL_MATTER_TEST_EVENT_TRIGGER_ENABLE_KEY=\"${sl_test_event_trigger_enable_key}\"" ] + } +} + +source_set("test-event-trigger") { + sources = [ + "${silabs_common_plat_dir}/SilabsTestEventTriggerDelegate.cpp", + "${silabs_common_plat_dir}/SilabsTestEventTriggerDelegate.h", + ] + + public_configs = [ ":test-event-trigger-config" ] + + public_deps = [ + ":silabs-factory-data-provider", + "${chip_root}/src/app:test-event-trigger", + "${chip_root}/src/lib/core", + "${chip_root}/src/lib/support", + ] +} + source_set("siwx917-matter-shell") { if (chip_build_libshell) { defines = [ "ENABLE_CHIP_SHELL" ] @@ -129,6 +150,10 @@ source_set("silabs-factory-data-provider") { ] public_configs = [ ":siwx917-common-config" ] + + if (sl_enable_test_event_trigger) { + public_configs += [ ":test-event-trigger-config" ] + } } config("siwx917-common-config") { @@ -152,10 +177,6 @@ config("siwx917-common-config") { defines += [ "HEAP_MONITORING" ] } - if (siwx917_commissionable_data) { - defines += [ "SIWX917_USE_COMISSIONABLE_DATA=1" ] - } - ldflags = [ "-Wl,--no-warn-rwx-segment" ] } @@ -274,18 +295,16 @@ source_set("siwx917-common") { public_deps += [ ":silabs-factory-data-provider" ] } - if (silabs_test_event_trigger_enabled) { - sources += - [ "${silabs_common_plat_dir}/SilabsTestEventTriggerDelegate.cpp" ] - defines += [ "SILABS_TEST_EVENT_TRIGGER_ENABLE_KEY=\"${silabs_test_event_trigger_enable_key}\"" ] - } - public_deps += [ "${chip_root}/examples/providers:device_info_provider", "${chip_root}/src/lib", "${chip_root}/src/setup_payload", ] + if (sl_enable_test_event_trigger) { + public_deps += [ ":test-event-trigger" ] + } + if (app_data_model != "") { public_deps += [ app_data_model ] } diff --git a/examples/platform/silabs/SilabsDeviceDataProvider.cpp b/examples/platform/silabs/SilabsDeviceDataProvider.cpp index c487c334819dd5..0bf11cde951ab4 100644 --- a/examples/platform/silabs/SilabsDeviceDataProvider.cpp +++ b/examples/platform/silabs/SilabsDeviceDataProvider.cpp @@ -23,13 +23,6 @@ #include #include -#ifdef SIWX917_USE_COMISSIONABLE_DATA -#include "DeviceConfig.h" -#include "silabs_utils.h" -#include -#include -#endif // SIWX917_USE_COMISSIONABLE_DATA - #include namespace chip { @@ -39,142 +32,6 @@ namespace Silabs { // using namespace chip::Credentials; using namespace chip::DeviceLayer::Internal; -// TODO Remove once Commander supports (doesn't erase) NVM3 for 917 -#ifdef SIWX917_USE_COMISSIONABLE_DATA -void SilabsDeviceDataProvider::setupPayload(uint8_t * outBuf) -{ - SetupPayload payload; - std::string result; - ChipError err = CHIP_NO_ERROR; - payload.version = 0; - payload.discriminator.SetLongValue(discriminatorValue); - payload.setUpPINCode = passcode; - payload.rendezvousInformation.SetValue(static_cast(rendezvousFlag)); - payload.commissioningFlow = static_cast(commissionableFlow); - payload.vendorID = vendorId; - payload.productID = productId; - - QRCodeSetupPayloadGenerator generator(payload); - err = generator.payloadBase38Representation(result); - if (err != CHIP_NO_ERROR) - { - SILABS_LOG("Failed to get the payload: %d", err); - } - SILABS_LOG("Payload value in string format : %s", result.c_str()); - std::vector result1; - // skipping the MT: from the payload during decoding - err = base38Decode(result.substr(3), result1); - if (err == CHIP_NO_ERROR) - { - for (uint8_t i = 0; i < result1.size(); i++) - { - outBuf[i] = result1.at(i); - } - } -} - -// writing to the flash based on the value given in the DeviceConfig.h -CHIP_ERROR SilabsDeviceDataProvider::FlashFactoryData() -{ - // flashing the value to the nvm3 section of the flash - // TODO: remove this once it is removed SiWx917 have the nvm3 simiplicity commander support - CHIP_ERROR err; - // Checking for the value of CM and flag - if ((commissionableFlow > 3) || (rendezvousFlag > 7)) - { - return CHIP_ERROR_INTERNAL; - } - if (discriminatorValue != 0) - { - err = SilabsConfig::WriteConfigValue(SilabsConfig::kConfigKey_SetupDiscriminator, discriminatorValue); - if (err != CHIP_NO_ERROR) - { - return err; - } - } - uint8_t payload[kTotalPayloadDataSizeInBytes]; - setupPayload(payload); - err = SilabsConfig::WriteConfigValueBin(SilabsConfig::kConfigKey_SetupPayloadBitSet, payload, kTotalPayloadDataSizeInBytes); - if (err != CHIP_NO_ERROR) - { - return err; - } - if (spake2Interation != 0) - { - err = SilabsConfig::WriteConfigValue(SilabsConfig::kConfigKey_Spake2pIterationCount, spake2Interation); - if (err != CHIP_NO_ERROR) - { - return err; - } - } - if (spake2Salt != NULL) - { - err = SilabsConfig::WriteConfigValueStr(SilabsConfig::kConfigKey_Spake2pSalt, spake2Salt); - if (err != CHIP_NO_ERROR) - { - return err; - } - } - if (spake2Verifier != NULL) - { - err = SilabsConfig::WriteConfigValueStr(SilabsConfig::kConfigKey_Spake2pVerifier, spake2Verifier); - if (err != CHIP_NO_ERROR) - { - return err; - } - } - if (productId != 0) - { - err = SilabsConfig::WriteConfigValue(SilabsConfig::kConfigKey_ProductId, productId); - if (err != CHIP_NO_ERROR) - { - return err; - } - } - if (vendorId != 0) - { - err = SilabsConfig::WriteConfigValue(SilabsConfig::kConfigKey_VendorId, vendorId); - if (err != CHIP_NO_ERROR) - { - return err; - } - } - if (strlen(productName) != 0) - { - err = SilabsConfig::WriteConfigValueStr(SilabsConfig::kConfigKey_ProductName, productName); - if (err != CHIP_NO_ERROR) - { - return err; - } - } - if (strlen(vendorName) != 0) - { - err = SilabsConfig::WriteConfigValueStr(SilabsConfig::kConfigKey_VendorName, vendorName); - if (err != CHIP_NO_ERROR) - { - return err; - } - } - if (strlen(hwVersionString) != 0) - { - err = SilabsConfig::WriteConfigValueStr(SilabsConfig::kConfigKey_HardwareVersionString, hwVersionString); - if (err != CHIP_NO_ERROR) - { - return err; - } - } - if (rotatingId != 0) - { - err = SilabsConfig::WriteConfigValue(SilabsConfig::kConfigKey_UniqueId, rotatingId); - if (err != CHIP_NO_ERROR) - { - return err; - } - } - return CHIP_NO_ERROR; -} -#endif - CHIP_ERROR SilabsDeviceDataProvider::GetSetupDiscriminator(uint16_t & setupDiscriminator) { CHIP_ERROR err; @@ -510,6 +367,43 @@ CHIP_ERROR SilabsDeviceDataProvider::GetProductLabel(char * buf, size_t bufSize) return SilabsConfig::ReadConfigValueStr(SilabsConfig::KConfigKey_ProductLabel, buf, bufSize, productLabelLen); } +#ifdef SL_MATTER_TEST_EVENT_TRIGGER_ENABLED +/** + * @brief Reads the test event trigger key from NVM. If the key isn't present, returns default value if defined. + * + * @param[out] keySpan output buffer. Must be at least large enough for 16 bytes (ken length) + * @return CHIP_ERROR + */ +CHIP_ERROR SilabsDeviceDataProvider::GetTestEventTriggerKey(MutableByteSpan & keySpan) +{ + constexpr size_t kEnableKeyLength = 16; // Expected byte size of the EnableKey + CHIP_ERROR err = CHIP_NO_ERROR; + size_t keyLength = 0; + + VerifyOrReturnError(keySpan.size() >= kEnableKeyLength, CHIP_ERROR_BUFFER_TOO_SMALL); + + err = SilabsConfig::ReadConfigValueBin(SilabsConfig::kConfigKey_Test_Event_Trigger_Key, keySpan.data(), kEnableKeyLength, + keyLength); +#ifndef NDEBUG + if (err == CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND) + { + + constexpr char enableKey[] = SL_MATTER_TEST_EVENT_TRIGGER_ENABLE_KEY; + if (Encoding::HexToBytes(enableKey, strlen(enableKey), keySpan.data(), kEnableKeyLength) != kEnableKeyLength) + { + // enableKey Hex String doesn't have the correct length + memset(keySpan.data(), 0, keySpan.size()); + return CHIP_ERROR_INTERNAL; + } + err = CHIP_NO_ERROR; + } +#endif // NDEBUG + + keySpan.reduce_size(kEnableKeyLength); + return err; +} +#endif // SL_MATTER_TEST_EVENT_TRIGGER_ENABLED + SilabsDeviceDataProvider & SilabsDeviceDataProvider::GetDeviceDataProvider() { static SilabsDeviceDataProvider sDataProvider; diff --git a/examples/platform/silabs/SilabsDeviceDataProvider.h b/examples/platform/silabs/SilabsDeviceDataProvider.h index f29e6be24d9d72..76caac04bd60b8 100644 --- a/examples/platform/silabs/SilabsDeviceDataProvider.h +++ b/examples/platform/silabs/SilabsDeviceDataProvider.h @@ -37,12 +37,6 @@ class SilabsDeviceDataProvider : public CommissionableDataProvider, Internal::GenericDeviceInstanceInfoProvider(ConfigurationManagerImpl::GetDefaultInstance()) {} -// TODO Remove once Commander supports (doesn't erase) NVM3 for 917 -#ifdef SIWX917_USE_COMISSIONABLE_DATA - void setupPayload(uint8_t * outBuf); - CHIP_ERROR FlashFactoryData(); -#endif /* SIWX917_USE_COMISSIONABLE_DATA */ - static SilabsDeviceDataProvider & GetDeviceDataProvider(); CHIP_ERROR GetSetupPayload(MutableCharSpan & payloadBuf); // ===== Members functions that implement the CommissionableDataProvider @@ -68,6 +62,9 @@ class SilabsDeviceDataProvider : public CommissionableDataProvider, CHIP_ERROR GetPartNumber(char * buf, size_t bufSize) override; CHIP_ERROR GetProductURL(char * buf, size_t bufSzie) override; CHIP_ERROR GetProductLabel(char * buf, size_t bufSize) override; + + // ===== Member functions that are Silabs Specific + CHIP_ERROR GetTestEventTriggerKey(MutableByteSpan & keySpan); }; } // namespace Silabs diff --git a/examples/platform/silabs/SilabsTestEventTriggerDelegate.cpp b/examples/platform/silabs/SilabsTestEventTriggerDelegate.cpp index f9a11df74d7ae9..ef42c0d3a9dfd2 100644 --- a/examples/platform/silabs/SilabsTestEventTriggerDelegate.cpp +++ b/examples/platform/silabs/SilabsTestEventTriggerDelegate.cpp @@ -17,6 +17,7 @@ */ #include "SilabsTestEventTriggerDelegate.h" +#include "SilabsDeviceDataProvider.h" using namespace ::chip::DeviceLayer; @@ -24,7 +25,14 @@ namespace chip { bool SilabsTestEventTriggerDelegate::DoesEnableKeyMatch(const ByteSpan & enableKey) const { - return !mEnableKey.empty() && mEnableKey.data_equal(enableKey); + uint8_t storedEnableKey[TestEventTriggerDelegate::kEnableKeyLength]; + MutableByteSpan enableKeySpan(storedEnableKey); + + // Return false if we were not able to get the enableKey + VerifyOrReturnValue( + Silabs::SilabsDeviceDataProvider::GetDeviceDataProvider().GetTestEventTriggerKey(enableKeySpan) == CHIP_NO_ERROR, false); + + return (!enableKeySpan.empty() && enableKeySpan.data_equal(enableKey)); } } // namespace chip diff --git a/examples/platform/silabs/SilabsTestEventTriggerDelegate.h b/examples/platform/silabs/SilabsTestEventTriggerDelegate.h index 03ceabd69a7898..8359e489a16029 100644 --- a/examples/platform/silabs/SilabsTestEventTriggerDelegate.h +++ b/examples/platform/silabs/SilabsTestEventTriggerDelegate.h @@ -46,10 +46,7 @@ namespace chip { class SilabsTestEventTriggerDelegate : public TestEventTriggerDelegate, TestEventTriggerHandler { public: - explicit SilabsTestEventTriggerDelegate(const ByteSpan & enableKey) : mEnableKey(enableKey) - { - VerifyOrDie(AddHandler(this) == CHIP_NO_ERROR); - } + explicit SilabsTestEventTriggerDelegate() { VerifyOrDie(AddHandler(this) == CHIP_NO_ERROR); } /** * @brief Checks to see if `enableKey` provided matches value chosen by the manufacturer. @@ -69,9 +66,6 @@ class SilabsTestEventTriggerDelegate : public TestEventTriggerDelegate, TestEven // WARNING: LEGACY SUPPORT ONLY, DO NOT EXTEND FOR STANDARD CLUSTERS return (emberAfHandleEventTrigger(eventTrigger)) ? CHIP_NO_ERROR : CHIP_ERROR_INVALID_ARGUMENT; } - -private: - ByteSpan mEnableKey; }; } // namespace chip diff --git a/examples/platform/silabs/efr32/BUILD.gn b/examples/platform/silabs/efr32/BUILD.gn index 8b7b1ebf86e264..ee0b891a2565f8 100644 --- a/examples/platform/silabs/efr32/BUILD.gn +++ b/examples/platform/silabs/efr32/BUILD.gn @@ -41,11 +41,11 @@ declare_args() { chip_default_wifi_psk = "" # Enable TestEventTrigger in GeneralDiagnostics cluster - silabs_test_event_trigger_enabled = false + sl_enable_test_event_trigger = false # The EnableKey in hex string format used by TestEventTrigger command in - # GeneralDiagnostics cluster. The length of the string should be 32. - silabs_test_event_trigger_enable_key = "00112233445566778899aabbccddeeff" + # GeneralDiagnostics cluster. The length of the string should be 16 bytes. + sl_test_event_trigger_enable_key = "00112233445566778899AABBCCDDEEFF" } silabs_common_plat_dir = "${chip_root}/examples/platform/silabs" @@ -94,6 +94,30 @@ config("chip_examples_project_config") { ] } +config("test-event-trigger-config") { + defines = [ "SL_MATTER_TEST_EVENT_TRIGGER_ENABLED" ] + + if (is_debug) { + defines += [ "SL_MATTER_TEST_EVENT_TRIGGER_ENABLE_KEY=\"${sl_test_event_trigger_enable_key}\"" ] + } +} + +source_set("test-event-trigger") { + sources = [ + "${silabs_common_plat_dir}/SilabsTestEventTriggerDelegate.cpp", + "${silabs_common_plat_dir}/SilabsTestEventTriggerDelegate.h", + ] + + public_configs = [ ":test-event-trigger-config" ] + + public_deps = [ + ":silabs-factory-data-provider", + "${chip_root}/src/app:test-event-trigger", + "${chip_root}/src/lib/core", + "${chip_root}/src/lib/support", + ] +} + source_set("openthread_core_config_efr32_chip_examples") { if (chip_enable_openthread) { sources = [ "project_include/OpenThreadConfig.h" ] @@ -157,6 +181,10 @@ source_set("silabs-factory-data-provider") { "${chip_root}/src/platform:platform_base", "${chip_root}/src/setup_payload", ] + + if (sl_enable_test_event_trigger) { + public_configs = [ ":test-event-trigger-config" ] + } } config("efr32-common-config") { @@ -206,6 +234,7 @@ config("silabs-wifi-config") { if (sl_wfx_config_softap) { defines += [ "SL_WFX_CONFIG_SOFTAP" ] } + if (sl_wfx_config_scan) { defines += [ "SL_WFX_CONFIG_SCAN" ] } @@ -213,6 +242,7 @@ config("silabs-wifi-config") { if (chip_enable_wifi_ipv4) { defines += [ "CHIP_DEVICE_CONFIG_ENABLE_IPV4" ] } + if (rs91x_wpa3_transition) { # TODO: Change this macro once WF200 support is provided defines += [ "WIFI_ENABLE_SECURITY_WPA3_TRANSITION=1" ] @@ -322,15 +352,6 @@ source_set("efr32-common") { public_deps += [ ":silabs-factory-data-provider" ] } - if (silabs_test_event_trigger_enabled) { - sources += - [ "${silabs_common_plat_dir}/SilabsTestEventTriggerDelegate.cpp" ] - defines += [ - "SILABS_TEST_EVENT_TRIGGER_ENABLED=true", - "SILABS_TEST_EVENT_TRIGGER_ENABLE_KEY=\"${silabs_test_event_trigger_enable_key}\"", - ] - } - public_deps += [ "${chip_root}/examples/providers:device_info_provider", "${chip_root}/src/app/server", @@ -338,6 +359,10 @@ source_set("efr32-common") { "${chip_root}/src/setup_payload", ] + if (sl_enable_test_event_trigger) { + public_deps += [ ":test-event-trigger" ] + } + if (app_data_model != "") { public_deps += [ app_data_model ] } diff --git a/examples/smoke-co-alarm-app/silabs/README.md b/examples/smoke-co-alarm-app/silabs/README.md index b5548b69f24f54..03ff976deca183 100644 --- a/examples/smoke-co-alarm-app/silabs/README.md +++ b/examples/smoke-co-alarm-app/silabs/README.md @@ -384,10 +384,10 @@ features can easily be toggled on or off. Here is a short list of options : ### Enabling test event trigger -`silabs_test_event_trigger_enabled, silabs_test_event_trigger_enable_key` +`sl_enable_test_event_trigger` ``` - The value of silabs_test_event_trigger_enable_key is specific to each device manufacturer + The enable the test event trigger, `sl_enable_test_event_trigger` must be true. - $ ./scripts/examples/gn_silabs_example.sh ./examples/smoke-co-alarm-app/silabs ./out/smoke-co-alarm-app BRD4164A silabs_test_event_trigger_enabled=true silabs_test_event_trigger_enable_key=\"00112233445566778899aabbccddeeff\" + $ ./scripts/examples/gn_silabs_example.sh ./examples/smoke-co-alarm-app/silabs ./out/smoke-co-alarm-app BRD4164A sl_enable_test_event_trigger=true ``` diff --git a/examples/smoke-co-alarm-app/silabs/build_for_wifi_args.gni b/examples/smoke-co-alarm-app/silabs/build_for_wifi_args.gni index 047de7f34492df..0619082413530d 100644 --- a/examples/smoke-co-alarm-app/silabs/build_for_wifi_args.gni +++ b/examples/smoke-co-alarm-app/silabs/build_for_wifi_args.gni @@ -21,3 +21,17 @@ import("${chip_root}/src/platform/silabs/wifi_args.gni") chip_enable_ota_requestor = true app_data_model = "${chip_root}/examples/smoke-co-alarm-app/smoke-co-alarm-common" + +sl_enable_test_event_trigger = true + +# ICD Default configurations +chip_enable_icd_server = true +chip_subscription_timeout_resumption = false +sl_use_subscription_syncing = true +icd_enforce_sit_slow_poll_limit = true +chip_enable_icd_lit = true + +# ICD Matter Configuration flags +sl_idle_mode_duration_s = 3600 # 60min Idle Mode Duration +sl_active_mode_duration_ms = 0 # 0 Active Mode Duration +sl_active_mode_threshold_ms = 30000 # 30s Active Mode Threshold diff --git a/examples/smoke-co-alarm-app/silabs/openthread.gni b/examples/smoke-co-alarm-app/silabs/openthread.gni index 650b338de86f93..845b2220b4570a 100644 --- a/examples/smoke-co-alarm-app/silabs/openthread.gni +++ b/examples/smoke-co-alarm-app/silabs/openthread.gni @@ -25,3 +25,22 @@ chip_enable_openthread = true openthread_external_platform = "${chip_root}/third_party/openthread/platforms/efr32:libopenthread-efr32" + +sl_enable_test_event_trigger = true + +# ICD Default configurations +chip_enable_icd_server = true +chip_subscription_timeout_resumption = false +sl_use_subscription_syncing = true +icd_enforce_sit_slow_poll_limit = true +chip_icd_report_on_active_mode = true +chip_enable_icd_lit = true + +# Openthread Configuration flags +sl_ot_idle_interval_ms = 3600000 # 60mins Idle Polling Interval +sl_ot_active_interval_ms = 1000 # 1000ms Active Polling Interval + +# ICD Matter Configuration flags +sl_idle_mode_duration_s = 3600 # 60min Idle Mode Duration +sl_active_mode_duration_ms = 0 # 0 Active Mode Duration +sl_active_mode_threshold_ms = 5000 # 5s Active Mode Threshold diff --git a/examples/window-app/silabs/openthread.gni b/examples/window-app/silabs/openthread.gni index d3d50ab878b211..9fd09bd510a840 100644 --- a/examples/window-app/silabs/openthread.gni +++ b/examples/window-app/silabs/openthread.gni @@ -29,7 +29,7 @@ openthread_external_platform = chip_enable_icd_server = true enable_synchronized_sed = true chip_subscription_timeout_resumption = false -sl_use_subscription_synching = true +sl_use_subscription_syncing = true # Openthread Configuration flags sl_ot_idle_interval_ms = 1000 # 1s Idle Intervals diff --git a/src/platform/silabs/SilabsConfig.h b/src/platform/silabs/SilabsConfig.h index 0f820f6fb8268e..3bd5abfba1b8f3 100644 --- a/src/platform/silabs/SilabsConfig.h +++ b/src/platform/silabs/SilabsConfig.h @@ -93,34 +93,35 @@ class SilabsConfig // Key definitions for well-known configuration values. // Factory config keys - static constexpr Key kConfigKey_SerialNum = SilabsConfigKey(kMatterFactory_KeyBase, 0x00); - static constexpr Key kConfigKey_MfrDeviceId = SilabsConfigKey(kMatterFactory_KeyBase, 0x01); - static constexpr Key kConfigKey_MfrDeviceCert = SilabsConfigKey(kMatterFactory_KeyBase, 0x02); - static constexpr Key kConfigKey_MfrDevicePrivateKey = SilabsConfigKey(kMatterFactory_KeyBase, 0x03); - static constexpr Key kConfigKey_ManufacturingDate = SilabsConfigKey(kMatterFactory_KeyBase, 0x04); - static constexpr Key kConfigKey_SetupPayloadBitSet = SilabsConfigKey(kMatterFactory_KeyBase, 0x05); - static constexpr Key kConfigKey_MfrDeviceICACerts = SilabsConfigKey(kMatterFactory_KeyBase, 0x06); - static constexpr Key kConfigKey_SetupDiscriminator = SilabsConfigKey(kMatterFactory_KeyBase, 0x07); - static constexpr Key kConfigKey_Spake2pIterationCount = SilabsConfigKey(kMatterFactory_KeyBase, 0x08); - static constexpr Key kConfigKey_Spake2pSalt = SilabsConfigKey(kMatterFactory_KeyBase, 0x09); - static constexpr Key kConfigKey_Spake2pVerifier = SilabsConfigKey(kMatterFactory_KeyBase, 0x0A); - static constexpr Key kConfigKey_ProductId = SilabsConfigKey(kMatterFactory_KeyBase, 0x0B); - static constexpr Key kConfigKey_VendorId = SilabsConfigKey(kMatterFactory_KeyBase, 0x0C); - static constexpr Key kConfigKey_VendorName = SilabsConfigKey(kMatterFactory_KeyBase, 0x0D); - static constexpr Key kConfigKey_ProductName = SilabsConfigKey(kMatterFactory_KeyBase, 0x0E); - static constexpr Key kConfigKey_HardwareVersionString = SilabsConfigKey(kMatterFactory_KeyBase, 0x0F); - static constexpr Key KConfigKey_ProductLabel = SilabsConfigKey(kMatterFactory_KeyBase, 0x10); - static constexpr Key kConfigKey_ProductURL = SilabsConfigKey(kMatterFactory_KeyBase, 0x11); - static constexpr Key kConfigKey_PartNumber = SilabsConfigKey(kMatterFactory_KeyBase, 0x12); - static constexpr Key kConfigKey_UniqueId = SilabsConfigKey(kMatterFactory_KeyBase, 0x1F); - static constexpr Key kConfigKey_Creds_KeyId = SilabsConfigKey(kMatterFactory_KeyBase, 0x20); - static constexpr Key kConfigKey_Creds_Base_Addr = SilabsConfigKey(kMatterFactory_KeyBase, 0x21); - static constexpr Key kConfigKey_Creds_DAC_Offset = SilabsConfigKey(kMatterFactory_KeyBase, 0x22); - static constexpr Key kConfigKey_Creds_DAC_Size = SilabsConfigKey(kMatterFactory_KeyBase, 0x23); - static constexpr Key kConfigKey_Creds_PAI_Offset = SilabsConfigKey(kMatterFactory_KeyBase, 0x24); - static constexpr Key kConfigKey_Creds_PAI_Size = SilabsConfigKey(kMatterFactory_KeyBase, 0x25); - static constexpr Key kConfigKey_Creds_CD_Offset = SilabsConfigKey(kMatterFactory_KeyBase, 0x26); - static constexpr Key kConfigKey_Creds_CD_Size = SilabsConfigKey(kMatterFactory_KeyBase, 0x27); + static constexpr Key kConfigKey_SerialNum = SilabsConfigKey(kMatterFactory_KeyBase, 0x00); + static constexpr Key kConfigKey_MfrDeviceId = SilabsConfigKey(kMatterFactory_KeyBase, 0x01); + static constexpr Key kConfigKey_MfrDeviceCert = SilabsConfigKey(kMatterFactory_KeyBase, 0x02); + static constexpr Key kConfigKey_MfrDevicePrivateKey = SilabsConfigKey(kMatterFactory_KeyBase, 0x03); + static constexpr Key kConfigKey_ManufacturingDate = SilabsConfigKey(kMatterFactory_KeyBase, 0x04); + static constexpr Key kConfigKey_SetupPayloadBitSet = SilabsConfigKey(kMatterFactory_KeyBase, 0x05); + static constexpr Key kConfigKey_MfrDeviceICACerts = SilabsConfigKey(kMatterFactory_KeyBase, 0x06); + static constexpr Key kConfigKey_SetupDiscriminator = SilabsConfigKey(kMatterFactory_KeyBase, 0x07); + static constexpr Key kConfigKey_Spake2pIterationCount = SilabsConfigKey(kMatterFactory_KeyBase, 0x08); + static constexpr Key kConfigKey_Spake2pSalt = SilabsConfigKey(kMatterFactory_KeyBase, 0x09); + static constexpr Key kConfigKey_Spake2pVerifier = SilabsConfigKey(kMatterFactory_KeyBase, 0x0A); + static constexpr Key kConfigKey_ProductId = SilabsConfigKey(kMatterFactory_KeyBase, 0x0B); + static constexpr Key kConfigKey_VendorId = SilabsConfigKey(kMatterFactory_KeyBase, 0x0C); + static constexpr Key kConfigKey_VendorName = SilabsConfigKey(kMatterFactory_KeyBase, 0x0D); + static constexpr Key kConfigKey_ProductName = SilabsConfigKey(kMatterFactory_KeyBase, 0x0E); + static constexpr Key kConfigKey_HardwareVersionString = SilabsConfigKey(kMatterFactory_KeyBase, 0x0F); + static constexpr Key KConfigKey_ProductLabel = SilabsConfigKey(kMatterFactory_KeyBase, 0x10); + static constexpr Key kConfigKey_ProductURL = SilabsConfigKey(kMatterFactory_KeyBase, 0x11); + static constexpr Key kConfigKey_PartNumber = SilabsConfigKey(kMatterFactory_KeyBase, 0x12); + static constexpr Key kConfigKey_UniqueId = SilabsConfigKey(kMatterFactory_KeyBase, 0x1F); + static constexpr Key kConfigKey_Creds_KeyId = SilabsConfigKey(kMatterFactory_KeyBase, 0x20); + static constexpr Key kConfigKey_Creds_Base_Addr = SilabsConfigKey(kMatterFactory_KeyBase, 0x21); + static constexpr Key kConfigKey_Creds_DAC_Offset = SilabsConfigKey(kMatterFactory_KeyBase, 0x22); + static constexpr Key kConfigKey_Creds_DAC_Size = SilabsConfigKey(kMatterFactory_KeyBase, 0x23); + static constexpr Key kConfigKey_Creds_PAI_Offset = SilabsConfigKey(kMatterFactory_KeyBase, 0x24); + static constexpr Key kConfigKey_Creds_PAI_Size = SilabsConfigKey(kMatterFactory_KeyBase, 0x25); + static constexpr Key kConfigKey_Creds_CD_Offset = SilabsConfigKey(kMatterFactory_KeyBase, 0x26); + static constexpr Key kConfigKey_Creds_CD_Size = SilabsConfigKey(kMatterFactory_KeyBase, 0x27); + static constexpr Key kConfigKey_Test_Event_Trigger_Key = SilabsConfigKey(kMatterFactory_KeyBase, 0x28); // Matter Config Keys static constexpr Key kConfigKey_ServiceConfig = SilabsConfigKey(kMatterConfig_KeyBase, 0x01); static constexpr Key kConfigKey_PairedAccountId = SilabsConfigKey(kMatterConfig_KeyBase, 0x02); From a93dba5c1a988affdbe0481a95119032bfa9d201 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Thu, 11 Apr 2024 09:57:04 -0400 Subject: [PATCH 031/468] Improve MTRDevice work item logging. (#32936) Stop including the node ID in the description passed to enqueueWorkItem, because the work queue includes that already. Use hex for node IDs, cluster IDs, command/attribute IDs (but keep using decimal for endpoint IDs), to be consistent with other logging. --- src/darwin/Framework/CHIP/MTRDevice.mm | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/darwin/Framework/CHIP/MTRDevice.mm b/src/darwin/Framework/CHIP/MTRDevice.mm index a5ae3904156367..31cdc3aa304af2 100644 --- a/src/darwin/Framework/CHIP/MTRDevice.mm +++ b/src/darwin/Framework/CHIP/MTRDevice.mm @@ -1522,14 +1522,14 @@ static BOOL AttributeHasChangesOmittedQuality(MTRAttributePath * attributePath) while (readRequestsNext.count) { // Can only read up to 9 paths at a time, per spec if (readRequestsCurrent.count >= 9) { - MTR_LOG_INFO("Batching read attribute work item [%llu]: cannot add more work, item is full [%@:%@:%@:%@]", workItemID, nodeID, endpointID, clusterID, attributeID); + MTR_LOG_INFO("Batching read attribute work item [%llu]: cannot add more work, item is full [0x%016llX:%@:0x%llx:0x%llx]", workItemID, nodeID.unsignedLongLongValue, endpointID, clusterID.unsignedLongLongValue, attributeID.unsignedLongLongValue); return outcome; } // if params don't match then they cannot be merged if (![readRequestsNext[0][MTRDeviceReadRequestFieldParamsIndex] isEqual:readRequestsCurrent[0][MTRDeviceReadRequestFieldParamsIndex]]) { - MTR_LOG_INFO("Batching read attribute work item [%llu]: cannot add more work, parameter mismatch [%@:%@:%@:%@]", workItemID, nodeID, endpointID, clusterID, attributeID); + MTR_LOG_INFO("Batching read attribute work item [%llu]: cannot add more work, parameter mismatch [0x%016llX:%@:0x%llx:0x%llx]", workItemID, nodeID.unsignedLongLongValue, endpointID, clusterID.unsignedLongLongValue, attributeID.unsignedLongLongValue); return outcome; } @@ -1537,8 +1537,8 @@ static BOOL AttributeHasChangesOmittedQuality(MTRAttributePath * attributePath) auto readItem = readRequestsNext.firstObject; [readRequestsNext removeObjectAtIndex:0]; [readRequestsCurrent addObject:readItem]; - MTR_LOG_INFO("Batching read attribute work item [%llu]: added %@ (now %tu requests total) [%@:%@:%@:%@]", - workItemID, readItem, readRequestsCurrent.count, nodeID, endpointID, clusterID, attributeID); + MTR_LOG_INFO("Batching read attribute work item [%llu]: added %@ (now %tu requests total) [0x%016llX:%@:0x%llx:0x%llx]", + workItemID, readItem, readRequestsCurrent.count, nodeID.unsignedLongLongValue, endpointID, clusterID.unsignedLongLongValue, attributeID.unsignedLongLongValue); outcome = MTRBatchedPartially; } NSCAssert(readRequestsNext.count == 0, @"should have batched everything or returned early"); @@ -1548,7 +1548,7 @@ static BOOL AttributeHasChangesOmittedQuality(MTRAttributePath * attributePath) mtr_hide(self); // don't capture self accidentally for (NSArray * readItem in readRequests) { if ([readItem isEqual:opaqueItemData]) { - MTR_LOG_DEFAULT("Read attribute work item [%llu] report duplicate %@ [%@:%@:%@:%@]", workItemID, readItem, nodeID, endpointID, clusterID, attributeID); + MTR_LOG_DEFAULT("Read attribute work item [%llu] report duplicate %@ [0x%016llX:%@:0x%llx:0x%llx]", workItemID, readItem, nodeID.unsignedLongLongValue, endpointID, clusterID.unsignedLongLongValue, attributeID.unsignedLongLongValue); *isDuplicate = YES; *stop = YES; return; @@ -1585,23 +1585,23 @@ static BOOL AttributeHasChangesOmittedQuality(MTRAttributePath * attributePath) if (values) { // Since the format is the same data-value dictionary, this looks like an // attribute report - MTR_LOG_INFO("Read attribute work item [%llu] result: %@ [%@:%@:%@:%@]", workItemID, values, nodeID, endpointID, clusterID, attributeID); + MTR_LOG_INFO("Read attribute work item [%llu] result: %@ [0x%016llX:%@:0x%llX:0x%llX]", workItemID, values, nodeID.unsignedLongLongValue, endpointID, clusterID.unsignedLongLongValue, attributeID.unsignedLongLongValue); [self _handleAttributeReport:values]; } // TODO: better retry logic if (error && (retryCount < 2)) { - MTR_LOG_ERROR("Read attribute work item [%llu] failed (will retry): %@ [%@:%@:%@:%@]", workItemID, error, nodeID, endpointID, clusterID, attributeID); + MTR_LOG_ERROR("Read attribute work item [%llu] failed (will retry): %@ [0x%016llX:%@:0x%llx:0x%llx]", workItemID, error, nodeID.unsignedLongLongValue, endpointID, clusterID.unsignedLongLongValue, attributeID.unsignedLongLongValue); completion(MTRAsyncWorkNeedsRetry); } else { if (error) { - MTR_LOG_DEFAULT("Read attribute work item [%llu] failed (giving up): %@ [%@:%@:%@:%@]", workItemID, error, nodeID, endpointID, clusterID, attributeID); + MTR_LOG_DEFAULT("Read attribute work item [%llu] failed (giving up): %@ [0x%016llX:%@:0x%llx:0x%llx]", workItemID, error, nodeID.unsignedLongLongValue, endpointID, clusterID.unsignedLongLongValue, attributeID.unsignedLongLongValue); } completion(MTRAsyncWorkComplete); } }]; }]; - [_asyncWorkQueue enqueueWorkItem:workItem descriptionWithFormat:@"read %@ %@ %@ %@", self.nodeID, endpointID, clusterID, attributeID]; + [_asyncWorkQueue enqueueWorkItem:workItem descriptionWithFormat:@"read %@ 0x%llx 0x%llx", endpointID, clusterID.unsignedLongLongValue, attributeID.unsignedLongLongValue]; } return attributeValueToReturn; @@ -1669,7 +1669,7 @@ - (void)writeAttributeWithEndpointID:(NSNumber *)endpointID completion(MTRAsyncWorkComplete); }]; }]; - [_asyncWorkQueue enqueueWorkItem:workItem descriptionWithFormat:@"write %@ %@ %@ %@", self.nodeID, endpointID, clusterID, attributeID]; + [_asyncWorkQueue enqueueWorkItem:workItem descriptionWithFormat:@"write %@ 0x%llx 0x%llx", endpointID, clusterID.unsignedLongLongValue, attributeID.unsignedLongLongValue]; } - (void)invokeCommandWithEndpointID:(NSNumber *)endpointID @@ -1819,7 +1819,7 @@ - (void)_invokeCommandWithEndpointID:(NSNumber *)endpointID workDone(values, error); }]; }]; - [_asyncWorkQueue enqueueWorkItem:workItem descriptionWithFormat:@"invoke %@ %@ %@", endpointID, clusterID, commandID]; + [_asyncWorkQueue enqueueWorkItem:workItem descriptionWithFormat:@"invoke %@ 0x%llx 0x%llx", endpointID, clusterID.unsignedLongLongValue, commandID.unsignedLongLongValue]; } - (void)_invokeKnownCommandWithEndpointID:(NSNumber *)endpointID From 27e31fb7c3bddd5176a0471bf2c817b25e6ee298 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Thu, 11 Apr 2024 10:05:55 -0400 Subject: [PATCH 032/468] Remove examples/android/CHIPTest from detekt (#32942) * Remove examples/android/CHIPTest from detekt It seems to hang/never finish. We do something odd there. * Update again with the real failure reason --- .github/workflows/kotlin-style.yaml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/kotlin-style.yaml b/.github/workflows/kotlin-style.yaml index 2f8df6f486123b..a8d328268951bf 100644 --- a/.github/workflows/kotlin-style.yaml +++ b/.github/workflows/kotlin-style.yaml @@ -22,11 +22,17 @@ jobs: uses: actions/checkout@v4 - name: "detekt" - uses: natiginfo/action-detekt-all@1.23.5 + uses: natiginfo/action-detekt-all@1.23.6 # Detekt seems not to like circular symlinks, so we set up # explicit paths below + # + # In particular, if symlinks exist and recurse, detekt tries to + # follow, so for example `examples/android/CHIPTest` as a path + # will never end (and eventually run out of HEAP) because + # `examples/android/CHIPTest/third_party/connectedhomeip` is + # circular with: - args: --parallel --build-upon-default-config --config kotlin-detect-config.yaml --input examples/android/CHIPTest,examples/android/CHIPTool,examples/java-matter-controller/java,src/controller/java + args: --parallel --build-upon-default-config --config kotlin-detect-config.yaml --input examples/android/CHIPTest/app,examples/android/CHIPTool,examples/java-matter-controller/java,src/controller/java ktlint: name: "Format check" From f52eabf5608e37132e04648e8f7f8ea6f0d46663 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Thu, 11 Apr 2024 10:15:52 -0400 Subject: [PATCH 033/468] Detect some out of date submodules during bootstrap/activate (#32878) * Detect out of date submodules. Since we removed auto submodule update from bootstrap, we got some complaints about not being aware that an update is required. I added detection of a small subset of out of date modules: - pigweed since that really requires a new bootstrap (however on a fresh checkout things will be checked out already) - some small submodule subset that is always checked out * add path quoting --------- Co-authored-by: Andrei Litvin --- scripts/setup/bootstrap.sh | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/scripts/setup/bootstrap.sh b/scripts/setup/bootstrap.sh index ce6b12f1df330d..0fb9af207e2c77 100644 --- a/scripts/setup/bootstrap.sh +++ b/scripts/setup/bootstrap.sh @@ -56,6 +56,29 @@ _install_additional_pip_requirements() { unset _SETUP_PLATFORM } +_submodules_need_updating() { + # Validates if a set o submodules that should always be checked out are up to date + + # Pigweed will be up to date on an initial setup, however it may change over time + # the rest are a small subset of things that are always checked out (have no platform attachment) + _SUBMODULE_PATHS=( + "third_party/pigweed/repo" + "third_party/openthread/repo" + "third_party/editline/repo" + ) + + for path in "${_SUBMODULE_PATHS[@]}"; do + if git submodule status "$path" | grep -E '^-' >/dev/null 2>&1; then + echo "git shows that $path has changes" + unset _SUBMODULE_PATHS + return 0 # Success + fi + done + + unset _SUBMODULE_PATHS + return 1 # Failure +} + _bootstrap_or_activate() { if [ -n "$BASH" ]; then local _BOOTSTRAP_PATH="${BASH_SOURCE[0]}" @@ -164,6 +187,20 @@ unset -f _install_additional_pip_requirements pw_cleanup +if _submodules_need_updating; then + # yellow output + if which tput >/dev/null; then tput setaf 3; fi + + echo "Some submodules seem out of date." + echo "For a clean checkout, consider running:" + echo " ./scripts/checkout_submodules.py --shallow --platform " + echo "OR for a full checkout:" + echo " git submodules update -f --init --recursive" + + # reset output + if which tput >/dev/null; then tput sgr0; fi +fi + unset _ACTION_TAKEN unset _CHIP_ROOT unset PW_CIPD_INSTALL_DIR From 9e0f288819ba047b4b87349b8241abe9fd66186e Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Thu, 11 Apr 2024 10:27:28 -0400 Subject: [PATCH 034/468] More fixes to src/app/util/mock. (#32932) * More fixes to src/app/util/mock. * Remove misplaced comment * Remove misplaced comment * Fix compilation for esp32 * Fix typo --- src/app/util/mock/Functions.h | 8 ++++++ src/app/util/mock/MockNodeConfig.cpp | 16 +++++++++++ src/app/util/mock/MockNodeConfig.h | 35 +++++++++++++++++++++++-- src/app/util/mock/attribute-storage.cpp | 16 +++++++++++ 4 files changed, 73 insertions(+), 2 deletions(-) diff --git a/src/app/util/mock/Functions.h b/src/app/util/mock/Functions.h index 32ba08d316f484..16fe45d9045b9e 100644 --- a/src/app/util/mock/Functions.h +++ b/src/app/util/mock/Functions.h @@ -36,7 +36,15 @@ namespace Test { CHIP_ERROR ReadSingleMockClusterData(FabricIndex aAccessingFabricIndex, const app::ConcreteAttributePath & aPath, app::AttributeReportIBs::Builder & aAttributeReports, app::AttributeValueEncoder::AttributeEncodeState * apEncoderState); + +/// Increase the current value for `GetVersion` void BumpVersion(); + +/// Sets GetVersion to return 0 +void ResetVersion(); + +/// Gets the current value for the version that will +/// be returned by emberAfDataVersionStorage DataVersion GetVersion(); /// Configures the singular global mock attribute storage to use the specified configuration. diff --git a/src/app/util/mock/MockNodeConfig.cpp b/src/app/util/mock/MockNodeConfig.cpp index e7c04fa546e5c9..79c886f532a8a2 100644 --- a/src/app/util/mock/MockNodeConfig.cpp +++ b/src/app/util/mock/MockNodeConfig.cpp @@ -70,6 +70,22 @@ MockClusterConfig::MockClusterConfig(ClusterId aId, std::initializer_list(mEmberEventList.size()); mEmberCluster.eventList = mEmberEventList.data(); + + for (auto & attr : attributes) + { + mAttributeMetaData.push_back(attr.attributeMetaData); + } + + // Make sure ember side has access to attribute metadata + mEmberCluster.attributes = mAttributeMetaData.data(); +} + +MockClusterConfig::MockClusterConfig(const MockClusterConfig & other) : + id(other.id), attributes(other.attributes), events(other.events), mEmberCluster(other.mEmberCluster), + mEmberEventList(other.mEmberEventList), mAttributeMetaData(other.mAttributeMetaData) +{ + // Fix self-referencial dependencies after data copy + mEmberCluster.attributes = mAttributeMetaData.data(); } const MockAttributeConfig * MockClusterConfig::attributeById(AttributeId attributeId, ptrdiff_t * outIndex) const diff --git a/src/app/util/mock/MockNodeConfig.h b/src/app/util/mock/MockNodeConfig.h index fc8f185fd80a56..aa711589eff432 100644 --- a/src/app/util/mock/MockNodeConfig.h +++ b/src/app/util/mock/MockNodeConfig.h @@ -18,6 +18,7 @@ #pragma once +#include #include #include @@ -28,10 +29,35 @@ namespace chip { namespace Test { +namespace internal { + +constexpr EmberAfAttributeMetadata DefaultAttributeMetadata(chip::AttributeId id) +{ + return EmberAfAttributeMetadata{ + .defaultValue = EmberAfDefaultOrMinMaxAttributeValue(static_cast(0)), + .attributeId = id, + .size = 4, + .attributeType = ZCL_INT32U_ATTRIBUTE_TYPE, + .mask = ATTRIBUTE_MASK_WRITABLE | ATTRIBUTE_MASK_NULLABLE, + }; +} + +} // namespace internal + struct MockAttributeConfig { - MockAttributeConfig(AttributeId aId) : id(aId) {} + MockAttributeConfig(AttributeId aId) : id(aId), attributeMetaData(internal::DefaultAttributeMetadata(aId)) {} + MockAttributeConfig(AttributeId aId, EmberAfAttributeType type, + EmberAfAttributeMask mask = ATTRIBUTE_MASK_WRITABLE | ATTRIBUTE_MASK_NULLABLE) : + id(aId), + attributeMetaData(internal::DefaultAttributeMetadata(aId)) + { + attributeMetaData.attributeType = type; + attributeMetaData.mask = mask; + } + const AttributeId id; + EmberAfAttributeMetadata attributeMetaData; }; struct MockEventConfig @@ -45,6 +71,10 @@ struct MockClusterConfig MockClusterConfig(ClusterId aId, std::initializer_list aAttributes = {}, std::initializer_list aEvents = {}); + // Cluster-config is self-referential: mEmberCluster.attributes references mAttributeMetaData.data() + MockClusterConfig(const MockClusterConfig & other); + MockClusterConfig & operator=(const MockClusterConfig &) = delete; + const MockAttributeConfig * attributeById(AttributeId attributeId, ptrdiff_t * outIndex = nullptr) const; const EmberAfCluster * emberCluster() const { return &mEmberCluster; } @@ -55,13 +85,14 @@ struct MockClusterConfig private: EmberAfCluster mEmberCluster; std::vector mEmberEventList; + std::vector mAttributeMetaData; }; struct MockEndpointConfig { MockEndpointConfig(EndpointId aId, std::initializer_list aClusters = {}); - // Cluster-config is self-referntial: mEmberCluster.clusters references mEmberClusters + // Endpoint-config is self-referential: mEmberEndpoint.clusters references mEmberClusters.data() MockEndpointConfig(const MockEndpointConfig & other); MockEndpointConfig & operator=(const MockEndpointConfig &) = delete; diff --git a/src/app/util/mock/attribute-storage.cpp b/src/app/util/mock/attribute-storage.cpp index 6aa872956dbe7a..716460026591ee 100644 --- a/src/app/util/mock/attribute-storage.cpp +++ b/src/app/util/mock/attribute-storage.cpp @@ -307,8 +307,14 @@ void EnabledEndpointsWithServerCluster::EnsureMatchingEndpoint() } } // namespace app + namespace Test { +void ResetVersion() +{ + dataVersion = 0; +} + void BumpVersion() { dataVersion++; @@ -407,5 +413,15 @@ CHIP_ERROR ReadSingleMockClusterData(FabricIndex aAccessingFabricIndex, const Co return attributeReport.EndOfAttributeReportIB(); } +void SetMockNodeConfig(const MockNodeConfig & config) +{ + mockConfig = &config; +} + +void ResetMockNodeConfig() +{ + mockConfig = nullptr; +} + } // namespace Test } // namespace chip From 1998017feadf8c6696d18335de55a2655df60a1e Mon Sep 17 00:00:00 2001 From: Karsten Sperling <113487422+ksperling-apple@users.noreply.github.com> Date: Fri, 12 Apr 2024 02:58:58 +1200 Subject: [PATCH 035/468] Darwin: Fix STRIP_STYLE, should be non-global (#32938) Also ensure we actuall generate dSYM files, since dwarf-with-dsym doesn't seem to get used by default by xcodebuild even though Xcode shows it as the default. --- src/darwin/Framework/Matter.xcodeproj/project.pbxproj | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/darwin/Framework/Matter.xcodeproj/project.pbxproj b/src/darwin/Framework/Matter.xcodeproj/project.pbxproj index 80c451c937e2de..846db8bd08ee26 100644 --- a/src/darwin/Framework/Matter.xcodeproj/project.pbxproj +++ b/src/darwin/Framework/Matter.xcodeproj/project.pbxproj @@ -2193,6 +2193,8 @@ CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DWARF_DSYM_FILE_SHOULD_ACCOMPANY_PRODUCT = YES; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_NO_COMMON_BLOCKS = YES; @@ -2294,6 +2296,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.csa.matter; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SDKROOT = iphoneos; + STRIP_STYLE = "non-global"; SYSTEM_HEADER_SEARCH_PATHS = ( "$(TEMP_DIR)/out/gen/include", "$(CHIP_ROOT)/src/darwin/Framework/CHIP/", @@ -2361,6 +2364,8 @@ CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DWARF_DSYM_FILE_SHOULD_ACCOMPANY_PRODUCT = YES; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -2460,6 +2465,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.csa.matter; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SDKROOT = iphoneos; + STRIP_STYLE = "non-global"; SYSTEM_HEADER_SEARCH_PATHS = ( "$(TEMP_DIR)/out/gen/include", "$(CHIP_ROOT)/src/darwin/Framework/CHIP/", From c47db02ef1bab23efc89631e7fa241581165c8a6 Mon Sep 17 00:00:00 2001 From: Jaehoon-You <55170115+Jaehoon-You@users.noreply.github.com> Date: Fri, 12 Apr 2024 01:06:43 +0900 Subject: [PATCH 036/468] [Android] virtual-device-app: Add door lock menu (#32712) * virtual-device-app: Cleanup resources (menu) Signed-off-by: Jaehoon You Signed-off-by: Charles Kim * virtual-device-app: Add doorlock menu Signed-off-by: Jaehoon You Signed-off-by: Charles Kim --------- Signed-off-by: Jaehoon You Signed-off-by: Charles Kim Co-authored-by: Andrei Litvin --- .../android/App/app/build.gradle.kts | 3 ++- .../app/src/main/res/navigation/nav_graph.xml | 1 + .../device/app/core/common/DeepLink.kt | 3 +++ .../virtual/device/app/core/common/Device.kt | 4 ++++ .../src/main/res/drawable/round_lock_24.xml | 5 +++++ .../device/app/feature/main/MainFragment.kt | 8 ++++---- .../device/app/feature/main/MenuAdapter.kt | 16 ++++++++-------- .../device/app/feature/main/model/Menu.kt | 19 ------------------- .../main/src/main/res/layout/item_menu.xml | 12 +++++------- 9 files changed, 32 insertions(+), 39 deletions(-) create mode 100644 examples/virtual-device-app/android/App/core/common/src/main/res/drawable/round_lock_24.xml delete mode 100644 examples/virtual-device-app/android/App/feature/main/src/main/java/com/matter/virtual/device/app/feature/main/model/Menu.kt diff --git a/examples/virtual-device-app/android/App/app/build.gradle.kts b/examples/virtual-device-app/android/App/app/build.gradle.kts index e5998ddc554d6d..c9b40ccd5abc1d 100644 --- a/examples/virtual-device-app/android/App/app/build.gradle.kts +++ b/examples/virtual-device-app/android/App/app/build.gradle.kts @@ -76,7 +76,8 @@ dependencies { implementation(project(":core:data")) implementation(project(":core:domain")) implementation(project(":core:model")) - implementation(project(":core:ui")) + implementation(project(":core:ui")) + implementation(project(":feature:closure")) implementation(project(":feature:control")) implementation(project(":feature:main")) implementation(project(":feature:qrcode")) diff --git a/examples/virtual-device-app/android/App/app/src/main/res/navigation/nav_graph.xml b/examples/virtual-device-app/android/App/app/src/main/res/navigation/nav_graph.xml index a5e06ead94b64c..87d075c431ea82 100644 --- a/examples/virtual-device-app/android/App/app/src/main/res/navigation/nav_graph.xml +++ b/examples/virtual-device-app/android/App/app/src/main/res/navigation/nav_graph.xml @@ -7,5 +7,6 @@ + \ No newline at end of file diff --git a/examples/virtual-device-app/android/App/core/common/src/main/java/com/matter/virtual/device/app/core/common/DeepLink.kt b/examples/virtual-device-app/android/App/core/common/src/main/java/com/matter/virtual/device/app/core/common/DeepLink.kt index 2e24a9246888b5..8adad6a4495d4d 100644 --- a/examples/virtual-device-app/android/App/core/common/src/main/java/com/matter/virtual/device/app/core/common/DeepLink.kt +++ b/examples/virtual-device-app/android/App/core/common/src/main/java/com/matter/virtual/device/app/core/common/DeepLink.kt @@ -35,6 +35,9 @@ object DeepLink { Device.OnOffSwitch -> "android-app://com.matter.virtual.device.app.feature.control/onOffSwitchFragment/${setting}" .toUri() + Device.DoorLock -> + "android-app://com.matter.virtual.device.app.feature.closure/doorLockFragment/${setting}" + .toUri() Device.Unknown -> throw UnsupportedOperationException("Unsupported device") } diff --git a/examples/virtual-device-app/android/App/core/common/src/main/java/com/matter/virtual/device/app/core/common/Device.kt b/examples/virtual-device-app/android/App/core/common/src/main/java/com/matter/virtual/device/app/core/common/Device.kt index 067898bbd79d93..05b114f3385b70 100644 --- a/examples/virtual-device-app/android/App/core/common/src/main/java/com/matter/virtual/device/app/core/common/Device.kt +++ b/examples/virtual-device-app/android/App/core/common/src/main/java/com/matter/virtual/device/app/core/common/Device.kt @@ -22,6 +22,10 @@ sealed class Device( 3841 ) + @Serializable + object DoorLock : + Device("doorlock", R.string.matter_door_lock, R.drawable.round_lock_24, 0x000A, 3842) + @Serializable object Unknown : Device("unknown", R.string.matter_device, R.drawable.round_device_unknown_24, 65535, 3840) diff --git a/examples/virtual-device-app/android/App/core/common/src/main/res/drawable/round_lock_24.xml b/examples/virtual-device-app/android/App/core/common/src/main/res/drawable/round_lock_24.xml new file mode 100644 index 00000000000000..74cd8a77ffc307 --- /dev/null +++ b/examples/virtual-device-app/android/App/core/common/src/main/res/drawable/round_lock_24.xml @@ -0,0 +1,5 @@ + + + diff --git a/examples/virtual-device-app/android/App/feature/main/src/main/java/com/matter/virtual/device/app/feature/main/MainFragment.kt b/examples/virtual-device-app/android/App/feature/main/src/main/java/com/matter/virtual/device/app/feature/main/MainFragment.kt index 0365727b110d25..623c0bbb978a7d 100644 --- a/examples/virtual-device-app/android/App/feature/main/src/main/java/com/matter/virtual/device/app/feature/main/MainFragment.kt +++ b/examples/virtual-device-app/android/App/feature/main/src/main/java/com/matter/virtual/device/app/feature/main/MainFragment.kt @@ -15,10 +15,10 @@ import androidx.navigation.NavOptions import androidx.navigation.fragment.findNavController import androidx.recyclerview.widget.LinearLayoutManager import com.matter.virtual.device.app.core.common.DeepLink +import com.matter.virtual.device.app.core.common.Device import com.matter.virtual.device.app.core.common.MatterSettings import com.matter.virtual.device.app.core.ui.SharedViewModel import com.matter.virtual.device.app.feature.main.databinding.FragmentMainBinding -import com.matter.virtual.device.app.feature.main.model.Menu import dagger.hilt.android.AndroidEntryPoint import kotlinx.serialization.ExperimentalSerializationApi import kotlinx.serialization.encodeToString @@ -84,15 +84,15 @@ class MainFragment : Fragment() { ) } MainUiState.Start -> { - val itemList = arrayListOf(Menu.ON_OFF_SWITCH) + val itemList = arrayListOf(Device.OnOffSwitch, Device.DoorLock) val menuAdapter = MenuAdapter( object : MenuAdapter.ItemHandler { - override fun onClick(item: Menu) { + override fun onClick(item: Device) { viewModel.consumeUiState() - val matterSettings = MatterSettings(device = item.device) + val matterSettings = MatterSettings(device = item) val jsonSettings = Json.encodeToString(matterSettings) try { findNavController() diff --git a/examples/virtual-device-app/android/App/feature/main/src/main/java/com/matter/virtual/device/app/feature/main/MenuAdapter.kt b/examples/virtual-device-app/android/App/feature/main/src/main/java/com/matter/virtual/device/app/feature/main/MenuAdapter.kt index c3212333d7ec13..8df42477871afc 100644 --- a/examples/virtual-device-app/android/App/feature/main/src/main/java/com/matter/virtual/device/app/feature/main/MenuAdapter.kt +++ b/examples/virtual-device-app/android/App/feature/main/src/main/java/com/matter/virtual/device/app/feature/main/MenuAdapter.kt @@ -5,17 +5,17 @@ import android.view.ViewGroup import androidx.recyclerview.widget.DiffUtil import androidx.recyclerview.widget.ListAdapter import androidx.recyclerview.widget.RecyclerView +import com.matter.virtual.device.app.core.common.Device import com.matter.virtual.device.app.feature.main.databinding.ItemMenuBinding -import com.matter.virtual.device.app.feature.main.model.Menu internal class MenuAdapter(private val itemHandler: ItemHandler) : - ListAdapter( - object : DiffUtil.ItemCallback() { - override fun areItemsTheSame(oldItem: Menu, newItem: Menu): Boolean { - return oldItem.titleResId == newItem.titleResId + ListAdapter( + object : DiffUtil.ItemCallback() { + override fun areItemsTheSame(oldItem: Device, newItem: Device): Boolean { + return oldItem.deviceNameResId == newItem.deviceNameResId } - override fun areContentsTheSame(oldItem: Menu, newItem: Menu): Boolean { + override fun areContentsTheSame(oldItem: Device, newItem: Device): Boolean { return oldItem == newItem } } @@ -23,7 +23,7 @@ internal class MenuAdapter(private val itemHandler: ItemHandler) : inner class MenuViewHolder(private val binding: ItemMenuBinding) : RecyclerView.ViewHolder(binding.root) { - fun bind(item: Menu) { + fun bind(item: Device) { binding.item = item binding.itemHandler = itemHandler } @@ -41,6 +41,6 @@ internal class MenuAdapter(private val itemHandler: ItemHandler) : } interface ItemHandler { - fun onClick(item: Menu) + fun onClick(item: Device) } } diff --git a/examples/virtual-device-app/android/App/feature/main/src/main/java/com/matter/virtual/device/app/feature/main/model/Menu.kt b/examples/virtual-device-app/android/App/feature/main/src/main/java/com/matter/virtual/device/app/feature/main/model/Menu.kt deleted file mode 100644 index 67e2658c5bed44..00000000000000 --- a/examples/virtual-device-app/android/App/feature/main/src/main/java/com/matter/virtual/device/app/feature/main/model/Menu.kt +++ /dev/null @@ -1,19 +0,0 @@ -package com.matter.virtual.device.app.feature.main.model - -import androidx.annotation.DrawableRes -import androidx.annotation.StringRes -import com.matter.virtual.device.app.core.common.Device -import com.matter.virtual.device.app.feature.main.R - -enum class Menu( - @DrawableRes val iconResId: Int, - @StringRes val titleResId: Int, - val isDim: Boolean = false, - val device: Device = Device.Unknown -) { - ON_OFF_SWITCH( - R.drawable.round_toggle_on_24, - R.string.matter_on_off_switch, - device = Device.OnOffSwitch - ) -} diff --git a/examples/virtual-device-app/android/App/feature/main/src/main/res/layout/item_menu.xml b/examples/virtual-device-app/android/App/feature/main/src/main/res/layout/item_menu.xml index b9b12400969d84..23239f41667e6e 100644 --- a/examples/virtual-device-app/android/App/feature/main/src/main/res/layout/item_menu.xml +++ b/examples/virtual-device-app/android/App/feature/main/src/main/res/layout/item_menu.xml @@ -10,15 +10,14 @@ + type="com.matter.virtual.device.app.core.common.Device" /> @@ -35,10 +34,10 @@ android:layout_marginTop="@dimen/menu_item_image_margin_top" android:layout_marginBottom="@dimen/menu_item_image_margin_bottom" android:tint="@color/device_image_tint" + app:imageSrc="@{item.deviceIconResId}" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toTopOf="parent" - app:imageSrc="@{item.iconResId}" /> + app:layout_constraintTop_toTopOf="parent" /> - From 43c5d84e6b15640b126b53d7c0930756d95fcc6d Mon Sep 17 00:00:00 2001 From: Nivi Sarkar <55898241+nivi-apple@users.noreply.github.com> Date: Thu, 11 Apr 2024 09:10:31 -0700 Subject: [PATCH 037/468] =?UTF-8?q?Do=20not=20report=20attribute=20in=20?= =?UTF-8?q?=5FgetAttributesToReportWithReportedValues=20i=E2=80=A6=20(#328?= =?UTF-8?q?83)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Do not report attribute in _getAttributesToReportWithReportedValues if an expected value is present - The expiry timer for the expected value will take care of the reporting and we shouldn't report an attribute in the expected value interval if there is an existing expected value * Add the code that sets previous value in the block where we have an expected value --- src/darwin/Framework/CHIP/MTRDevice.mm | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/darwin/Framework/CHIP/MTRDevice.mm b/src/darwin/Framework/CHIP/MTRDevice.mm index 31cdc3aa304af2..9997b370320e7b 100644 --- a/src/darwin/Framework/CHIP/MTRDevice.mm +++ b/src/darwin/Framework/CHIP/MTRDevice.mm @@ -2157,13 +2157,9 @@ - (NSArray *)_getAttributesToReportWithReportedValues:(NSArray Date: Thu, 11 Apr 2024 09:42:01 -0700 Subject: [PATCH 038/468] YAML Updates 3-20-24 (#32659) * Updates Test_TC_BRBINFO_1_1.yaml, Test_TC_TSUIC_1_1.yaml * Updates Test_TC_ACE_1_6.yaml * Restores Test_TC_BRBINFO_1_1.yaml * Updates Test_TC_CNET_4_4.yaml, Test_TC_CNET_4_5.yaml, Test_TC_CNET_4_6.yaml, Test_TC_CNET_4_9.yaml, Test_TC_CNET_4_10.yaml, Test_TC_CNET_4_11.yaml, Test_TC_CNET_4_15.yaml, Test_TC_CNET_4_16.yaml, Test_TC_CNET_4_22.yaml --- .../suites/certification/Test_TC_ACE_1_6.yaml | 15 +++++---- .../certification/Test_TC_CNET_4_10.yaml | 31 ------------------- .../certification/Test_TC_CNET_4_11.yaml | 26 ---------------- .../certification/Test_TC_CNET_4_15.yaml | 26 ---------------- .../certification/Test_TC_CNET_4_16.yaml | 31 ------------------- .../certification/Test_TC_CNET_4_22.yaml | 31 ------------------- .../certification/Test_TC_CNET_4_4.yaml | 26 ---------------- .../certification/Test_TC_CNET_4_5.yaml | 26 ---------------- .../certification/Test_TC_CNET_4_6.yaml | 31 ------------------- .../certification/Test_TC_CNET_4_9.yaml | 26 ---------------- .../certification/Test_TC_TSUIC_1_1.yaml | 8 ++--- 11 files changed, 13 insertions(+), 264 deletions(-) diff --git a/src/app/tests/suites/certification/Test_TC_ACE_1_6.yaml b/src/app/tests/suites/certification/Test_TC_ACE_1_6.yaml index 7c353c2b2382b5..9738fefb7024fe 100644 --- a/src/app/tests/suites/certification/Test_TC_ACE_1_6.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACE_1_6.yaml @@ -100,10 +100,13 @@ tests: } - label: - "Step 2: TH binds GroupId to GroupKeySet with entries as follows: List - item 1: GroupId: 0x0103, GroupKeySetId: 0x01a3, List item 2: GroupId: - 0x0104, GroupKeySetId: 0x01a4, List item 3: GroupId: 0x0105, - GroupKeySetId: 0x01a3" + "Step 2: TH binds GroupIds 0x0101 and 0x0102 with GroupKeySetID 0x01a1 + and GroupId 0x0103 with GroupKeySetID 0x01a3 in the GroupKeyMap + attribute list on GroupKeyManagement cluster by writing the + GroupKeyMap attribute with three entries as follows: List item 1: + GroupId: 0x0101, GroupKeySetId: 0x01a1, List item 2: GroupId: 0x0102, + GroupKeySetId: 0x01a1, List item 3: GroupId: 0x0103, GroupKeySetId: + 0x01a3" cluster: "Group Key Management" command: "writeAttribute" attribute: "GroupKeyMap" @@ -175,7 +178,7 @@ tests: - label: "Step 5: TH sends a AddGroup Command to the Groups cluster on Endpoint - PIXIT.G.ENDPOINT over CASE with the GroupID field set to 0x0101 and + PIXIT.G.ENDPOINT over CASE with the GroupID field set to 0x0104 and the GroupName set to an empty string" cluster: "Groups" endpoint: Groups.Endpoint @@ -183,7 +186,7 @@ tests: arguments: values: - name: GroupID - value: 0x0101 + value: 0x0104 - name: GroupName value: "" response: diff --git a/src/app/tests/suites/certification/Test_TC_CNET_4_10.yaml b/src/app/tests/suites/certification/Test_TC_CNET_4_10.yaml index ac024c5644ef45..7955c2fa199d11 100644 --- a/src/app/tests/suites/certification/Test_TC_CNET_4_10.yaml +++ b/src/app/tests/suites/certification/Test_TC_CNET_4_10.yaml @@ -29,37 +29,6 @@ config: defaultValue: "hex:1111111122222222" tests: - #Issue: https://github.com/project-chip/connectedhomeip/issues/30196 - - label: "Precondition: Commission TH and DUT on Thread network " - verification: | - ./chip-tool pairing ble-thread 0x12344321 - - [1698660637.937566][6429:6431] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0005 - [1698660637.937644][6429:6431] CHIP:CTL: Received CommissioningComplete response, errorCode=0 - [1698660637.937705][6429:6431] CHIP:CTL: Successfully finished commissioning step 'SendComplete' - [1698660637.937750][6429:6431] CHIP:CTL: Commissioning stage next step: 'SendComplete' -> 'Cleanup' - [1698660637.937812][6429:6431] CHIP:CTL: Performing next commissioning step 'Cleanup' - [1698660637.937863][6429:6431] CHIP:DIS: Closing all BLE connections - [1698660637.937911][6429:6431] CHIP:IN: Clearing BLE pending packets. - [1698660637.938582][6429:6431] CHIP:BLE: Auto-closing end point's BLE connection. - [1698660637.938645][6429:6431] CHIP:DL: Closing BLE GATT connection (con 0xffff9c034bb0) - [1698660637.938805][6429:6430] CHIP:DL: BluezDisconnect peer=F7:D4:24:D2:4A:1F - [1698660638.365208][6429:6431] CHIP:IN: SecureSession[0xffff9400f900]: MarkForEviction Type:1 LSID:62220 - [1698660638.365311][6429:6431] CHIP:SC: SecureSession[0xffff9400f900, LSID:62220]: State change 'kActive' --> 'kPendingEviction' - [1698660638.365440][6429:6431] CHIP:IN: SecureSession[0xffff9400f900]: Released - Type:1 LSID:62220 - [1698660638.365529][6429:6431] CHIP:CTL: Successfully finished commissioning step 'Cleanup' - [1698660638.365598][6429:6431] CHIP:TOO: Device commissioning completed with success - [1698660638.365873][6429:6431] CHIP:DMG: ICR moving to [AwaitingDe] - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: enter 'y' after success" - - name: "expectedValue" - value: "y" - - label: "Precondition: TH reads FeatureMap attribute from the DUT" command: "readAttribute" attribute: "FeatureMap" diff --git a/src/app/tests/suites/certification/Test_TC_CNET_4_11.yaml b/src/app/tests/suites/certification/Test_TC_CNET_4_11.yaml index 64335127d530ae..4d3f94418afef9 100644 --- a/src/app/tests/suites/certification/Test_TC_CNET_4_11.yaml +++ b/src/app/tests/suites/certification/Test_TC_CNET_4_11.yaml @@ -36,32 +36,6 @@ config: defaultValue: "hex:70617373776f7264313233" tests: - #Issue: https://github.com/project-chip/connectedhomeip/issues/30196 - - label: "Precondition: Commission TH and DUT on WiFi network" - verification: | - ./chip-tool pairing ble-wifi 0x12344321 - - [1698912271.738597][32363:32366] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0005 - [1698912271.738606][32363:32366] CHIP:CTL: Received CommissioningComplete response, errorCode=0 - [1698912271.738613][32363:32366] CHIP:CTL: Successfully finished commissioning step 'SendComplete' - [1698912271.738617][32363:32366] CHIP:CTL: Commissioning stage next step: 'SendComplete' -> 'Cleanup' - [1698912271.738622][32363:32366] CHIP:CTL: Performing next commissioning step 'Cleanup' - [1698912271.738639][32363:32366] CHIP:IN: SecureSession[0x7fbb04014a50]: MarkForEviction Type:1 LSID:50170 - [1698912271.738642][32363:32366] CHIP:SC: SecureSession[0x7fbb04014a50, LSID:50170]: State change 'kActive' --> 'kPendingEviction' - [1698912271.738666][32363:32366] CHIP:IN: SecureSession[0x7fbb04014a50]: Released - Type:1 LSID:50170 - [1698912271.738672][32363:32366] CHIP:CTL: Successfully finished commissioning step 'Cleanup' - [1698912271.738677][32363:32366] CHIP:TOO: Device commissioning completed with success - [1698912271.738691][32363:32366] CHIP:DMG: ICR moving to [AwaitingDe] - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: enter 'y' after success" - - name: "expectedValue" - value: "y" - - label: "Precondition: TH reads FeatureMap attribute from the DUT" command: "readAttribute" attribute: "FeatureMap" diff --git a/src/app/tests/suites/certification/Test_TC_CNET_4_15.yaml b/src/app/tests/suites/certification/Test_TC_CNET_4_15.yaml index ec89cc137f89e4..c8d8fa91f34633 100644 --- a/src/app/tests/suites/certification/Test_TC_CNET_4_15.yaml +++ b/src/app/tests/suites/certification/Test_TC_CNET_4_15.yaml @@ -43,32 +43,6 @@ tests: - name: "expectedValue" value: "y" - #Issue: https://github.com/project-chip/connectedhomeip/issues/30196 - - label: "Precondition: Commission TH and DUT on WiFi network" - verification: | - ./chip-tool pairing ble-wifi 0x12344321 - - [1698912271.738597][32363:32366] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0005 - [1698912271.738606][32363:32366] CHIP:CTL: Received CommissioningComplete response, errorCode=0 - [1698912271.738613][32363:32366] CHIP:CTL: Successfully finished commissioning step 'SendComplete' - [1698912271.738617][32363:32366] CHIP:CTL: Commissioning stage next step: 'SendComplete' -> 'Cleanup' - [1698912271.738622][32363:32366] CHIP:CTL: Performing next commissioning step 'Cleanup' - [1698912271.738639][32363:32366] CHIP:IN: SecureSession[0x7fbb04014a50]: MarkForEviction Type:1 LSID:50170 - [1698912271.738642][32363:32366] CHIP:SC: SecureSession[0x7fbb04014a50, LSID:50170]: State change 'kActive' --> 'kPendingEviction' - [1698912271.738666][32363:32366] CHIP:IN: SecureSession[0x7fbb04014a50]: Released - Type:1 LSID:50170 - [1698912271.738672][32363:32366] CHIP:CTL: Successfully finished commissioning step 'Cleanup' - [1698912271.738677][32363:32366] CHIP:TOO: Device commissioning completed with success - [1698912271.738691][32363:32366] CHIP:DMG: ICR moving to [AwaitingDe] - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: enter 'y' after success" - - name: "expectedValue" - value: "y" - - label: "Precondition: TH reads FeatureMap attribute from the DUT" command: "readAttribute" attribute: "FeatureMap" diff --git a/src/app/tests/suites/certification/Test_TC_CNET_4_16.yaml b/src/app/tests/suites/certification/Test_TC_CNET_4_16.yaml index 36fa1ca62ceb30..49422e215be178 100644 --- a/src/app/tests/suites/certification/Test_TC_CNET_4_16.yaml +++ b/src/app/tests/suites/certification/Test_TC_CNET_4_16.yaml @@ -43,37 +43,6 @@ tests: - name: "expectedValue" value: "y" - #Issue: https://github.com/project-chip/connectedhomeip/issues/30196 - - label: "Precondition: Commission TH and DUT on Thread network " - verification: | - ./chip-tool pairing ble-thread 0x12344321 - - [1698660637.937566][6429:6431] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0005 - [1698660637.937644][6429:6431] CHIP:CTL: Received CommissioningComplete response, errorCode=0 - [1698660637.937705][6429:6431] CHIP:CTL: Successfully finished commissioning step 'SendComplete' - [1698660637.937750][6429:6431] CHIP:CTL: Commissioning stage next step: 'SendComplete' -> 'Cleanup' - [1698660637.937812][6429:6431] CHIP:CTL: Performing next commissioning step 'Cleanup' - [1698660637.937863][6429:6431] CHIP:DIS: Closing all BLE connections - [1698660637.937911][6429:6431] CHIP:IN: Clearing BLE pending packets. - [1698660637.938582][6429:6431] CHIP:BLE: Auto-closing end point's BLE connection. - [1698660637.938645][6429:6431] CHIP:DL: Closing BLE GATT connection (con 0xffff9c034bb0) - [1698660637.938805][6429:6430] CHIP:DL: BluezDisconnect peer=F7:D4:24:D2:4A:1F - [1698660638.365208][6429:6431] CHIP:IN: SecureSession[0xffff9400f900]: MarkForEviction Type:1 LSID:62220 - [1698660638.365311][6429:6431] CHIP:SC: SecureSession[0xffff9400f900, LSID:62220]: State change 'kActive' --> 'kPendingEviction' - [1698660638.365440][6429:6431] CHIP:IN: SecureSession[0xffff9400f900]: Released - Type:1 LSID:62220 - [1698660638.365529][6429:6431] CHIP:CTL: Successfully finished commissioning step 'Cleanup' - [1698660638.365598][6429:6431] CHIP:TOO: Device commissioning completed with success - [1698660638.365873][6429:6431] CHIP:DMG: ICR moving to [AwaitingDe] - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: enter 'y' after successfull Commission" - - name: "expectedValue" - value: "y" - - label: "Precondition: TH reads FeatureMap attribute from the DUT" command: "readAttribute" attribute: "FeatureMap" diff --git a/src/app/tests/suites/certification/Test_TC_CNET_4_22.yaml b/src/app/tests/suites/certification/Test_TC_CNET_4_22.yaml index b8fed5f79afbc5..6b5eb06b47e5cf 100644 --- a/src/app/tests/suites/certification/Test_TC_CNET_4_22.yaml +++ b/src/app/tests/suites/certification/Test_TC_CNET_4_22.yaml @@ -29,37 +29,6 @@ config: defaultValue: "hex:1111111122222222" tests: - #Issue: https://github.com/project-chip/connectedhomeip/issues/30196 - - label: "Precondition: Commission TH and DUT on Thread network " - verification: | - ./chip-tool pairing ble-thread 0x12344321 - - [1698660637.937566][6429:6431] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0005 - [1698660637.937644][6429:6431] CHIP:CTL: Received CommissioningComplete response, errorCode=0 - [1698660637.937705][6429:6431] CHIP:CTL: Successfully finished commissioning step 'SendComplete' - [1698660637.937750][6429:6431] CHIP:CTL: Commissioning stage next step: 'SendComplete' -> 'Cleanup' - [1698660637.937812][6429:6431] CHIP:CTL: Performing next commissioning step 'Cleanup' - [1698660637.937863][6429:6431] CHIP:DIS: Closing all BLE connections - [1698660637.937911][6429:6431] CHIP:IN: Clearing BLE pending packets. - [1698660637.938582][6429:6431] CHIP:BLE: Auto-closing end point's BLE connection. - [1698660637.938645][6429:6431] CHIP:DL: Closing BLE GATT connection (con 0xffff9c034bb0) - [1698660637.938805][6429:6430] CHIP:DL: BluezDisconnect peer=F7:D4:24:D2:4A:1F - [1698660638.365208][6429:6431] CHIP:IN: SecureSession[0xffff9400f900]: MarkForEviction Type:1 LSID:62220 - [1698660638.365311][6429:6431] CHIP:SC: SecureSession[0xffff9400f900, LSID:62220]: State change 'kActive' --> 'kPendingEviction' - [1698660638.365440][6429:6431] CHIP:IN: SecureSession[0xffff9400f900]: Released - Type:1 LSID:62220 - [1698660638.365529][6429:6431] CHIP:CTL: Successfully finished commissioning step 'Cleanup' - [1698660638.365598][6429:6431] CHIP:TOO: Device commissioning completed with success - [1698660638.365873][6429:6431] CHIP:DMG: ICR moving to [AwaitingDe] - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: enter 'y' after success" - - name: "expectedValue" - value: "y" - - label: "Step 1: TH sends ScanNetworks command to the DUT with the SSID field omitted and the Breadcrumb field set to 1" diff --git a/src/app/tests/suites/certification/Test_TC_CNET_4_4.yaml b/src/app/tests/suites/certification/Test_TC_CNET_4_4.yaml index aaf348393320e1..f020b75bee18dd 100644 --- a/src/app/tests/suites/certification/Test_TC_CNET_4_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_CNET_4_4.yaml @@ -29,32 +29,6 @@ config: defaultValue: "hex:47524C50726976617465" tests: - #Issue: https://github.com/project-chip/connectedhomeip/issues/30196 - - label: "Precondition : Commission TH and DUT on WiFi network" - verification: | - ./chip-tool pairing ble-wifi 0x12344321 - - [1698912271.738597][32363:32366] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0005 - [1698912271.738606][32363:32366] CHIP:CTL: Received CommissioningComplete response, errorCode=0 - [1698912271.738613][32363:32366] CHIP:CTL: Successfully finished commissioning step 'SendComplete' - [1698912271.738617][32363:32366] CHIP:CTL: Commissioning stage next step: 'SendComplete' -> 'Cleanup' - [1698912271.738622][32363:32366] CHIP:CTL: Performing next commissioning step 'Cleanup' - [1698912271.738639][32363:32366] CHIP:IN: SecureSession[0x7fbb04014a50]: MarkForEviction Type:1 LSID:50170 - [1698912271.738642][32363:32366] CHIP:SC: SecureSession[0x7fbb04014a50, LSID:50170]: State change 'kActive' --> 'kPendingEviction' - [1698912271.738666][32363:32366] CHIP:IN: SecureSession[0x7fbb04014a50]: Released - Type:1 LSID:50170 - [1698912271.738672][32363:32366] CHIP:CTL: Successfully finished commissioning step 'Cleanup' - [1698912271.738677][32363:32366] CHIP:TOO: Device commissioning completed with success - [1698912271.738691][32363:32366] CHIP:DMG: ICR moving to [AwaitingDe] - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: enter 'y' after success" - - name: "expectedValue" - value: "y" - - label: "Precondition: TH reads FeatureMap attribute from the DUT" command: "readAttribute" attribute: "FeatureMap" diff --git a/src/app/tests/suites/certification/Test_TC_CNET_4_5.yaml b/src/app/tests/suites/certification/Test_TC_CNET_4_5.yaml index 892ae4e63059b5..cb12c7a35ac6ed 100644 --- a/src/app/tests/suites/certification/Test_TC_CNET_4_5.yaml +++ b/src/app/tests/suites/certification/Test_TC_CNET_4_5.yaml @@ -32,32 +32,6 @@ config: defaultValue: "hex:70617373776f7264313233" tests: - #Issue: https://github.com/project-chip/connectedhomeip/issues/30196 - - label: "Precondition: Commission TH and DUT on WiFi network" - verification: | - ./chip-tool pairing ble-wifi 0x12344321 - - [1698912271.738597][32363:32366] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0005 - [1698912271.738606][32363:32366] CHIP:CTL: Received CommissioningComplete response, errorCode=0 - [1698912271.738613][32363:32366] CHIP:CTL: Successfully finished commissioning step 'SendComplete' - [1698912271.738617][32363:32366] CHIP:CTL: Commissioning stage next step: 'SendComplete' -> 'Cleanup' - [1698912271.738622][32363:32366] CHIP:CTL: Performing next commissioning step 'Cleanup' - [1698912271.738639][32363:32366] CHIP:IN: SecureSession[0x7fbb04014a50]: MarkForEviction Type:1 LSID:50170 - [1698912271.738642][32363:32366] CHIP:SC: SecureSession[0x7fbb04014a50, LSID:50170]: State change 'kActive' --> 'kPendingEviction' - [1698912271.738666][32363:32366] CHIP:IN: SecureSession[0x7fbb04014a50]: Released - Type:1 LSID:50170 - [1698912271.738672][32363:32366] CHIP:CTL: Successfully finished commissioning step 'Cleanup' - [1698912271.738677][32363:32366] CHIP:TOO: Device commissioning completed with success - [1698912271.738691][32363:32366] CHIP:DMG: ICR moving to [AwaitingDe] - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: enter 'y' after success" - - name: "expectedValue" - value: "y" - - label: "Precondition: TH reads FeatureMap attribute from the DUT" command: "readAttribute" attribute: "FeatureMap" diff --git a/src/app/tests/suites/certification/Test_TC_CNET_4_6.yaml b/src/app/tests/suites/certification/Test_TC_CNET_4_6.yaml index aeac82e7857335..9ec38988742f85 100644 --- a/src/app/tests/suites/certification/Test_TC_CNET_4_6.yaml +++ b/src/app/tests/suites/certification/Test_TC_CNET_4_6.yaml @@ -28,37 +28,6 @@ config: defaultValue: "hex:1111111122222222" tests: - #Issue: https://github.com/project-chip/connectedhomeip/issues/30196 - - label: "Precondition: Commission TH and DUT on Thread network" - verification: | - ./chip-tool pairing ble-thread 0x12344321 - - [1698660637.937566][6429:6431] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0005 - [1698660637.937644][6429:6431] CHIP:CTL: Received CommissioningComplete response, errorCode=0 - [1698660637.937705][6429:6431] CHIP:CTL: Successfully finished commissioning step 'SendComplete' - [1698660637.937750][6429:6431] CHIP:CTL: Commissioning stage next step: 'SendComplete' -> 'Cleanup' - [1698660637.937812][6429:6431] CHIP:CTL: Performing next commissioning step 'Cleanup' - [1698660637.937863][6429:6431] CHIP:DIS: Closing all BLE connections - [1698660637.937911][6429:6431] CHIP:IN: Clearing BLE pending packets. - [1698660637.938582][6429:6431] CHIP:BLE: Auto-closing end point's BLE connection. - [1698660637.938645][6429:6431] CHIP:DL: Closing BLE GATT connection (con 0xffff9c034bb0) - [1698660637.938805][6429:6430] CHIP:DL: BluezDisconnect peer=F7:D4:24:D2:4A:1F - [1698660638.365208][6429:6431] CHIP:IN: SecureSession[0xffff9400f900]: MarkForEviction Type:1 LSID:62220 - [1698660638.365311][6429:6431] CHIP:SC: SecureSession[0xffff9400f900, LSID:62220]: State change 'kActive' --> 'kPendingEviction' - [1698660638.365440][6429:6431] CHIP:IN: SecureSession[0xffff9400f900]: Released - Type:1 LSID:62220 - [1698660638.365529][6429:6431] CHIP:CTL: Successfully finished commissioning step 'Cleanup' - [1698660638.365598][6429:6431] CHIP:TOO: Device commissioning completed with success - [1698660638.365873][6429:6431] CHIP:DMG: ICR moving to [AwaitingDe] - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: enter 'y' after success" - - name: "expectedValue" - value: "y" - - label: "Precondition: TH reads FeatureMap attribute from the DUT" command: "readAttribute" attribute: "FeatureMap" diff --git a/src/app/tests/suites/certification/Test_TC_CNET_4_9.yaml b/src/app/tests/suites/certification/Test_TC_CNET_4_9.yaml index 66e3207b24c22b..8ba579ca9266ba 100644 --- a/src/app/tests/suites/certification/Test_TC_CNET_4_9.yaml +++ b/src/app/tests/suites/certification/Test_TC_CNET_4_9.yaml @@ -29,32 +29,6 @@ config: defaultValue: "hex:7A6967626565686F6D65" tests: - #Issue: https://github.com/project-chip/connectedhomeip/issues/30196 - - label: "Precondition: Commission TH and DUT on WiFi network" - verification: | - ./chip-tool pairing ble-wifi 0x12344321 - - [1698912271.738597][32363:32366] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0005 - [1698912271.738606][32363:32366] CHIP:CTL: Received CommissioningComplete response, errorCode=0 - [1698912271.738613][32363:32366] CHIP:CTL: Successfully finished commissioning step 'SendComplete' - [1698912271.738617][32363:32366] CHIP:CTL: Commissioning stage next step: 'SendComplete' -> 'Cleanup' - [1698912271.738622][32363:32366] CHIP:CTL: Performing next commissioning step 'Cleanup' - [1698912271.738639][32363:32366] CHIP:IN: SecureSession[0x7fbb04014a50]: MarkForEviction Type:1 LSID:50170 - [1698912271.738642][32363:32366] CHIP:SC: SecureSession[0x7fbb04014a50, LSID:50170]: State change 'kActive' --> 'kPendingEviction' - [1698912271.738666][32363:32366] CHIP:IN: SecureSession[0x7fbb04014a50]: Released - Type:1 LSID:50170 - [1698912271.738672][32363:32366] CHIP:CTL: Successfully finished commissioning step 'Cleanup' - [1698912271.738677][32363:32366] CHIP:TOO: Device commissioning completed with success - [1698912271.738691][32363:32366] CHIP:DMG: ICR moving to [AwaitingDe] - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: enter 'y' after success" - - name: "expectedValue" - value: "y" - - label: "Precondition: TH reads FeatureMap attribute from the DUT" command: "readAttribute" attribute: "FeatureMap" 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 066267b9117be0..333a81dc7b71a8 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 @@ -85,17 +85,17 @@ tests: constraints: type: list - - label: "Step 6: TH reads from the DUT the AcceptedCommandList attribute." + - label: "Step 6: TH reads from the DUT the GeneratedCommandList attribute." command: "readAttribute" - attribute: "AcceptedCommandList" + attribute: "GeneratedCommandList" response: value: [] constraints: type: list - - label: "Step 7: TH reads from the DUT the GeneratedCommandList attribute." + - label: "Step 7: TH reads from the DUT the AcceptedCommandList attribute." command: "readAttribute" - attribute: "GeneratedCommandList" + attribute: "AcceptedCommandList" response: value: [] constraints: From d5d441e484f5da583a0424c14686d22bc75476a8 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Thu, 11 Apr 2024 13:02:32 -0400 Subject: [PATCH 039/468] Fix typos in boostrap.sh comments, stop using path as a variable name (#32944) * Fix typos in boostrap.sh comments * Rename path to submodule_path --- scripts/setup/bootstrap.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/setup/bootstrap.sh b/scripts/setup/bootstrap.sh index 0fb9af207e2c77..23b8087ff54460 100644 --- a/scripts/setup/bootstrap.sh +++ b/scripts/setup/bootstrap.sh @@ -57,19 +57,19 @@ _install_additional_pip_requirements() { } _submodules_need_updating() { - # Validates if a set o submodules that should always be checked out are up to date + # Validates if a set of submodules that should always be checked out are up to date. - # Pigweed will be up to date on an initial setup, however it may change over time - # the rest are a small subset of things that are always checked out (have no platform attachment) + # Pigweed will be up to date on an initial setup, however it may change over time. + # The rest are a small subset of things that are always checked out (have no platform attachment). _SUBMODULE_PATHS=( "third_party/pigweed/repo" "third_party/openthread/repo" "third_party/editline/repo" ) - for path in "${_SUBMODULE_PATHS[@]}"; do - if git submodule status "$path" | grep -E '^-' >/dev/null 2>&1; then - echo "git shows that $path has changes" + for submodule_path in "${_SUBMODULE_PATHS[@]}"; do + if git submodule status "$submodule_path" | grep -E '^-' >/dev/null 2>&1; then + echo "git shows that $submodule_path has changes" unset _SUBMODULE_PATHS return 0 # Success fi From 59cd138ee1f706a64969c23f4018f6dcd54a368b Mon Sep 17 00:00:00 2001 From: C Freeman Date: Thu, 11 Apr 2024 14:45:52 -0400 Subject: [PATCH 040/468] TC-TMP-2.1: Fix (#32881) * TC-TMP-2.1: Fix The constraints here are actually relatively complex because the min and max can be null and fall back to default values. Updated the automation to python so we can do the appropriate tests, added tests for the various scenarios becuase there are a LOT and we don't cover any of them with our current examples. Please see https://github.com/CHIP-Specifications/chip-test-plans/pull/4096 for test plan updates * remove yaml * missed a change * Restyled by autopep8 * remove unused import * Apply suggestions from code review --------- Co-authored-by: Restyled.io --- .../suites/certification/Test_TC_TMP_2_1.yaml | 74 ------- src/python_testing/TC_TMP_2_1.py | 97 ++++++++++ src/python_testing/matter_testing_support.py | 27 ++- .../test_testing/MockTestRunner.py | 57 ++++++ .../test_testing/test_TC_TMP_2_1.py | 180 ++++++++++++++++++ 5 files changed, 352 insertions(+), 83 deletions(-) delete mode 100644 src/app/tests/suites/certification/Test_TC_TMP_2_1.yaml create mode 100644 src/python_testing/TC_TMP_2_1.py create mode 100644 src/python_testing/test_testing/MockTestRunner.py create mode 100644 src/python_testing/test_testing/test_TC_TMP_2_1.py diff --git a/src/app/tests/suites/certification/Test_TC_TMP_2_1.yaml b/src/app/tests/suites/certification/Test_TC_TMP_2_1.yaml deleted file mode 100644 index a239c77b01dd05..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_TMP_2_1.yaml +++ /dev/null @@ -1,74 +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. - -name: 7.2.1. [TC-TMP-2.1] Attributes with server as DUT - -PICS: - - TMP.S - -config: - nodeId: 0x12344321 - cluster: "Temperature Measurement" - endpoint: 1 - -tests: - - label: "Step 1: Commission DUT to TH" - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId - - - label: "Step 2: TH reads the MinMeasuredValue attribute from the DUT" - PICS: TMP.S.A0001 - command: "readAttribute" - attribute: "MinMeasuredValue" - response: - saveAs: CurrentMinMeasured - constraints: - type: int16s - minValue: -27315 - maxValue: 32766 - - - label: "Step 3: TH reads the MaxMeasuredValue attribute from the DUT" - PICS: TMP.S.A0002 - command: "readAttribute" - attribute: "MaxMeasuredValue" - response: - saveAs: CurrentMaxMeasured - constraints: - type: int16s - minValue: CurrentMinMeasured+1 - maxValue: 32767 - - - label: "Step 4: TH reads the MeasuredValue attribute from the DUT" - PICS: TMP.S.A0000 - command: "readAttribute" - attribute: "MeasuredValue" - response: - constraints: - type: int16s - minValue: CurrentMinMeasured - maxValue: CurrentMaxMeasured - - - label: "Step 5: TH reads the Tolerance attribute from the DUT" - PICS: TMP.S.A0003 - command: "readAttribute" - attribute: "Tolerance" - response: - constraints: - type: int16u - minValue: 0 - maxValue: 2048 diff --git a/src/python_testing/TC_TMP_2_1.py b/src/python_testing/TC_TMP_2_1.py new file mode 100644 index 00000000000000..f48b96991ef80d --- /dev/null +++ b/src/python_testing/TC_TMP_2_1.py @@ -0,0 +1,97 @@ +# +# Copyright (c) 2024 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. + +import chip.clusters as Clusters +from chip.clusters.Types import NullValue +from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from mobly import asserts + + +class TC_TMP_2_1(MatterBaseTest): + def desc_TC_TMP_2_1(self) -> str: + return "[TC-TMP-2.1] Attributes with Server as DUT" + + def pics_TC_TMP_2_1(self): + return ["TMP.S"] + + def steps_TC_TMP_2_1(self) -> list[TestStep]: + return [ + TestStep(1, "Commissioning, already done", is_commissioning=True), + TestStep( + 2, "Set default bounds `min_bound` = -27315, `max_bound` = 32767"), + TestStep(3, "TH reads the MinMeasuredValue attribute from the DUT and saves as `min_measured_value`. If `min_measured_value` is not null, set `min_bound` to `min_measured_value`"), + TestStep(4, "TH reads the MaxMeasuredValue attribute from the DUT and saves as `max_measured_value`. If `max_measured_value` is not null, set `max_bound` to `max_measured_value", + "Verify that `max_measured_value` is either null or an int16 where min_bound < `max_measured_value` ≤ 32767."), + TestStep(5, "If `min_measured_value` is not null, verify min measured value range", + "Verify that -27315 ≤ `min_measured_value` < `max_bound`"), + TestStep(6, "TH reads the MeasuredValue attribute from the DUT", + "Verify that the DUT response contains either null or a int16 where `min_bound` ≤ MeasuredValue ≤ `max_bound`."), + TestStep(7, "TH reads the Tolerance attribute from the DUT", + "Verify that Tolerance is in the range of 0 to 2048"), + ] + + @async_test_body + async def test_TC_TMP_2_1(self): + cluster = Clusters.TemperatureMeasurement + attr = Clusters.TemperatureMeasurement.Attributes + + # Commission DUT - already done + self.step(1) + + self.step(2) + min_bound = -27315 + max_bound = 32767 + + self.step(3) + min_measured_value = await self.read_single_attribute_check_success(cluster=cluster, attribute=attr.MinMeasuredValue) + if min_measured_value != NullValue: + min_bound = min_measured_value + + self.step(4) + max_measured_value = await self.read_single_attribute_check_success(cluster=cluster, attribute=attr.MaxMeasuredValue) + if max_measured_value != NullValue: + max_bound = max_measured_value + asserts.assert_greater(max_measured_value, min_bound, + "MaxMeasuredValue is not greater than the minimum bound") + asserts.assert_less_equal( + max_measured_value, 32767, "MaxMeasuredValue is not less than or equal to than 32767") + + self.step(5) + if min_measured_value != NullValue: + asserts.assert_greater_equal(min_measured_value, -27315, "MinMeasuredValue is out of range") + asserts.assert_less(min_measured_value, max_bound, "MinMeasuredValue is out of range") + else: + self.mark_current_step_skipped() + + self.step(6) + measured_value = await self.read_single_attribute_check_success(cluster=cluster, attribute=attr.MeasuredValue) + if measured_value != NullValue: + print(measured_value) + print(min_bound) + asserts.assert_greater_equal( + measured_value, min_bound, "Measured value is less than min bound") + asserts.assert_less_equal( + measured_value, max_bound, "Measured value is greater than max bound") + + self.step(7) + tolerance = await self.read_single_attribute_check_success(cluster=cluster, attribute=attr.Tolerance) + asserts.assert_greater_equal(tolerance, 0, "Tolerance is less than 0") + asserts.assert_less_equal( + tolerance, 2048, "Tolerance is greater than 2048") + + +if __name__ == "__main__": + default_matter_test_main() diff --git a/src/python_testing/matter_testing_support.py b/src/python_testing/matter_testing_support.py index f56acdcd61d040..9ec12dca5fb081 100644 --- a/src/python_testing/matter_testing_support.py +++ b/src/python_testing/matter_testing_support.py @@ -1656,7 +1656,7 @@ def get_test_info(test_class: MatterBaseTest, matter_test_config: MatterTestConf return info -def run_tests(test_class: MatterBaseTest, matter_test_config: MatterTestConfig, hooks: TestRunnerHooks) -> None: +def run_tests_no_exit(test_class: MatterBaseTest, matter_test_config: MatterTestConfig, hooks: TestRunnerHooks, default_controller=None, external_stack=None) -> bool: get_test_info(test_class, matter_test_config) @@ -1668,7 +1668,10 @@ def run_tests(test_class: MatterBaseTest, matter_test_config: MatterTestConfig, if len(matter_test_config.tests) > 0: tests = matter_test_config.tests - stack = MatterStackState(matter_test_config) + if external_stack: + stack = external_stack + else: + stack = MatterStackState(matter_test_config) with TracingContext() as tracing_ctx: for destination in matter_test_config.trace_to: @@ -1678,12 +1681,12 @@ def run_tests(test_class: MatterBaseTest, matter_test_config: MatterTestConfig, # TODO: Steer to right FabricAdmin! # TODO: If CASE Admin Subject is a CAT tag range, then make sure to issue NOC with that CAT tag - - default_controller = stack.certificate_authorities[0].adminList[0].NewController( - nodeId=matter_test_config.controller_node_id, - paaTrustStorePath=str(matter_test_config.paa_trust_store_path), - catTags=matter_test_config.controller_cat_tags - ) + if not default_controller: + default_controller = stack.certificate_authorities[0].adminList[0].NewController( + nodeId=matter_test_config.controller_node_id, + paaTrustStorePath=str(matter_test_config.paa_trust_store_path), + catTags=matter_test_config.controller_cat_tags + ) test_config.user_params["default_controller"] = stash_globally(default_controller) test_config.user_params["matter_test_config"] = stash_globally(matter_test_config) @@ -1732,10 +1735,16 @@ def run_tests(test_class: MatterBaseTest, matter_test_config: MatterTestConfig, hooks.stop(duration=duration) # Shutdown the stack when all done - stack.Shutdown() + if not external_stack: + stack.Shutdown() if ok: logging.info("Final result: PASS !") else: logging.error("Final result: FAIL !") + return ok + + +def run_tests(test_class: MatterBaseTest, matter_test_config: MatterTestConfig, hooks: TestRunnerHooks, default_controller=None, external_stack=None) -> None: + if not run_tests_no_exit(test_class, matter_test_config, hooks, default_controller, external_stack): sys.exit(1) diff --git a/src/python_testing/test_testing/MockTestRunner.py b/src/python_testing/test_testing/MockTestRunner.py new file mode 100644 index 00000000000000..79f6e21e2b434e --- /dev/null +++ b/src/python_testing/test_testing/MockTestRunner.py @@ -0,0 +1,57 @@ +# +# Copyright (c) 2024 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. +# + +import importlib +import os +import sys +from pathlib import Path +from unittest.mock import MagicMock + +from chip.clusters import Attribute + +try: + from matter_testing_support import MatterStackState, MatterTestConfig, run_tests_no_exit +except ImportError: + sys.path.append(os.path.abspath( + os.path.join(os.path.dirname(__file__), '..'))) + from matter_testing_support import MatterStackState, MatterTestConfig, run_tests_no_exit + + +class AsyncMock(MagicMock): + async def __call__(self, *args, **kwargs): + return super(AsyncMock, self).__call__(*args, **kwargs) + + +class MockTestRunner(): + def __init__(self, filename: str, classname: str, test: str): + self.config = MatterTestConfig( + tests=[test], endpoint=1, dut_node_ids=[1]) + self.stack = MatterStackState(self.config) + self.default_controller = self.stack.certificate_authorities[0].adminList[0].NewController( + nodeId=self.config.controller_node_id, + paaTrustStorePath=str(self.config.paa_trust_store_path), + catTags=self.config.controller_cat_tags + ) + module = importlib.import_module(Path(os.path.basename(filename)).stem) + self.test_class = getattr(module, classname) + + def Shutdown(self): + self.stack.Shutdown() + + def run_test_with_mock_read(self, read_cache: Attribute.AsyncReadTransaction.ReadResponse): + self.default_controller.Read = AsyncMock(return_value=read_cache) + return run_tests_no_exit(self.test_class, self.config, None, self.default_controller, self.stack) diff --git a/src/python_testing/test_testing/test_TC_TMP_2_1.py b/src/python_testing/test_testing/test_TC_TMP_2_1.py new file mode 100644 index 00000000000000..5693aced8ba505 --- /dev/null +++ b/src/python_testing/test_testing/test_TC_TMP_2_1.py @@ -0,0 +1,180 @@ +#!/usr/bin/env -S python3 -B +# +# Copyright (c) 2024 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. +# + +import sys +import typing +from dataclasses import dataclass + +import chip.clusters as Clusters +from chip.clusters import Attribute +from chip.clusters.Types import NullValue +from MockTestRunner import MockTestRunner + + +@dataclass +class TestSpec(): + min: typing.Optional[int] + max: typing.Optional[int] + measured: int + tolerance: int + expect_pass: bool + + +TEST_CASES = [ + # ============================== + # Measured Test cases + # ============================== + # -------- + # Neither min nor max specified + # -------- + # Measured lowest + TestSpec(NullValue, NullValue, -27315, 10, True), + # Measured highest + TestSpec(NullValue, NullValue, 32767, 10, True), + # Measured below + TestSpec(NullValue, NullValue, -27316, 10, False), + # Measured above + TestSpec(NullValue, NullValue, 32768, 10, False), + # Measured null + TestSpec(NullValue, NullValue, NullValue, 10, True), + + # -------- + # min only + # -------- + # Measured lowest + TestSpec(5, NullValue, 5, 10, True), + # Measured highest + TestSpec(5, NullValue, 32767, 10, True), + # Measured below + TestSpec(5, NullValue, 4, 10, False), + # Measured above + TestSpec(5, NullValue, 32768, 10, False), + # Measured null + TestSpec(5, NullValue, NullValue, 10, True), + + # -------- + # max only + # -------- + # Measured lowest + TestSpec(NullValue, 5, -27315, 10, True), + # Measured highest + TestSpec(NullValue, 5, 5, 10, True), + # Measured below + TestSpec(NullValue, 5, -27316, 10, False), + # Measured above + TestSpec(NullValue, 5, 6, 10, False), + # Measured null + TestSpec(NullValue, 5, NullValue, 10, True), + + # -------- + # both + # -------- + # Measured lowest + TestSpec(-5, 5, -5, 10, True), + # Measured highest + TestSpec(-5, 5, 5, 10, True), + # Measured below + TestSpec(-5, 5, -6, 10, False), + # Measured above + TestSpec(-5, 5, 6, 10, False), + # Measured null + TestSpec(-5, 5, NullValue, 10, True), + + # ============================== + # Min Test cases + # ============================== + # Max not specified, min OK bottom + TestSpec(-27315, NullValue, 0, 10, True), + # Max not specified, min OK top + TestSpec(32766, NullValue, 32767, 10, True), + # Max not specified, min out of range below + TestSpec(-27316, NullValue, 0, 10, False), + # Max not specified, min out of range above + TestSpec(32767, NullValue, 32767, 10, False), + # Max specified, min OK bottom + TestSpec(-27315, 5, 0, 10, True), + # Max specified, min OK top + TestSpec(4, 5, 4, 10, True), + # Max specified, min out of range below + TestSpec(-27316, 5, 0, 10, False), + # Max specified, min out of range above + TestSpec(5, 5, 5, 10, False), + + # ============================== + # Min Test cases + # ============================== + # min not specified, max OK bottom + TestSpec(NullValue, -27314, -27315, 10, True), + # min not specified, max OK top + TestSpec(NullValue, 32767, 0, 10, True), + # min not specified, max out of range bottom + TestSpec(NullValue, -27315, -27315, 10, False), + # min not specified, max out of range top + TestSpec(NullValue, 32768, 0, 10, False), + # min specified, max OK bottom + TestSpec(0, 1, 0, 10, True), + # min specified, max OK top + TestSpec(0, 32767, 0, 10, True), + # min specified, max out of range bottom + TestSpec(0, 0, 0, 10, False), + # min specified, max out of range top + TestSpec(0, 32768, 0, 10, False), + + # ============================== + # Tolerance test cases + # ============================== + # Tolerance OK bottom + TestSpec(NullValue, NullValue, 0, 0, True), + # Tolerance OK top + TestSpec(NullValue, NullValue, 0, 2048, True), + # Tolerance out of range bottom + TestSpec(NullValue, NullValue, 0, -1, False), + # Tolerance out of range top + TestSpec(NullValue, NullValue, 0, 2049, False), + +] + + +def test_spec_to_attribute_cache(test_spec: TestSpec) -> Attribute.AsyncReadTransaction.ReadResponse: + c = Clusters.TemperatureMeasurement + attr = Clusters.TemperatureMeasurement.Attributes + resp = Attribute.AsyncReadTransaction.ReadResponse({}, [], {}) + resp.attributes = {1: {c: {attr.MaxMeasuredValue: test_spec.max, + attr.MinMeasuredValue: test_spec.min, attr.MeasuredValue: test_spec.measured, attr.Tolerance: test_spec.tolerance}}} + return resp + + +def main(): + test_runner = MockTestRunner('TC_TMP_2_1', 'TC_TMP_2_1', 'test_TC_TMP_2_1') + failures = [] + for idx, t in enumerate(TEST_CASES): + ok = test_runner.run_test_with_mock_read(test_spec_to_attribute_cache(t)) == t.expect_pass + if not ok: + failures.append(f"Measured test case failure: {idx} {t}") + + test_runner.Shutdown() + print( + f"Test of tests: run {len(TEST_CASES)}, test response correct: {len(TEST_CASES) - len(failures)} test response incorrect: {len(failures)}") + for f in failures: + print(f) + + return 1 if failures else 0 + + +if __name__ == "__main__": + sys.exit(main()) From 15f2c4978a019d11e62a45ed988974df92164cf6 Mon Sep 17 00:00:00 2001 From: Raul Marquez <130402456+raul-marquez-csa@users.noreply.github.com> Date: Thu, 11 Apr 2024 11:58:59 -0700 Subject: [PATCH 041/468] YAML Updates 3/18/24 (#32625) * Updates Test_TC_S_2_4.yaml * Updates Test_TC_S_2_5.yaml, Test_TC_S_2_6.yaml * Updates Test_TC_CONTENTLAUNCHER_10_4.yaml * Updates Test_TC_DEMM_1_1.yaml * Updates Test_TC_WAKEONLAN_1_5.yaml * Updates Test_TC_ALOGIN_12_1.yaml * Updates Test_TC_S_2_3.yaml * Updates Test_TC_DESC_2_1.yaml * Updates Test_TC_EEVSEM_1_1.yaml * Updates Test_TC_S_2_5.yaml, Test_TC_S_2_6.yaml, Test_TC_S_3_1.yaml * Updates Test_TC_ICDM_3_1.yaml * Updates Test_TC_G_3_2.yaml * Updates Test_TC_SU_2_3.yaml, Test_TC_SU_2_5.yaml, Test_TC_SU_3_3.yaml Removes Test_TC_SU_4_2.yaml Adds Test_TC_SU_5_1.yaml * Updates Test_TC_LWM_2_1.yaml * ts Test_TC_WAKEONLAN_1_5.yaml * Restores Test_TC_WAKEONLAN_1_5.yaml * Updates Test_TC_S_2_5.yaml * Updates Test_TC_S_2_6.yaml * Updates Test_TC_S_2_4.yaml * Removes Test_TC_SU_5_1.yaml * Fix restyle * Trigger CI * Trigger CI * Fix restyle * Fix restyle --- .../certification/Test_TC_ALOGIN_12_1.yaml | 1 - .../Test_TC_CONTENTLAUNCHER_10_4.yaml | 4 +- .../certification/Test_TC_DEMM_1_1.yaml | 6 +- .../certification/Test_TC_DESC_2_1.yaml | 156 ++++++------- .../certification/Test_TC_EEVSEM_1_1.yaml | 6 +- .../suites/certification/Test_TC_G_3_2.yaml | 1 + .../certification/Test_TC_ICDM_3_1.yaml | 41 ++++ .../suites/certification/Test_TC_LWM_2_1.yaml | 1 - .../suites/certification/Test_TC_SU_2_3.yaml | 8 - .../suites/certification/Test_TC_SU_2_5.yaml | 8 - .../suites/certification/Test_TC_SU_3_3.yaml | 8 - .../suites/certification/Test_TC_SU_4_2.yaml | 209 ------------------ .../suites/certification/Test_TC_S_2_3.yaml | 26 +-- .../suites/certification/Test_TC_S_2_4.yaml | 4 +- .../suites/certification/Test_TC_S_2_5.yaml | 11 +- .../suites/certification/Test_TC_S_2_6.yaml | 71 +++--- .../suites/certification/Test_TC_S_3_1.yaml | 34 ++- 17 files changed, 212 insertions(+), 383 deletions(-) delete mode 100644 src/app/tests/suites/certification/Test_TC_SU_4_2.yaml diff --git a/src/app/tests/suites/certification/Test_TC_ALOGIN_12_1.yaml b/src/app/tests/suites/certification/Test_TC_ALOGIN_12_1.yaml index 2c7be1eebcf05e..be5f6f789c5c04 100644 --- a/src/app/tests/suites/certification/Test_TC_ALOGIN_12_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_ALOGIN_12_1.yaml @@ -59,7 +59,6 @@ tests: - name: "Status" value: 0 - #Issue: https://github.com/project-chip/connectedhomeip/issues/28992 - label: "Step 1: TH sends a GetSetupPIN command to the DUT with test values provided by the product maker." diff --git a/src/app/tests/suites/certification/Test_TC_CONTENTLAUNCHER_10_4.yaml b/src/app/tests/suites/certification/Test_TC_CONTENTLAUNCHER_10_4.yaml index 1fbbdab81d8a26..638b78cd2ac59d 100644 --- a/src/app/tests/suites/certification/Test_TC_CONTENTLAUNCHER_10_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_CONTENTLAUNCHER_10_4.yaml @@ -36,10 +36,10 @@ tests: verification: | Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner) or tv-casting-app (when DUT is a commissionee): - ./chip-tool contentlauncher launch-content '{"parameterList": [ { "type": 0, "value": "exampleString", "externalIDList": [ { "name": "exampleName", "value": "exampleValue"} ] } ] }' 0 '{"playbackPosition": 0, "textTrack": {"languageCode": "", "audioOutputIndex": 0}}' 1 1 + ./chip-tool contentlauncher launch-content '{"parameterList": [ { "type": 0, "value": "exampleString", "externalIDList": [ { "name": "exampleName", "value": "exampleValue"} ] } ] }' 0 1 1 --Data '{"playbackPosition": 0, "textTrack": {"languageCode": "", "audioOutputIndex": 0}}' - ./chip-tv-casting-app contentlauncher launch-content '{"parameterList": [ { "type": 0, "value": "exampleString", "externalIDList": [ { "name": "exampleName", "value": "exampleValue"} ] } ] }' 0 '{"playbackPosition": 0, "textTrack": {"languageCode": "", "audioOutputIndex": 0}}' 1 1 + ./chip-tv-casting-app contentlauncher launch-content '{"parameterList": [ { "type": 0, "value": "exampleString", "externalIDList": [ { "name": "exampleName", "value": "exampleValue"} ] } ] }' 0 1 1 --Data '{"playbackPosition": 0, "textTrack": {"languageCode": "", "audioOutputIndex": 0}}' On TH (tv-app), Verify the launch content command is received successfully. diff --git a/src/app/tests/suites/certification/Test_TC_DEMM_1_1.yaml b/src/app/tests/suites/certification/Test_TC_DEMM_1_1.yaml index 832b21e12ac63b..b2f927d14fd554 100644 --- a/src/app/tests/suites/certification/Test_TC_DEMM_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DEMM_1_1.yaml @@ -48,9 +48,9 @@ tests: On the TH(Chip-tool) Log, Verify featureMap value is 0 and below is the sample log provided for the raspi platform: - [1705923720.577354][23553:23555] CHIP:DMG: } - [1705923720.577393][23553:23555] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_009F Attribute 0x0000_FFFC DataVersion: 2217281174 - [1705923720.577412][23553:23555] CHIP:TOO: FeatureMap: 1 + [1707803263.396282][12695:12697] CHIP:DMG: } + [1707803263.396447][12695:12697] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_009F Attribute 0x0000_FFFC DataVersion: 3404644350 + [1707803263.396492][12695:12697] CHIP:TOO: FeatureMap: 0 cluster: "LogCommands" command: "UserPrompt" PICS: PICS_SKIP_SAMPLE_APP diff --git a/src/app/tests/suites/certification/Test_TC_DESC_2_1.yaml b/src/app/tests/suites/certification/Test_TC_DESC_2_1.yaml index 734282a82e7ca8..2ce0e296bbc2d5 100644 --- a/src/app/tests/suites/certification/Test_TC_DESC_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DESC_2_1.yaml @@ -136,82 +136,87 @@ tests: verification: | For all the Endpoint id’s listed in step 1a run the following steps. For all the server list entries listed in the output - Convert them to Hex values. For example 29 is 0x001D. Verify that these are also present in the device_type.json. Every server cluster listed in the JSON should correspond to a number here in the output. + The cluster ID's listed in the below log is from the All-Cluster-app. Please run the below command in all the Reference apps (bridge-app, tv-app, microwave-oven-app, Lock-app, Energy-Management-app and Thermostat-app). + ./chip-tool descriptor read server-list 1 1 - Verify ServerList entries on the TH (Chip-tool) and below is the sample log provided for the raspi platform, Here ServerList entries are 70. - - [1693218196.392903][13451:13453] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_0001 DataVersion: 3853201227 - [1693218196.393030][13451:13453] CHIP:TOO: ServerList: 70 entries - [1693218196.393047][13451:13453] CHIP:TOO: [1]: 3 - [1693218196.393059][13451:13453] CHIP:TOO: [2]: 4 - [1693218196.393071][13451:13453] CHIP:TOO: [3]: 5 - [1693218196.393081][13451:13453] CHIP:TOO: [4]: 6 - [1693218196.393092][13451:13453] CHIP:TOO: [5]: 7 - [1693218196.393103][13451:13453] CHIP:TOO: [6]: 8 - [1693218196.393114][13451:13453] CHIP:TOO: [7]: 15 - [1693218196.393125][13451:13453] CHIP:TOO: [8]: 29 - [1693218196.393136][13451:13453] CHIP:TOO: [9]: 30 - [1693218196.393147][13451:13453] CHIP:TOO: [10]: 37 - [1693218196.393159][13451:13453] CHIP:TOO: [11]: 47 - [1693218196.393169][13451:13453] CHIP:TOO: [12]: 59 - [1693218196.393180][13451:13453] CHIP:TOO: [13]: 64 - [1693218196.393191][13451:13453] CHIP:TOO: [14]: 65 - [1693218196.393201][13451:13453] CHIP:TOO: [15]: 69 - [1693218196.393212][13451:13453] CHIP:TOO: [16]: 80 - [1693218196.393222][13451:13453] CHIP:TOO: [17]: 81 - [1693218196.393233][13451:13453] CHIP:TOO: [18]: 82 - [1693218196.393244][13451:13453] CHIP:TOO: [19]: 83 - [1693218196.393254][13451:13453] CHIP:TOO: [20]: 84 - [1693218196.393265][13451:13453] CHIP:TOO: [21]: 85 - [1693218196.393276][13451:13453] CHIP:TOO: [22]: 86 - [1693218196.393286][13451:13453] CHIP:TOO: [23]: 87 - [1693218196.393297][13451:13453] CHIP:TOO: [24]: 89 - [1693218196.393308][13451:13453] CHIP:TOO: [25]: 91 - [1693218196.393318][13451:13453] CHIP:TOO: [26]: 92 - [1693218196.393329][13451:13453] CHIP:TOO: [27]: 93 - [1693218196.393340][13451:13453] CHIP:TOO: [28]: 96 - [1693218196.393350][13451:13453] CHIP:TOO: [29]: 97 - [1693218196.393362][13451:13453] CHIP:TOO: [30]: 113 - [1693218196.393373][13451:13453] CHIP:TOO: [31]: 114 - [1693218196.393384][13451:13453] CHIP:TOO: [32]: 257 - [1693218196.393394][13451:13453] CHIP:TOO: [33]: 258 - [1693218196.393405][13451:13453] CHIP:TOO: [34]: 259 - [1693218196.393416][13451:13453] CHIP:TOO: [35]: 512 - [1693218196.393427][13451:13453] CHIP:TOO: [36]: 513 - [1693218196.393437][13451:13453] CHIP:TOO: [37]: 514 - [1693218196.393448][13451:13453] CHIP:TOO: [38]: 516 - [1693218196.393459][13451:13453] CHIP:TOO: [39]: 768 - [1693218196.393470][13451:13453] CHIP:TOO: [40]: 769 - [1693218196.393481][13451:13453] CHIP:TOO: [41]: 1024 - [1693218196.393492][13451:13453] CHIP:TOO: [42]: 1026 - [1693218196.393503][13451:13453] CHIP:TOO: [43]: 1027 - [1693218196.393514][13451:13453] CHIP:TOO: [44]: 1028 - [1693218196.393525][13451:13453] CHIP:TOO: [45]: 1029 - [1693218196.393536][13451:13453] CHIP:TOO: [46]: 1030 - [1693218196.393546][13451:13453] CHIP:TOO: [47]: 1036 - [1693218196.393557][13451:13453] CHIP:TOO: [48]: 1037 - [1693218196.393568][13451:13453] CHIP:TOO: [49]: 1043 - [1693218196.393579][13451:13453] CHIP:TOO: [50]: 1045 - [1693218196.393590][13451:13453] CHIP:TOO: [51]: 1066 - [1693218196.393601][13451:13453] CHIP:TOO: [52]: 1067 - [1693218196.393611][13451:13453] CHIP:TOO: [53]: 1068 - [1693218196.393622][13451:13453] CHIP:TOO: [54]: 1069 - [1693218196.393633][13451:13453] CHIP:TOO: [55]: 1070 - [1693218196.393643][13451:13453] CHIP:TOO: [56]: 1071 - [1693218196.393654][13451:13453] CHIP:TOO: [57]: 1283 - [1693218196.393664][13451:13453] CHIP:TOO: [58]: 1284 - [1693218196.393675][13451:13453] CHIP:TOO: [59]: 1285 - [1693218196.393686][13451:13453] CHIP:TOO: [60]: 1286 - [1693218196.393697][13451:13453] CHIP:TOO: [61]: 1287 - [1693218196.393708][13451:13453] CHIP:TOO: [62]: 1288 - [1693218196.393718][13451:13453] CHIP:TOO: [63]: 1289 - [1693218196.393729][13451:13453] CHIP:TOO: [64]: 1290 - [1693218196.393740][13451:13453] CHIP:TOO: [65]: 1291 - [1693218196.393750][13451:13453] CHIP:TOO: [66]: 1292 - [1693218196.393761][13451:13453] CHIP:TOO: [67]: 1293 - [1693218196.393772][13451:13453] CHIP:TOO: [68]: 1294 - [1693218196.393783][13451:13453] CHIP:TOO: [69]: 2820 - [1693218196.393794][13451:13453] CHIP:TOO: [70]: 4294048773 + Verify ServerList entries on the TH (Chip-tool) and below is the sample log provided for the raspi platform, + + [1707996554.409850][20755:20757] CHIP:DMG: } + [1707996554.410814][20755:20757] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_0001 DataVersion: 3583190746 + [1707996554.410955][20755:20757] CHIP:TOO: ServerList: 71 entries + [1707996554.410990][20755:20757] CHIP:TOO: [1]: 3 + [1707996554.411002][20755:20757] CHIP:TOO: [2]: 4 + [1707996554.411013][20755:20757] CHIP:TOO: [3]: 6 + [1707996554.411024][20755:20757] CHIP:TOO: [4]: 7 + [1707996554.411034][20755:20757] CHIP:TOO: [5]: 8 + [1707996554.411045][20755:20757] CHIP:TOO: [6]: 15 + [1707996554.411056][20755:20757] CHIP:TOO: [7]: 29 + [1707996554.411067][20755:20757] CHIP:TOO: [8]: 30 + [1707996554.411078][20755:20757] CHIP:TOO: [9]: 37 + [1707996554.411092][20755:20757] CHIP:TOO: [10]: 47 + [1707996554.411103][20755:20757] CHIP:TOO: [11]: 59 + [1707996554.411113][20755:20757] CHIP:TOO: [12]: 64 + [1707996554.411124][20755:20757] CHIP:TOO: [13]: 65 + [1707996554.411135][20755:20757] CHIP:TOO: [14]: 69 + [1707996554.411146][20755:20757] CHIP:TOO: [15]: 72 + [1707996554.411156][20755:20757] CHIP:TOO: [16]: 73 + [1707996554.411167][20755:20757] CHIP:TOO: [17]: 74 + [1707996554.411177][20755:20757] CHIP:TOO: [18]: 80 + [1707996554.411188][20755:20757] CHIP:TOO: [19]: 81 + [1707996554.411199][20755:20757] CHIP:TOO: [20]: 82 + [1707996554.411209][20755:20757] CHIP:TOO: [21]: 83 + [1707996554.411220][20755:20757] CHIP:TOO: [22]: 84 + [1707996554.411231][20755:20757] CHIP:TOO: [23]: 85 + [1707996554.411240][20755:20757] CHIP:TOO: [24]: 86 + [1707996554.411251][20755:20757] CHIP:TOO: [25]: 87 + [1707996554.411261][20755:20757] CHIP:TOO: [26]: 89 + [1707996554.411271][20755:20757] CHIP:TOO: [27]: 91 + [1707996554.411282][20755:20757] CHIP:TOO: [28]: 92 + [1707996554.411293][20755:20757] CHIP:TOO: [29]: 93 + [1707996554.411303][20755:20757] CHIP:TOO: [30]: 94 + [1707996554.411313][20755:20757] CHIP:TOO: [31]: 96 + [1707996554.411323][20755:20757] CHIP:TOO: [32]: 97 + [1707996554.411334][20755:20757] CHIP:TOO: [33]: 98 + [1707996554.411345][20755:20757] CHIP:TOO: [34]: 113 + [1707996554.411355][20755:20757] CHIP:TOO: [35]: 114 + [1707996554.411367][20755:20757] CHIP:TOO: [36]: 128 + [1707996554.411376][20755:20757] CHIP:TOO: [37]: 129 + [1707996554.411387][20755:20757] CHIP:TOO: [38]: 144 + [1707996554.411396][20755:20757] CHIP:TOO: [39]: 145 + [1707996554.411406][20755:20757] CHIP:TOO: [40]: 152 + [1707996554.411417][20755:20757] CHIP:TOO: [41]: 153 + [1707996554.411427][20755:20757] CHIP:TOO: [42]: 157 + [1707996554.411437][20755:20757] CHIP:TOO: [43]: 159 + [1707996554.411449][20755:20757] CHIP:TOO: [44]: 258 + [1707996554.411459][20755:20757] CHIP:TOO: [45]: 259 + [1707996554.411469][20755:20757] CHIP:TOO: [46]: 512 + [1707996554.411480][20755:20757] CHIP:TOO: [47]: 513 + [1707996554.411490][20755:20757] CHIP:TOO: [48]: 514 + [1707996554.411500][20755:20757] CHIP:TOO: [49]: 516 + [1707996554.411511][20755:20757] CHIP:TOO: [50]: 768 + [1707996554.411521][20755:20757] CHIP:TOO: [51]: 769 + [1707996554.411532][20755:20757] CHIP:TOO: [52]: 1024 + [1707996554.411559][20755:20757] CHIP:TOO: [53]: 1026 + [1707996554.411562][20755:20757] CHIP:TOO: [54]: 1027 + [1707996554.411565][20755:20757] CHIP:TOO: [55]: 1028 + [1707996554.411568][20755:20757] CHIP:TOO: [56]: 1029 + [1707996554.411571][20755:20757] CHIP:TOO: [57]: 1030 + [1707996554.411575][20755:20757] CHIP:TOO: [58]: 1036 + [1707996554.411578][20755:20757] CHIP:TOO: [59]: 1037 + [1707996554.411581][20755:20757] CHIP:TOO: [60]: 1043 + [1707996554.411584][20755:20757] CHIP:TOO: [61]: 1045 + [1707996554.411587][20755:20757] CHIP:TOO: [62]: 1066 + [1707996554.411589][20755:20757] CHIP:TOO: [63]: 1067 + [1707996554.411592][20755:20757] CHIP:TOO: [64]: 1068 + [1707996554.411595][20755:20757] CHIP:TOO: [65]: 1069 + [1707996554.411598][20755:20757] CHIP:TOO: [66]: 1070 + [1707996554.411601][20755:20757] CHIP:TOO: [67]: 1071 + [1707996554.411604][20755:20757] CHIP:TOO: [68]: 1283 + [1707996554.411607][20755:20757] CHIP:TOO: [69]: 1288 + [1707996554.411610][20755:20757] CHIP:TOO: [70]: 2820 + [1707996554.411613][20755:20757] CHIP:TOO: [71]: 4294048773 + ./chip-tool descriptor read server-list 1 2 @@ -233,6 +238,8 @@ tests: verification: | For all the Endpoint id’s listed in step 1a run the following steps. For all the client list entries listed in the output - Convert them to Hex values. For example 29 is 0x001D. Verify that these are also present in the device_type.json. Every server cluster listed in the JSON should correspond to a number here in the output. + The cluster ID's listed in the below log is from the All-Cluster-app. Please run the below command in all the Reference apps (bridge-app, tv-app, microwave-oven-app, Lock-app, Energy-Management-app and Thermostat-app). + ./chip-tool descriptor read client-list 1 1 Verify client list entries on the TH (Chip-tool) and below is the sample log provided for the raspi platform, Here ClientList entries are 1. @@ -242,7 +249,6 @@ tests: [1676367470.160282][9805:9807] CHIP:TOO: ClientList: 1 entries [1676367470.160289][9805:9807] CHIP:TOO: [1]: 6 - ./chip-tool descriptor read client-list 1 2 Verify client list entries on the TH (Chip-tool) and below is the sample log provided for the raspi platform, Here ClientList entries are 0. diff --git a/src/app/tests/suites/certification/Test_TC_EEVSEM_1_1.yaml b/src/app/tests/suites/certification/Test_TC_EEVSEM_1_1.yaml index ea416ee91e96b3..769dc5d3cba3ac 100644 --- a/src/app/tests/suites/certification/Test_TC_EEVSEM_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_EEVSEM_1_1.yaml @@ -48,9 +48,9 @@ tests: On the TH(Chip-tool) Log, Verify featureMap value is 0 and below is the sample log provided for the raspi platform: - [1705995388.110138][7525:7527] CHIP:DMG: } - [1705995388.110173][7525:7527] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_009D Attribute 0x0000_FFFC DataVersion: 1324786556 - [1705995388.110192][7525:7527] CHIP:TOO: FeatureMap: 1 + [1707803286.349129][12699:12701] CHIP:DMG: } + [1707803286.349183][12699:12701] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_009D Attribute 0x0000_FFFC DataVersion: 811903427 + [1707803286.349202][12699:12701] CHIP:TOO: FeatureMap: 0 cluster: "LogCommands" command: "UserPrompt" PICS: PICS_SKIP_SAMPLE_APP diff --git a/src/app/tests/suites/certification/Test_TC_G_3_2.yaml b/src/app/tests/suites/certification/Test_TC_G_3_2.yaml index 7f718a160bb9a0..bbafb43b2725fd 100644 --- a/src/app/tests/suites/certification/Test_TC_G_3_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_G_3_2.yaml @@ -17,6 +17,7 @@ name: 125.3.2. [TC-G-3.2] Groups Cluster Commands [DUT-Client] PICS: - G.C + - GRPKEY.C config: nodeId: 0x12344321 diff --git a/src/app/tests/suites/certification/Test_TC_ICDM_3_1.yaml b/src/app/tests/suites/certification/Test_TC_ICDM_3_1.yaml index 3fe5afe83a8510..365d820bccf00f 100644 --- a/src/app/tests/suites/certification/Test_TC_ICDM_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_ICDM_3_1.yaml @@ -35,6 +35,47 @@ tests: 2c.TH reads from the DUT the RegisteredClients attribute. Verify that the DUT response contains empty list of registered clients. disabled: true + - label: + "Step 0a: Preconfition 1: Read 'register-clients' by sending the + command below and note the check-in nodeID for the entries" + verification: | + ./chip-tool icdmanagement read registered-clients 1 0 + + [1704888897.027204][71644:71646] CHIP:DMG: } + [1704888897.027313][71644:71646] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0046 Attribute 0x0000_0003 DataVersion: 852105378 + [1704888897.027351][71644:71646] CHIP:TOO: RegisteredClients: 1 entries + [1704888897.027394][71644:71646] CHIP:TOO: [1]: { + [1704888897.027412][71644:71646] CHIP:TOO: CheckInNodeID: 112233 + [1704888897.027421][71644:71646] CHIP:TOO: MonitoredSubject: 112233 + [1704888897.027431][71644:71646] CHIP:TOO: FabricIndex: 1 + [1704888897.027440][71644:71646] CHIP:TOO: } + [1704888897.027521][71644:71646] CHIP:EM: <<< [E:49337i S:30873 M:176023643 (Ack:200282364)] (S) Msg TX to 1:0000000000000001 [5BF5] [UDP:[fe80::a70c:61dc:df51:6945%enxd03745ce8f62]:5540] --- Type 0000:10 (SecureChannel:StandaloneAck) + disabled: true + + - label: + "Step 0b: Preconfition 2: Please send the 'unregister client' command + using the check-in nodeID received from the previous read" + verification: | + ./chip-tool icdmanagement unregister-client 112233 1 0 + + [1704888949.629057][71657:71659] CHIP:DMG: + [1704888949.629066][71657:71659] CHIP:DMG: InteractionModelRevision = 11 + [1704888949.629074][71657:71659] CHIP:DMG: }, + [1704888949.629125][71657:71659] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_0046 Command=0x0000_0002 Status=0x0 + [1704888949.629153][71657:71659] CHIP:DMG: ICR moving to [AwaitingDe] + disabled: true + + - label: + "Step 0c: Preconfition 3: Verify that all entries have been + successfully unregistered by reading 'register-clients'" + verification: | + ./chip-tool icdmanagement read registered-clients 1 0 + [1704889092.945869][71700:71702] CHIP:DMG: } + [1704889092.945955][71700:71702] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0046 Attribute 0x0000_0003 DataVersion: 852105378 + [1704889092.945989][71700:71702] CHIP:TOO: RegisteredClients: 0 entries + [1704889092.946079][71700:71702] CHIP:EM: <<< [E:63454i S:39669 M:600516 (Ack:156383188)] (S) + disabled: true + - label: "Step 1: TH sends RegisterClient command. - CheckInNodeID: registering clients node ID - MonitoredSubject: monitored subject ID - Key: shared diff --git a/src/app/tests/suites/certification/Test_TC_LWM_2_1.yaml b/src/app/tests/suites/certification/Test_TC_LWM_2_1.yaml index b3535b13ceec51..a1641587411efa 100644 --- a/src/app/tests/suites/certification/Test_TC_LWM_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LWM_2_1.yaml @@ -101,7 +101,6 @@ tests: command: "readAttribute" attribute: "CurrentMode" response: - saveAs: Step6_current_mode_dut constraints: type: int8u minValue: 0 diff --git a/src/app/tests/suites/certification/Test_TC_SU_2_3.yaml b/src/app/tests/suites/certification/Test_TC_SU_2_3.yaml index 09e18d01b69f9c..b913c30975d85b 100644 --- a/src/app/tests/suites/certification/Test_TC_SU_2_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_SU_2_3.yaml @@ -119,11 +119,3 @@ tests: verification: | Out of scope disabled: true - - - label: - "Step 6: Perform the OTA Update on DUT using vendor specific - mechanism." - PICS: MCORE.OTA.VendorSpecific - verification: | - Use vendor specific steps to initiate OTA Update and verify that the software image is transferred to the DUT - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_SU_2_5.yaml b/src/app/tests/suites/certification/Test_TC_SU_2_5.yaml index 60e55dc65e397b..f58d180b4170bf 100644 --- a/src/app/tests/suites/certification/Test_TC_SU_2_5.yaml +++ b/src/app/tests/suites/certification/Test_TC_SU_2_5.yaml @@ -157,11 +157,3 @@ tests: [1653636406.637617][11116:11121] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_000A DataVersion: 1527020963 [1653636406.637708][11116:11121] CHIP:TOO: SoftwareVersion: 1 disabled: true - - - label: - "Step 6: Apply the OTA Update on DUT using vendor specific mechanism." - PICS: MCORE.OTA.VendorSpecific - verification: | - Use vendor specific steps to apply OTA Update and verify that the DUT starts updating its software. - Once the update is finished verify the software version on the DUT to match the version downloaded for the software update. - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_SU_3_3.yaml b/src/app/tests/suites/certification/Test_TC_SU_3_3.yaml index fe03bc98caeb3d..a4fad4cc9fbe35 100644 --- a/src/app/tests/suites/certification/Test_TC_SU_3_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_SU_3_3.yaml @@ -121,11 +121,3 @@ tests: verification: | Out of scope disabled: true - - - label: - "Step 6: Perform the OTA Update from DUT using vendor specific - mechanism." - PICS: MCORE.OTA.VendorSpecific - verification: | - Use vendor specific steps to initiate OTA Update and verify that the software image is transferred from the DUT - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_SU_4_2.yaml b/src/app/tests/suites/certification/Test_TC_SU_4_2.yaml deleted file mode 100644 index 409fdf5b82f1ec..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_SU_4_2.yaml +++ /dev/null @@ -1,209 +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. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default - -name: - 31.15.1. [TC-SU-4.2] Tests for verifying cluster attributes from Admin(DUT) - -PICS: - - MCORE.ACL.Administrator - -config: - nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 - -tests: - - label: - "Step 1: DUT sends a write request for the DefaultOTAProviders - Attribute to the TH." - verification: | - Verify that the OTA Requestor App receives the write command and does not reject the value as invalid. - - ./chip-tool otasoftwareupdaterequestor write default-otaproviders '[{"fabricIndex": 1, "providerNodeID": 123, "endpoint": 0}]' 321 0 - - - Verify write request for the DefaultOTAProviders attribute on TH [OTA-REQ] Logs: - - [1662651310.444641][30167:30167] CHIP:IM: Received Write request - [1662651310.444820][30167:30167] CHIP:DMG: IM WH moving to [Initialized] - [1662651310.444952][30167:30167] CHIP:DMG: WriteRequestMessage = - [1662651310.445036][30167:30167] CHIP:DMG: { - [1662651310.445112][30167:30167] CHIP:DMG: suppressResponse = false, - [1662651310.445225][30167:30167] CHIP:DMG: timedRequest = false, - [1662651310.445335][30167:30167] CHIP:DMG: AttributeDataIBs = - [1662651310.445455][30167:30167] CHIP:DMG: [ - [1662651310.445565][30167:30167] CHIP:DMG: AttributeDataIB = - [1662651310.445698][30167:30167] CHIP:DMG: { - [1662651310.445826][30167:30167] CHIP:DMG: AttributePathIB = - [1662651310.445974][30167:30167] CHIP:DMG: { - [1662651310.446124][30167:30167] CHIP:DMG: Endpoint = 0x0, - [1662651310.446289][30167:30167] CHIP:DMG: Cluster = 0x2a, - [1662651310.446457][30167:30167] CHIP:DMG: Attribute = 0x0000_0000, - [1662651310.446620][30167:30167] CHIP:DMG: } - [1662651310.446772][30167:30167] CHIP:DMG: - [1662651310.446905][30167:30167] CHIP:DMG: Data = [ - [1662651310.447049][30167:30167] CHIP:DMG: - [1662651310.447158][30167:30167] CHIP:DMG: ], - [1662651310.447246][30167:30167] CHIP:DMG: }, - [1662651310.447338][30167:30167] CHIP:DMG: - [1662651310.447410][30167:30167] CHIP:DMG: AttributeDataIB = - [1662651310.447490][30167:30167] CHIP:DMG: { - [1662651310.447570][30167:30167] CHIP:DMG: AttributePathIB = - [1662651310.447661][30167:30167] CHIP:DMG: { - [1662651310.447754][30167:30167] CHIP:DMG: Endpoint = 0x0, - [1662651310.447854][30167:30167] CHIP:DMG: Cluster = 0x2a, - [1662651310.447955][30167:30167] CHIP:DMG: Attribute = 0x0000_0000, - [1662651310.448054][30167:30167] CHIP:DMG: ListIndex = Null, - [1662651310.448171][30167:30167] CHIP:DMG: } - [1662651310.448270][30167:30167] CHIP:DMG: - [1662651310.448360][30167:30167] CHIP:DMG: Data = - [1662651310.448449][30167:30167] CHIP:DMG: { - [1662651310.448540][30167:30167] CHIP:DMG: 0x1 = 123, - [1662651310.448641][30167:30167] CHIP:DMG: 0x2 = 0, - [1662651310.448742][30167:30167] CHIP:DMG: }, - [1662651310.448831][30167:30167] CHIP:DMG: }, - [1662651310.448913][30167:30167] CHIP:DMG: - [1662651310.448979][30167:30167] CHIP:DMG: ], - [1662651310.449053][30167:30167] CHIP:DMG: - [1662651310.449111][30167:30167] CHIP:DMG: moreChunkedMessages = false, - [1662651310.449178][30167:30167] CHIP:DMG: InteractionModelRevision = 1 - [1662651310.449244][30167:30167] CHIP:DMG: }, - [1662651310.449361][30167:30167] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_002A e=0 p=o - [1662651310.449426][30167:30167] CHIP:DMG: AccessControl: allowed - disabled: true - - - label: - "Step 2: DUT sends a read request to read the DefaultOTAProviders - Attribute to the TH." - verification: | - Verify that the OTA Requestor App responds to the read command - - ./chip-tool otasoftwareupdaterequestor read default-otaproviders 321 0 - - Verify read request for the DefaultOTAProviders attribute on TH [OTA-REQ] Logs: - [1662651381.708529][30167:30167] CHIP:IM: Received Read request - [1662651381.708619][30167:30167] CHIP:DMG: ReadRequestMessage = - [1662651381.708648][30167:30167] CHIP:DMG: { - [1662651381.708671][30167:30167] CHIP:DMG: AttributePathIBs = - [1662651381.708733][30167:30167] CHIP:DMG: [ - [1662651381.708762][30167:30167] CHIP:DMG: AttributePathIB = - [1662651381.708813][30167:30167] CHIP:DMG: { - [1662651381.708865][30167:30167] CHIP:DMG: Endpoint = 0x0, - [1662651381.708920][30167:30167] CHIP:DMG: Cluster = 0x2a, - [1662651381.708975][30167:30167] CHIP:DMG: Attribute = 0x0000_0000, - [1662651381.709027][30167:30167] CHIP:DMG: } - [1662651381.709079][30167:30167] CHIP:DMG: - [1662651381.709127][30167:30167] CHIP:DMG: ], - [1662651381.709159][30167:30167] CHIP:DMG: - [1662651381.709189][30167:30167] CHIP:DMG: isFabricFiltered = true, - disabled: true - - - label: - "Step 3: DUT sends a read request to read the UpdatePossible attribute - from the TH." - verification: | - Verify that the OTA Requestor App responds to the read command - - ./chip-tool otasoftwareupdaterequestor read update-possible 321 0 - - Verify UpdatePossible attribute on TH [OTA-REQ] Logs: - - [1662651426.055059][30167:30167] CHIP:IM: Received Read request - [1662651426.055180][30167:30167] CHIP:DMG: ReadRequestMessage = - [1662651426.055225][30167:30167] CHIP:DMG: { - [1662651426.055264][30167:30167] CHIP:DMG: AttributePathIBs = - [1662651426.055308][30167:30167] CHIP:DMG: [ - [1662651426.055349][30167:30167] CHIP:DMG: AttributePathIB = - [1662651426.055397][30167:30167] CHIP:DMG: { - [1662651426.055444][30167:30167] CHIP:DMG: Endpoint = 0x0, - [1662651426.055500][30167:30167] CHIP:DMG: Cluster = 0x2a, - [1662651426.055553][30167:30167] CHIP:DMG: Attribute = 0x0000_0001, - [1662651426.055603][30167:30167] CHIP:DMG: } - [1662651426.055654][30167:30167] CHIP:DMG: - [1662651426.055701][30167:30167] CHIP:DMG: ], - [1662651426.055747][30167:30167] CHIP:DMG: - disabled: true - - - label: - "Step 4: DUT sends a read request to read the UpdateState Attribute - from the TH." - verification: | - Verify that the OTA Requestor App responds to the read command - - ./chip-tool otasoftwareupdaterequestor read update-state 321 0 - - Verify UpdateState attribute on TH [OTA-REQ] Logs: - - [1662651459.324406][30167:30167] CHIP:IM: Received Read request - [1662651459.324545][30167:30167] CHIP:DMG: ReadRequestMessage = - [1662651459.324597][30167:30167] CHIP:DMG: { - [1662651459.324641][30167:30167] CHIP:DMG: AttributePathIBs = - [1662651459.324692][30167:30167] CHIP:DMG: [ - [1662651459.324739][30167:30167] CHIP:DMG: AttributePathIB = - [1662651459.324847][30167:30167] CHIP:DMG: { - [1662651459.324914][30167:30167] CHIP:DMG: Endpoint = 0x0, - [1662651459.324973][30167:30167] CHIP:DMG: Cluster = 0x2a, - [1662651459.325030][30167:30167] CHIP:DMG: Attribute = 0x0000_0002, - [1662651459.325083][30167:30167] CHIP:DMG: } - [1662651459.325138][30167:30167] CHIP:DMG: - [1662651459.325188][30167:30167] CHIP:DMG: ], - [1662651459.325240][30167:30167] CHIP:DMG: - disabled: true - - - label: - "Step 5: TH should start initiating the Software update process. While - the TH is downloading the image, DUT sends a read request to read the - UpdateStateProgress attribute from the TH." - verification: | - Write the acl entry to allow the software update: - - ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, {"fabricIndex": 1, "privilege": 3, "authMode": 2, "subjects": [321], "targets": null}]' 123 0 - - [1686306394.095355][30543:30545] CHIP:DMG: StatusIB = - [1686306394.095380][30543:30545] CHIP:DMG: { - [1686306394.095404][30543:30545] CHIP:DMG: status = 0x00 (SUCCESS), - [1686306394.095436][30543:30545] CHIP:DMG: }, - - Run the announce ota provider command to start the software update and check the UpdateStateProgress - - ./chip-tool otasoftwareupdaterequestor announce-otaprovider 123 0 0 0 321 0 - - where 321 is OTA Requestor node ID and 123 is OTA Provider node ID - - Verify that the OTA Requestor App responds to the read command - - ./chip-tool otasoftwareupdaterequestor read update-state-progress 321 0 - - Verify UpdateStateProgress attribute on TH [OTA-REQ] Logs: - - [1662651648.244248][30167:30167] CHIP:IM: Received Read request - [1662651648.244329][30167:30167] CHIP:DMG: ReadRequestMessage = - [1662651648.244353][30167:30167] CHIP:DMG: { - [1662651648.244372][30167:30167] CHIP:DMG: AttributePathIBs = - [1662651648.244399][30167:30167] CHIP:DMG: [ - [1662651648.244430][30167:30167] CHIP:DMG: AttributePathIB = - [1662651648.244457][30167:30167] CHIP:DMG: { - [1662651648.244492][30167:30167] CHIP:DMG: Endpoint = 0x0, - [1662651648.244523][30167:30167] CHIP:DMG: Cluster = 0x2a, - [1662651648.244558][30167:30167] CHIP:DMG: Attribute = 0x0000_0003, - [1662651648.244584][30167:30167] CHIP:DMG: } - [1662651648.244618][30167:30167] CHIP:DMG: - [1662651648.244643][30167:30167] CHIP:DMG: ], - [1662651648.244676][30167:30167] CHIP:DMG: - [1662651648.244700][30167:30167] CHIP:DMG: isFabricFiltered = true, - [1662651648.244721][30167:30167] CHIP:DMG: InteractionModelRevision = 1 - [1662651648.244749][30167:30167] CHIP:DMG: }, - [1662651648.244822][30167:30167] CHIP:DMG: IM RH moving to [GeneratingReports] - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_S_2_3.yaml b/src/app/tests/suites/certification/Test_TC_S_2_3.yaml index 859204e549f7b2..b39a2e762a1113 100644 --- a/src/app/tests/suites/certification/Test_TC_S_2_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_S_2_3.yaml @@ -309,11 +309,10 @@ tests: to G1, the SceneID field set to 0x01, the TransitionTime field set to 1000 (1s) and a set of extension fields appropriate to AC1." verification: | - ./chip-tool scenesmanagement add-scene GroupID SceneID TransitionTime "SceneName" '[{"clusterId": value, "attributeValueList":[{"attributeId": value, "attributeValue": value}]}' nodeId endpointId + ./chip-tool scenesmanagement add-scene 0x0101 0x01 1000 "scene name" '[{"clusterID": "0x0006", "attributeValueList":[{"attributeID": "0x0001", "attributeValue": "0x01"}, ]}, {"clusterID": "0x0008", "attributeValueList":[{"attributeID": "0x0000", "attributeValue": "0x64"}, ]}]' 1 1 - Note: The number of ExtensionFieldSets, the value of clusterId of each ExtensionFieldSet, the number of attributes in attributeValueList and their values varies for each application + Verify DUT sends a AddSceneResponse command to TH with the Status field set to 0x00 (SUCCESS), the GroupID field set to 257 and the SceneID field set to 0x01 on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: - Verify the "status is success" on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: [1705680175.863785][5823:5825] CHIP:DMG: }, [1705680175.863851][5823:5825] CHIP:DMG: Received Command Response Data, Endpoint=1 Cluster=0x0000_0062 Command=0x0000_0000 [1705680175.863880][5823:5825] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0062 Command 0x0000_0000 @@ -613,11 +612,12 @@ tests: set to G1 and the SceneID field set to 0x03." PICS: S.S.C01.Rsp && PICS_SKIP_SAMPLE_APP verification: | - ./chip-tool scenesmanagement view-scene GroupId SceneId Node-Id EndpointId + ./chip-tool scenesmanagement view-scene 0x0101 0x03 1 1 - Note: The number of ExtensionFieldSets, the value of clusterId of each ExtensionFieldSet, the number of attributes in attributeValueList and their values varies for each application + Verify DUT sends a ViewSceneResponse command to TH with the Status field set to 0x00 (SUCCESS), the GroupID field set to 257, the SceneID field set to 0x03, the TransitionTime field set to 1 and a set of extension fields appropriate to AC1 on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: + + NOTE: The values below are expected to match the values from the specific AC tested - Verify that the extension fields in the log match the ones expected and that the log output is similar to the following: [1707285444.028460][13682:13684] CHIP:DMG: }, [1707285444.028553][13682:13684] CHIP:DMG: Received Command Response Data, Endpoint=1 Cluster=0x0000_0062 Command=0x0000_0001 [1707285444.028579][13682:13684] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0062 Command 0x0000_0001 @@ -627,13 +627,13 @@ tests: [1707285444.028706][13682:13684] CHIP:TOO: sceneID: 3 [1707285444.028717][13682:13684] CHIP:TOO: transitionTime: 1 [1707285444.028728][13682:13684] CHIP:TOO: sceneName: scene name - [1707285444.028766][13682:13684] CHIP:TOO: extensionFieldSets: XX entries - [1707285444.028814][13682:13684] CHIP:TOO: [XX]: { - [1707285444.028828][13682:13684] CHIP:TOO: ClusterID: XX - [1707285444.028853][13682:13684] CHIP:TOO: AttributeValueList: XX entries - [1707285444.028882][13682:13684] CHIP:TOO: [XX]: { - [1707285444.028896][13682:13684] CHIP:TOO: AttributeID: XX - [1707285444.028913][13682:13684] CHIP:TOO: AttributeValue: XX + [1707285444.028766][13682:13684] CHIP:TOO: extensionFieldSets: 1 entries + [1707285444.028814][13682:13684] CHIP:TOO: [1]: { + [1707285444.028828][13682:13684] CHIP:TOO: ClusterID: 768 + [1707285444.028853][13682:13684] CHIP:TOO: AttributeValueList: 1 entries + [1707285444.028882][13682:13684] CHIP:TOO: [1]: { + [1707285444.028896][13682:13684] CHIP:TOO: AttributeID: 16386 + [1707285444.028913][13682:13684] CHIP:TOO: AttributeValue: 1 [1707285444.028925][13682:13684] CHIP:TOO: } [1707285444.028937][13682:13684] CHIP:TOO: } [1707285444.028950][13682:13684] CHIP:TOO: } diff --git a/src/app/tests/suites/certification/Test_TC_S_2_4.yaml b/src/app/tests/suites/certification/Test_TC_S_2_4.yaml index c3ba72dcf05b80..196d08a4eb46cf 100644 --- a/src/app/tests/suites/certification/Test_TC_S_2_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_S_2_4.yaml @@ -440,7 +440,7 @@ tests: response: value: 100 - - label: "DUT transitions to AC2 over 20." + - label: "DUT transitions to AC1 over 20s." verification: | Is the transition done over 20s? cluster: "LogCommands" @@ -449,7 +449,7 @@ tests: arguments: values: - name: "message" - value: "Please confirm that transition to AC2 was made over 5s" + value: "Please confirm that transition to AC1 was made over 20s" - name: "expectedValue" value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_S_2_5.yaml b/src/app/tests/suites/certification/Test_TC_S_2_5.yaml index e0a2998e06d965..8616c15665531e 100644 --- a/src/app/tests/suites/certification/Test_TC_S_2_5.yaml +++ b/src/app/tests/suites/certification/Test_TC_S_2_5.yaml @@ -17,7 +17,6 @@ name: 132.2.5. [TC-S-2.5] RemainingCapacity functionality with DUT as Server PICS: - S.S - - S.S.F03 config: nodeId: 0x12344321 @@ -250,7 +249,7 @@ tests: to 20000 (20s) and no extension field sets." PICS: S.S.C00.Rsp verification: | - ./chip-tool scenesmanagement add-scene 0x0001 0x01 20000 scene1 [] 1 1 + scenesmanagement add-scene 0x0001 0x01 20000 scene1 [] 1 1 Verify the AddSceneResponse with following fields: Status is SUCCESS @@ -331,7 +330,7 @@ tests: 8a." PICS: S.S.C04.Rsp verification: | - ./chiptool scenesmanagement store-scene 0x0001 0x02 1 1 + scenesmanagement store-scene 0x0001 0x02 1 1 Verify the StoreSceneResponse with following fields: Status is SUCCESS @@ -412,7 +411,7 @@ tests: field sets. If RemainingCapacity is 0, continue to Step 8a." PICS: S.S.C00.Rsp verification: | - ./chip-tool scenesmanagement add-scene 0x0001 0x03 20000 scene1 [] 1 1 + scenesmanagement add-scene 0x0001 0x03 20000 scene1 [] 1 1 Verify the AddSceneResponse with following fields: Status is SUCCESS @@ -491,7 +490,7 @@ tests: set to G1 and the SceneID field set to 0x01." PICS: S.S.C02.Rsp verification: | - ./chip-tool scenesmanagement remove-scene 0x0001 0x01 1 1 + scenesmanagement remove-scene 0x0001 0x01 1 1 Verify the RemoveScenesResponse with following fields: Status is SUCCESS @@ -646,7 +645,7 @@ tests: KeySetRemove command to the GroupKeyManagement cluster with the GroupKeySetID field set to 0x01a1" verification: | - ./chip-tool groupkeymanagement key-set-remove 0x01a1 1 0 + groupkeymanagement key-set-remove 0x01a1 1 0 Verify DUT responds with SUCCESS status response on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: diff --git a/src/app/tests/suites/certification/Test_TC_S_2_6.yaml b/src/app/tests/suites/certification/Test_TC_S_2_6.yaml index 2c8d0ce4e5a820..5a578eeb8a7866 100644 --- a/src/app/tests/suites/certification/Test_TC_S_2_6.yaml +++ b/src/app/tests/suites/certification/Test_TC_S_2_6.yaml @@ -19,7 +19,6 @@ name: PICS: - S.S - - S.S.F03 config: nodeId: 0x12344321 @@ -30,7 +29,7 @@ tests: - label: "Precondition: Commission DUT to TH1" verification: | Once DUT reach the commissionable state send the following command on TH1: - ./chip-tool pairing onnetwork 1 20202021 + pairing onnetwork 1 20202021 Verify the commissioning completed with success on TH(chip-tool) from DUT [1650455358.501816][4366:4371] CHIP:TOO: Device commissioning completed with success disabled: true @@ -39,7 +38,7 @@ tests: verification: | Open a commissioning window On TH1(Chiptool)using below command - ./chip-tool pairing open-commissioning-window 1 1 400 2000 3841 + pairing open-commissioning-window 1 1 400 2000 3841 Verify the Successfully opened pairing window On TH1(Chiptool)e device @@ -53,7 +52,7 @@ tests: verification: | Now send the below command for commissionin DUT to TH2 with Manual pairing code generated in TH1 using open commission window - ./chip-tool pairing code 2 36253605617 --commissioner-name beta + pairing code 2 36253605617 --commissioner-name beta Verify the commissioning completed with success on TH2(chip-tool) from DUT @@ -65,7 +64,7 @@ tests: verification: | Open a commissioning window On TH1(Chiptool)using below command - ./chip-tool pairing open-commissioning-window 1 1 400 2000 3842 + pairing open-commissioning-window 1 1 400 2000 3842 Verify the Successfully opened pairing window On TH1(Chiptool)e device @@ -79,7 +78,7 @@ tests: verification: | send the below command for commissionin DUT to TH3 with Manual pairing code generated in TH1 using open commission window - ./chip-tool pairing code 3 36545248276 --commissioner-name gamma + pairing code 3 36545248276 --commissioner-name gamma Verify the commissioning completed with success on TH3(chip-tool) from DUT @@ -92,7 +91,7 @@ tests: field set to 0x0000." PICS: S.S.C03.Rsp verification: | - ./chip-tool scenesmanagement remove-all-scenes 0x0000 1 1 + scenesmanagement remove-all-scenes 0x0000 1 1 Verify the RemoveAllScenesResponse with following fields: Status is SUCCESS @@ -108,7 +107,7 @@ tests: - label: "Step 1b: Repeat Step 1a with TH2." PICS: S.S.C03.Rsp verification: | - ./chip-tool scenesmanagement remove-all-scenes 0x0000 2 1 --commissioner-name beta + scenesmanagement remove-all-scenes 0x0000 2 1 --commissioner-name beta Verify the RemoveAllScenesResponse with following fields: Status is SUCCESS @@ -125,7 +124,7 @@ tests: - label: "Step 1C: Repeat Step 1a with TH3." PICS: S.S.C03.Rsp verification: | - ./chip-tool scenesmanagement remove-all-scenes 0x0000 3 1 --commissioner-name gamma + scenesmanagement remove-all-scenes 0x0000 3 1 --commissioner-name gamma Verify the RemoveAllScenesResponse with following fields: Status is SUCCESS @@ -141,7 +140,7 @@ tests: - label: "Step 2a: TH1 reads from the DUT the SceneTableSize attribute" verification: | - ./chip-tool scenesmanagement read scene-table-size 1 1 + scenesmanagement read scene-table-size 1 1 Verify the "SceneTableSize" attribute value is SceneTableSize(minimum=16) which is recorded into SceneTableSize on the TH (Chip-tool) and below is the sample log provided for the raspi platform: @@ -156,7 +155,7 @@ tests: verification: | Please use Interactive mode to Verify the subscription Here the command to enter interactive mode:-- - ./chip-tool interactive start + interactive start Set up the subscription between DUT and TH by sending the command mentioned below, and verify that the subscription is activated successfully @@ -236,7 +235,7 @@ tests: Please use Interactive mode to Verify the subscription of an event Here the command to enter interactive mode:-- - ./chip-tool interactive start + interactive start Set up the subscription between DUT and TH by sending the command mentioned below, and verify that the subscription is activated successfully @@ -296,7 +295,7 @@ tests: verification: | Please use Interactive mode to Verify the subscription of an event Here the command to enter interactive mode:-- - ./chip-tool interactive start + interactive start Set up the subscription between DUT and TH by sending the command mentioned below, and verify that the subscription is activated successfully @@ -358,7 +357,7 @@ tests: set to 20000 (20s) and no extension field sets." PICS: S.S.C00.Rsp verification: | - ./chip-tool scenesmanagement add-scene 0x0000 0x01 20000 scene1 [] 1 1 + scenesmanagement add-scene 0x0000 0x01 20000 scene1 [] 1 1 Verify the AddSceneResponse with following fields: Status is SUCCESS @@ -381,7 +380,7 @@ tests: FabricSceneInfo into Remaining1stCapacity; verify Remaining1stCapacity equals (MaxRemainingCapacity-1)." verification: | - ./chipt-tool scenesmanagement subscribe fabric-scene-info 100 200 1 1 + scenesmanagement subscribe fabric-scene-info 100 200 1 1 Verify the DUT sends a report data to TH1 for FabricSceneInfo after the MinIntervalFloor time; store the RemainingCapacity field from this fabric’s entry reported in FabricSceneInfo into Remaining1stCapacity and is equals to (MaxRemainingCapacity-1) on the TH (Chip-tool) and below is the sample log provided for the raspi platform: @@ -441,7 +440,7 @@ tests: becomes 0." PICS: S.S.C00.Rsp verification: | - ./chip-tool scenesmanagement add-scene 0x0000 0x02 20000 scene2 [] 1 1 + scenesmanagement add-scene 0x0000 0x02 20000 scene2 [] 1 1 Verify the AddSceneResponse with following fields: Status is SUCCESS @@ -457,7 +456,7 @@ tests: [1700827508.579697][16026:16028] CHIP:TOO: } - ./chip-tool scenesmanagement subscribe fabric-scene-info 100 200 1 1 + scenesmanagement subscribe fabric-scene-info 100 200 1 1 Verify the DUT sends a report data messages after the MinIntervalFloor time to TH1 for RemainingCapacity field in FabricSceneInfo for that fabric with updated valueon the TH1 (Chip-tool) and below is the sample log provided for the raspi platform: [1701243677.717829][7642:7644] CHIP:DMG: ReportDataMessage = [1701243677.717834][7642:7644] CHIP:DMG: { @@ -508,7 +507,7 @@ tests: . . . - ./chip-tool scenesmanagement add-scene 0x0000 0x07 20000 scene8 [] 1 1 + scenesmanagement add-scene 0x0000 0x07 20000 scene8 [] 1 1 Verify the AddSceneResponse with following fields: Status is SUCCESS @@ -524,7 +523,7 @@ tests: [1700827941.415498][16068:16070] CHIP:TOO: sceneID: 7 [1700827941.415508][16068:16070] CHIP:TOO: } - ./chip-tool scenesmanagement subscribe fabric-scene-info 100 200 1 1 + scenesmanagement subscribe fabric-scene-info 100 200 1 1 Verify the DUT sends a report data messages after the MinIntervalFloor time to TH1 for RemainingCapacity field in FabricSceneInfo for that fabric with updated valueon the TH1 (Chip-tool) and below is the sample log provided for the raspi platform: @@ -583,7 +582,7 @@ tests: field sets." PICS: S.S.C00.Rsp verification: | - ./chip-tool scenesmanagement add-scene 0x0000 0x08 20000 scene9 [] 1 1 + scenesmanagement add-scene 0x0000 0x08 20000 scene9 [] 1 1 Verify the AddSceneResponse with following fields: Status is RESOURCE_EXHAUSTED(0x89) on the TH1(Chip-tool) log and below is the sample log provided for the raspi platform: @@ -601,7 +600,7 @@ tests: - label: "Step 5a: Repeat Step 4a with TH2" PICS: S.S.C00.Rsp verification: | - ./chip-tool scenesmanagement add-scene 0x0000 0x02 0x0014 scene1 [] 2 1 --commissioner-name beta + scenesmanagement add-scene 0x0000 0x02 0x0014 scene1 [] 2 1 --commissioner-name beta Verify the AddSceneResponse with following fields: Status is SUCCESS @@ -617,7 +616,7 @@ tests: [1700828173.261638][16115:16117] CHIP:TOO: sceneID: 2 [1700828173.261640][16115:16117] CHIP:TOO: } - ./chip-tool scenesmanagement subscribe fabric-scene-info 100 200 2 1 --commissioner-name beta + scenesmanagement subscribe fabric-scene-info 100 200 2 1 --commissioner-name beta Verify the DUT sends a report data messages after the MinIntervalFloor time to TH2 for RemainingCapacity field in FabricSceneInfo for that fabric with updated value on the TH2 (Chip-tool) and below is the sample log provided for the raspi platform: @@ -670,7 +669,7 @@ tests: . . . - ./chip-tool scenesmanagement add-scene 0x0000 0x08 0x0014 scene7 [] 2 1 --commissioner-name beta + scenesmanagement add-scene 0x0000 0x08 0x0014 scene7 [] 2 1 --commissioner-name beta Verify the AddSceneResponse with following fields: Status is SUCCESS @@ -685,7 +684,7 @@ tests: [1700829509.052521][16198:16200] CHIP:TOO: sceneID: 8 [1700829509.052532][16198:16200] CHIP:TOO: } - ./chip-tool scenesmanagement subscribe fabric-scene-info 100 200 2 1 --commissioner-name beta + scenesmanagement subscribe fabric-scene-info 100 200 2 1 --commissioner-name beta Verify the DUT sends a report data messages after the MinIntervalFloor time to TH2 for RemainingCapacity field in FabricSceneInfo for that fabric with updated value(decreasing to 0) on the TH2 (Chip-tool) and below is the sample log provided for the raspi platform: @@ -736,7 +735,7 @@ tests: [1701245132.870584][7824:7826] CHIP:TOO: FabricIndex: 2 [1701245132.870594][7824:7826] CHIP:TOO: } - ./chip-tool scenesmanagement subscribe fabric-scene-info 100 200 3 1 --commissioner-name gamma + scenesmanagement subscribe fabric-scene-info 100 200 3 1 --commissioner-name gamma Verify that the DUT sends report data messages after the MinIntervalFloor time to TH3 for RemainingCapacity field in FabricSceneInfo for that fabric with updated value (decreasing to SceneTableSize - (2 * MaxRemainingCapacity)) on the TH2 (Chip-tool) and below is the sample log provided for the raspi platform: @@ -791,7 +790,7 @@ tests: - label: "Step 5b: Repeat Step 4b with TH2" PICS: S.S.C00.Rsp verification: | - ./chip-tool scenesmanagement add-scene 0x0000 0x09 0x0014 scene8 [] 2 1 --commissioner-name beta + scenesmanagement add-scene 0x0000 0x09 0x0014 scene8 [] 2 1 --commissioner-name beta Verify the AddSceneResponse with following fields: Status is RESOURCE_EXHAUSTED(0x89) on the TH2(Chip-tool) log and below is the sample log provided for the raspi platform: @@ -808,7 +807,7 @@ tests: - label: "Step 6a: Repeat Step 4a with TH3" PICS: S.S.C00.Rsp verification: | - ./chip-tool scenesmanagement add-scene 0x0000 0x02 0x0014 scene1 [] 3 1 --commissioner-name gamma + scenesmanagement add-scene 0x0000 0x02 0x0014 scene1 [] 3 1 --commissioner-name gamma Verify the AddSceneResponse with following fields: Status is SUCCESS @@ -951,7 +950,7 @@ tests: set to 20000 20s and no extension field sets." PICS: S.S.C00.Rsp verification: | - ./chipt-tool scenesmanagement add-scene 0x0000 0x01 20000 scene [] 3 1 --commissioner-name gamma + scenesmanagement add-scene 0x0000 0x01 20000 scene [] 3 1 --commissioner-name gamma Verify the AddSceneResponse with following fields: Status is RESOURCE_EXHAUSTED(0x89) on the TH3(Chip-tool) log and below is the sample log provided for the raspi platform: @@ -971,7 +970,7 @@ tests: set to 0x0000, the SceneID field set to 0x01." PICS: S.S.C04.Rsp verification: | - ./chipt-tool scenesmanagement store-scene 0x0000 0x01 3 1 --commissioner-name gamma + scenesmanagement store-scene 0x0000 0x01 3 1 --commissioner-name gamma Verify the StoreSceneResponse with following fields: Status is RESOURCE_EXHAUSTED(0x89) on the TH3(Chip-tool) log and below is the sample log provided for the raspi platform: @@ -993,7 +992,7 @@ tests: to 0x0000 and the scene identifier to field set to 0xFE." PICS: S.S.C40.Rsp verification: | - ./chipt-tool scenesmanagement copy-scene 0x00 0x0000 0x02 0x0000 0x00 3 1 --commissioner-name gamma + scenesmanagement copy-scene 0x00 0x0000 0x02 0x0000 0x00 3 1 --commissioner-name gamma Verify the CopySceneResponse with following fields: Status is RESOURCE_EXHAUSTED(0x89) on the TH(Chip-tool) log and below is the sample log provided for the raspi platform: @@ -1013,7 +1012,7 @@ tests: field set to 0x0000." PICS: S.S.C03.Rsp verification: | - ./chipt-tool scenesmanagement remove-all-scenes 0x0000 1 1 + scenesmanagement remove-all-scenes 0x0000 1 1 Verify the RemoveAllScenesResponse with following fields: Status is SUCCESS @@ -1038,7 +1037,7 @@ tests: should send 'empty' report data since there is no update for this attribute for TH2)." verification: | - ./chipt-tool scenesmanagement subscribe fabric-scene-info 100 200 1 1 + scenesmanagement subscribe fabric-scene-info 100 200 1 1 Verify that the DUT sends a report data to TH1 for FabricSceneInfo after the MinIntervalFloor time; store the RemainingCapacity field from this fabric’s entry the reported in FabricSceneInfo into Remaining1stCapacity; verify Remaining1stCapacity equals (MaxRemainingCapacity) on TH1(Chip-tool) log and below is the sample log provided for the raspi platform: @@ -1097,7 +1096,7 @@ tests: field set to 0x0000." PICS: S.S.C03.Rsp verification: | - ./chipt-tool scenesmanagement remove-all-scenes 0x0000 2 1 --commissioner-name beta + scenesmanagement remove-all-scenes 0x0000 2 1 --commissioner-name beta Verify the RemoveAllScenesResponse with following fields: Status is SUCCESS @@ -1119,7 +1118,7 @@ tests: FabricSceneInfo into Remaining2ndCapacity; verify Remaining2ndCapacity equals (MaxRemainingCapacity)." verification: | - ./chip-tool scenesmanagement subscribe fabric-scene-info 100 200 2 1 --commissioner-name beta + scenesmanagement subscribe fabric-scene-info 100 200 2 1 --commissioner-name beta Verify that the DUT sends a report data to TH2 for FabricSceneInfo after the MinIntervalFloor time; store the RemainingCapacity field from this fabric’s entry reported in FabricSceneInfo into Remaining2ndCapacity; verify Remaining2ndCapacity equals (MaxRemainingCapacity) on TH2(Chip-tool) log and below is the sample log provided for the raspi platform: @@ -1141,7 +1140,7 @@ tests: "Step 11a: TH1 removes the TH2 fabric by sending the RemoveFabric command to the DUT with the FabricIndex set to th2FabricIndex" verification: | - ./chip-tool operationalcredentials remove-fabric th2FabricIndex 1 0 + operationalcredentials remove-fabric th2FabricIndex 1 0 On TH1(chip-tool) verify the success with the nocresponse with statuscode is success(0) @@ -1158,7 +1157,7 @@ tests: "Step 11b: TH1 removes the TH3 fabric by sending the RemoveFabric command to the DUT with the FabricIndex set to th3FabricIndex" verification: | - ./chip-tool operationalcredentials remove-fabric th3FabricIndex 1 0 + operationalcredentials remove-fabric th3FabricIndex 1 0 On TH1(chip-tool) verify the success with the nocresponse with statuscode is success(0) diff --git a/src/app/tests/suites/certification/Test_TC_S_3_1.yaml b/src/app/tests/suites/certification/Test_TC_S_3_1.yaml index 66912006363345..ffb3023c67b862 100644 --- a/src/app/tests/suites/certification/Test_TC_S_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_S_3_1.yaml @@ -154,16 +154,34 @@ tests: - label: "Step 0d: Precondition 4: TH sends a RemoveAllGroups command to DUT." verification: | - Please execute the below commands before starting the test case : - ./chip-tool groups remove-all-groups 1 1 - Verify DUT responds with SUCCESS status response on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: - - [1653485455.344097][11508:11513] CHIP:DMG: StatusIB = - [1653485455.344141][11508:11513] CHIP:DMG: { - [1653485455.344190][11508:11513] CHIP:DMG: status = 0x00 (SUCCESS), - [1653485455.344236][11508:11513] CHIP:DMG: }, + Verify the RemoveAllGroups attribute On TH (all-Clusters-app) log and below is the sample log provided for the raspi platform: + + [1707992121.754676][18074:18074] CHIP:DMG: InvokeRequestMessage = + [1707992121.754689][18074:18074] CHIP:DMG: { + [1707992121.754697][18074:18074] CHIP:DMG: suppressResponse = false, + [1707992121.754707][18074:18074] CHIP:DMG: timedRequest = false, + [1707992121.754714][18074:18074] CHIP:DMG: InvokeRequests = + [1707992121.754730][18074:18074] CHIP:DMG: [ + [1707992121.754744][18074:18074] CHIP:DMG: CommandDataIB = + [1707992121.754756][18074:18074] CHIP:DMG: { + [1707992121.754766][18074:18074] CHIP:DMG: CommandPathIB = + [1707992121.754776][18074:18074] CHIP:DMG: { + [1707992121.754788][18074:18074] CHIP:DMG: EndpointId = 0x1, + [1707992121.754801][18074:18074] CHIP:DMG: ClusterId = 0x4, + [1707992121.754810][18074:18074] CHIP:DMG: CommandId = 0x4, + [1707992121.754827][18074:18074] CHIP:DMG: }, + [1707992121.754841][18074:18074] CHIP:DMG: + [1707992121.754852][18074:18074] CHIP:DMG: CommandFields = + [1707992121.754863][18074:18074] CHIP:DMG: { + [1707992121.754874][18074:18074] CHIP:DMG: }, + [1707992121.754883][18074:18074] CHIP:DMG: }, + [1707992121.754899][18074:18074] CHIP:DMG: + [1707992121.754907][18074:18074] CHIP:DMG: ], + [1707992121.754924][18074:18074] CHIP:DMG: + [1707992121.754934][18074:18074] CHIP:DMG: InteractionModelRevision = 11 + [1707992121.754943][18074:18074] CHIP:DMG: }, disabled: true - label: From 1fdd217947e9d1b531f4437f2e728569c9441711 Mon Sep 17 00:00:00 2001 From: Nivi Sarkar <55898241+nivi-apple@users.noreply.github.com> Date: Thu, 11 Apr 2024 13:51:48 -0700 Subject: [PATCH 042/468] =?UTF-8?q?Cancel=20the=20SRP=20timer=20if=20we=20?= =?UTF-8?q?have=20resolved=20on=20the=20SRP=20domain=20but=20the=20kD?= =?UTF-8?q?=E2=80=A6=20(#32948)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Cancel the SRP timer if we have resolved on the SRP domain but the kDNSServiceFlagsMoreComing is set indicating there are more results coming * Update src/platform/Darwin/DnssdImpl.cpp Co-authored-by: Boris Zbarsky * Addressed review comments --------- Co-authored-by: Boris Zbarsky --- src/platform/Darwin/DnssdContexts.cpp | 15 ++++++++------- src/platform/Darwin/DnssdImpl.cpp | 7 +++++++ src/platform/Darwin/DnssdImpl.h | 12 ++++++------ 3 files changed, 21 insertions(+), 13 deletions(-) diff --git a/src/platform/Darwin/DnssdContexts.cpp b/src/platform/Darwin/DnssdContexts.cpp index 46c7bb34fc4365..7dc5956845414f 100644 --- a/src/platform/Darwin/DnssdContexts.cpp +++ b/src/platform/Darwin/DnssdContexts.cpp @@ -492,10 +492,7 @@ ResolveContext::ResolveContext(DiscoverNodeDelegate * delegate, chip::Inet::IPAd ResolveContext::~ResolveContext() { - if (isSRPTimerRunning) - { - CancelSRPTimer(); - } + CancelSRPTimerIfRunning(); } void ResolveContext::DispatchFailure(const char * errorStr, CHIP_ERROR err) @@ -647,10 +644,14 @@ void ResolveContext::SRPTimerExpiredCallback(chip::System::Layer * systemLayer, sdCtx->Finalize(); } -void ResolveContext::CancelSRPTimer() +void ResolveContext::CancelSRPTimerIfRunning() { - DeviceLayer::SystemLayer().CancelTimer(SRPTimerExpiredCallback, static_cast(this)); - ChipLogProgress(Discovery, "SRP resolve timer for %s cancelled; resolve timed out", instanceName.c_str()); + if (isSRPTimerRunning) + { + DeviceLayer::SystemLayer().CancelTimer(SRPTimerExpiredCallback, static_cast(this)); + ChipLogProgress(Discovery, "SRP resolve timer for %s cancelled; resolve timed out", instanceName.c_str()); + isSRPTimerRunning = false; + } } CHIP_ERROR ResolveContext::OnNewAddress(const InterfaceKey & interfaceKey, const struct sockaddr * address) diff --git a/src/platform/Darwin/DnssdImpl.cpp b/src/platform/Darwin/DnssdImpl.cpp index a9dccf21ef47f5..4156c7a4bf0924 100644 --- a/src/platform/Darwin/DnssdImpl.cpp +++ b/src/platform/Darwin/DnssdImpl.cpp @@ -272,6 +272,13 @@ static void OnGetAddrInfo(DNSServiceRef sdRef, DNSServiceFlags flags, uint32_t i if (flags & kDNSServiceFlagsMoreComing) { + // If we now don't need to have a timer while we wait for SRP results, ensure that there is no such + // timer running. Otherwise the timer could fire before we get the rest of the results that flags + // say are coming, and trigger a finalize before we have all the data that is already available. + if (!sdCtx->shouldStartSRPTimerForResolve) + { + sdCtx->CancelSRPTimerIfRunning(); + } return; } diff --git a/src/platform/Darwin/DnssdImpl.h b/src/platform/Darwin/DnssdImpl.h index 3cf48db33545a5..42ae55fdd9d4c0 100644 --- a/src/platform/Darwin/DnssdImpl.h +++ b/src/platform/Darwin/DnssdImpl.h @@ -297,6 +297,12 @@ struct ResolveContext : public GenericContext */ static void SRPTimerExpiredCallback(chip::System::Layer * systemLayer, void * callbackContext); + /** + * @brief Cancels the timer that was started to wait for the resolution on the kSRPDot domain to happen. + * + */ + void CancelSRPTimerIfRunning(); + private: /** * Try reporting the results we got on the provided interface index. @@ -306,12 +312,6 @@ struct ResolveContext : public GenericContext bool TryReportingResultsForInterfaceIndex(uint32_t interfaceIndex, const std::string & hostname, bool isSRPResult); bool TryReportingResultsForInterfaceIndex(uint32_t interfaceIndex); - - /** - * @brief Cancels the timer that was started to wait for the resolution on the kSRPDot domain to happen. - * - */ - void CancelSRPTimer(); }; } // namespace Dnssd From 1db304aee079121ab7e60e94bd57f6e2c499ee48 Mon Sep 17 00:00:00 2001 From: Sting Chang <33673360+stingchang@users.noreply.github.com> Date: Fri, 12 Apr 2024 07:17:03 +0800 Subject: [PATCH 043/468] Enable power source cluster to NRF board contact sensor chef-devices (#32916) * chef-add-batery2nrf-324031858 * revert type define changes * new attributes default value * remote event list attribute * update attribute values * update attributes --- .../rootnode_contactsensor_27f76aeaf5.matter | 21 +- .../rootnode_contactsensor_27f76aeaf5.zap | 204 +++++++++- .../rootnode_contactsensor_lFAGG1bfRO.matter | 286 +++++++++++++ .../rootnode_contactsensor_lFAGG1bfRO.zap | 382 +++++++++++++++++- 4 files changed, 881 insertions(+), 12 deletions(-) diff --git a/examples/chef/devices/rootnode_contactsensor_27f76aeaf5.matter b/examples/chef/devices/rootnode_contactsensor_27f76aeaf5.matter index a578cc06a5d79f..9f2c7509031e86 100644 --- a/examples/chef/devices/rootnode_contactsensor_27f76aeaf5.matter +++ b/examples/chef/devices/rootnode_contactsensor_27f76aeaf5.matter @@ -2114,6 +2114,7 @@ endpoint 0 { } } endpoint 1 { + device type ma_powersource = 17, version 1; device type ma_contactsensor = 21, version 1; @@ -2122,11 +2123,13 @@ endpoint 1 { ram attribute identifyType default = 0x0; callback attribute generatedCommandList; callback attribute acceptedCommandList; + callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 2; handle command Identify; + handle command TriggerEffect; } server cluster Descriptor { @@ -2142,15 +2145,25 @@ endpoint 1 { } server cluster PowerSource { - ram attribute status; - ram attribute order; - ram attribute description; + ram attribute status default = 1; + ram attribute order default = 1; + ram attribute description default = "Primary Battery"; + ram attribute batVoltage default = 4100; + ram attribute batPercentRemaining default = 95; + ram attribute batTimeRemaining default = 5184000; + ram attribute batChargeLevel default = 0; + ram attribute batReplacementNeeded default = 0; + ram attribute batReplaceability default = 1; + ram attribute batPresent default = 1; + ram attribute batCapacity default = 350; + ram attribute batChargeState default = 4; + ram attribute batFunctionalWhileCharging default = 1; callback attribute endpointList; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; - ram attribute featureMap default = 0; + ram attribute featureMap default = 0x06; ram attribute clusterRevision default = 1; } diff --git a/examples/chef/devices/rootnode_contactsensor_27f76aeaf5.zap b/examples/chef/devices/rootnode_contactsensor_27f76aeaf5.zap index 77bffd9fd09486..4a57e6a0b9e2fa 100644 --- a/examples/chef/devices/rootnode_contactsensor_27f76aeaf5.zap +++ b/examples/chef/devices/rootnode_contactsensor_27f76aeaf5.zap @@ -2316,13 +2316,21 @@ "profileId": 259, "label": "MA-contactsensor", "name": "MA-contactsensor" + }, + { + "code": 17, + "profileId": 259, + "label": "MA-powersource", + "name": "MA-powersource" } ], "deviceVersions": [ + 1, 1 ], "deviceIdentifiers": [ - 21 + 21, + 17 ], "deviceTypeName": "MA-contactsensor", "deviceTypeCode": 21, @@ -2343,6 +2351,14 @@ "source": "client", "isIncoming": 1, "isEnabled": 1 + }, + { + "name": "TriggerEffect", + "code": 64, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 } ], "attributes": [ @@ -2410,6 +2426,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "AttributeList", "code": 65531, @@ -2632,7 +2664,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2648,7 +2680,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2664,7 +2696,167 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "Primary Battery", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatVoltage", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4100", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatPercentRemaining", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "95", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatTimeRemaining", + "code": 13, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5184000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatChargeLevel", + "code": 14, + "mfgCode": null, + "side": "server", + "type": "BatChargeLevelEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatReplacementNeeded", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatReplaceability", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "BatReplaceabilityEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatPresent", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatCapacity", + "code": 24, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "350", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatChargeState", + "code": 26, + "mfgCode": null, + "side": "server", + "type": "BatChargeStateEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatFunctionalWhileCharging", + "code": 28, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2760,7 +2952,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "0x06", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -4525,7 +4717,7 @@ { "endpointTypeName": "Anonymous Endpoint Type", "endpointTypeIndex": 1, - "profileId": 260, + "profileId": 259, "endpointId": 1, "networkId": 0, "parentEndpointIdentifier": null diff --git a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter index f49d0a1e6e03b1..b8026a69abb6e2 100644 --- a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter +++ b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter @@ -569,6 +569,265 @@ cluster TimeFormatLocalization = 44 { readonly attribute int16u clusterRevision = 65533; } +/** This cluster is used to describe the configuration and capabilities of a physical power source that provides power to the Node. */ +cluster PowerSource = 47 { + revision 1; // NOTE: Default/not specifically set + + enum BatApprovedChemistryEnum : enum16 { + kUnspecified = 0; + kAlkaline = 1; + kLithiumCarbonFluoride = 2; + kLithiumChromiumOxide = 3; + kLithiumCopperOxide = 4; + kLithiumIronDisulfide = 5; + kLithiumManganeseDioxide = 6; + kLithiumThionylChloride = 7; + kMagnesium = 8; + kMercuryOxide = 9; + kNickelOxyhydride = 10; + kSilverOxide = 11; + kZincAir = 12; + kZincCarbon = 13; + kZincChloride = 14; + kZincManganeseDioxide = 15; + kLeadAcid = 16; + kLithiumCobaltOxide = 17; + kLithiumIon = 18; + kLithiumIonPolymer = 19; + kLithiumIronPhosphate = 20; + kLithiumSulfur = 21; + kLithiumTitanate = 22; + kNickelCadmium = 23; + kNickelHydrogen = 24; + kNickelIron = 25; + kNickelMetalHydride = 26; + kNickelZinc = 27; + kSilverZinc = 28; + kSodiumIon = 29; + kSodiumSulfur = 30; + kZincBromide = 31; + kZincCerium = 32; + } + + enum BatChargeFaultEnum : enum8 { + kUnspecified = 0; + kAmbientTooHot = 1; + kAmbientTooCold = 2; + kBatteryTooHot = 3; + kBatteryTooCold = 4; + kBatteryAbsent = 5; + kBatteryOverVoltage = 6; + kBatteryUnderVoltage = 7; + kChargerOverVoltage = 8; + kChargerUnderVoltage = 9; + kSafetyTimeout = 10; + } + + enum BatChargeLevelEnum : enum8 { + kOK = 0; + kWarning = 1; + kCritical = 2; + } + + enum BatChargeStateEnum : enum8 { + kUnknown = 0; + kIsCharging = 1; + kIsAtFullCharge = 2; + kIsNotCharging = 3; + } + + enum BatCommonDesignationEnum : enum16 { + kUnspecified = 0; + kAAA = 1; + kAA = 2; + kC = 3; + kD = 4; + k4v5 = 5; + k6v0 = 6; + k9v0 = 7; + k12AA = 8; + kAAAA = 9; + kA = 10; + kB = 11; + kF = 12; + kN = 13; + kNo6 = 14; + kSubC = 15; + kA23 = 16; + kA27 = 17; + kBA5800 = 18; + kDuplex = 19; + k4SR44 = 20; + k523 = 21; + k531 = 22; + k15v0 = 23; + k22v5 = 24; + k30v0 = 25; + k45v0 = 26; + k67v5 = 27; + kJ = 28; + kCR123A = 29; + kCR2 = 30; + k2CR5 = 31; + kCRP2 = 32; + kCRV3 = 33; + kSR41 = 34; + kSR43 = 35; + kSR44 = 36; + kSR45 = 37; + kSR48 = 38; + kSR54 = 39; + kSR55 = 40; + kSR57 = 41; + kSR58 = 42; + kSR59 = 43; + kSR60 = 44; + kSR63 = 45; + kSR64 = 46; + kSR65 = 47; + kSR66 = 48; + kSR67 = 49; + kSR68 = 50; + kSR69 = 51; + kSR516 = 52; + kSR731 = 53; + kSR712 = 54; + kLR932 = 55; + kA5 = 56; + kA10 = 57; + kA13 = 58; + kA312 = 59; + kA675 = 60; + kAC41E = 61; + k10180 = 62; + k10280 = 63; + k10440 = 64; + k14250 = 65; + k14430 = 66; + k14500 = 67; + k14650 = 68; + k15270 = 69; + k16340 = 70; + kRCR123A = 71; + k17500 = 72; + k17670 = 73; + k18350 = 74; + k18500 = 75; + k18650 = 76; + k19670 = 77; + k25500 = 78; + k26650 = 79; + k32600 = 80; + } + + enum BatFaultEnum : enum8 { + kUnspecified = 0; + kOverTemp = 1; + kUnderTemp = 2; + } + + enum BatReplaceabilityEnum : enum8 { + kUnspecified = 0; + kNotReplaceable = 1; + kUserReplaceable = 2; + kFactoryReplaceable = 3; + } + + enum PowerSourceStatusEnum : enum8 { + kUnspecified = 0; + kActive = 1; + kStandby = 2; + kUnavailable = 3; + } + + enum WiredCurrentTypeEnum : enum8 { + kAC = 0; + kDC = 1; + } + + enum WiredFaultEnum : enum8 { + kUnspecified = 0; + kOverVoltage = 1; + kUnderVoltage = 2; + } + + bitmap Feature : bitmap32 { + kWired = 0x1; + kBattery = 0x2; + kRechargeable = 0x4; + kReplaceable = 0x8; + } + + struct BatChargeFaultChangeType { + BatChargeFaultEnum current[] = 0; + BatChargeFaultEnum previous[] = 1; + } + + struct BatFaultChangeType { + BatFaultEnum current[] = 0; + BatFaultEnum previous[] = 1; + } + + struct WiredFaultChangeType { + WiredFaultEnum current[] = 0; + WiredFaultEnum previous[] = 1; + } + + info event WiredFaultChange = 0 { + WiredFaultEnum current[] = 0; + WiredFaultEnum previous[] = 1; + } + + info event BatFaultChange = 1 { + BatFaultEnum current[] = 0; + BatFaultEnum previous[] = 1; + } + + info event BatChargeFaultChange = 2 { + BatChargeFaultEnum current[] = 0; + BatChargeFaultEnum previous[] = 1; + } + + readonly attribute PowerSourceStatusEnum status = 0; + readonly attribute int8u order = 1; + readonly attribute char_string<60> description = 2; + readonly attribute optional nullable int32u wiredAssessedInputVoltage = 3; + readonly attribute optional nullable int16u wiredAssessedInputFrequency = 4; + readonly attribute optional WiredCurrentTypeEnum wiredCurrentType = 5; + readonly attribute optional nullable int32u wiredAssessedCurrent = 6; + readonly attribute optional int32u wiredNominalVoltage = 7; + readonly attribute optional int32u wiredMaximumCurrent = 8; + readonly attribute optional boolean wiredPresent = 9; + readonly attribute optional WiredFaultEnum activeWiredFaults[] = 10; + readonly attribute optional nullable int32u batVoltage = 11; + readonly attribute optional nullable int8u batPercentRemaining = 12; + readonly attribute optional nullable int32u batTimeRemaining = 13; + readonly attribute optional BatChargeLevelEnum batChargeLevel = 14; + readonly attribute optional boolean batReplacementNeeded = 15; + readonly attribute optional BatReplaceabilityEnum batReplaceability = 16; + readonly attribute optional boolean batPresent = 17; + readonly attribute optional BatFaultEnum activeBatFaults[] = 18; + readonly attribute optional char_string<60> batReplacementDescription = 19; + readonly attribute optional BatCommonDesignationEnum batCommonDesignation = 20; + readonly attribute optional char_string<20> batANSIDesignation = 21; + readonly attribute optional char_string<20> batIECDesignation = 22; + readonly attribute optional BatApprovedChemistryEnum batApprovedChemistry = 23; + readonly attribute optional int32u batCapacity = 24; + readonly attribute optional int8u batQuantity = 25; + readonly attribute optional BatChargeStateEnum batChargeState = 26; + readonly attribute optional nullable int32u batTimeToFullCharge = 27; + readonly attribute optional boolean batFunctionalWhileCharging = 28; + readonly attribute optional nullable int32u batChargingCurrent = 29; + readonly attribute optional BatChargeFaultEnum activeBatChargeFaults[] = 30; + readonly attribute endpoint_no endpointList[] = 31; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + /** This cluster is used to manage global aspects of the Commissioning flow. */ cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set @@ -1544,6 +1803,7 @@ endpoint 0 { } } endpoint 1 { + device type ma_powersource = 17, version 1; device type ma_contactsensor = 21, version 1; binding cluster Binding; @@ -1558,6 +1818,7 @@ endpoint 1 { ram attribute clusterRevision default = 2; handle command Identify; + handle command TriggerEffect; } server cluster Groups { @@ -1592,10 +1853,35 @@ endpoint 1 { callback attribute clusterRevision; } + server cluster PowerSource { + ram attribute status default = 1; + ram attribute order default = 1; + ram attribute description default = "Battery"; + ram attribute batVoltage default = 2590; + ram attribute batPercentRemaining default = 98; + ram attribute batTimeRemaining default = 52560000; + ram attribute batChargeLevel default = 0; + ram attribute batReplacementNeeded default = 0; + ram attribute batReplaceability default = 2; + ram attribute batPresent default = 1; + ram attribute batReplacementDescription default = "2x AA/LR6 Alkaline"; + ram attribute batCommonDesignation default = 2; + ram attribute batApprovedChemistry default = 1; + ram attribute batQuantity; + callback attribute endpointList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0x0A; + ram attribute clusterRevision default = 1; + } + server cluster BooleanState { ram attribute stateValue default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; + callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; diff --git a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap index 40b85db5d09ef7..a47dc3a0b5c53e 100644 --- a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap +++ b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap @@ -2480,13 +2480,21 @@ "profileId": 259, "label": "MA-contactsensor", "name": "MA-contactsensor" + }, + { + "code": 17, + "profileId": 259, + "label": "MA-powersource", + "name": "MA-powersource" } ], "deviceVersions": [ + 1, 1 ], "deviceIdentifiers": [ - 21 + 21, + 17 ], "deviceTypeName": "MA-contactsensor", "deviceTypeCode": 21, @@ -2507,6 +2515,14 @@ "source": "client", "isIncoming": 1, "isEnabled": 1 + }, + { + "name": "TriggerEffect", + "code": 64, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 } ], "attributes": [ @@ -3008,6 +3024,352 @@ } ] }, + { + "name": "Power Source", + "code": 47, + "mfgCode": null, + "define": "POWER_SOURCE_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "Status", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "PowerSourceStatusEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Order", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Description", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "Battery", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatVoltage", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2590", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatPercentRemaining", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "98", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatTimeRemaining", + "code": 13, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "52560000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatChargeLevel", + "code": 14, + "mfgCode": null, + "side": "server", + "type": "BatChargeLevelEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatReplacementNeeded", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatReplaceability", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "BatReplaceabilityEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatPresent", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatReplacementDescription", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2x AA/LR6 Alkaline", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatCommonDesignation", + "code": 20, + "mfgCode": null, + "side": "server", + "type": "BatCommonDesignationEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatApprovedChemistry", + "code": 23, + "mfgCode": null, + "side": "server", + "type": "BatApprovedChemistryEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatQuantity", + "code": 25, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EndpointList", + "code": 31, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0A", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, { "name": "Boolean State", "code": 69, @@ -3064,6 +3426,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "AttributeList", "code": 65531, @@ -3129,7 +3507,7 @@ { "endpointTypeName": "Anonymous Endpoint Type", "endpointTypeIndex": 1, - "profileId": 260, + "profileId": 259, "endpointId": 1, "networkId": 0, "parentEndpointIdentifier": null From a7645314fa1e4aa28c889453a7dd4bd66bbd8118 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Fri, 12 Apr 2024 00:47:33 -0400 Subject: [PATCH 044/468] Fix bootstrap if repository path contains symlinks. (#32945) Pigweed seems to fail with: ERROR at /home/angus/projects/connectedhomeip/third_party/pigweed/repo/pw_build/facade.gni:187:7: Assertion failed. assert(_dep_is_in_link_dependencies, when the repo path has symlinks in it and bootstrap is run. The workaround is to change to the symlink-resolved path temporarily while doing the pigweed parts of bootstrap.sh. Fixes https://github.com/project-chip/connectedhomeip/issues/31851 --- scripts/setup/bootstrap.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/scripts/setup/bootstrap.sh b/scripts/setup/bootstrap.sh index 23b8087ff54460..16e1f6064c5b90 100644 --- a/scripts/setup/bootstrap.sh +++ b/scripts/setup/bootstrap.sh @@ -167,8 +167,20 @@ EOF # bootstrap or run_in_build_env.sh can be executed in a build env _ORIGINAL_PW_ENVIRONMENT_ROOT="$PW_ENVIRONMENT_ROOT" +# pigweed does not seem to handle pwd involving symlinks very well. +original_pwd=$PWD +if hash realpath 2>/dev/null; then + realpwd="$(realpath "$PWD")" + if [ "$realpwd" != "$PWD" ]; then + echo "Warning: $PWD contains symlinks, using $realpwd instead" + cd "$realpwd" + fi +fi + _bootstrap_or_activate "$0" +cd $original_pwd + if [ "$_ACTION_TAKEN" = "bootstrap" ]; then # By default, install all extra pip dependencies even if slow. -p/--platform # arguments may override this default. From 8b3d00871f57f82babaf3d0fff95400497e25ccc Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Fri, 12 Apr 2024 01:36:31 -0400 Subject: [PATCH 045/468] Remove the MTR_PER_CONTROLLER_STORAGE_ENABLED define. (#32956) This is now enabled unconditionally. Also allows us to remove the wrapper headers we had to allow us to use the per-controller storage bits internally. --- .github/workflows/darwin.yaml | 3 --- src/darwin/Framework/CHIP/MTRDefines.h | 4 --- .../Framework/CHIP/MTRDeviceController.h | 6 ----- .../Framework/CHIP/MTRDeviceController.mm | 9 ------- .../CHIP/MTRDeviceControllerDataStore.h | 6 +---- .../CHIP/MTRDeviceControllerFactory.mm | 7 +----- .../MTRDeviceControllerFactory_Internal.h | 7 +----- .../MTRDeviceControllerLocalTestStorage.h | 4 --- .../MTRDeviceControllerLocalTestStorage.mm | 4 --- .../CHIP/MTRDeviceControllerParameters.h | 14 ----------- .../MTRDeviceControllerParameters_Wrapper.h | 25 ------------------- .../CHIP/MTRDeviceControllerStartupParams.mm | 4 --- ...TRDeviceControllerStartupParams_Internal.h | 4 --- .../CHIP/MTRDeviceControllerStorageDelegate.h | 13 ---------- ...RDeviceControllerStorageDelegate_Wrapper.h | 25 ------------------- .../CHIP/MTRDeviceController_Internal.h | 13 +--------- .../CHIP/ServerEndpoint/MTRServerAttribute.mm | 4 --- .../CHIP/ServerEndpoint/MTRServerCluster.mm | 4 --- .../CHIP/ServerEndpoint/MTRServerEndpoint.mm | 4 --- .../CHIPTests/MTRControllerAdvertisingTests.m | 4 --- .../Framework/CHIPTests/MTRDeviceTests.m | 8 ------ .../CHIPTests/MTRPerControllerStorageTests.m | 4 --- .../TestHelpers/MTRTestPerControllerStorage.h | 4 --- .../TestHelpers/MTRTestPerControllerStorage.m | 4 --- 24 files changed, 4 insertions(+), 180 deletions(-) delete mode 100644 src/darwin/Framework/CHIP/MTRDeviceControllerParameters_Wrapper.h delete mode 100644 src/darwin/Framework/CHIP/MTRDeviceControllerStorageDelegate_Wrapper.h diff --git a/.github/workflows/darwin.yaml b/.github/workflows/darwin.yaml index e857515b11f952..3076f046e3f38f 100644 --- a/.github/workflows/darwin.yaml +++ b/.github/workflows/darwin.yaml @@ -75,9 +75,6 @@ jobs: options: # We don't need a full matrix - flavor: asan arguments: -enableAddressSanitizer YES -enableUndefinedBehaviorSanitizer YES - - flavor: asan-global-storage - arguments: -enableAddressSanitizer YES -enableUndefinedBehaviorSanitizer YES - defines: MTR_PER_CONTROLLER_STORAGE_ENABLED=0 - flavor: tsan arguments: -enableThreadSanitizer YES steps: diff --git a/src/darwin/Framework/CHIP/MTRDefines.h b/src/darwin/Framework/CHIP/MTRDefines.h index fb8fed4f678ab8..ce4e80de8b1a6b 100644 --- a/src/darwin/Framework/CHIP/MTRDefines.h +++ b/src/darwin/Framework/CHIP/MTRDefines.h @@ -102,10 +102,6 @@ #define MTR_UNSTABLE_API _MTR_UNAVAILABLE #endif -#ifndef MTR_PER_CONTROLLER_STORAGE_ENABLED -#define MTR_PER_CONTROLLER_STORAGE_ENABLED 1 -#endif - #pragma mark - Types typedef NSData * MTRTLVBytes; diff --git a/src/darwin/Framework/CHIP/MTRDeviceController.h b/src/darwin/Framework/CHIP/MTRDeviceController.h index ea2f6497a45edb..2662d4b54e0f6d 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController.h +++ b/src/darwin/Framework/CHIP/MTRDeviceController.h @@ -24,9 +24,7 @@ @class MTRBaseDevice; @class MTRServerEndpoint; // Defined in MTRServerEndpoint.h, which imports MTRAccessGrant.h, which imports MTRBaseClusters.h, which imports this file, so we can't import it. -#if MTR_PER_CONTROLLER_STORAGE_ENABLED @class MTRDeviceControllerAbstractParameters; -#endif // MTR_PER_CONTROLLER_STORAGE_ENABLED NS_ASSUME_NONNULL_BEGIN @@ -49,7 +47,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; -#if MTR_PER_CONTROLLER_STORAGE_ENABLED /** * Initialize a device controller with the provided parameters. This will: * @@ -62,19 +59,16 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) */ - (nullable instancetype)initWithParameters:(MTRDeviceControllerAbstractParameters *)parameters error:(NSError * __autoreleasing *)error MTR_NEWLY_AVAILABLE; -#endif // MTR_PER_CONTROLLER_STORAGE_ENABLED /** * If true, the controller has not been shut down yet. */ @property (readonly, nonatomic, getter=isRunning) BOOL running; -#if MTR_PER_CONTROLLER_STORAGE_ENABLED /** * The ID assigned to this controller at creation time. */ @property (readonly, nonatomic) NSUUID * uniqueIdentifier MTR_NEWLY_AVAILABLE; -#endif // MTR_PER_CONTROLLER_STORAGE_ENABLED /** * Return the Node ID assigned to the controller. Will return nil if the diff --git a/src/darwin/Framework/CHIP/MTRDeviceController.mm b/src/darwin/Framework/CHIP/MTRDeviceController.mm index 28a70bd347caf8..4c7c7c7c964659 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceController.mm @@ -15,12 +15,7 @@ * limitations under the License. */ #import - -#if MTR_PER_CONTROLLER_STORAGE_ENABLED #import -#else -#import "MTRDeviceControllerParameters_Wrapper.h" -#endif // MTR_PER_CONTROLLER_STORAGE_ENABLED #import "MTRDeviceController_Internal.h" @@ -169,11 +164,9 @@ - (instancetype)initWithFactory:(MTRDeviceControllerFactory *)factory } id storageDelegateToUse = storageDelegate; -#if MTR_PER_CONTROLLER_STORAGE_ENABLED if (MTRDeviceControllerLocalTestStorage.localTestStorageEnabled) { storageDelegateToUse = [[MTRDeviceControllerLocalTestStorage alloc] initWithPassThroughStorage:storageDelegate]; } -#endif // MTR_PER_CONTROLLER_STORAGE_ENABLED _controllerDataStore = [[MTRDeviceControllerDataStore alloc] initWithController:self storageDelegate:storageDelegateToUse storageDelegateQueue:storageDelegateQueue]; @@ -181,7 +174,6 @@ - (instancetype)initWithFactory:(MTRDeviceControllerFactory *)factory return nil; } } else { -#if MTR_PER_CONTROLLER_STORAGE_ENABLED if (MTRDeviceControllerLocalTestStorage.localTestStorageEnabled) { dispatch_queue_t localTestStorageQueue = dispatch_queue_create("org.csa-iot.matter.framework.devicecontroller.localteststorage", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL); MTRDeviceControllerLocalTestStorage * localTestStorage = [[MTRDeviceControllerLocalTestStorage alloc] initWithPassThroughStorage:nil]; @@ -192,7 +184,6 @@ - (instancetype)initWithFactory:(MTRDeviceControllerFactory *)factory return nil; } } -#endif // MTR_PER_CONTROLLER_STORAGE_ENABLED } // Ensure the otaProviderDelegate, if any, is valid. diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerDataStore.h b/src/darwin/Framework/CHIP/MTRDeviceControllerDataStore.h index c49bc897f6b4c0..27019b06df1acb 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerDataStore.h +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerDataStore.h @@ -17,12 +17,8 @@ #import #import #import -#import -#if MTR_PER_CONTROLLER_STORAGE_ENABLED #import -#else -#import "MTRDeviceControllerStorageDelegate_Wrapper.h" -#endif // MTR_PER_CONTROLLER_STORAGE_ENABLED +#import #include diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm index dccce24e892531..016f1c1d630d72 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm @@ -19,13 +19,8 @@ #import -#if MTR_PER_CONTROLLER_STORAGE_ENABLED -#import -#else -#import "MTRDeviceControllerParameters_Wrapper.h" -#endif // MTR_PER_CONTROLLER_STORAGE_ENABLED - #import +#import #import #import "MTRCertificates.h" diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory_Internal.h b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory_Internal.h index 4e0290bc041860..0f157b8f89092f 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory_Internal.h +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory_Internal.h @@ -24,15 +24,10 @@ #import // for MTRClusterPath #import #import +#import #import #import -#if MTR_PER_CONTROLLER_STORAGE_ENABLED -#import -#else -#import "MTRDeviceControllerParameters_Wrapper.h" -#endif // MTR_PER_CONTROLLER_STORAGE_ENABLED - #import "MTRDeviceControllerFactory.h" #include diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerLocalTestStorage.h b/src/darwin/Framework/CHIP/MTRDeviceControllerLocalTestStorage.h index 92670f1721c3e2..064a4f866c5cc0 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerLocalTestStorage.h +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerLocalTestStorage.h @@ -18,8 +18,6 @@ #import #import -#if MTR_PER_CONTROLLER_STORAGE_ENABLED - NS_ASSUME_NONNULL_BEGIN MTR_EXTERN MTR_EXPORT @interface MTRDeviceControllerLocalTestStorage : NSObject @@ -33,5 +31,3 @@ MTR_EXTERN MTR_EXPORT @interface MTRDeviceControllerLocalTestStorage : NSObject< @end NS_ASSUME_NONNULL_END - -#endif // MTR_PER_CONTROLLER_STORAGE_ENABLED diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerLocalTestStorage.mm b/src/darwin/Framework/CHIP/MTRDeviceControllerLocalTestStorage.mm index 7e3eff8e368567..9ccd651760a47d 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerLocalTestStorage.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerLocalTestStorage.mm @@ -18,8 +18,6 @@ #import "MTRDeviceControllerLocalTestStorage.h" #import "MTRLogging_Internal.h" -#if MTR_PER_CONTROLLER_STORAGE_ENABLED - static NSString * const kLocalTestUserDefaultDomain = @"org.csa-iot.matter.darwintest"; static NSString * const kLocalTestUserDefaultEnabledKey = @"enableTestStorage"; @@ -115,5 +113,3 @@ - (BOOL)controller:(MTRDeviceController *)controller } } @end - -#endif // MTR_PER_CONTROLLER_STORAGE_ENABLED diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerParameters.h b/src/darwin/Framework/CHIP/MTRDeviceControllerParameters.h index 73369cdf0d1361..9c07f3f82dfced 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerParameters.h +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerParameters.h @@ -16,12 +16,6 @@ #import -#if defined(MTR_INTERNAL_INCLUDE) && defined(MTR_INCLUDED_FROM_UMBRELLA_HEADER) -#error Internal includes should not happen from the umbrella header -#endif - -#if MTR_PER_CONTROLLER_STORAGE_ENABLED || defined(MTR_INTERNAL_INCLUDE) - #import #import @@ -32,9 +26,7 @@ NS_ASSUME_NONNULL_BEGIN * interfaces inheriting from this one should be used to actually do the * initialization. */ -#if MTR_PER_CONTROLLER_STORAGE_ENABLED MTR_NEWLY_AVAILABLE -#endif @interface MTRDeviceControllerAbstractParameters : NSObject - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @@ -44,9 +36,7 @@ MTR_NEWLY_AVAILABLE * Parameters that can be used to initialize an MTRDeviceController which * has a node identity. */ -#if MTR_PER_CONTROLLER_STORAGE_ENABLED MTR_NEWLY_AVAILABLE -#endif @interface MTRDeviceControllerParameters : MTRDeviceControllerAbstractParameters /** @@ -89,9 +79,7 @@ MTR_NEWLY_AVAILABLE @end -#if MTR_PER_CONTROLLER_STORAGE_ENABLED MTR_NEWLY_AVAILABLE -#endif @interface MTRDeviceControllerExternalCertificateParameters : MTRDeviceControllerParameters - (instancetype)init NS_UNAVAILABLE; @@ -142,5 +130,3 @@ MTR_NEWLY_AVAILABLE @end NS_ASSUME_NONNULL_END - -#endif // MTR_PER_CONTROLLER_STORAGE_ENABLED || defined(MTR_INTERNAL_INCLUDE) diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerParameters_Wrapper.h b/src/darwin/Framework/CHIP/MTRDeviceControllerParameters_Wrapper.h deleted file mode 100644 index 4f26e1a49c9d18..00000000000000 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerParameters_Wrapper.h +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Copyright (c) 2023 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 - -#if MTR_PER_CONTROLLER_STORAGE_ENABLED -#error Should be including Matter/MTRDeviceControllerParameters.h -#endif // MTR_PER_CONTROLLER_STORAGE_ENABLED - -#define MTR_INTERNAL_INCLUDE -#import -#undef MTR_INTERNAL_INCLUDE diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams.mm b/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams.mm index 74a9681ca3e619..c48c48c4a424d2 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams.mm @@ -23,11 +23,7 @@ #import "MTRP256KeypairBridge.h" #import "NSDataSpanConversion.h" -#if MTR_PER_CONTROLLER_STORAGE_ENABLED #import -#else -#import "MTRDeviceControllerStorageDelegate_Wrapper.h" -#endif // MTR_PER_CONTROLLER_STORAGE_ENABLED #include #include diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams_Internal.h b/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams_Internal.h index 66ced06e8e1673..6b8c762633578a 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams_Internal.h +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams_Internal.h @@ -20,11 +20,7 @@ #import #import #import -#if MTR_PER_CONTROLLER_STORAGE_ENABLED #import -#else -#import "MTRDeviceControllerParameters_Wrapper.h" -#endif // MTR_PER_CONTROLLER_STORAGE_ENABLED #include #include diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerStorageDelegate.h b/src/darwin/Framework/CHIP/MTRDeviceControllerStorageDelegate.h index dd8bdd07366498..bdf9bdb1a44c56 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerStorageDelegate.h +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerStorageDelegate.h @@ -18,12 +18,6 @@ #import #import -#if defined(MTR_INTERNAL_INCLUDE) && defined(MTR_INCLUDED_FROM_UMBRELLA_HEADER) -#error Internal includes should not happen from the umbrella header -#endif - -#if MTR_PER_CONTROLLER_STORAGE_ENABLED || defined(MTR_INTERNAL_INCLUDE) - NS_ASSUME_NONNULL_BEGIN typedef NS_ENUM(NSUInteger, MTRStorageSecurityLevel) { @@ -67,9 +61,7 @@ typedef NS_ENUM(NSUInteger, MTRStorageSharingType) { * stored and calling MTRDeviceControllerStorageClasses(), is likely to lead * to deadlocks. */ -#if MTR_PER_CONTROLLER_STORAGE_ENABLED MTR_NEWLY_AVAILABLE -#endif @protocol MTRDeviceControllerStorageDelegate @required /** @@ -113,13 +105,8 @@ MTR_NEWLY_AVAILABLE sharingType:(MTRStorageSharingType)sharingType; @end -// TODO: FIXME: Is this a sane place to put this API? -#if MTR_PER_CONTROLLER_STORAGE_ENABLED MTR_EXTERN MTR_NEWLY_AVAILABLE -#endif NSSet * MTRDeviceControllerStorageClasses(void); NS_ASSUME_NONNULL_END - -#endif // MTR_PER_CONTROLLER_STORAGE_ENABLED || defined(MTR_INTERNAL_INCLUDE) diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerStorageDelegate_Wrapper.h b/src/darwin/Framework/CHIP/MTRDeviceControllerStorageDelegate_Wrapper.h deleted file mode 100644 index 774fff9f48a179..00000000000000 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerStorageDelegate_Wrapper.h +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Copyright (c) 2023 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 - -#if MTR_PER_CONTROLLER_STORAGE_ENABLED -#error Should be including Matter/MTRDeviceControllerStorageDelegate.h -#endif // MTR_PER_CONTROLLER_STORAGE_ENABLED - -#define MTR_INTERNAL_INCLUDE -#import -#undef MTR_INTERNAL_INCLUDE diff --git a/src/darwin/Framework/CHIP/MTRDeviceController_Internal.h b/src/darwin/Framework/CHIP/MTRDeviceController_Internal.h index b55d41b8d8a59e..aa9c8c1e906ee3 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController_Internal.h +++ b/src/darwin/Framework/CHIP/MTRDeviceController_Internal.h @@ -35,12 +35,8 @@ #import #import -#import -#if MTR_PER_CONTROLLER_STORAGE_ENABLED #import -#else -#import "MTRDeviceControllerStorageDelegate_Wrapper.h" -#endif // MTR_PER_CONTROLLER_STORAGE_ENABLED +#import #import @class MTRDeviceControllerStartupParamsInternal; @@ -59,13 +55,6 @@ NS_ASSUME_NONNULL_BEGIN @interface MTRDeviceController () -#if !MTR_PER_CONTROLLER_STORAGE_ENABLED -/** - * The ID assigned to this controller at creation time. - */ -@property (readonly, nonatomic) NSUUID * uniqueIdentifier; -#endif // MTR_PER_CONTROLLER_STORAGE_ENABLED - #pragma mark - MTRDeviceControllerFactory methods /** diff --git a/src/darwin/Framework/CHIP/ServerEndpoint/MTRServerAttribute.mm b/src/darwin/Framework/CHIP/ServerEndpoint/MTRServerAttribute.mm index 638b6f5ea48e28..ba8eb555cc4214 100644 --- a/src/darwin/Framework/CHIP/ServerEndpoint/MTRServerAttribute.mm +++ b/src/darwin/Framework/CHIP/ServerEndpoint/MTRServerAttribute.mm @@ -173,12 +173,8 @@ - (BOOL)associateWithController:(nullable MTRDeviceController *)controller MTRDeviceController * existingController = _deviceController; if (existingController != nil) { -#if MTR_PER_CONTROLLER_STORAGE_ENABLED MTR_LOG_ERROR("Cannot associate MTRServerAttribute with controller %@; already associated with controller %@", controller.uniqueIdentifier, existingController.uniqueIdentifier); -#else - MTR_LOG_ERROR("Cannot associate MTRServerAttribute with controller; already associated with a different controller"); -#endif return NO; } diff --git a/src/darwin/Framework/CHIP/ServerEndpoint/MTRServerCluster.mm b/src/darwin/Framework/CHIP/ServerEndpoint/MTRServerCluster.mm index 7439c0ff6a453a..df66ebfe0a5d70 100644 --- a/src/darwin/Framework/CHIP/ServerEndpoint/MTRServerCluster.mm +++ b/src/darwin/Framework/CHIP/ServerEndpoint/MTRServerCluster.mm @@ -250,12 +250,8 @@ - (BOOL)associateWithController:(nullable MTRDeviceController *)controller MTRDeviceController * existingController = _deviceController; if (existingController != nil) { -#if MTR_PER_CONTROLLER_STORAGE_ENABLED MTR_LOG_ERROR("Cannot associate MTRServerCluster with controller %@; already associated with controller %@", controller.uniqueIdentifier, existingController.uniqueIdentifier); -#else - MTR_LOG_ERROR("Cannot associate MTRServerCluster with controller; already associated with a different controller"); -#endif return NO; } diff --git a/src/darwin/Framework/CHIP/ServerEndpoint/MTRServerEndpoint.mm b/src/darwin/Framework/CHIP/ServerEndpoint/MTRServerEndpoint.mm index 1d7b466d92d2d9..44da6a6cb6016a 100644 --- a/src/darwin/Framework/CHIP/ServerEndpoint/MTRServerEndpoint.mm +++ b/src/darwin/Framework/CHIP/ServerEndpoint/MTRServerEndpoint.mm @@ -187,12 +187,8 @@ - (BOOL)associateWithController:(nullable MTRDeviceController *)controller { MTRDeviceController * existingController = _deviceController; if (existingController != nil) { -#if MTR_PER_CONTROLLER_STORAGE_ENABLED MTR_LOG_ERROR("Cannot associate MTRServerEndpoint with controller %@; already associated with controller %@", controller.uniqueIdentifier, existingController.uniqueIdentifier); -#else - MTR_LOG_ERROR("Cannot associate MTRServerEndpoint with controller; already associated with a different controller"); -#endif return NO; } diff --git a/src/darwin/Framework/CHIPTests/MTRControllerAdvertisingTests.m b/src/darwin/Framework/CHIPTests/MTRControllerAdvertisingTests.m index b7fa9a1cfa574f..4092a38b56f84e 100644 --- a/src/darwin/Framework/CHIPTests/MTRControllerAdvertisingTests.m +++ b/src/darwin/Framework/CHIPTests/MTRControllerAdvertisingTests.m @@ -24,8 +24,6 @@ #import "MTRTestKeys.h" #import "MTRTestPerControllerStorage.h" -#if MTR_PER_CONTROLLER_STORAGE_ENABLED - static const uint16_t kTestVendorId = 0xFFF1u; static const uint16_t kTimeoutInSeconds = 3; @@ -275,5 +273,3 @@ - (void)test001_CheckAdvertisingAsExpected } @end - -#endif // MTR_PER_CONTROLLER_STORAGE_ENABLED diff --git a/src/darwin/Framework/CHIPTests/MTRDeviceTests.m b/src/darwin/Framework/CHIPTests/MTRDeviceTests.m index 34d39289cd5772..777fb584d24419 100644 --- a/src/darwin/Framework/CHIPTests/MTRDeviceTests.m +++ b/src/darwin/Framework/CHIPTests/MTRDeviceTests.m @@ -119,18 +119,14 @@ @interface MTRDeviceTests : XCTestCase @implementation MTRDeviceTests -#if MTR_PER_CONTROLLER_STORAGE_ENABLED static BOOL slocalTestStorageEnabledBeforeUnitTest; -#endif // MTR_PER_CONTROLLER_STORAGE_ENABLED + (void)setUp { XCTestExpectation * pairingExpectation = [[XCTestExpectation alloc] initWithDescription:@"Pairing Complete"]; -#if MTR_PER_CONTROLLER_STORAGE_ENABLED slocalTestStorageEnabledBeforeUnitTest = MTRDeviceControllerLocalTestStorage.localTestStorageEnabled; MTRDeviceControllerLocalTestStorage.localTestStorageEnabled = YES; -#endif // MTR_PER_CONTROLLER_STORAGE_ENABLED __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; XCTAssertNotNil(factory); @@ -181,13 +177,11 @@ + (void)tearDown { ResetCommissionee(GetConnectedDevice(), dispatch_get_main_queue(), nil, kTimeoutInSeconds); -#if MTR_PER_CONTROLLER_STORAGE_ENABLED // Restore testing setting to previous state, and remove all persisted attributes MTRDeviceControllerLocalTestStorage.localTestStorageEnabled = slocalTestStorageEnabledBeforeUnitTest; [sController.controllerDataStore clearAllStoredAttributes]; NSArray * storedAttributesAfterClear = [sController.controllerDataStore getStoredAttributesForNodeID:@(kDeviceId)]; XCTAssertEqual(storedAttributesAfterClear.count, 0); -#endif // MTR_PER_CONTROLLER_STORAGE_ENABLED MTRDeviceController * controller = sController; XCTAssertNotNil(controller); @@ -2839,7 +2833,6 @@ - (void)test030_DeviceAndClusterProperties XCTAssertEqualObjects(cluster.endpointID, @(0)); } -#if MTR_PER_CONTROLLER_STORAGE_ENABLED - (void)test031_MTRDeviceAttributeCacheLocalTestStorage { dispatch_queue_t queue = dispatch_get_main_queue(); @@ -2912,7 +2905,6 @@ - (void)test031_MTRDeviceAttributeCacheLocalTestStorage NSUInteger storedAttributeCountDifferenceFromMTRDeviceReport = dataStoreValuesAfterSecondSubscription.count - attributesReportedWithSecondSubscription; XCTAssertTrue(storedAttributeCountDifferenceFromMTRDeviceReport > 300); } -#endif // MTR_PER_CONTROLLER_STORAGE_ENABLED - (void)test032_MTRPathClassesEncoding { diff --git a/src/darwin/Framework/CHIPTests/MTRPerControllerStorageTests.m b/src/darwin/Framework/CHIPTests/MTRPerControllerStorageTests.m index fce1ff18b03cf1..3355790c584e83 100644 --- a/src/darwin/Framework/CHIPTests/MTRPerControllerStorageTests.m +++ b/src/darwin/Framework/CHIPTests/MTRPerControllerStorageTests.m @@ -28,8 +28,6 @@ #import "MTRTestPerControllerStorage.h" #import "MTRTestResetCommissioneeHelper.h" -#if MTR_PER_CONTROLLER_STORAGE_ENABLED - static const uint16_t kPairingTimeoutInSeconds = 10; static const uint16_t kTimeoutInSeconds = 3; static NSString * kOnboardingPayload = @"MT:-24J0AFN00KA0648G00"; @@ -1808,5 +1806,3 @@ - (void)testControllerServer } @end - -#endif // MTR_PER_CONTROLLER_STORAGE_ENABLED diff --git a/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestPerControllerStorage.h b/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestPerControllerStorage.h index 427d537e07b485..b3052a9929a1af 100644 --- a/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestPerControllerStorage.h +++ b/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestPerControllerStorage.h @@ -17,8 +17,6 @@ #import #import -#if MTR_PER_CONTROLLER_STORAGE_ENABLED - NS_ASSUME_NONNULL_BEGIN @interface MTRTestPerControllerStorage : NSObject @@ -43,5 +41,3 @@ NS_ASSUME_NONNULL_BEGIN @end NS_ASSUME_NONNULL_END - -#endif // MTR_PER_CONTROLLER_STORAGE_ENABLED diff --git a/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestPerControllerStorage.m b/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestPerControllerStorage.m index 1a453d5eaec281..1898bd14832cf9 100644 --- a/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestPerControllerStorage.m +++ b/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestPerControllerStorage.m @@ -18,8 +18,6 @@ #import "MTRTestPerControllerStorage.h" -#if MTR_PER_CONTROLLER_STORAGE_ENABLED - @interface MTRTestPerControllerStorage () @property (nonatomic, readonly) NSMutableDictionary * storage; @end @@ -85,5 +83,3 @@ - (BOOL)controller:(MTRDeviceController *)controller } @end - -#endif // MTR_PER_CONTROLLER_STORAGE_ENABLED From bcebbc6124620d992ca4a8f7816cafbc42043cf7 Mon Sep 17 00:00:00 2001 From: Wang Qixiang <43193572+wqx6@users.noreply.github.com> Date: Fri, 12 Apr 2024 14:58:30 +0800 Subject: [PATCH 046/468] Enable CONFIG_BUILD_FOR_HOST_UNIT_TEST to fix CHIP test build (#32959) --- .../esp32/main/Kconfig.projbuild | 4 -- .../esp32/main/include/CHIPProjectConfig.h | 38 ------------------- .../esp32/main/Kconfig.projbuild | 4 -- .../esp32/main/include/CHIPProjectConfig.h | 38 ------------------- src/platform/ESP32/CHIPPlatformConfig.h | 6 +++ .../esp32/main/include/CHIPProjectConfig.h | 2 - 6 files changed, 6 insertions(+), 86 deletions(-) delete mode 100644 examples/all-clusters-app/esp32/main/include/CHIPProjectConfig.h delete mode 100644 examples/all-clusters-minimal-app/esp32/main/include/CHIPProjectConfig.h diff --git a/examples/all-clusters-app/esp32/main/Kconfig.projbuild b/examples/all-clusters-app/esp32/main/Kconfig.projbuild index e1d8805e689326..2cec0c32093734 100644 --- a/examples/all-clusters-app/esp32/main/Kconfig.projbuild +++ b/examples/all-clusters-app/esp32/main/Kconfig.projbuild @@ -59,10 +59,6 @@ menu "Demo" depends on IDF_TARGET_ESP32H2 endchoice - config CHIP_PROJECT_CONFIG - string "CHIP Project Configuration file" - default "main/include/CHIPProjectConfig.h" - choice prompt "Rendezvous Mode" default RENDEZVOUS_MODE_BLE if BT_ENABLED diff --git a/examples/all-clusters-app/esp32/main/include/CHIPProjectConfig.h b/examples/all-clusters-app/esp32/main/include/CHIPProjectConfig.h deleted file mode 100644 index 9fff1bd10e67b4..00000000000000 --- a/examples/all-clusters-app/esp32/main/include/CHIPProjectConfig.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * - * Copyright (c) 2023 Project CHIP Authors - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @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 - -/** - * @def CONFIG_BUILD_FOR_HOST_UNIT_TEST - * - * @brief Defines whether we're currently building for unit testing, which enables a set of features - * that are only utilized in those tests. This flag should not be enabled on devices. If you have a test - * that uses this flag, either appropriately conditionalize the entire test on this flag, or to exclude - * the compliation of that test source file entirely. - */ -#define CONFIG_BUILD_FOR_HOST_UNIT_TEST 1 diff --git a/examples/all-clusters-minimal-app/esp32/main/Kconfig.projbuild b/examples/all-clusters-minimal-app/esp32/main/Kconfig.projbuild index 9fe8f460e6b0a4..171af4f0ba2c24 100644 --- a/examples/all-clusters-minimal-app/esp32/main/Kconfig.projbuild +++ b/examples/all-clusters-minimal-app/esp32/main/Kconfig.projbuild @@ -48,10 +48,6 @@ menu "Demo" depends on IDF_TARGET_ESP32C2 endchoice - config CHIP_PROJECT_CONFIG - string "CHIP Project Configuration file" - default "main/include/CHIPProjectConfig.h" - choice prompt "Rendezvous Mode" default RENDEZVOUS_MODE_BLE if BT_ENABLED diff --git a/examples/all-clusters-minimal-app/esp32/main/include/CHIPProjectConfig.h b/examples/all-clusters-minimal-app/esp32/main/include/CHIPProjectConfig.h deleted file mode 100644 index 9fff1bd10e67b4..00000000000000 --- a/examples/all-clusters-minimal-app/esp32/main/include/CHIPProjectConfig.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * - * Copyright (c) 2023 Project CHIP Authors - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @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 - -/** - * @def CONFIG_BUILD_FOR_HOST_UNIT_TEST - * - * @brief Defines whether we're currently building for unit testing, which enables a set of features - * that are only utilized in those tests. This flag should not be enabled on devices. If you have a test - * that uses this flag, either appropriately conditionalize the entire test on this flag, or to exclude - * the compliation of that test source file entirely. - */ -#define CONFIG_BUILD_FOR_HOST_UNIT_TEST 1 diff --git a/src/platform/ESP32/CHIPPlatformConfig.h b/src/platform/ESP32/CHIPPlatformConfig.h index 041b8e99612891..d9012d41da58a8 100644 --- a/src/platform/ESP32/CHIPPlatformConfig.h +++ b/src/platform/ESP32/CHIPPlatformConfig.h @@ -101,3 +101,9 @@ #ifdef CONFIG_CHIP_ENABLE_BDX_LOG_TRANSFER #define CHIP_CONFIG_ENABLE_BDX_LOG_TRANSFER 1 #endif // CONFIG_CHIP_ENABLE_BDX_LOG_TRANSFER + +#ifdef CONFIG_BUILD_CHIP_TESTS +// CHIP tests use APIs that are declared when CONFIG_BUILD_FOR_HOST_UNIT_TEST is enabled +// Enable CONFIG_BUILD_FOR_HOST_UNIT_TEST when building CHIP test binaries +#define CONFIG_BUILD_FOR_HOST_UNIT_TEST 1 +#endif diff --git a/src/test_driver/esp32/main/include/CHIPProjectConfig.h b/src/test_driver/esp32/main/include/CHIPProjectConfig.h index 1e4dc9626b5033..3a25601cfd884e 100644 --- a/src/test_driver/esp32/main/include/CHIPProjectConfig.h +++ b/src/test_driver/esp32/main/include/CHIPProjectConfig.h @@ -30,6 +30,4 @@ // Enable support functions for parsing command-line arguments #define CHIP_CONFIG_ENABLE_ARG_PARSER 1 -#define CONFIG_BUILD_FOR_HOST_UNIT_TEST 1 - #endif // CHIP_PROJECT_CONFIG_H From 4be45dd3db668d5e9098e1890c644431048642d5 Mon Sep 17 00:00:00 2001 From: Thirupathi S <108743108+Thirsrin@users.noreply.github.com> Date: Fri, 12 Apr 2024 19:15:04 +0530 Subject: [PATCH 047/468] DGWIFI_2_1 Beacon Rx count for linux platform (#32963) * added condition for beacon Rx count in DiagnosticDataProviderImpl * Restyled by clang-format --------- Co-authored-by: Restyled.io --- src/platform/Linux/DiagnosticDataProviderImpl.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/platform/Linux/DiagnosticDataProviderImpl.cpp b/src/platform/Linux/DiagnosticDataProviderImpl.cpp index 3802d968d72c94..74f7003676c051 100644 --- a/src/platform/Linux/DiagnosticDataProviderImpl.cpp +++ b/src/platform/Linux/DiagnosticDataProviderImpl.cpp @@ -761,9 +761,12 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiOverrunCount(uint64_t & overrunCou CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiBeaconRxCount(uint32_t & beaconRxCount) { - beaconRxCount = mBeaconRxCount; - - return CHIP_NO_ERROR; + if (DeviceLayer::ConnectivityMgrImpl().IsWiFiManagementStarted()) + { + beaconRxCount = mBeaconRxCount; + return CHIP_NO_ERROR; + } + return CHIP_ERROR_NOT_IMPLEMENTED; } CHIP_ERROR DiagnosticDataProviderImpl::ResetWiFiNetworkDiagnosticsCounts() From d18aede918b645afb152a4dbe3d3eefb9756b169 Mon Sep 17 00:00:00 2001 From: Curtis Rahman <111998767+CuRahman@users.noreply.github.com> Date: Fri, 12 Apr 2024 10:40:53 -0400 Subject: [PATCH 048/468] [Silabs] Moved nvm RebootCount and TotalOperationalHours keys to config (#32917) * Moved nvm counter vals to config vals * Removed getter function * Updated include dir * Restyled by whitespace * Restyled by clang-format * Upaded include directory * Moved MigrateCounterConfigs() to MigrationManager * Added MigrationManager * Updated config key base max val --------- Co-authored-by: Restyled.io --- .../silabs/SilabsDeviceAttestationCreds.cpp | 29 ++++------ .../silabs/DiagnosticDataProviderImpl.cpp | 15 +----- src/platform/silabs/MigrationManager.cpp | 25 ++++++++- src/platform/silabs/MigrationManager.h | 2 + src/platform/silabs/PlatformManagerImpl.h | 4 ++ .../silabs/SiWx917/PlatformManagerImpl.cpp | 28 +++++----- src/platform/silabs/SilabsConfig.h | 54 +++++++++---------- .../silabs/efr32/PlatformManagerImpl.cpp | 28 +++++----- 8 files changed, 95 insertions(+), 90 deletions(-) diff --git a/examples/platform/silabs/SilabsDeviceAttestationCreds.cpp b/examples/platform/silabs/SilabsDeviceAttestationCreds.cpp index bc69573c13286b..810529c26399ab 100644 --- a/examples/platform/silabs/SilabsDeviceAttestationCreds.cpp +++ b/examples/platform/silabs/SilabsDeviceAttestationCreds.cpp @@ -21,6 +21,7 @@ #include #include #include +#include #include #include @@ -171,18 +172,6 @@ DeviceAttestationCredentialsProvider * GetSilabsDacProvider() namespace DeviceLayer { namespace Silabs { -namespace { - -void MigrateUint32(uint32_t old_key, uint32_t new_key) -{ - uint32_t value = 0; - if (SilabsConfig::ConfigValueExists(old_key) && (CHIP_NO_ERROR == SilabsConfig::ReadConfigValue(old_key, value))) - { - SilabsConfig::WriteConfigValue(new_key, value); - } -} - -} // namespace void MigrateDacProvider(void) { @@ -195,14 +184,14 @@ void MigrateDacProvider(void) constexpr uint32_t kOldKey_Creds_CD_Offset = SilabsConfigKey(SilabsConfig::kMatterConfig_KeyBase, 0x27); constexpr uint32_t kOldKey_Creds_CD_Size = SilabsConfigKey(SilabsConfig::kMatterConfig_KeyBase, 0x28); - MigrateUint32(kOldKey_Creds_KeyId, SilabsConfig::kConfigKey_Creds_KeyId); - MigrateUint32(kOldKey_Creds_Base_Addr, SilabsConfig::kConfigKey_Creds_Base_Addr); - MigrateUint32(kOldKey_Creds_DAC_Offset, SilabsConfig::kConfigKey_Creds_DAC_Offset); - MigrateUint32(kOldKey_Creds_DAC_Size, SilabsConfig::kConfigKey_Creds_DAC_Size); - MigrateUint32(kOldKey_Creds_PAI_Offset, SilabsConfig::kConfigKey_Creds_PAI_Offset); - MigrateUint32(kOldKey_Creds_PAI_Size, SilabsConfig::kConfigKey_Creds_PAI_Size); - MigrateUint32(kOldKey_Creds_CD_Offset, SilabsConfig::kConfigKey_Creds_CD_Offset); - MigrateUint32(kOldKey_Creds_CD_Size, SilabsConfig::kConfigKey_Creds_CD_Size); + MigrationManager::MigrateUint32(kOldKey_Creds_KeyId, SilabsConfig::kConfigKey_Creds_KeyId); + MigrationManager::MigrateUint32(kOldKey_Creds_Base_Addr, SilabsConfig::kConfigKey_Creds_Base_Addr); + MigrationManager::MigrateUint32(kOldKey_Creds_DAC_Offset, SilabsConfig::kConfigKey_Creds_DAC_Offset); + MigrationManager::MigrateUint32(kOldKey_Creds_DAC_Size, SilabsConfig::kConfigKey_Creds_DAC_Size); + MigrationManager::MigrateUint32(kOldKey_Creds_PAI_Offset, SilabsConfig::kConfigKey_Creds_PAI_Offset); + MigrationManager::MigrateUint32(kOldKey_Creds_PAI_Size, SilabsConfig::kConfigKey_Creds_PAI_Size); + MigrationManager::MigrateUint32(kOldKey_Creds_CD_Offset, SilabsConfig::kConfigKey_Creds_CD_Offset); + MigrationManager::MigrateUint32(kOldKey_Creds_CD_Size, SilabsConfig::kConfigKey_Creds_CD_Size); } } // namespace Silabs diff --git a/src/platform/silabs/DiagnosticDataProviderImpl.cpp b/src/platform/silabs/DiagnosticDataProviderImpl.cpp index 03afa5efe29487..02668206e26662 100644 --- a/src/platform/silabs/DiagnosticDataProviderImpl.cpp +++ b/src/platform/silabs/DiagnosticDataProviderImpl.cpp @@ -194,20 +194,7 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetUpTime(uint64_t & upTime) 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) - { - 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; + return ConfigurationMgr().GetTotalOperationalHours(totalOperationalHours); } CHIP_ERROR DiagnosticDataProviderImpl::GetActiveHardwareFaults(GeneralFaults & hardwareFaults) diff --git a/src/platform/silabs/MigrationManager.cpp b/src/platform/silabs/MigrationManager.cpp index e07b730e67f048..f78facc938471b 100644 --- a/src/platform/silabs/MigrationManager.cpp +++ b/src/platform/silabs/MigrationManager.cpp @@ -37,7 +37,9 @@ typedef struct #define COUNT_OF(A) (sizeof(A) / sizeof((A)[0])) static migrationData_t migrationTable[] = { - { .migrationGroup = 1, .migrationFunc = MigrateKvsMap }, { .migrationGroup = 2, .migrationFunc = MigrateDacProvider }, + { .migrationGroup = 1, .migrationFunc = MigrateKvsMap }, + { .migrationGroup = 2, .migrationFunc = MigrateDacProvider }, + { .migrationGroup = 3, .migrationFunc = MigrateCounterConfigs }, // add any additional migration neccesary. migrationGroup should stay equal if done in the same commit or increment by 1 for // each new entry. }; @@ -60,6 +62,27 @@ void MigrationManager::applyMigrations() } SilabsConfig::WriteConfigValue(SilabsConfig::kConfigKey_MigrationCounter, completedMigrationGroup); } +void MigrationManager::MigrateUint32(uint32_t old_key, uint32_t new_key) +{ + uint32_t value = 0; + if (SilabsConfig::ConfigValueExists(old_key) && (CHIP_NO_ERROR == SilabsConfig::ReadConfigValue(old_key, value))) + { + if (CHIP_NO_ERROR == SilabsConfig::WriteConfigValue(new_key, value)) + { + // Free memory of old key location + SilabsConfig::ClearConfigValue(old_key); + } + } +} + +void MigrateCounterConfigs(void) +{ + constexpr uint32_t kOldConfigKey_BootCount = SilabsConfigKey(SilabsConfig::kMatterCounter_KeyBase, 0x00); + constexpr uint32_t kOldConfigKey_TotalOperationalHours = SilabsConfigKey(SilabsConfig::kMatterCounter_KeyBase, 0x01); + + MigrationManager::MigrateUint32(kOldConfigKey_BootCount, SilabsConfig::kConfigKey_BootCount); + MigrationManager::MigrateUint32(kOldConfigKey_TotalOperationalHours, SilabsConfig::kConfigKey_TotalOperationalHours); +} MigrationManager & MigrationManager::GetMigrationInstance() { diff --git a/src/platform/silabs/MigrationManager.h b/src/platform/silabs/MigrationManager.h index 708fdb3368feef..69afbf47ac7562 100644 --- a/src/platform/silabs/MigrationManager.h +++ b/src/platform/silabs/MigrationManager.h @@ -31,6 +31,7 @@ class MigrationManager */ static MigrationManager & GetMigrationInstance(); static void applyMigrations(); + static void MigrateUint32(uint32_t old_key, uint32_t new_key); private: MigrationManager(){}; @@ -43,6 +44,7 @@ class MigrationManager */ void MigrateKvsMap(void); void MigrateDacProvider(void); +void MigrateCounterConfigs(void); } // namespace Silabs } // namespace DeviceLayer diff --git a/src/platform/silabs/PlatformManagerImpl.h b/src/platform/silabs/PlatformManagerImpl.h index 7d6eef7cd90ed3..4a0bfdb52c1e81 100644 --- a/src/platform/silabs/PlatformManagerImpl.h +++ b/src/platform/silabs/PlatformManagerImpl.h @@ -68,6 +68,10 @@ class PlatformManagerImpl final : public PlatformManager, public Internal::Gener System::Clock::Timestamp GetStartTime() { return mStartTime; } private: + // ===== Members for internal use + + static void UpdateOperationalHours(System::Layer * systemLayer, void * appState); + // ===== Methods that implement the PlatformManager abstract interface. CHIP_ERROR _InitChipStack(void); diff --git a/src/platform/silabs/SiWx917/PlatformManagerImpl.cpp b/src/platform/silabs/SiWx917/PlatformManagerImpl.cpp index d14947d65af3f3..c3db4afb2510f5 100644 --- a/src/platform/silabs/SiWx917/PlatformManagerImpl.cpp +++ b/src/platform/silabs/SiWx917/PlatformManagerImpl.cpp @@ -41,6 +41,8 @@ #include "AppConfig.h" #include "FreeRTOS.h" +using namespace chip::DeviceLayer::Internal; + namespace chip { namespace DeviceLayer { @@ -111,32 +113,30 @@ CHIP_ERROR PlatformManagerImpl::_InitChipStack(void) err = Internal::GenericPlatformManagerImpl_FreeRTOS::_InitChipStack(); SuccessOrExit(err); + // Start timer to increment TotalOperationalHours every hour + SystemLayer().StartTimer(System::Clock::Seconds32(kSecondsPerHour), UpdateOperationalHours, NULL); + exit: return err; } -void PlatformManagerImpl::_Shutdown() +void PlatformManagerImpl::UpdateOperationalHours(System::Layer * systemLayer, void * appState) { - uint64_t upTime = 0; + uint32_t totalOperationalHours = 0; - if (GetDiagnosticDataProvider().GetUpTime(upTime) == CHIP_NO_ERROR) + if (ConfigurationMgr().GetTotalOperationalHours(totalOperationalHours) == 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"); - } + ConfigurationMgr().StoreTotalOperationalHours(totalOperationalHours + 1); } else { - ChipLogError(DeviceLayer, "Failed to get current uptime since the Node’s last reboot"); + ChipLogError(DeviceLayer, "Failed to get total operational hours of the Node"); } + SystemLayer().StartTimer(System::Clock::Seconds32(kSecondsPerHour), UpdateOperationalHours, NULL); +} +void PlatformManagerImpl::_Shutdown() +{ Internal::GenericPlatformManagerImpl_FreeRTOS::_Shutdown(); } #if CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION diff --git a/src/platform/silabs/SilabsConfig.h b/src/platform/silabs/SilabsConfig.h index 3bd5abfba1b8f3..92a879177530c7 100644 --- a/src/platform/silabs/SilabsConfig.h +++ b/src/platform/silabs/SilabsConfig.h @@ -123,37 +123,37 @@ class SilabsConfig static constexpr Key kConfigKey_Creds_CD_Size = SilabsConfigKey(kMatterFactory_KeyBase, 0x27); static constexpr Key kConfigKey_Test_Event_Trigger_Key = SilabsConfigKey(kMatterFactory_KeyBase, 0x28); // Matter Config Keys - static constexpr Key kConfigKey_ServiceConfig = SilabsConfigKey(kMatterConfig_KeyBase, 0x01); - static constexpr Key kConfigKey_PairedAccountId = SilabsConfigKey(kMatterConfig_KeyBase, 0x02); - static constexpr Key kConfigKey_ServiceId = SilabsConfigKey(kMatterConfig_KeyBase, 0x03); - static constexpr Key kConfigKey_LastUsedEpochKeyId = SilabsConfigKey(kMatterConfig_KeyBase, 0x05); - static constexpr Key kConfigKey_FailSafeArmed = SilabsConfigKey(kMatterConfig_KeyBase, 0x06); - static constexpr Key kConfigKey_GroupKey = SilabsConfigKey(kMatterConfig_KeyBase, 0x07); - static constexpr Key kConfigKey_HardwareVersion = SilabsConfigKey(kMatterConfig_KeyBase, 0x08); - static constexpr Key kConfigKey_RegulatoryLocation = SilabsConfigKey(kMatterConfig_KeyBase, 0x09); - static constexpr Key kConfigKey_CountryCode = SilabsConfigKey(kMatterConfig_KeyBase, 0x0A); - static constexpr Key kConfigKey_WiFiSSID = SilabsConfigKey(kMatterConfig_KeyBase, 0x0C); - static constexpr Key kConfigKey_WiFiPSK = SilabsConfigKey(kMatterConfig_KeyBase, 0x0D); - static constexpr Key kConfigKey_WiFiSEC = SilabsConfigKey(kMatterConfig_KeyBase, 0x0E); - static constexpr Key kConfigKey_GroupKeyBase = SilabsConfigKey(kMatterConfig_KeyBase, 0x0F); - static constexpr Key kConfigKey_LockUser = SilabsConfigKey(kMatterConfig_KeyBase, 0x10); - static constexpr Key kConfigKey_Credential = SilabsConfigKey(kMatterConfig_KeyBase, 0x11); - static constexpr Key kConfigKey_LockUserName = SilabsConfigKey(kMatterConfig_KeyBase, 0x12); - static constexpr Key kConfigKey_CredentialData = SilabsConfigKey(kMatterConfig_KeyBase, 0x13); - static constexpr Key kConfigKey_UserCredentials = SilabsConfigKey(kMatterConfig_KeyBase, 0x14); - static constexpr Key kConfigKey_WeekDaySchedules = SilabsConfigKey(kMatterConfig_KeyBase, 0x15); - static constexpr Key kConfigKey_YearDaySchedules = SilabsConfigKey(kMatterConfig_KeyBase, 0x16); - static constexpr Key kConfigKey_HolidaySchedules = SilabsConfigKey(kMatterConfig_KeyBase, 0x17); - static constexpr Key kConfigKey_OpKeyMap = SilabsConfigKey(kMatterConfig_KeyBase, 0x20); + static constexpr Key kConfigKey_ServiceConfig = SilabsConfigKey(kMatterConfig_KeyBase, 0x01); + static constexpr Key kConfigKey_PairedAccountId = SilabsConfigKey(kMatterConfig_KeyBase, 0x02); + static constexpr Key kConfigKey_ServiceId = SilabsConfigKey(kMatterConfig_KeyBase, 0x03); + static constexpr Key kConfigKey_LastUsedEpochKeyId = SilabsConfigKey(kMatterConfig_KeyBase, 0x05); + static constexpr Key kConfigKey_FailSafeArmed = SilabsConfigKey(kMatterConfig_KeyBase, 0x06); + static constexpr Key kConfigKey_GroupKey = SilabsConfigKey(kMatterConfig_KeyBase, 0x07); + static constexpr Key kConfigKey_HardwareVersion = SilabsConfigKey(kMatterConfig_KeyBase, 0x08); + static constexpr Key kConfigKey_RegulatoryLocation = SilabsConfigKey(kMatterConfig_KeyBase, 0x09); + static constexpr Key kConfigKey_CountryCode = SilabsConfigKey(kMatterConfig_KeyBase, 0x0A); + static constexpr Key kConfigKey_WiFiSSID = SilabsConfigKey(kMatterConfig_KeyBase, 0x0C); + static constexpr Key kConfigKey_WiFiPSK = SilabsConfigKey(kMatterConfig_KeyBase, 0x0D); + static constexpr Key kConfigKey_WiFiSEC = SilabsConfigKey(kMatterConfig_KeyBase, 0x0E); + static constexpr Key kConfigKey_GroupKeyBase = SilabsConfigKey(kMatterConfig_KeyBase, 0x0F); + static constexpr Key kConfigKey_LockUser = SilabsConfigKey(kMatterConfig_KeyBase, 0x10); + static constexpr Key kConfigKey_Credential = SilabsConfigKey(kMatterConfig_KeyBase, 0x11); + static constexpr Key kConfigKey_LockUserName = SilabsConfigKey(kMatterConfig_KeyBase, 0x12); + static constexpr Key kConfigKey_CredentialData = SilabsConfigKey(kMatterConfig_KeyBase, 0x13); + static constexpr Key kConfigKey_UserCredentials = SilabsConfigKey(kMatterConfig_KeyBase, 0x14); + static constexpr Key kConfigKey_WeekDaySchedules = SilabsConfigKey(kMatterConfig_KeyBase, 0x15); + static constexpr Key kConfigKey_YearDaySchedules = SilabsConfigKey(kMatterConfig_KeyBase, 0x16); + static constexpr Key kConfigKey_HolidaySchedules = SilabsConfigKey(kMatterConfig_KeyBase, 0x17); + static constexpr Key kConfigKey_OpKeyMap = SilabsConfigKey(kMatterConfig_KeyBase, 0x20); + static constexpr Key kConfigKey_BootCount = SilabsConfigKey(kMatterConfig_KeyBase, 0x21); + static constexpr Key kConfigKey_TotalOperationalHours = SilabsConfigKey(kMatterConfig_KeyBase, 0x22); static constexpr Key kConfigKey_GroupKeyMax = SilabsConfigKey(kMatterConfig_KeyBase, 0x1E); // Allows 16 Group Keys to be created. // Matter Counter Keys - static constexpr Key kConfigKey_BootCount = SilabsConfigKey(kMatterCounter_KeyBase, 0x00); - static constexpr Key kConfigKey_TotalOperationalHours = SilabsConfigKey(kMatterCounter_KeyBase, 0x01); - static constexpr Key kConfigKey_LifeTimeCounter = SilabsConfigKey(kMatterCounter_KeyBase, 0x02); - static constexpr Key kConfigKey_MigrationCounter = SilabsConfigKey(kMatterCounter_KeyBase, 0x03); + static constexpr Key kConfigKey_LifeTimeCounter = SilabsConfigKey(kMatterCounter_KeyBase, 0x02); + static constexpr Key kConfigKey_MigrationCounter = SilabsConfigKey(kMatterCounter_KeyBase, 0x03); // Matter KVS storage Keys static constexpr Key kConfigKey_KvsStringKeyMap = SilabsConfigKey(kMatterKvs_KeyBase, 0x00); @@ -164,7 +164,7 @@ class SilabsConfig static constexpr Key kMinConfigKey_MatterFactory = SilabsConfigKey(kMatterFactory_KeyBase, 0x00); static constexpr Key kMaxConfigKey_MatterFactory = SilabsConfigKey(kMatterFactory_KeyBase, 0x2F); static constexpr Key kMinConfigKey_MatterConfig = SilabsConfigKey(kMatterConfig_KeyBase, 0x00); - static constexpr Key kMaxConfigKey_MatterConfig = SilabsConfigKey(kMatterConfig_KeyBase, 0x20); + static constexpr Key kMaxConfigKey_MatterConfig = SilabsConfigKey(kMatterConfig_KeyBase, 0x22); // Allows 32 Counters to be created. static constexpr Key kMinConfigKey_MatterCounter = SilabsConfigKey(kMatterCounter_KeyBase, 0x00); diff --git a/src/platform/silabs/efr32/PlatformManagerImpl.cpp b/src/platform/silabs/efr32/PlatformManagerImpl.cpp index 25de6d51d164b2..2ebc64d77babc5 100644 --- a/src/platform/silabs/efr32/PlatformManagerImpl.cpp +++ b/src/platform/silabs/efr32/PlatformManagerImpl.cpp @@ -37,6 +37,8 @@ #include "AppConfig.h" #include "FreeRTOS.h" +using namespace chip::DeviceLayer::Internal; + namespace chip { namespace DeviceLayer { @@ -62,32 +64,30 @@ CHIP_ERROR PlatformManagerImpl::_InitChipStack(void) err = Internal::GenericPlatformManagerImpl_FreeRTOS::_InitChipStack(); SuccessOrExit(err); + // Start timer to increment TotalOperationalHours every hour + SystemLayer().StartTimer(System::Clock::Seconds32(kSecondsPerHour), UpdateOperationalHours, NULL); + exit: return err; } -void PlatformManagerImpl::_Shutdown() +void PlatformManagerImpl::UpdateOperationalHours(System::Layer * systemLayer, void * appState) { - uint64_t upTime = 0; + uint32_t totalOperationalHours = 0; - if (GetDiagnosticDataProvider().GetUpTime(upTime) == CHIP_NO_ERROR) + if (ConfigurationMgr().GetTotalOperationalHours(totalOperationalHours) == 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"); - } + ConfigurationMgr().StoreTotalOperationalHours(totalOperationalHours + 1); } else { - ChipLogError(DeviceLayer, "Failed to get current uptime since the Node’s last reboot"); + ChipLogError(DeviceLayer, "Failed to get total operational hours of the Node"); } + SystemLayer().StartTimer(System::Clock::Seconds32(kSecondsPerHour), UpdateOperationalHours, NULL); +} +void PlatformManagerImpl::_Shutdown() +{ Internal::GenericPlatformManagerImpl_FreeRTOS::_Shutdown(); } #if CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION From d65f3004fbb8553c3e4c8f4cbaede6141be6731a Mon Sep 17 00:00:00 2001 From: achaulk-goog <107196446+achaulk-goog@users.noreply.github.com> Date: Fri, 12 Apr 2024 11:26:40 -0400 Subject: [PATCH 049/468] IWYU chip-tool, add RemoteDataModelLogger.h (#32951) --- .../chip-tool/commands/pairing/GetCommissionerNodeIdCommand.h | 1 + .../commands/pairing/GetCommissionerRootCertificateCommand.h | 1 + examples/chip-tool/commands/pairing/IssueNOCChainCommand.h | 1 + 3 files changed, 3 insertions(+) diff --git a/examples/chip-tool/commands/pairing/GetCommissionerNodeIdCommand.h b/examples/chip-tool/commands/pairing/GetCommissionerNodeIdCommand.h index 9d3d3deabd83d7..a541b1b9fe0f2d 100644 --- a/examples/chip-tool/commands/pairing/GetCommissionerNodeIdCommand.h +++ b/examples/chip-tool/commands/pairing/GetCommissionerNodeIdCommand.h @@ -19,6 +19,7 @@ #pragma once #include "../common/CHIPCommand.h" +#include "../common/RemoteDataModelLogger.h" class GetCommissionerNodeIdCommand : public CHIPCommand { diff --git a/examples/chip-tool/commands/pairing/GetCommissionerRootCertificateCommand.h b/examples/chip-tool/commands/pairing/GetCommissionerRootCertificateCommand.h index 88fa95a139c9ee..f904cbbcfaa0a6 100644 --- a/examples/chip-tool/commands/pairing/GetCommissionerRootCertificateCommand.h +++ b/examples/chip-tool/commands/pairing/GetCommissionerRootCertificateCommand.h @@ -19,6 +19,7 @@ #pragma once #include "../common/CHIPCommand.h" +#include "../common/RemoteDataModelLogger.h" #include "ToTLVCert.h" diff --git a/examples/chip-tool/commands/pairing/IssueNOCChainCommand.h b/examples/chip-tool/commands/pairing/IssueNOCChainCommand.h index 6f18db90631ed7..a04ed4f3e9a27f 100644 --- a/examples/chip-tool/commands/pairing/IssueNOCChainCommand.h +++ b/examples/chip-tool/commands/pairing/IssueNOCChainCommand.h @@ -19,6 +19,7 @@ #pragma once #include "../common/CHIPCommand.h" +#include "../common/RemoteDataModelLogger.h" #include "ToTLVCert.h" From 9d46b23717b37c26b671febdfb881efffca52fce Mon Sep 17 00:00:00 2001 From: Terence Hampson Date: Fri, 12 Apr 2024 12:48:20 -0400 Subject: [PATCH 050/468] Fix python evaluation of arithmetic statements with no spaces (#32911) --- .../matter_yamltests/parser.py | 5 +- .../py_matter_yamltests/test_yaml_parser.py | 89 +++++++++++++++++++ 2 files changed, 92 insertions(+), 2 deletions(-) diff --git a/scripts/py_matter_yamltests/matter_yamltests/parser.py b/scripts/py_matter_yamltests/matter_yamltests/parser.py index 9612d5749d085b..7d8558df89e185 100644 --- a/scripts/py_matter_yamltests/matter_yamltests/parser.py +++ b/scripts/py_matter_yamltests/matter_yamltests/parser.py @@ -1223,7 +1223,8 @@ def _config_variable_substitution(self, value): # But some other tests were relying on the fact that the expression was put 'as if' in # the generated code and was resolved before being sent over the wire. For such # expressions (e.g 'myVar + 1') we need to compute it before sending it over the wire. - tokens = value.split() + delimiter_regex = "(\ |\(|\)|\+|\-|\*|\/|\%)" + tokens = re.split(delimiter_regex, value) if len(tokens) == 0: return value @@ -1240,7 +1241,7 @@ def _config_variable_substitution(self, value): return tokens[0] tokens = [str(token) for token in tokens] - value = ' '.join(tokens) + value = ''.join(tokens) # TODO we should move away from eval. That will mean that we will need to do extra # parsing, but it would be safer then just blindly running eval. return value if not substitution_occured else eval(value) diff --git a/scripts/py_matter_yamltests/test_yaml_parser.py b/scripts/py_matter_yamltests/test_yaml_parser.py index 27472572a96d6b..01784ec7465dd0 100644 --- a/scripts/py_matter_yamltests/test_yaml_parser.py +++ b/scripts/py_matter_yamltests/test_yaml_parser.py @@ -48,6 +48,9 @@ test_enum + + + ''' @@ -175,6 +178,81 @@ value: TestEnum.UnknownEnumValue(0) ''' +_BASIC_ARITHMETIC_ARG_RESULTS = [6, 6, 2, 2, 8, 8, 2, 2, 1] +basic_arithmetic_yaml = ''' +name: Test Cluster Tests + +config: + nodeId: 0x12344321 + cluster: "Test" + endpoint: 1 + myVariable: 4 + +tests: + - label: "Add 2" + command: "IntTest" + arguments: + values: + - name: "arg" + value: myVariable + 2 + + - label: "Add 2 with no space" + command: "IntTest" + arguments: + values: + - name: "arg" + value: myVariable+2 + + - label: "Minus 2" + command: "IntTest" + arguments: + values: + - name: "arg" + value: myVariable - 2 + + - label: "Minus 2 with no space" + command: "IntTest" + arguments: + values: + - name: "arg" + value: myVariable-2 + + - label: "Multiply by 2" + command: "IntTest" + arguments: + values: + - name: "arg" + value: myVariable * 2 + + - label: "Multiply by 2 with no space" + command: "IntTest" + arguments: + values: + - name: "arg" + value: myVariable*2 + + - label: "Divide by 2" + command: "IntTest" + arguments: + values: + - name: "arg" + value: myVariable / 2 + + - label: "Divide by 2 with no space" + command: "IntTest" + arguments: + values: + - name: "arg" + value: myVariable/2 + + - label: "Arithmetic with parentheses" + command: "IntTest" + arguments: + values: + - name: "arg" + value: (myVariable +3)/7 +''' + def mock_open_with_parameter_content(content): file_object = mock_open(read_data=content).return_value @@ -207,6 +285,17 @@ def test_config(self): self.assertEqual(test_step.cluster, 'Test') self.assertEqual(test_step.endpoint, 1) + def test_basic_arithmetic(self): + parser_config = TestParserConfig(None, self._definitions) + + yaml_parser = TestParser(basic_arithmetic_yaml, parser_config) + for idx, test_step in enumerate(yaml_parser.tests): + values = test_step.arguments['values'] + self.assertEqual(len(values), 1) + value = values[0] + self.assertEqual(value['name'], 'arg') + self.assertEqual(value['value'], _BASIC_ARITHMETIC_ARG_RESULTS[idx]) + def test_config_override(self): config_override = {'nodeId': 12345, 'cluster': 'TestOverride', 'endpoint': 4} From 391979edb93074e17efba596cf07e07f1a1671e7 Mon Sep 17 00:00:00 2001 From: Kai Liao <140431279+kliao-csa@users.noreply.github.com> Date: Fri, 12 Apr 2024 10:17:53 -0700 Subject: [PATCH 051/468] 30754 followup (#32922) * Update examples-nxp.yaml * Update examples-cc13xx_26xx.yaml * Update darwin-tests.yaml * Update examples-linux-tv-casting-app.yaml * Update examples-rw61x.yaml --- .github/workflows/darwin-tests.yaml | 2 ++ .github/workflows/examples-cc13xx_26xx.yaml | 2 ++ .github/workflows/examples-linux-tv-casting-app.yaml | 2 ++ .github/workflows/examples-nxp.yaml | 2 ++ .github/workflows/examples-rw61x.yaml | 2 ++ 5 files changed, 10 insertions(+) diff --git a/.github/workflows/darwin-tests.yaml b/.github/workflows/darwin-tests.yaml index 78e06521d973f2..a916250572bb6e 100644 --- a/.github/workflows/darwin-tests.yaml +++ b/.github/workflows/darwin-tests.yaml @@ -16,6 +16,8 @@ name: Darwin Tests on: push: + branches-ignore: + - 'dependabot/**' pull_request: merge_group: workflow_dispatch: diff --git a/.github/workflows/examples-cc13xx_26xx.yaml b/.github/workflows/examples-cc13xx_26xx.yaml index cd045b5cd3d45d..ce8c5a94910c1c 100644 --- a/.github/workflows/examples-cc13xx_26xx.yaml +++ b/.github/workflows/examples-cc13xx_26xx.yaml @@ -16,6 +16,8 @@ name: Build example - TI CC13XX_26XX on: push: + branches-ignore: + - 'dependabot/**' pull_request: merge_group: diff --git a/.github/workflows/examples-linux-tv-casting-app.yaml b/.github/workflows/examples-linux-tv-casting-app.yaml index daba40795f8d87..e7ecb5bdddecc7 100644 --- a/.github/workflows/examples-linux-tv-casting-app.yaml +++ b/.github/workflows/examples-linux-tv-casting-app.yaml @@ -16,6 +16,8 @@ name: Test TV Casting Example on: push: + branches-ignore: + - 'dependabot/**' pull_request: merge_group: diff --git a/.github/workflows/examples-nxp.yaml b/.github/workflows/examples-nxp.yaml index 63165f8db1df31..f6ca62c7011f4c 100644 --- a/.github/workflows/examples-nxp.yaml +++ b/.github/workflows/examples-nxp.yaml @@ -16,6 +16,8 @@ name: Build example - NXP on: push: + branches-ignore: + - 'dependabot/**' pull_request: merge_group: diff --git a/.github/workflows/examples-rw61x.yaml b/.github/workflows/examples-rw61x.yaml index b7d308f577882d..250968a5e1f6c2 100644 --- a/.github/workflows/examples-rw61x.yaml +++ b/.github/workflows/examples-rw61x.yaml @@ -16,6 +16,8 @@ name: Build example - RW61X on: push: + branches-ignore: + - 'dependabot/**' pull_request: merge_group: From ce52971f4127822bcc74308f3478aa7136dcfd65 Mon Sep 17 00:00:00 2001 From: achaulk-goog <107196446+achaulk-goog@users.noreply.github.com> Date: Fri, 12 Apr 2024 14:10:12 -0400 Subject: [PATCH 052/468] IWYU CredentialIssuerCommands.h (#32933) chip::CATValues is defined in CASEAuthTag.h --- examples/chip-tool/commands/common/CredentialIssuerCommands.h | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/chip-tool/commands/common/CredentialIssuerCommands.h b/examples/chip-tool/commands/common/CredentialIssuerCommands.h index afb36773529e1e..fd096b31835723 100644 --- a/examples/chip-tool/commands/common/CredentialIssuerCommands.h +++ b/examples/chip-tool/commands/common/CredentialIssuerCommands.h @@ -20,6 +20,7 @@ #include #include +#include #include #include #include From 07f4b355ba9f635fe6d2036dcab586ff3c9a2b55 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Fri, 12 Apr 2024 14:12:24 -0400 Subject: [PATCH 053/468] Separate out attribute access interface registry/cache, remove free functions from InteractionModelEngine.h (#32954) * Move GetAttributeAccessOverride to the right place * A first pass at decoupling the AttributeAccessOverride * Start adding a bit of registry, update attribute-storage.h * Add the registry include everywhere it was used to register things * Restyle * More definition and usage cleanup * Add include in ember compatibility layer * Cleanup a TODO * Fix linter too * Fix dynamic dispatcher compile * Darwin connectivity manager does not use TLV * Fix include dependency for ESP32 * Remove usage of chip::tlv from connectivity manager: no TLV is used and this was just copy and paste * Fix tizen includes: if you need Wifi enums, cluster-enums.h need including * Fix esp32 build * Fix mbed compile: its impl header had no includes for some reason * Add needed include to InteractiveServer.cpp to fix darwin build * Also include vectore because we use it * Also fix boufallolab includes * Update src/darwin/Framework/CHIP/ServerEndpoint/MTRServerCluster.mm Co-authored-by: Boris Zbarsky * Apply rename suggestion for unregisterAll...ForEndpoint * Apply code review comment: log category switch --------- Co-authored-by: Boris Zbarsky --- .github/workflows/lint.yml | 6 +- .../src/bridged-actions-stub.cpp | 1 + .../all-clusters-common/src/fan-stub.cpp | 1 + .../asr/src/bridged-actions-stub.cpp | 1 + .../bridge-app/esp32/main/DeviceCallbacks.cpp | 1 + .../bridge-app/linux/bridged-actions-stub.cpp | 1 + examples/bridge-app/linux/main.cpp | 1 + .../bridge-app/telink/src/DeviceCallbacks.cpp | 1 + .../chef/common/chef-fan-control-manager.cpp | 1 + .../placeholder/linux/InteractiveServer.cpp | 2 + .../linux/src/bridged-actions-stub.cpp | 1 + src/app/AttributeAccessInterfaceRegistry.cpp | 126 ++++++++++++++++++ src/app/AttributeAccessInterfaceRegistry.h | 54 ++++++++ src/app/BUILD.gn | 28 +++- src/app/InteractionModelEngine.cpp | 1 + src/app/InteractionModelEngine.h | 10 -- src/app/WriteHandler.cpp | 1 + .../access-control-server.cpp | 1 + .../account-login-server.cpp | 1 + .../administrator-commissioning-server.cpp | 1 + .../air-quality-server/air-quality-server.cpp | 1 + .../application-basic-server.cpp | 1 + .../application-launcher-server.cpp | 1 + .../audio-output-server.cpp | 1 + .../basic-information/basic-information.cpp | 1 + src/app/clusters/bindings/bindings.cpp | 1 + .../boolean-state-configuration-server.cpp | 1 + .../channel-server/channel-server.cpp | 1 + .../concentration-measurement-server.h | 1 + .../content-launch-server.cpp | 1 + src/app/clusters/descriptor/descriptor.cpp | 1 + .../device-energy-management-server.cpp | 1 + .../door-lock-server/door-lock-server.cpp | 1 + .../electrical-energy-measurement-server.cpp | 1 + .../electrical-power-measurement-server.cpp | 1 + .../energy-evse-server/energy-evse-server.cpp | 1 + .../energy-preference-server.cpp | 1 + .../ethernet-network-diagnostics-server.cpp | 1 + .../fixed-label-server/fixed-label-server.cpp | 1 + .../general-commissioning-server.cpp | 1 + .../general-diagnostics-server.cpp | 1 + .../group-key-mgmt-server.cpp | 1 + .../icd-management-server.cpp | 1 + .../keypad-input-server.cpp | 1 + .../laundry-dryer-controls-server.cpp | 1 + .../laundry-washer-controls-server.cpp | 1 + .../localization-configuration-server.cpp | 1 + .../media-input-server/media-input-server.cpp | 1 + .../media-playback-server.cpp | 1 + .../messages-server/messages-server.cpp | 1 + .../microwave-oven-control-server.cpp | 1 + .../mode-base-server/mode-base-server.cpp | 1 + .../mode-select-server/mode-select-server.cpp | 1 + .../network-commissioning.cpp | 1 + .../operational-credentials-server.cpp | 1 + .../operational-state-server.cpp | 1 + .../ota-requestor/ota-requestor-server.cpp | 1 + .../power-source-configuration-server.cpp | 1 + .../power-source-server.cpp | 1 + .../power-topology-server.cpp | 1 + .../resource-monitoring-server.cpp | 1 + .../sample-mei-server/sample-mei-server.cpp | 1 + .../clusters/scenes-server/scenes-server.cpp | 1 + .../software-diagnostics-server.cpp | 1 + .../target-navigator-server.cpp | 1 + .../temperature-control-server.cpp | 1 + .../test-cluster-server.cpp | 1 + .../thermostat-server/thermostat-server.cpp | 1 + .../thread-network-diagnostics-server.cpp | 1 + .../time-format-localization-server.cpp | 1 + .../time-synchronization-server.cpp | 1 + .../user-label-server/user-label-server.cpp | 1 + ...valve-configuration-and-control-server.cpp | 1 + .../wake-on-lan-server/wake-on-lan-server.cpp | 1 + .../wifi-network-diagnostics-server.cpp | 1 + src/app/dynamic_server/DynamicDispatcher.cpp | 8 -- src/app/icd/server/ICDManager.cpp | 1 - src/app/icd/server/ICDManager.h | 2 +- src/app/util/IMClusterCommandHandler.h | 38 ++++++ src/app/util/af-types.h | 1 - src/app/util/attribute-storage.cpp | 97 +------------- src/app/util/attribute-storage.h | 19 --- src/app/util/ember-compatibility-functions.h | 1 + src/app/util/mock/attribute-storage.cpp | 5 - src/controller/tests/TestEventChunking.cpp | 1 + src/controller/tests/TestReadChunking.cpp | 1 + src/controller/tests/TestWriteChunking.cpp | 1 + .../CHIP/ServerEndpoint/MTRServerCluster.mm | 3 +- src/include/platform/ConnectivityManager.h | 1 - src/include/platform/ThreadStackManager.h | 1 - .../GenericConnectivityManagerImpl_NoThread.h | 1 - .../GenericConnectivityManagerImpl_Thread.h | 1 - src/platform/ASR/ConnectivityManagerImpl.cpp | 1 - .../Ameba/ConnectivityManagerImpl.cpp | 1 - .../Beken/ConnectivityManagerImpl.cpp | 1 - .../Darwin/ConnectivityManagerImpl.cpp | 3 - src/platform/ESP32/BLEManagerImpl.h | 2 + .../ESP32/ConnectivityManagerImpl.cpp | 1 - .../ConnectivityManagerImpl_Ethernet.cpp | 1 - .../ESP32/ConnectivityManagerImpl_WiFi.cpp | 1 - .../ESP32/KeyValueStoreManagerImpl.cpp | 2 +- .../PSOC6/ConnectivityManagerImpl.cpp | 1 - .../Linux/ConnectivityManagerImpl.cpp | 1 - src/platform/Linux/ThreadStackManagerImpl.cpp | 1 - src/platform/Linux/ThreadStackManagerImpl.h | 1 - src/platform/Tizen/ConnectivityManagerImpl.h | 2 + .../Tizen/DiagnosticDataProviderImpl.h | 2 + src/platform/Tizen/ThreadStackManagerImpl.cpp | 1 - src/platform/Tizen/ThreadStackManagerImpl.h | 1 - .../Zephyr/ConnectivityManagerImpl.cpp | 1 - .../wifi/ConnectivityManagerImplWiFi.cpp | 1 - .../android/ConnectivityManagerImpl.cpp | 1 - .../bouffalolab/common/BLEManagerImpl.h | 5 +- .../common/ConnectivityManagerImpl.cpp | 1 - .../cc13xx_26xx/ConnectivityManagerImpl.cpp | 1 - .../cc32xx/ConnectivityManagerImpl.cpp | 1 - src/platform/mbed/BLEManagerImpl.h | 4 + .../mt793x/ConnectivityManagerImpl.cpp | 1 - .../mt793x/ConnectivityManagerImpl_WIFI.cpp | 1 - .../wifi/ConnectivityManagerImplWiFi.cpp | 1 - .../nxp/common/ConnectivityManagerImpl.cpp | 1 - .../k32w/k32w0/ConnectivityManagerImpl.cpp | 1 - .../k32w/k32w1/ConnectivityManagerImpl.cpp | 1 - .../nxp/mw320/ConnectivityManagerImpl.cpp | 1 - .../nxp/zephyr/ConnectivityManagerImpl.cpp | 1 - src/platform/qpg/ConnectivityManagerImpl.cpp | 1 - .../silabs/ConnectivityManagerImpl_WIFI.cpp | 1 - .../silabs/efr32/ConnectivityManagerImpl.cpp | 1 - .../stm32/ConnectivityManagerImpl.cpp | 1 - .../telink/ConnectivityManagerImpl.cpp | 1 - .../webos/ConnectivityManagerImpl.cpp | 1 - src/platform/webos/ThreadStackManagerImpl.cpp | 1 - src/platform/webos/ThreadStackManagerImpl.h | 1 - 133 files changed, 337 insertions(+), 194 deletions(-) create mode 100644 src/app/AttributeAccessInterfaceRegistry.cpp create mode 100644 src/app/AttributeAccessInterfaceRegistry.h create mode 100644 src/app/util/IMClusterCommandHandler.h diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 576e2dab268229..4fbaab2a46a675 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -96,7 +96,6 @@ jobs: --known-failure app/app-platform/ContentAppPlatform.h \ --known-failure controller/ExamplePersistentStorage.cpp \ --known-failure controller/ExamplePersistentStorage.h \ - --known-failure app/AttributeAccessInterface.h \ --known-failure app/AttributeAccessToken.h \ --known-failure app/CommandHandler.h \ --known-failure app/CommandHandlerInterface.h \ @@ -107,11 +106,11 @@ jobs: --known-failure app/reporting/tests/MockReportScheduler.cpp \ --known-failure app/reporting/tests/MockReportScheduler.h \ --known-failure app/util/attribute-storage.cpp \ - --known-failure app/util/attribute-storage.h \ --known-failure app/util/attribute-storage-detail.h \ + --known-failure app/util/attribute-storage.h \ --known-failure app/util/attribute-table.cpp \ - --known-failure app/util/attribute-table.h \ --known-failure app/util/attribute-table-detail.h \ + --known-failure app/util/attribute-table.h \ --known-failure app/util/binding-table.cpp \ --known-failure app/util/binding-table.h \ --known-failure app/util/config.h \ @@ -123,6 +122,7 @@ jobs: --known-failure app/util/generic-callbacks.h \ --known-failure app/util/generic-callback-stubs.cpp \ --known-failure app/util/im-client-callbacks.h \ + --known-failure app/util/IMClusterCommandHandler.h \ --known-failure app/util/util.cpp \ --known-failure app/util/util.h \ --known-failure app/WriteHandler.h \ diff --git a/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp b/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp index 13c0205a4e3ca1..41171d760d0048 100644 --- a/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp +++ b/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include diff --git a/examples/all-clusters-app/all-clusters-common/src/fan-stub.cpp b/examples/all-clusters-app/all-clusters-common/src/fan-stub.cpp index 9a9fcccd73f4f2..9309b597db434f 100644 --- a/examples/all-clusters-app/all-clusters-common/src/fan-stub.cpp +++ b/examples/all-clusters-app/all-clusters-common/src/fan-stub.cpp @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include diff --git a/examples/bridge-app/asr/src/bridged-actions-stub.cpp b/examples/bridge-app/asr/src/bridged-actions-stub.cpp index b63fee3fd300a7..9e26bae9803fa1 100755 --- a/examples/bridge-app/asr/src/bridged-actions-stub.cpp +++ b/examples/bridge-app/asr/src/bridged-actions-stub.cpp @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include diff --git a/examples/bridge-app/esp32/main/DeviceCallbacks.cpp b/examples/bridge-app/esp32/main/DeviceCallbacks.cpp index b54c8b4ebb3934..13ced6a2e1c7c6 100644 --- a/examples/bridge-app/esp32/main/DeviceCallbacks.cpp +++ b/examples/bridge-app/esp32/main/DeviceCallbacks.cpp @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include diff --git a/examples/bridge-app/linux/bridged-actions-stub.cpp b/examples/bridge-app/linux/bridged-actions-stub.cpp index 6127df0206a4d0..00f6913b8012c5 100644 --- a/examples/bridge-app/linux/bridged-actions-stub.cpp +++ b/examples/bridge-app/linux/bridged-actions-stub.cpp @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include diff --git a/examples/bridge-app/linux/main.cpp b/examples/bridge-app/linux/main.cpp index 3016ece7a2e768..3643f5ea1eb02a 100644 --- a/examples/bridge-app/linux/main.cpp +++ b/examples/bridge-app/linux/main.cpp @@ -22,6 +22,7 @@ #include #include +#include #include #include #include diff --git a/examples/bridge-app/telink/src/DeviceCallbacks.cpp b/examples/bridge-app/telink/src/DeviceCallbacks.cpp index 6742953d7ec2d2..b0657e586fabc2 100644 --- a/examples/bridge-app/telink/src/DeviceCallbacks.cpp +++ b/examples/bridge-app/telink/src/DeviceCallbacks.cpp @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include diff --git a/examples/chef/common/chef-fan-control-manager.cpp b/examples/chef/common/chef-fan-control-manager.cpp index 998491d4a61aeb..899892501bf4f1 100644 --- a/examples/chef/common/chef-fan-control-manager.cpp +++ b/examples/chef/common/chef-fan-control-manager.cpp @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include diff --git a/examples/placeholder/linux/InteractiveServer.cpp b/examples/placeholder/linux/InteractiveServer.cpp index e9ca422d016f42..10d82ba5a902bc 100644 --- a/examples/placeholder/linux/InteractiveServer.cpp +++ b/examples/placeholder/linux/InteractiveServer.cpp @@ -19,11 +19,13 @@ #include "InteractiveServer.h" #include +#include #include #include #include #include +#include using namespace chip::DeviceLayer; diff --git a/examples/placeholder/linux/src/bridged-actions-stub.cpp b/examples/placeholder/linux/src/bridged-actions-stub.cpp index 5df0ba11f74011..ea6e824738a857 100644 --- a/examples/placeholder/linux/src/bridged-actions-stub.cpp +++ b/examples/placeholder/linux/src/bridged-actions-stub.cpp @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include diff --git a/src/app/AttributeAccessInterfaceRegistry.cpp b/src/app/AttributeAccessInterfaceRegistry.cpp new file mode 100644 index 00000000000000..b2c885fc4b2e2b --- /dev/null +++ b/src/app/AttributeAccessInterfaceRegistry.cpp @@ -0,0 +1,126 @@ +/** + * Copyright (c) 2024 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include + +#include + +using namespace chip::app; + +namespace { + +AttributeAccessInterface * gAttributeAccessOverrides = nullptr; +AttributeAccessInterfaceCache gAttributeAccessInterfaceCache; + +// shouldUnregister returns true if the given AttributeAccessInterface should be +// unregistered. +template +void UnregisterMatchingAttributeAccessInterfaces(F shouldUnregister) +{ + AttributeAccessInterface * prev = nullptr; + AttributeAccessInterface * cur = gAttributeAccessOverrides; + while (cur) + { + AttributeAccessInterface * next = cur->GetNext(); + if (shouldUnregister(cur)) + { + // Remove it from the list + if (prev) + { + prev->SetNext(next); + } + else + { + gAttributeAccessOverrides = next; + } + + cur->SetNext(nullptr); + + // Do not change prev in this case. + } + else + { + prev = cur; + } + cur = next; + } +} + +} // namespace + +void unregisterAttributeAccessOverride(AttributeAccessInterface * attrOverride) +{ + gAttributeAccessInterfaceCache.Invalidate(); + UnregisterMatchingAttributeAccessInterfaces([attrOverride](AttributeAccessInterface * entry) { return entry == attrOverride; }); +} + +void unregisterAllAttributeAccessOverridesForEndpoint(EmberAfDefinedEndpoint * definedEndpoint) +{ + UnregisterMatchingAttributeAccessInterfaces( + [endpoint = definedEndpoint->endpoint](AttributeAccessInterface * entry) { return entry->MatchesEndpoint(endpoint); }); +} + +bool registerAttributeAccessOverride(AttributeAccessInterface * attrOverride) +{ + gAttributeAccessInterfaceCache.Invalidate(); + for (auto * cur = gAttributeAccessOverrides; cur; cur = cur->GetNext()) + { + if (cur->Matches(*attrOverride)) + { + ChipLogError(InteractionModel, "Duplicate attribute override registration failed"); + return false; + } + } + attrOverride->SetNext(gAttributeAccessOverrides); + gAttributeAccessOverrides = attrOverride; + return true; +} + +namespace chip { +namespace app { + +app::AttributeAccessInterface * GetAttributeAccessOverride(EndpointId endpointId, ClusterId clusterId) +{ + using CacheResult = AttributeAccessInterfaceCache::CacheResult; + + AttributeAccessInterface * cached = nullptr; + CacheResult result = gAttributeAccessInterfaceCache.Get(endpointId, clusterId, &cached); + switch (result) + { + case CacheResult::kDefinitelyUnused: + return nullptr; + case CacheResult::kDefinitelyUsed: + return cached; + case CacheResult::kCacheMiss: + default: + // Did not cache yet, search set of AAI registered, and cache if found. + for (app::AttributeAccessInterface * cur = gAttributeAccessOverrides; cur; cur = cur->GetNext()) + { + if (cur->Matches(endpointId, clusterId)) + { + gAttributeAccessInterfaceCache.MarkUsed(endpointId, clusterId, cur); + return cur; + } + } + + // Did not find AAI registered: mark as definitely not using. + gAttributeAccessInterfaceCache.MarkUnused(endpointId, clusterId); + } + + return nullptr; +} + +} // namespace app +} // namespace chip diff --git a/src/app/AttributeAccessInterfaceRegistry.h b/src/app/AttributeAccessInterfaceRegistry.h new file mode 100644 index 00000000000000..f8452214cbf5f9 --- /dev/null +++ b/src/app/AttributeAccessInterfaceRegistry.h @@ -0,0 +1,54 @@ +/** + * Copyright (c) 2024 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 + +/** + * Register an attribute access override. It will remain registered until the + * endpoint it's registered for is disabled (or until shutdown if it's + * registered for all endpoints) or until it is explicitly unregistered. + * Registration will fail if there is an already-registered override for the + * same set of attributes. + * + * @return false if there is an existing override that the new one would + * conflict with. In this case the override is not registered. + * @return true if registration was successful. + */ +bool registerAttributeAccessOverride(chip::app::AttributeAccessInterface * attrOverride); + +/** + * Unregister an attribute access override (for example if the object + * implementing AttributeAccessInterface is being destroyed). + */ +void unregisterAttributeAccessOverride(chip::app::AttributeAccessInterface * attrOverride); + +/** + * Unregister all attribute access interfaces that match this given endpoint. + */ +void unregisterAllAttributeAccessOverridesForEndpoint(EmberAfDefinedEndpoint * definedEndpoint); + +namespace chip { +namespace app { + +/** + * Get the registered attribute access override. nullptr when attribute access override is not found. + */ +AttributeAccessInterface * GetAttributeAccessOverride(EndpointId aEndpointId, ClusterId aClusterId); + +} // namespace app +} // namespace chip diff --git a/src/app/BUILD.gn b/src/app/BUILD.gn index 76bd115a851a21..f368f068445d39 100644 --- a/src/app/BUILD.gn +++ b/src/app/BUILD.gn @@ -275,14 +275,32 @@ source_set("events") { ] } +static_library("attribute-access") { + sources = [ + "AttributeAccessInterface.cpp", + "AttributeAccessInterface.h", + "AttributeAccessInterfaceCache.h", + "AttributeAccessInterfaceRegistry.cpp", + "AttributeAccessInterfaceRegistry.h", + ] + + deps = [ + ":paths", + "${chip_root}/src/access:types", + "${chip_root}/src/app/MessageDef", + "${chip_root}/src/app/data-model", + "${chip_root}/src/app/util:af-types", + "${chip_root}/src/lib/core", + "${chip_root}/src/lib/support", + ] +} + # Note to developpers, instead of continuously adding files in the app librabry, it is recommand to create smaller source_sets that app can depend on. # This way, we can have a better understanding of dependencies and other componenets can depend on the different source_sets without needing to depend on the entire app library. static_library("app") { output_name = "libCHIPDataModel" sources = [ - "AttributeAccessInterface.cpp", - "AttributeAccessInterfaceCache.h", "AttributePathExpandIterator.cpp", "AttributePathExpandIterator.h", "AttributePersistenceProvider.h", @@ -315,15 +333,11 @@ static_library("app") { # "CommandHandler._h" # "ReadHandler._h", # "WriteHandler._h" - - # TODO: the following items cannot be included due to platform includes not being - # able to depend on src/app - # Name with _ so that linter does not recognize it - # "_AttributeAccessInterface._h", ] public_deps = [ ":app_config", + ":attribute-access", ":constants", ":global-attributes", ":interaction-model", diff --git a/src/app/InteractionModelEngine.cpp b/src/app/InteractionModelEngine.cpp index d0b020caf96315..64c06f92354f48 100644 --- a/src/app/InteractionModelEngine.cpp +++ b/src/app/InteractionModelEngine.cpp @@ -31,6 +31,7 @@ #include "access/SubjectDescriptor.h" #include #include +#include #include #include #include diff --git a/src/app/InteractionModelEngine.h b/src/app/InteractionModelEngine.h index 935bca002b0dd1..baf02c6af73d1c 100644 --- a/src/app/InteractionModelEngine.h +++ b/src/app/InteractionModelEngine.h @@ -712,15 +712,5 @@ class InteractionModelEngine : public Messaging::UnsolicitedMessageHandler, uint32_t mMagic = 0; }; -void DispatchSingleClusterCommand(const ConcreteCommandPath & aCommandPath, chip::TLV::TLVReader & aReader, - CommandHandler * apCommandObj); - -/** - * Get the registered attribute access override. nullptr when attribute access override is not found. - * - * TODO(#16806): This function and registerAttributeAccessOverride can be member functions of InteractionModelEngine. - */ -AttributeAccessInterface * GetAttributeAccessOverride(EndpointId aEndpointId, ClusterId aClusterId); - } // namespace app } // namespace chip diff --git a/src/app/WriteHandler.cpp b/src/app/WriteHandler.cpp index 911c2f594095cd..f7f3ee1c8ae7ae 100644 --- a/src/app/WriteHandler.cpp +++ b/src/app/WriteHandler.cpp @@ -18,6 +18,7 @@ #include "messaging/ExchangeContext.h" #include +#include #include #include #include diff --git a/src/app/clusters/access-control-server/access-control-server.cpp b/src/app/clusters/access-control-server/access-control-server.cpp index 20fb879186a21c..316825bc91848c 100644 --- a/src/app/clusters/access-control-server/access-control-server.cpp +++ b/src/app/clusters/access-control-server/access-control-server.cpp @@ -20,6 +20,7 @@ #include #include +#include #include #include #include diff --git a/src/app/clusters/account-login-server/account-login-server.cpp b/src/app/clusters/account-login-server/account-login-server.cpp index a41f8897e86a9a..95d94fe9b995a5 100644 --- a/src/app/clusters/account-login-server/account-login-server.cpp +++ b/src/app/clusters/account-login-server/account-login-server.cpp @@ -26,6 +26,7 @@ #include #include +#include #include #include #include diff --git a/src/app/clusters/administrator-commissioning-server/administrator-commissioning-server.cpp b/src/app/clusters/administrator-commissioning-server/administrator-commissioning-server.cpp index 1bfa13b6eb91bb..83a0b04281b1ad 100644 --- a/src/app/clusters/administrator-commissioning-server/administrator-commissioning-server.cpp +++ b/src/app/clusters/administrator-commissioning-server/administrator-commissioning-server.cpp @@ -22,6 +22,7 @@ #include #include +#include #include #include #include diff --git a/src/app/clusters/air-quality-server/air-quality-server.cpp b/src/app/clusters/air-quality-server/air-quality-server.cpp index f9ff17bc4fe53f..811c4722c94fec 100644 --- a/src/app/clusters/air-quality-server/air-quality-server.cpp +++ b/src/app/clusters/air-quality-server/air-quality-server.cpp @@ -18,6 +18,7 @@ #include "app-common/zap-generated/ids/Clusters.h" #include +#include #include #include #include diff --git a/src/app/clusters/application-basic-server/application-basic-server.cpp b/src/app/clusters/application-basic-server/application-basic-server.cpp index 20daa3aff23363..3841b81873660b 100644 --- a/src/app/clusters/application-basic-server/application-basic-server.cpp +++ b/src/app/clusters/application-basic-server/application-basic-server.cpp @@ -26,6 +26,7 @@ #include #include +#include #include #include #include diff --git a/src/app/clusters/application-launcher-server/application-launcher-server.cpp b/src/app/clusters/application-launcher-server/application-launcher-server.cpp index 2cc461a80c752b..ed6265e47c485b 100644 --- a/src/app/clusters/application-launcher-server/application-launcher-server.cpp +++ b/src/app/clusters/application-launcher-server/application-launcher-server.cpp @@ -29,6 +29,7 @@ #include #include +#include #include #include #include diff --git a/src/app/clusters/audio-output-server/audio-output-server.cpp b/src/app/clusters/audio-output-server/audio-output-server.cpp index 297d1ea9d8d8b3..19d34b0ebb5718 100644 --- a/src/app/clusters/audio-output-server/audio-output-server.cpp +++ b/src/app/clusters/audio-output-server/audio-output-server.cpp @@ -27,6 +27,7 @@ #include #include +#include #include #include #include diff --git a/src/app/clusters/basic-information/basic-information.cpp b/src/app/clusters/basic-information/basic-information.cpp index 91eef9d9dae899..b550026b5f1cd7 100644 --- a/src/app/clusters/basic-information/basic-information.cpp +++ b/src/app/clusters/basic-information/basic-information.cpp @@ -20,6 +20,7 @@ #include #include +#include #include #include #include diff --git a/src/app/clusters/bindings/bindings.cpp b/src/app/clusters/bindings/bindings.cpp index f11ce51da2aa90..63b085d7ee6de4 100644 --- a/src/app/clusters/bindings/bindings.cpp +++ b/src/app/clusters/bindings/bindings.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include diff --git a/src/app/clusters/boolean-state-configuration-server/boolean-state-configuration-server.cpp b/src/app/clusters/boolean-state-configuration-server/boolean-state-configuration-server.cpp index bd9a2554094272..3eb3b1216a38c7 100644 --- a/src/app/clusters/boolean-state-configuration-server/boolean-state-configuration-server.cpp +++ b/src/app/clusters/boolean-state-configuration-server/boolean-state-configuration-server.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include diff --git a/src/app/clusters/channel-server/channel-server.cpp b/src/app/clusters/channel-server/channel-server.cpp index 13743d875cfb42..01a1af2d3710de 100644 --- a/src/app/clusters/channel-server/channel-server.cpp +++ b/src/app/clusters/channel-server/channel-server.cpp @@ -17,6 +17,7 @@ #include #include +#include #include #include #include diff --git a/src/app/clusters/concentration-measurement-server/concentration-measurement-server.h b/src/app/clusters/concentration-measurement-server/concentration-measurement-server.h index 984eefee065fd2..c903b21c2306fd 100644 --- a/src/app/clusters/concentration-measurement-server/concentration-measurement-server.h +++ b/src/app/clusters/concentration-measurement-server/concentration-measurement-server.h @@ -20,6 +20,7 @@ #include "concentration-measurement-cluster-objects.h" #include +#include #include #include #include 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 ed2f5fa7627bac..2e4fb7435c0be9 100644 --- a/src/app/clusters/content-launch-server/content-launch-server.cpp +++ b/src/app/clusters/content-launch-server/content-launch-server.cpp @@ -20,6 +20,7 @@ #include #include +#include #include #include #include diff --git a/src/app/clusters/descriptor/descriptor.cpp b/src/app/clusters/descriptor/descriptor.cpp index d3badfb36ac5db..514051226fdcf5 100644 --- a/src/app/clusters/descriptor/descriptor.cpp +++ b/src/app/clusters/descriptor/descriptor.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include diff --git a/src/app/clusters/device-energy-management-server/device-energy-management-server.cpp b/src/app/clusters/device-energy-management-server/device-energy-management-server.cpp index 7836e91295412f..da1fd23d151987 100644 --- a/src/app/clusters/device-energy-management-server/device-energy-management-server.cpp +++ b/src/app/clusters/device-energy-management-server/device-energy-management-server.cpp @@ -17,6 +17,7 @@ #include "device-energy-management-server.h" #include +#include #include #include #include diff --git a/src/app/clusters/door-lock-server/door-lock-server.cpp b/src/app/clusters/door-lock-server/door-lock-server.cpp index 66676a2f72e4b8..742afee28480f3 100644 --- a/src/app/clusters/door-lock-server/door-lock-server.cpp +++ b/src/app/clusters/door-lock-server/door-lock-server.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include diff --git a/src/app/clusters/electrical-energy-measurement-server/electrical-energy-measurement-server.cpp b/src/app/clusters/electrical-energy-measurement-server/electrical-energy-measurement-server.cpp index e8ee2387c7ab60..4f527882c7284d 100644 --- a/src/app/clusters/electrical-energy-measurement-server/electrical-energy-measurement-server.cpp +++ b/src/app/clusters/electrical-energy-measurement-server/electrical-energy-measurement-server.cpp @@ -20,6 +20,7 @@ #include #include +#include #include #include #include diff --git a/src/app/clusters/electrical-power-measurement-server/electrical-power-measurement-server.cpp b/src/app/clusters/electrical-power-measurement-server/electrical-power-measurement-server.cpp index 5f124a3128df05..0ac1ec956f1dab 100644 --- a/src/app/clusters/electrical-power-measurement-server/electrical-power-measurement-server.cpp +++ b/src/app/clusters/electrical-power-measurement-server/electrical-power-measurement-server.cpp @@ -20,6 +20,7 @@ #include #include +#include #include #include #include diff --git a/src/app/clusters/energy-evse-server/energy-evse-server.cpp b/src/app/clusters/energy-evse-server/energy-evse-server.cpp index b3cbbf334a2e4c..2e2f6867e094c1 100644 --- a/src/app/clusters/energy-evse-server/energy-evse-server.cpp +++ b/src/app/clusters/energy-evse-server/energy-evse-server.cpp @@ -17,6 +17,7 @@ #include "energy-evse-server.h" #include +#include #include #include #include diff --git a/src/app/clusters/energy-preference-server/energy-preference-server.cpp b/src/app/clusters/energy-preference-server/energy-preference-server.cpp index c3c645f3108982..789ab4ce0e7299 100644 --- a/src/app/clusters/energy-preference-server/energy-preference-server.cpp +++ b/src/app/clusters/energy-preference-server/energy-preference-server.cpp @@ -17,6 +17,7 @@ #include "energy-preference-server.h" +#include #include // Needed for registerAttributeAccessOverride #include diff --git a/src/app/clusters/ethernet-network-diagnostics-server/ethernet-network-diagnostics-server.cpp b/src/app/clusters/ethernet-network-diagnostics-server/ethernet-network-diagnostics-server.cpp index 8db33174f07429..7bd7043d7c7e51 100644 --- a/src/app/clusters/ethernet-network-diagnostics-server/ethernet-network-diagnostics-server.cpp +++ b/src/app/clusters/ethernet-network-diagnostics-server/ethernet-network-diagnostics-server.cpp @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include diff --git a/src/app/clusters/fixed-label-server/fixed-label-server.cpp b/src/app/clusters/fixed-label-server/fixed-label-server.cpp index 22cca831167352..bd952f148647fc 100644 --- a/src/app/clusters/fixed-label-server/fixed-label-server.cpp +++ b/src/app/clusters/fixed-label-server/fixed-label-server.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include diff --git a/src/app/clusters/general-commissioning-server/general-commissioning-server.cpp b/src/app/clusters/general-commissioning-server/general-commissioning-server.cpp index d32ddc0ee90a5c..776441ffc9ae75 100644 --- a/src/app/clusters/general-commissioning-server/general-commissioning-server.cpp +++ b/src/app/clusters/general-commissioning-server/general-commissioning-server.cpp @@ -23,6 +23,7 @@ #include #include +#include #include #include #include diff --git a/src/app/clusters/general-diagnostics-server/general-diagnostics-server.cpp b/src/app/clusters/general-diagnostics-server/general-diagnostics-server.cpp index 0bd3fe0af9332f..fa3d9da3177d53 100644 --- a/src/app/clusters/general-diagnostics-server/general-diagnostics-server.cpp +++ b/src/app/clusters/general-diagnostics-server/general-diagnostics-server.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include diff --git a/src/app/clusters/group-key-mgmt-server/group-key-mgmt-server.cpp b/src/app/clusters/group-key-mgmt-server/group-key-mgmt-server.cpp index 5efc037014a704..c3cf09eb283f63 100644 --- a/src/app/clusters/group-key-mgmt-server/group-key-mgmt-server.cpp +++ b/src/app/clusters/group-key-mgmt-server/group-key-mgmt-server.cpp @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include diff --git a/src/app/clusters/icd-management-server/icd-management-server.cpp b/src/app/clusters/icd-management-server/icd-management-server.cpp index 51ec9b9239f929..f6ab59d9f2efb0 100644 --- a/src/app/clusters/icd-management-server/icd-management-server.cpp +++ b/src/app/clusters/icd-management-server/icd-management-server.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include diff --git a/src/app/clusters/keypad-input-server/keypad-input-server.cpp b/src/app/clusters/keypad-input-server/keypad-input-server.cpp index b07c1fac8123ea..a9903b754591a4 100644 --- a/src/app/clusters/keypad-input-server/keypad-input-server.cpp +++ b/src/app/clusters/keypad-input-server/keypad-input-server.cpp @@ -26,6 +26,7 @@ #include #include +#include #include #include #include diff --git a/src/app/clusters/laundry-dryer-controls-server/laundry-dryer-controls-server.cpp b/src/app/clusters/laundry-dryer-controls-server/laundry-dryer-controls-server.cpp index c29f61b5a21f55..9870c858eca766 100644 --- a/src/app/clusters/laundry-dryer-controls-server/laundry-dryer-controls-server.cpp +++ b/src/app/clusters/laundry-dryer-controls-server/laundry-dryer-controls-server.cpp @@ -15,6 +15,7 @@ * limitations under the License. */ +#include #include #include diff --git a/src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-server.cpp b/src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-server.cpp index d648216db55699..6f0f84fae808bc 100644 --- a/src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-server.cpp +++ b/src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-server.cpp @@ -15,6 +15,7 @@ * limitations under the License. */ +#include #include #include diff --git a/src/app/clusters/localization-configuration-server/localization-configuration-server.cpp b/src/app/clusters/localization-configuration-server/localization-configuration-server.cpp index 5f059e73b9a1d3..1b26542df3ed55 100644 --- a/src/app/clusters/localization-configuration-server/localization-configuration-server.cpp +++ b/src/app/clusters/localization-configuration-server/localization-configuration-server.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include diff --git a/src/app/clusters/media-input-server/media-input-server.cpp b/src/app/clusters/media-input-server/media-input-server.cpp index 3fe13985b1ff06..267f4e987a1da1 100644 --- a/src/app/clusters/media-input-server/media-input-server.cpp +++ b/src/app/clusters/media-input-server/media-input-server.cpp @@ -26,6 +26,7 @@ #include #include +#include #include #include #include diff --git a/src/app/clusters/media-playback-server/media-playback-server.cpp b/src/app/clusters/media-playback-server/media-playback-server.cpp index 9140cf58044456..b13a46d0101dd7 100644 --- a/src/app/clusters/media-playback-server/media-playback-server.cpp +++ b/src/app/clusters/media-playback-server/media-playback-server.cpp @@ -27,6 +27,7 @@ #include #include +#include #include #include #include diff --git a/src/app/clusters/messages-server/messages-server.cpp b/src/app/clusters/messages-server/messages-server.cpp index 66594ae732a522..0c03c95572dc74 100644 --- a/src/app/clusters/messages-server/messages-server.cpp +++ b/src/app/clusters/messages-server/messages-server.cpp @@ -20,6 +20,7 @@ #include #include +#include #include #include #include diff --git a/src/app/clusters/microwave-oven-control-server/microwave-oven-control-server.cpp b/src/app/clusters/microwave-oven-control-server/microwave-oven-control-server.cpp index cae604c625f0cb..4a736cecd01ac6 100644 --- a/src/app/clusters/microwave-oven-control-server/microwave-oven-control-server.cpp +++ b/src/app/clusters/microwave-oven-control-server/microwave-oven-control-server.cpp @@ -17,6 +17,7 @@ */ #include +#include #include #include #include diff --git a/src/app/clusters/mode-base-server/mode-base-server.cpp b/src/app/clusters/mode-base-server/mode-base-server.cpp index 76bd195376e9b0..bb6aac6837c0bf 100644 --- a/src/app/clusters/mode-base-server/mode-base-server.cpp +++ b/src/app/clusters/mode-base-server/mode-base-server.cpp @@ -17,6 +17,7 @@ */ #include +#include #include #include #include diff --git a/src/app/clusters/mode-select-server/mode-select-server.cpp b/src/app/clusters/mode-select-server/mode-select-server.cpp index f162a26cf4e5df..dceb72767bfb14 100644 --- a/src/app/clusters/mode-select-server/mode-select-server.cpp +++ b/src/app/clusters/mode-select-server/mode-select-server.cpp @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include diff --git a/src/app/clusters/network-commissioning/network-commissioning.cpp b/src/app/clusters/network-commissioning/network-commissioning.cpp index 3ad47b6cee7540..41741c70d266a4 100644 --- a/src/app/clusters/network-commissioning/network-commissioning.cpp +++ b/src/app/clusters/network-commissioning/network-commissioning.cpp @@ -22,6 +22,7 @@ #include #include +#include #include #include #include diff --git a/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp b/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp index d05f0995022d7e..12fe1c43de0baf 100644 --- a/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp +++ b/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include diff --git a/src/app/clusters/operational-state-server/operational-state-server.cpp b/src/app/clusters/operational-state-server/operational-state-server.cpp index 896cc0ca3856b6..50b4cd0178a8af 100644 --- a/src/app/clusters/operational-state-server/operational-state-server.cpp +++ b/src/app/clusters/operational-state-server/operational-state-server.cpp @@ -22,6 +22,7 @@ #include "operational-state-server.h" #include #include +#include #include #include #include diff --git a/src/app/clusters/ota-requestor/ota-requestor-server.cpp b/src/app/clusters/ota-requestor/ota-requestor-server.cpp index 8f5d1326aaf70a..b95a6d9ba24742 100644 --- a/src/app/clusters/ota-requestor/ota-requestor-server.cpp +++ b/src/app/clusters/ota-requestor/ota-requestor-server.cpp @@ -21,6 +21,7 @@ */ #include +#include #include #include #include diff --git a/src/app/clusters/power-source-configuration-server/power-source-configuration-server.cpp b/src/app/clusters/power-source-configuration-server/power-source-configuration-server.cpp index 7e9804286f07ef..a8a9d4e80e8189 100644 --- a/src/app/clusters/power-source-configuration-server/power-source-configuration-server.cpp +++ b/src/app/clusters/power-source-configuration-server/power-source-configuration-server.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include diff --git a/src/app/clusters/power-source-server/power-source-server.cpp b/src/app/clusters/power-source-server/power-source-server.cpp index a545ea91d3f4ef..43ca1827515731 100644 --- a/src/app/clusters/power-source-server/power-source-server.cpp +++ b/src/app/clusters/power-source-server/power-source-server.cpp @@ -23,6 +23,7 @@ #include #include +#include #include #include #include diff --git a/src/app/clusters/power-topology-server/power-topology-server.cpp b/src/app/clusters/power-topology-server/power-topology-server.cpp index 3aff74760343bc..0b7072ce8eb51b 100644 --- a/src/app/clusters/power-topology-server/power-topology-server.cpp +++ b/src/app/clusters/power-topology-server/power-topology-server.cpp @@ -20,6 +20,7 @@ #include #include +#include #include #include #include diff --git a/src/app/clusters/resource-monitoring-server/resource-monitoring-server.cpp b/src/app/clusters/resource-monitoring-server/resource-monitoring-server.cpp index 95480ddfcc23aa..25a0be188ad7af 100644 --- a/src/app/clusters/resource-monitoring-server/resource-monitoring-server.cpp +++ b/src/app/clusters/resource-monitoring-server/resource-monitoring-server.cpp @@ -17,6 +17,7 @@ */ #include +#include #include #include #include diff --git a/src/app/clusters/sample-mei-server/sample-mei-server.cpp b/src/app/clusters/sample-mei-server/sample-mei-server.cpp index 56d026e48a1efa..afeca910b455fe 100644 --- a/src/app/clusters/sample-mei-server/sample-mei-server.cpp +++ b/src/app/clusters/sample-mei-server/sample-mei-server.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include diff --git a/src/app/clusters/scenes-server/scenes-server.cpp b/src/app/clusters/scenes-server/scenes-server.cpp index a57f00392dded8..860e29236fa868 100644 --- a/src/app/clusters/scenes-server/scenes-server.cpp +++ b/src/app/clusters/scenes-server/scenes-server.cpp @@ -19,6 +19,7 @@ #include "scenes-server.h" #include #include +#include #include #include #include diff --git a/src/app/clusters/software-diagnostics-server/software-diagnostics-server.cpp b/src/app/clusters/software-diagnostics-server/software-diagnostics-server.cpp index b6071587292167..2c0d76f79b649b 100644 --- a/src/app/clusters/software-diagnostics-server/software-diagnostics-server.cpp +++ b/src/app/clusters/software-diagnostics-server/software-diagnostics-server.cpp @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include diff --git a/src/app/clusters/target-navigator-server/target-navigator-server.cpp b/src/app/clusters/target-navigator-server/target-navigator-server.cpp index a6c4d3911ca70c..42c852b81c8c5a 100644 --- a/src/app/clusters/target-navigator-server/target-navigator-server.cpp +++ b/src/app/clusters/target-navigator-server/target-navigator-server.cpp @@ -26,6 +26,7 @@ #include #include +#include #include #include #include diff --git a/src/app/clusters/temperature-control-server/temperature-control-server.cpp b/src/app/clusters/temperature-control-server/temperature-control-server.cpp index 9194c168fb236a..85035c642d4092 100644 --- a/src/app/clusters/temperature-control-server/temperature-control-server.cpp +++ b/src/app/clusters/temperature-control-server/temperature-control-server.cpp @@ -18,6 +18,7 @@ #include #include +#include #include #include #include diff --git a/src/app/clusters/test-cluster-server/test-cluster-server.cpp b/src/app/clusters/test-cluster-server/test-cluster-server.cpp index 8d23cd3075db54..0d805347f792f9 100644 --- a/src/app/clusters/test-cluster-server/test-cluster-server.cpp +++ b/src/app/clusters/test-cluster-server/test-cluster-server.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include diff --git a/src/app/clusters/thermostat-server/thermostat-server.cpp b/src/app/clusters/thermostat-server/thermostat-server.cpp index 91d9b33da69ca5..214594667b9eb8 100644 --- a/src/app/clusters/thermostat-server/thermostat-server.cpp +++ b/src/app/clusters/thermostat-server/thermostat-server.cpp @@ -15,6 +15,7 @@ * limitations under the License. */ +#include #include #include diff --git a/src/app/clusters/thread-network-diagnostics-server/thread-network-diagnostics-server.cpp b/src/app/clusters/thread-network-diagnostics-server/thread-network-diagnostics-server.cpp index b21f9015af8b28..59115c0971cffb 100644 --- a/src/app/clusters/thread-network-diagnostics-server/thread-network-diagnostics-server.cpp +++ b/src/app/clusters/thread-network-diagnostics-server/thread-network-diagnostics-server.cpp @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include diff --git a/src/app/clusters/time-format-localization-server/time-format-localization-server.cpp b/src/app/clusters/time-format-localization-server/time-format-localization-server.cpp index ff38290c21f8d4..7e61e340f1fab1 100644 --- a/src/app/clusters/time-format-localization-server/time-format-localization-server.cpp +++ b/src/app/clusters/time-format-localization-server/time-format-localization-server.cpp @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include diff --git a/src/app/clusters/time-synchronization-server/time-synchronization-server.cpp b/src/app/clusters/time-synchronization-server/time-synchronization-server.cpp index 3578e2be6eb8eb..d03d7842911d51 100644 --- a/src/app/clusters/time-synchronization-server/time-synchronization-server.cpp +++ b/src/app/clusters/time-synchronization-server/time-synchronization-server.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include diff --git a/src/app/clusters/user-label-server/user-label-server.cpp b/src/app/clusters/user-label-server/user-label-server.cpp index 49a557b778baa2..5131ed44aaca2b 100644 --- a/src/app/clusters/user-label-server/user-label-server.cpp +++ b/src/app/clusters/user-label-server/user-label-server.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include diff --git a/src/app/clusters/valve-configuration-and-control-server/valve-configuration-and-control-server.cpp b/src/app/clusters/valve-configuration-and-control-server/valve-configuration-and-control-server.cpp index 120cd2b3dd8416..82dd45464cfde4 100644 --- a/src/app/clusters/valve-configuration-and-control-server/valve-configuration-and-control-server.cpp +++ b/src/app/clusters/valve-configuration-and-control-server/valve-configuration-and-control-server.cpp @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include diff --git a/src/app/clusters/wake-on-lan-server/wake-on-lan-server.cpp b/src/app/clusters/wake-on-lan-server/wake-on-lan-server.cpp index ec989bbc588372..3141094d1fa3c7 100644 --- a/src/app/clusters/wake-on-lan-server/wake-on-lan-server.cpp +++ b/src/app/clusters/wake-on-lan-server/wake-on-lan-server.cpp @@ -26,6 +26,7 @@ #include #include +#include #include #include #include diff --git a/src/app/clusters/wifi-network-diagnostics-server/wifi-network-diagnostics-server.cpp b/src/app/clusters/wifi-network-diagnostics-server/wifi-network-diagnostics-server.cpp index 0657e37f23b860..d24bc02227b272 100644 --- a/src/app/clusters/wifi-network-diagnostics-server/wifi-network-diagnostics-server.cpp +++ b/src/app/clusters/wifi-network-diagnostics-server/wifi-network-diagnostics-server.cpp @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include diff --git a/src/app/dynamic_server/DynamicDispatcher.cpp b/src/app/dynamic_server/DynamicDispatcher.cpp index c54e7d87b96a0c..5f9476aa6fd40a 100644 --- a/src/app/dynamic_server/DynamicDispatcher.cpp +++ b/src/app/dynamic_server/DynamicDispatcher.cpp @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include @@ -189,13 +188,6 @@ CHIP_ERROR WriteSingleClusterData(const SubjectDescriptor & aSubjectDescriptor, return aWriteHandler->AddStatus(aPath, status); } -// No attribute access overrides on iOS and Android for now. -// TODO (#16806): This function can be moved to InteractionModelEngine. -AttributeAccessInterface * GetAttributeAccessOverride(EndpointId endpointId, ClusterId clusterId) -{ - return nullptr; -} - void DispatchSingleClusterCommand(const ConcreteCommandPath & aPath, TLV::TLVReader & aReader, CommandHandler * aCommandObj) { // This command passed ServerClusterCommandExists so we know it's one of our diff --git a/src/app/icd/server/ICDManager.cpp b/src/app/icd/server/ICDManager.cpp index 479fb9a240bc30..5f93946fa8eebf 100644 --- a/src/app/icd/server/ICDManager.cpp +++ b/src/app/icd/server/ICDManager.cpp @@ -26,7 +26,6 @@ #include #include #include -#include namespace { enum class ICDTestEventTriggerEvent : uint64_t diff --git a/src/app/icd/server/ICDManager.h b/src/app/icd/server/ICDManager.h index 43a5386d4d7844..69dfdbf6a88863 100644 --- a/src/app/icd/server/ICDManager.h +++ b/src/app/icd/server/ICDManager.h @@ -19,6 +19,7 @@ #include #include +#include #include #include #include @@ -26,7 +27,6 @@ #include #include #include -#include #include #include #include diff --git a/src/app/util/IMClusterCommandHandler.h b/src/app/util/IMClusterCommandHandler.h new file mode 100644 index 00000000000000..95d1aef85917f4 --- /dev/null +++ b/src/app/util/IMClusterCommandHandler.h @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#pragma once + +#include +#include +#include + +namespace chip { +namespace app { + +/** + * Dispatch is generally implemented in code-generated code in ember within + * IMClusterCommandHandler.cpp + * + * aCommandPath - the path that is invoked + * aReader - the input TLV data for this command + * apCommandObj - how to send back the reply + */ +void DispatchSingleClusterCommand(const ConcreteCommandPath & aCommandPath, chip::TLV::TLVReader & aReader, + CommandHandler * apCommandObj); + +} // namespace app +} // namespace chip diff --git a/src/app/util/af-types.h b/src/app/util/af-types.h index ffffdfb129de13..c608854c346fba 100644 --- a/src/app/util/af-types.h +++ b/src/app/util/af-types.h @@ -24,7 +24,6 @@ */ #include // For bool -#include // For NULL. #include // For various uint*_t types #include diff --git a/src/app/util/attribute-storage.cpp b/src/app/util/attribute-storage.cpp index 8848c63d07a427..d154b95cf9ab9e 100644 --- a/src/app/util/attribute-storage.cpp +++ b/src/app/util/attribute-storage.cpp @@ -19,7 +19,7 @@ #include -#include +#include #include #include #include @@ -140,43 +140,6 @@ constexpr const EmberAfDeviceType fixedDeviceTypeList[] = FIXED_DEVI DataVersion fixedEndpointDataVersions[ZAP_FIXED_ENDPOINT_DATA_VERSION_COUNT]; #endif // FIXED_ENDPOINT_COUNT > 0 -AttributeAccessInterface * gAttributeAccessOverrides = nullptr; -AttributeAccessInterfaceCache gAttributeAccessInterfaceCache; - -// shouldUnregister returns true if the given AttributeAccessInterface should be -// unregistered. -template -void UnregisterMatchingAttributeAccessInterfaces(F shouldUnregister) -{ - AttributeAccessInterface * prev = nullptr; - AttributeAccessInterface * cur = gAttributeAccessOverrides; - while (cur) - { - AttributeAccessInterface * next = cur->GetNext(); - if (shouldUnregister(cur)) - { - // Remove it from the list - if (prev) - { - prev->SetNext(next); - } - else - { - gAttributeAccessOverrides = next; - } - - cur->SetNext(nullptr); - - // Do not change prev in this case. - } - else - { - prev = cur; - } - cur = next; - } -} - bool emberAfIsThisDataTypeAListType(EmberAfAttributeType dataType) { return dataType == ZCL_ARRAY_ATTRIBUTE_TYPE; @@ -462,10 +425,7 @@ static void shutdownEndpoint(EmberAfDefinedEndpoint * definedEndpoint) // endpoint. chip::app::InteractionModelEngine::GetInstance()->UnregisterCommandHandlers(definedEndpoint->endpoint); - // Clear out any attribute access overrides registered for this - // endpoint. - UnregisterMatchingAttributeAccessInterfaces( - [endpoint = definedEndpoint->endpoint](AttributeAccessInterface * entry) { return entry->MatchesEndpoint(endpoint); }); + unregisterAllAttributeAccessOverridesForEndpoint(definedEndpoint); } // Calls the init functions. @@ -1382,62 +1342,9 @@ EmberAfGenericClusterFunction emberAfFindClusterFunction(const EmberAfCluster * return cluster->functions[functionIndex]; } -bool registerAttributeAccessOverride(AttributeAccessInterface * attrOverride) -{ - gAttributeAccessInterfaceCache.Invalidate(); - for (auto * cur = gAttributeAccessOverrides; cur; cur = cur->GetNext()) - { - if (cur->Matches(*attrOverride)) - { - ChipLogError(Zcl, "Duplicate attribute override registration failed"); - return false; - } - } - attrOverride->SetNext(gAttributeAccessOverrides); - gAttributeAccessOverrides = attrOverride; - return true; -} - -void unregisterAttributeAccessOverride(AttributeAccessInterface * attrOverride) -{ - gAttributeAccessInterfaceCache.Invalidate(); - UnregisterMatchingAttributeAccessInterfaces([attrOverride](AttributeAccessInterface * entry) { return entry == attrOverride; }); -} - namespace chip { namespace app { -app::AttributeAccessInterface * GetAttributeAccessOverride(EndpointId endpointId, ClusterId clusterId) -{ - using CacheResult = AttributeAccessInterfaceCache::CacheResult; - - AttributeAccessInterface * cached = nullptr; - CacheResult result = gAttributeAccessInterfaceCache.Get(endpointId, clusterId, &cached); - switch (result) - { - case CacheResult::kDefinitelyUnused: - return nullptr; - case CacheResult::kDefinitelyUsed: - return cached; - case CacheResult::kCacheMiss: - default: - // Did not cache yet, search set of AAI registered, and cache if found. - for (app::AttributeAccessInterface * cur = gAttributeAccessOverrides; cur; cur = cur->GetNext()) - { - if (cur->Matches(endpointId, clusterId)) - { - gAttributeAccessInterfaceCache.MarkUsed(endpointId, clusterId, cur); - return cur; - } - } - - // Did not find AAI registered: mark as definitely not using. - gAttributeAccessInterfaceCache.MarkUnused(endpointId, clusterId); - } - - return nullptr; -} - CHIP_ERROR SetParentEndpointForEndpoint(EndpointId childEndpoint, EndpointId parentEndpoint) { uint16_t childIndex = emberAfIndexFromEndpoint(childEndpoint); diff --git a/src/app/util/attribute-storage.h b/src/app/util/attribute-storage.h index 013be43f20334b..b25f106d4fcecd 100644 --- a/src/app/util/attribute-storage.h +++ b/src/app/util/attribute-storage.h @@ -183,25 +183,6 @@ chip::DataVersion * emberAfDataVersionStorage(const chip::app::ConcreteClusterPa */ uint16_t emberAfFixedEndpointCount(); -/** - * Register an attribute access override. It will remain registered until the - * endpoint it's registered for is disabled (or until shutdown if it's - * registered for all endpoints) or until it is explicitly unregistered. - * Registration will fail if there is an already-registered override for the - * same set of attributes. - * - * @return false if there is an existing override that the new one would - * conflict with. In this case the override is not registered. - * @return true if registration was successful. - */ -bool registerAttributeAccessOverride(chip::app::AttributeAccessInterface * attrOverride); - -/** - * Unregister an attribute access override (for example if the object - * implementing AttributeAccessInterface is being destroyed). - */ -void unregisterAttributeAccessOverride(chip::app::AttributeAccessInterface * attrOverride); - /** * Get the semantic tags of the endpoint. * Fills in the provided SemanticTagStruct with tag at index `index` if there is one, diff --git a/src/app/util/ember-compatibility-functions.h b/src/app/util/ember-compatibility-functions.h index a0888ac7f90498..1a81e543967482 100644 --- a/src/app/util/ember-compatibility-functions.h +++ b/src/app/util/ember-compatibility-functions.h @@ -17,6 +17,7 @@ #include #include +#include #include #include #include diff --git a/src/app/util/mock/attribute-storage.cpp b/src/app/util/mock/attribute-storage.cpp index 716460026591ee..cc1e19230dc33e 100644 --- a/src/app/util/mock/attribute-storage.cpp +++ b/src/app/util/mock/attribute-storage.cpp @@ -267,11 +267,6 @@ DataVersion * emberAfDataVersionStorage(const chip::app::ConcreteClusterPath & a namespace chip { namespace app { -AttributeAccessInterface * GetAttributeAccessOverride(EndpointId aEndpointId, ClusterId aClusterId) -{ - return nullptr; -} - EndpointId EnabledEndpointsWithServerCluster::operator*() const { return emberAfEndpointFromIndex(mEndpointIndex); diff --git a/src/controller/tests/TestEventChunking.cpp b/src/controller/tests/TestEventChunking.cpp index 74bee0f9aab0e4..0555e3ef94560b 100644 --- a/src/controller/tests/TestEventChunking.cpp +++ b/src/controller/tests/TestEventChunking.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include diff --git a/src/controller/tests/TestReadChunking.cpp b/src/controller/tests/TestReadChunking.cpp index 1a1f9c77d1af57..1095e0f26ebf61 100644 --- a/src/controller/tests/TestReadChunking.cpp +++ b/src/controller/tests/TestReadChunking.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include diff --git a/src/controller/tests/TestWriteChunking.cpp b/src/controller/tests/TestWriteChunking.cpp index d0555b8d2440af..2190195887ad41 100644 --- a/src/controller/tests/TestWriteChunking.cpp +++ b/src/controller/tests/TestWriteChunking.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include diff --git a/src/darwin/Framework/CHIP/ServerEndpoint/MTRServerCluster.mm b/src/darwin/Framework/CHIP/ServerEndpoint/MTRServerCluster.mm index df66ebfe0a5d70..dcd2f1eff9314e 100644 --- a/src/darwin/Framework/CHIP/ServerEndpoint/MTRServerCluster.mm +++ b/src/darwin/Framework/CHIP/ServerEndpoint/MTRServerCluster.mm @@ -35,7 +35,8 @@ #include #include -// TODO: These attribute-*.h bits are a hack that should eventually go away. +// TODO: These attribute-*.h and AttributeAccessInterfaceRegistry.h bits are a hack that should eventually go away. +#include #include #include diff --git a/src/include/platform/ConnectivityManager.h b/src/include/platform/ConnectivityManager.h index 30002484c33a3d..90bab2a5ba5e76 100644 --- a/src/include/platform/ConnectivityManager.h +++ b/src/include/platform/ConnectivityManager.h @@ -24,7 +24,6 @@ #pragma once #include -#include #include #include #include diff --git a/src/include/platform/ThreadStackManager.h b/src/include/platform/ThreadStackManager.h index 540fb773e57c2c..a28aea640ba46e 100644 --- a/src/include/platform/ThreadStackManager.h +++ b/src/include/platform/ThreadStackManager.h @@ -25,7 +25,6 @@ #include -#include #include #include #include diff --git a/src/include/platform/internal/GenericConnectivityManagerImpl_NoThread.h b/src/include/platform/internal/GenericConnectivityManagerImpl_NoThread.h index 865feb9b55845b..b8901cda078f50 100755 --- a/src/include/platform/internal/GenericConnectivityManagerImpl_NoThread.h +++ b/src/include/platform/internal/GenericConnectivityManagerImpl_NoThread.h @@ -24,7 +24,6 @@ #pragma once #include -#include namespace chip { namespace DeviceLayer { diff --git a/src/include/platform/internal/GenericConnectivityManagerImpl_Thread.h b/src/include/platform/internal/GenericConnectivityManagerImpl_Thread.h index f20412fda3aa3e..cf9a4a490d0f26 100755 --- a/src/include/platform/internal/GenericConnectivityManagerImpl_Thread.h +++ b/src/include/platform/internal/GenericConnectivityManagerImpl_Thread.h @@ -24,7 +24,6 @@ #pragma once -#include #include #include #include diff --git a/src/platform/ASR/ConnectivityManagerImpl.cpp b/src/platform/ASR/ConnectivityManagerImpl.cpp index fb023b7b3c3a0b..2a8734ec0010e2 100644 --- a/src/platform/ASR/ConnectivityManagerImpl.cpp +++ b/src/platform/ASR/ConnectivityManagerImpl.cpp @@ -52,7 +52,6 @@ using namespace ::chip; using namespace ::chip::Inet; using namespace ::chip::System; -using namespace ::chip::TLV; #ifdef __cplusplus extern "C" { #endif diff --git a/src/platform/Ameba/ConnectivityManagerImpl.cpp b/src/platform/Ameba/ConnectivityManagerImpl.cpp index c72113db12bebd..6324989bbf4d68 100644 --- a/src/platform/Ameba/ConnectivityManagerImpl.cpp +++ b/src/platform/Ameba/ConnectivityManagerImpl.cpp @@ -55,7 +55,6 @@ using namespace ::chip; using namespace ::chip::Inet; -using namespace ::chip::TLV; using namespace ::chip::DeviceLayer::Internal; namespace chip { diff --git a/src/platform/Beken/ConnectivityManagerImpl.cpp b/src/platform/Beken/ConnectivityManagerImpl.cpp index 3065b1fec3f99d..6adb1f8dae593c 100644 --- a/src/platform/Beken/ConnectivityManagerImpl.cpp +++ b/src/platform/Beken/ConnectivityManagerImpl.cpp @@ -55,7 +55,6 @@ using namespace ::chip; using namespace ::chip::Inet; -using namespace ::chip::TLV; using namespace ::chip::DeviceLayer::Internal; namespace chip { diff --git a/src/platform/Darwin/ConnectivityManagerImpl.cpp b/src/platform/Darwin/ConnectivityManagerImpl.cpp index e0a7711e18bbfb..a6518138bfc5e9 100644 --- a/src/platform/Darwin/ConnectivityManagerImpl.cpp +++ b/src/platform/Darwin/ConnectivityManagerImpl.cpp @@ -21,8 +21,6 @@ #include #include -#include - #include #include #include @@ -51,7 +49,6 @@ #endif // TARGET_OS_OSX using namespace ::chip; -using namespace ::chip::TLV; using namespace ::chip::DeviceLayer::Internal; namespace chip { diff --git a/src/platform/ESP32/BLEManagerImpl.h b/src/platform/ESP32/BLEManagerImpl.h index 5cb1421750786a..fc946c9aae3359 100644 --- a/src/platform/ESP32/BLEManagerImpl.h +++ b/src/platform/ESP32/BLEManagerImpl.h @@ -30,6 +30,8 @@ #include "sdkconfig.h" +#include + #if CONFIG_BT_BLUEDROID_ENABLED #include "esp_bt.h" diff --git a/src/platform/ESP32/ConnectivityManagerImpl.cpp b/src/platform/ESP32/ConnectivityManagerImpl.cpp index 783ef4b99678be..85146257ebe985 100644 --- a/src/platform/ESP32/ConnectivityManagerImpl.cpp +++ b/src/platform/ESP32/ConnectivityManagerImpl.cpp @@ -47,7 +47,6 @@ using namespace ::chip; using namespace ::chip::Inet; using namespace ::chip::System; -using namespace ::chip::TLV; using namespace ::chip::app::Clusters::GeneralDiagnostics; namespace chip { diff --git a/src/platform/ESP32/ConnectivityManagerImpl_Ethernet.cpp b/src/platform/ESP32/ConnectivityManagerImpl_Ethernet.cpp index b36c4b8cb273d2..eacf3c41526e5e 100644 --- a/src/platform/ESP32/ConnectivityManagerImpl_Ethernet.cpp +++ b/src/platform/ESP32/ConnectivityManagerImpl_Ethernet.cpp @@ -43,7 +43,6 @@ using namespace ::chip; using namespace ::chip::Inet; using namespace ::chip::System; -using namespace ::chip::TLV; using chip::DeviceLayer::Internal::ESP32Utils; namespace chip { namespace DeviceLayer { diff --git a/src/platform/ESP32/ConnectivityManagerImpl_WiFi.cpp b/src/platform/ESP32/ConnectivityManagerImpl_WiFi.cpp index 5fefcb5490f059..3810862a0f57b6 100644 --- a/src/platform/ESP32/ConnectivityManagerImpl_WiFi.cpp +++ b/src/platform/ESP32/ConnectivityManagerImpl_WiFi.cpp @@ -46,7 +46,6 @@ using namespace ::chip; using namespace ::chip::Inet; using namespace ::chip::System; -using namespace ::chip::TLV; using chip::DeviceLayer::Internal::ESP32Utils; namespace chip { diff --git a/src/platform/ESP32/KeyValueStoreManagerImpl.cpp b/src/platform/ESP32/KeyValueStoreManagerImpl.cpp index 5cd113e3e65c63..6617bb2cb11bf0 100644 --- a/src/platform/ESP32/KeyValueStoreManagerImpl.cpp +++ b/src/platform/ESP32/KeyValueStoreManagerImpl.cpp @@ -24,12 +24,12 @@ #include #include -#include #include #include "nvs.h" #include "nvs_flash.h" #include +#include #include #include diff --git a/src/platform/Infineon/PSOC6/ConnectivityManagerImpl.cpp b/src/platform/Infineon/PSOC6/ConnectivityManagerImpl.cpp index 9ac41f5d211cbb..b78f6fe757286b 100644 --- a/src/platform/Infineon/PSOC6/ConnectivityManagerImpl.cpp +++ b/src/platform/Infineon/PSOC6/ConnectivityManagerImpl.cpp @@ -55,7 +55,6 @@ using namespace ::chip; using namespace ::chip::Inet; using namespace ::chip::System; -using namespace ::chip::TLV; namespace chip { namespace DeviceLayer { diff --git a/src/platform/Linux/ConnectivityManagerImpl.cpp b/src/platform/Linux/ConnectivityManagerImpl.cpp index 7e7d2a1786b29e..f7edd474e2d7ea 100644 --- a/src/platform/Linux/ConnectivityManagerImpl.cpp +++ b/src/platform/Linux/ConnectivityManagerImpl.cpp @@ -67,7 +67,6 @@ #endif using namespace ::chip; -using namespace ::chip::TLV; using namespace ::chip::Credentials; using namespace ::chip::DeviceLayer; using namespace ::chip::DeviceLayer::Internal; diff --git a/src/platform/Linux/ThreadStackManagerImpl.cpp b/src/platform/Linux/ThreadStackManagerImpl.cpp index 846b2db4867154..40bd31ecaeee44 100644 --- a/src/platform/Linux/ThreadStackManagerImpl.cpp +++ b/src/platform/Linux/ThreadStackManagerImpl.cpp @@ -18,7 +18,6 @@ #include #include -#include #include #include #include diff --git a/src/platform/Linux/ThreadStackManagerImpl.h b/src/platform/Linux/ThreadStackManagerImpl.h index 374108dad176d1..e9c1a825d35a91 100755 --- a/src/platform/Linux/ThreadStackManagerImpl.h +++ b/src/platform/Linux/ThreadStackManagerImpl.h @@ -20,7 +20,6 @@ #include #include -#include #include #include #include diff --git a/src/platform/Tizen/ConnectivityManagerImpl.h b/src/platform/Tizen/ConnectivityManagerImpl.h index a22eb71eb7deb2..4d982acac2bf97 100644 --- a/src/platform/Tizen/ConnectivityManagerImpl.h +++ b/src/platform/Tizen/ConnectivityManagerImpl.h @@ -28,6 +28,8 @@ #include #include +#include + #include "platform/internal/GenericConnectivityManagerImpl.h" #include "platform/internal/GenericConnectivityManagerImpl_UDP.h" #if INET_CONFIG_ENABLE_TCP_ENDPOINT diff --git a/src/platform/Tizen/DiagnosticDataProviderImpl.h b/src/platform/Tizen/DiagnosticDataProviderImpl.h index 80dd3ae7b09a2e..c234e23bc885c7 100644 --- a/src/platform/Tizen/DiagnosticDataProviderImpl.h +++ b/src/platform/Tizen/DiagnosticDataProviderImpl.h @@ -24,6 +24,8 @@ #include +#include + namespace chip { namespace DeviceLayer { diff --git a/src/platform/Tizen/ThreadStackManagerImpl.cpp b/src/platform/Tizen/ThreadStackManagerImpl.cpp index f92676b4d44114..950b6ec300292c 100644 --- a/src/platform/Tizen/ThreadStackManagerImpl.cpp +++ b/src/platform/Tizen/ThreadStackManagerImpl.cpp @@ -39,7 +39,6 @@ #include #include -#include #include #include #include diff --git a/src/platform/Tizen/ThreadStackManagerImpl.h b/src/platform/Tizen/ThreadStackManagerImpl.h index e4b256cfc42d2f..3c0206cfd525fe 100644 --- a/src/platform/Tizen/ThreadStackManagerImpl.h +++ b/src/platform/Tizen/ThreadStackManagerImpl.h @@ -28,7 +28,6 @@ #include -#include #include #include #include diff --git a/src/platform/Zephyr/ConnectivityManagerImpl.cpp b/src/platform/Zephyr/ConnectivityManagerImpl.cpp index c5029f37a67862..17cdf46370f2d2 100644 --- a/src/platform/Zephyr/ConnectivityManagerImpl.cpp +++ b/src/platform/Zephyr/ConnectivityManagerImpl.cpp @@ -38,7 +38,6 @@ #endif using namespace ::chip; -using namespace ::chip::TLV; using namespace ::chip::DeviceLayer::Internal; namespace chip { diff --git a/src/platform/Zephyr/wifi/ConnectivityManagerImplWiFi.cpp b/src/platform/Zephyr/wifi/ConnectivityManagerImplWiFi.cpp index 3fefcf709e1b9b..5bef79bb22fdc5 100644 --- a/src/platform/Zephyr/wifi/ConnectivityManagerImplWiFi.cpp +++ b/src/platform/Zephyr/wifi/ConnectivityManagerImplWiFi.cpp @@ -29,7 +29,6 @@ using namespace ::chip; using namespace ::chip::Inet; using namespace ::chip::System; -using namespace ::chip::TLV; namespace chip { namespace DeviceLayer { diff --git a/src/platform/android/ConnectivityManagerImpl.cpp b/src/platform/android/ConnectivityManagerImpl.cpp index 390cb5ebb751f9..81fc070880ef33 100644 --- a/src/platform/android/ConnectivityManagerImpl.cpp +++ b/src/platform/android/ConnectivityManagerImpl.cpp @@ -46,7 +46,6 @@ #endif using namespace ::chip; -using namespace ::chip::TLV; using namespace ::chip::DeviceLayer::Internal; namespace chip { diff --git a/src/platform/bouffalolab/common/BLEManagerImpl.h b/src/platform/bouffalolab/common/BLEManagerImpl.h index d5d571ef7949cd..a0c69fe242372b 100644 --- a/src/platform/bouffalolab/common/BLEManagerImpl.h +++ b/src/platform/bouffalolab/common/BLEManagerImpl.h @@ -14,11 +14,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - #pragma once +#include + #if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE +#include + #include #include #include diff --git a/src/platform/bouffalolab/common/ConnectivityManagerImpl.cpp b/src/platform/bouffalolab/common/ConnectivityManagerImpl.cpp index 5679674bc973fb..c6babf25e5f74c 100644 --- a/src/platform/bouffalolab/common/ConnectivityManagerImpl.cpp +++ b/src/platform/bouffalolab/common/ConnectivityManagerImpl.cpp @@ -53,7 +53,6 @@ using namespace ::chip; using namespace ::chip::Inet; using namespace ::chip::System; -using namespace ::chip::TLV; using namespace ::chip::DeviceLayer::Internal; namespace chip { diff --git a/src/platform/cc13xx_26xx/ConnectivityManagerImpl.cpp b/src/platform/cc13xx_26xx/ConnectivityManagerImpl.cpp index 186f7d82cf590b..c8b3b35d26c42f 100644 --- a/src/platform/cc13xx_26xx/ConnectivityManagerImpl.cpp +++ b/src/platform/cc13xx_26xx/ConnectivityManagerImpl.cpp @@ -49,7 +49,6 @@ #include using namespace ::chip; -using namespace ::chip::TLV; using namespace ::chip::DeviceLayer::Internal; namespace chip { diff --git a/src/platform/cc32xx/ConnectivityManagerImpl.cpp b/src/platform/cc32xx/ConnectivityManagerImpl.cpp index c42bfb426a55e0..fe629c4f880ae8 100644 --- a/src/platform/cc32xx/ConnectivityManagerImpl.cpp +++ b/src/platform/cc32xx/ConnectivityManagerImpl.cpp @@ -62,7 +62,6 @@ extern void SlNetConnEventHandler(uint32_t ifID, SlNetConnStatus_e netStatus, vo using namespace ::chip; using namespace ::chip::Inet; using namespace ::chip::System; -using namespace ::chip::TLV; extern "C" void cc32xxLog(const char * aFormat, ...); static struct netif * m_pNetIf = NULL; diff --git a/src/platform/mbed/BLEManagerImpl.h b/src/platform/mbed/BLEManagerImpl.h index e642b1276493f0..6dfb1d56e2097b 100644 --- a/src/platform/mbed/BLEManagerImpl.h +++ b/src/platform/mbed/BLEManagerImpl.h @@ -23,8 +23,12 @@ #pragma once +#include + #if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE +#include + namespace chip { namespace DeviceLayer { namespace Internal { diff --git a/src/platform/mt793x/ConnectivityManagerImpl.cpp b/src/platform/mt793x/ConnectivityManagerImpl.cpp index e656a98e0e60bd..c3353c858f585f 100644 --- a/src/platform/mt793x/ConnectivityManagerImpl.cpp +++ b/src/platform/mt793x/ConnectivityManagerImpl.cpp @@ -49,7 +49,6 @@ using namespace ::chip; using namespace ::chip::Inet; using namespace ::chip::System; -using namespace ::chip::TLV; using namespace ::chip::DeviceLayer::Internal; namespace chip { diff --git a/src/platform/mt793x/ConnectivityManagerImpl_WIFI.cpp b/src/platform/mt793x/ConnectivityManagerImpl_WIFI.cpp index 5e2aa54ac8b809..991223b58ea966 100644 --- a/src/platform/mt793x/ConnectivityManagerImpl_WIFI.cpp +++ b/src/platform/mt793x/ConnectivityManagerImpl_WIFI.cpp @@ -41,7 +41,6 @@ using namespace ::chip; using namespace ::chip::Inet; using namespace ::chip::System; -using namespace ::chip::TLV; using namespace ::chip::DeviceLayer::Internal; namespace chip { diff --git a/src/platform/nrfconnect/wifi/ConnectivityManagerImplWiFi.cpp b/src/platform/nrfconnect/wifi/ConnectivityManagerImplWiFi.cpp index b3bdede0f2f852..92b3532dae56f3 100644 --- a/src/platform/nrfconnect/wifi/ConnectivityManagerImplWiFi.cpp +++ b/src/platform/nrfconnect/wifi/ConnectivityManagerImplWiFi.cpp @@ -29,7 +29,6 @@ using namespace ::chip; using namespace ::chip::Inet; using namespace ::chip::System; -using namespace ::chip::TLV; namespace chip { namespace DeviceLayer { diff --git a/src/platform/nxp/common/ConnectivityManagerImpl.cpp b/src/platform/nxp/common/ConnectivityManagerImpl.cpp index 2d514dd9f12d81..2753451c5308ff 100644 --- a/src/platform/nxp/common/ConnectivityManagerImpl.cpp +++ b/src/platform/nxp/common/ConnectivityManagerImpl.cpp @@ -67,7 +67,6 @@ extern "C" { using namespace ::chip; using namespace ::chip::Inet; using namespace ::chip::System; -using namespace ::chip::TLV; using namespace ::chip::DeviceLayer::Internal; using namespace ::chip::DeviceLayer::DeviceEventType; diff --git a/src/platform/nxp/k32w/k32w0/ConnectivityManagerImpl.cpp b/src/platform/nxp/k32w/k32w0/ConnectivityManagerImpl.cpp index 3182a874fbf41c..31489178875259 100644 --- a/src/platform/nxp/k32w/k32w0/ConnectivityManagerImpl.cpp +++ b/src/platform/nxp/k32w/k32w0/ConnectivityManagerImpl.cpp @@ -48,7 +48,6 @@ using namespace ::chip; using namespace ::chip::Inet; using namespace ::chip::System; -using namespace ::chip::TLV; using namespace ::chip::DeviceLayer::Internal; namespace chip { diff --git a/src/platform/nxp/k32w/k32w1/ConnectivityManagerImpl.cpp b/src/platform/nxp/k32w/k32w1/ConnectivityManagerImpl.cpp index 3182a874fbf41c..31489178875259 100644 --- a/src/platform/nxp/k32w/k32w1/ConnectivityManagerImpl.cpp +++ b/src/platform/nxp/k32w/k32w1/ConnectivityManagerImpl.cpp @@ -48,7 +48,6 @@ using namespace ::chip; using namespace ::chip::Inet; using namespace ::chip::System; -using namespace ::chip::TLV; using namespace ::chip::DeviceLayer::Internal; namespace chip { diff --git a/src/platform/nxp/mw320/ConnectivityManagerImpl.cpp b/src/platform/nxp/mw320/ConnectivityManagerImpl.cpp index 93f1b18ab7c18c..5520eaa5c03a81 100644 --- a/src/platform/nxp/mw320/ConnectivityManagerImpl.cpp +++ b/src/platform/nxp/mw320/ConnectivityManagerImpl.cpp @@ -57,7 +57,6 @@ static struct wlan_network sta_network; using namespace ::chip; using namespace ::chip::Inet; using namespace ::chip::System; -using namespace ::chip::TLV; using namespace ::chip::DeviceLayer::Internal; using namespace ::chip::app::Clusters::GeneralDiagnostics; using namespace ::chip::app::Clusters::WiFiNetworkDiagnostics; diff --git a/src/platform/nxp/zephyr/ConnectivityManagerImpl.cpp b/src/platform/nxp/zephyr/ConnectivityManagerImpl.cpp index 888e5748ad6b10..f927df2ac17480 100644 --- a/src/platform/nxp/zephyr/ConnectivityManagerImpl.cpp +++ b/src/platform/nxp/zephyr/ConnectivityManagerImpl.cpp @@ -38,7 +38,6 @@ #endif using namespace ::chip; -using namespace ::chip::TLV; using namespace ::chip::DeviceLayer::Internal; namespace chip { diff --git a/src/platform/qpg/ConnectivityManagerImpl.cpp b/src/platform/qpg/ConnectivityManagerImpl.cpp index 0a3f507a999532..50601c29721809 100644 --- a/src/platform/qpg/ConnectivityManagerImpl.cpp +++ b/src/platform/qpg/ConnectivityManagerImpl.cpp @@ -37,7 +37,6 @@ #include using namespace ::chip; -using namespace ::chip::TLV; using namespace ::chip::DeviceLayer::Internal; namespace chip { diff --git a/src/platform/silabs/ConnectivityManagerImpl_WIFI.cpp b/src/platform/silabs/ConnectivityManagerImpl_WIFI.cpp index 214b0974668fbb..1eb7b01bfc83c9 100644 --- a/src/platform/silabs/ConnectivityManagerImpl_WIFI.cpp +++ b/src/platform/silabs/ConnectivityManagerImpl_WIFI.cpp @@ -45,7 +45,6 @@ using namespace ::chip; using namespace ::chip::Inet; using namespace ::chip::System; -using namespace ::chip::TLV; using namespace ::chip::DeviceLayer::Internal; namespace chip { diff --git a/src/platform/silabs/efr32/ConnectivityManagerImpl.cpp b/src/platform/silabs/efr32/ConnectivityManagerImpl.cpp index c38a5e5bb1e268..e5d3b319389a4e 100644 --- a/src/platform/silabs/efr32/ConnectivityManagerImpl.cpp +++ b/src/platform/silabs/efr32/ConnectivityManagerImpl.cpp @@ -40,7 +40,6 @@ using namespace ::chip; using namespace ::chip::Inet; using namespace ::chip::System; -using namespace ::chip::TLV; using namespace ::chip::DeviceLayer::Internal; namespace chip { diff --git a/src/platform/stm32/ConnectivityManagerImpl.cpp b/src/platform/stm32/ConnectivityManagerImpl.cpp index 0a3f507a999532..50601c29721809 100644 --- a/src/platform/stm32/ConnectivityManagerImpl.cpp +++ b/src/platform/stm32/ConnectivityManagerImpl.cpp @@ -37,7 +37,6 @@ #include using namespace ::chip; -using namespace ::chip::TLV; using namespace ::chip::DeviceLayer::Internal; namespace chip { diff --git a/src/platform/telink/ConnectivityManagerImpl.cpp b/src/platform/telink/ConnectivityManagerImpl.cpp index 130a5634f5d2d1..601bac3f22fe71 100644 --- a/src/platform/telink/ConnectivityManagerImpl.cpp +++ b/src/platform/telink/ConnectivityManagerImpl.cpp @@ -38,7 +38,6 @@ #endif using namespace ::chip; -using namespace ::chip::TLV; using namespace ::chip::DeviceLayer::Internal; namespace chip { diff --git a/src/platform/webos/ConnectivityManagerImpl.cpp b/src/platform/webos/ConnectivityManagerImpl.cpp index e78e5aba192e68..e8640e11b1c747 100644 --- a/src/platform/webos/ConnectivityManagerImpl.cpp +++ b/src/platform/webos/ConnectivityManagerImpl.cpp @@ -65,7 +65,6 @@ #endif using namespace ::chip; -using namespace ::chip::TLV; using namespace ::chip::DeviceLayer; using namespace ::chip::DeviceLayer::Internal; using namespace ::chip::app::Clusters::GeneralDiagnostics; diff --git a/src/platform/webos/ThreadStackManagerImpl.cpp b/src/platform/webos/ThreadStackManagerImpl.cpp index fdb49ce2d5558d..cb538fa34ec618 100644 --- a/src/platform/webos/ThreadStackManagerImpl.cpp +++ b/src/platform/webos/ThreadStackManagerImpl.cpp @@ -18,7 +18,6 @@ #include #include -#include #include #include #include diff --git a/src/platform/webos/ThreadStackManagerImpl.h b/src/platform/webos/ThreadStackManagerImpl.h index 59b1a8e9646249..b102e16ab568f7 100644 --- a/src/platform/webos/ThreadStackManagerImpl.h +++ b/src/platform/webos/ThreadStackManagerImpl.h @@ -20,7 +20,6 @@ #include #include -#include #include #include #include From 1601e05dec9b947ffbc67c17f2ef3b7562a32e11 Mon Sep 17 00:00:00 2001 From: mkardous-silabs <84793247+mkardous-silabs@users.noreply.github.com> Date: Fri, 12 Apr 2024 14:54:58 -0500 Subject: [PATCH 054/468] [Silabs] Remove global function from the SilabsTestEventTriggerDelegate (#32969) * Refactor Silabs Test Event Trigger to remove global function * Enable test event trigger on the lit-icd sample apps * Add the support lib to the data provider dependencies --- .../silabs/build_for_wifi_args.gni | 2 + examples/lit-icd-app/silabs/openthread.gni | 2 + examples/platform/silabs/SiWx917/BUILD.gn | 1 + .../silabs/SilabsDeviceDataProvider.cpp | 1 + .../silabs/SilabsTestEventTriggerDelegate.h | 32 +-------------- examples/platform/silabs/efr32/BUILD.gn | 1 + .../silabs/include/SmokeCoAlarmManager.h | 15 ++++++- .../smoke-co-alarm-app/silabs/src/AppTask.cpp | 13 +++--- .../silabs/src/SmokeCoAlarmManager.cpp | 40 +++++++++---------- 9 files changed, 47 insertions(+), 60 deletions(-) diff --git a/examples/lit-icd-app/silabs/build_for_wifi_args.gni b/examples/lit-icd-app/silabs/build_for_wifi_args.gni index cdc711cdc1c252..56cd70b217e81e 100644 --- a/examples/lit-icd-app/silabs/build_for_wifi_args.gni +++ b/examples/lit-icd-app/silabs/build_for_wifi_args.gni @@ -23,6 +23,8 @@ import("${chip_root}/src/platform/silabs/wifi_args.gni") chip_enable_ota_requestor = true app_data_model = "${chip_root}/examples/lit-icd-app/lit-icd-common" +sl_enable_test_event_trigger = true + # ICD Default configurations chip_enable_icd_server = true chip_subscription_timeout_resumption = false diff --git a/examples/lit-icd-app/silabs/openthread.gni b/examples/lit-icd-app/silabs/openthread.gni index 4b49740513c555..b12529c2cab39a 100644 --- a/examples/lit-icd-app/silabs/openthread.gni +++ b/examples/lit-icd-app/silabs/openthread.gni @@ -26,6 +26,8 @@ chip_enable_openthread = true openthread_external_platform = "${chip_root}/third_party/openthread/platforms/efr32:libopenthread-efr32" +sl_enable_test_event_trigger = true + # ICD Default configurations chip_enable_icd_server = true chip_subscription_timeout_resumption = false diff --git a/examples/platform/silabs/SiWx917/BUILD.gn b/examples/platform/silabs/SiWx917/BUILD.gn index 87df30d1a186c9..e8fce7e11279f6 100644 --- a/examples/platform/silabs/SiWx917/BUILD.gn +++ b/examples/platform/silabs/SiWx917/BUILD.gn @@ -145,6 +145,7 @@ source_set("silabs-factory-data-provider") { public_deps = [ "${chip_root}/src/credentials", + "${chip_root}/src/lib/support", "${chip_root}/src/platform:platform_base", "${chip_root}/src/setup_payload", ] diff --git a/examples/platform/silabs/SilabsDeviceDataProvider.cpp b/examples/platform/silabs/SilabsDeviceDataProvider.cpp index 0bf11cde951ab4..7d80eaaafda2bd 100644 --- a/examples/platform/silabs/SilabsDeviceDataProvider.cpp +++ b/examples/platform/silabs/SilabsDeviceDataProvider.cpp @@ -18,6 +18,7 @@ #include "SilabsDeviceDataProvider.h" #include #include +#include #include #include #include diff --git a/examples/platform/silabs/SilabsTestEventTriggerDelegate.h b/examples/platform/silabs/SilabsTestEventTriggerDelegate.h index 8359e489a16029..c691c0eff9759b 100644 --- a/examples/platform/silabs/SilabsTestEventTriggerDelegate.h +++ b/examples/platform/silabs/SilabsTestEventTriggerDelegate.h @@ -25,28 +25,12 @@ #include #include -/** - * @brief User handler for handling the test event trigger - * - * @note If TestEventTrigger is enabled, it needs to be implemented in the app - * - * @param eventTrigger Event trigger to handle - * - * @warning *** DO NOT USE FOR STANDARD CLUSTER EVENT TRIGGERS *** - * - * TODO(#31723): Rename `emberAfHandleEventTrigger` to `SilabsHandleGlobalTestEventTrigger` - * - * @retval true on success - * @retval false if error happened - */ -bool emberAfHandleEventTrigger(uint64_t eventTrigger); - namespace chip { -class SilabsTestEventTriggerDelegate : public TestEventTriggerDelegate, TestEventTriggerHandler +class SilabsTestEventTriggerDelegate : public TestEventTriggerDelegate { public: - explicit SilabsTestEventTriggerDelegate() { VerifyOrDie(AddHandler(this) == CHIP_NO_ERROR); } + explicit SilabsTestEventTriggerDelegate() = default; /** * @brief Checks to see if `enableKey` provided matches value chosen by the manufacturer. @@ -54,18 +38,6 @@ class SilabsTestEventTriggerDelegate : public TestEventTriggerDelegate, TestEven * @return True or False. */ bool DoesEnableKeyMatch(const ByteSpan & enableKey) const override; - - /** - * @brief Delegates handling to global `emberAfHandleEventTrigger` function. DO NOT EXTEND. - * - * @param eventTrigger - trigger to process. - * @return CHIP_NO_ERROR if properly handled, else another CHIP_ERROR. - */ - CHIP_ERROR HandleEventTrigger(uint64_t eventTrigger) override - { - // WARNING: LEGACY SUPPORT ONLY, DO NOT EXTEND FOR STANDARD CLUSTERS - return (emberAfHandleEventTrigger(eventTrigger)) ? CHIP_NO_ERROR : CHIP_ERROR_INVALID_ARGUMENT; - } }; } // namespace chip diff --git a/examples/platform/silabs/efr32/BUILD.gn b/examples/platform/silabs/efr32/BUILD.gn index ee0b891a2565f8..aa6c72a98c24b2 100644 --- a/examples/platform/silabs/efr32/BUILD.gn +++ b/examples/platform/silabs/efr32/BUILD.gn @@ -178,6 +178,7 @@ source_set("silabs-factory-data-provider") { public_deps = [ "${chip_root}/src/credentials", + "${chip_root}/src/lib/support", "${chip_root}/src/platform:platform_base", "${chip_root}/src/setup_payload", ] diff --git a/examples/smoke-co-alarm-app/silabs/include/SmokeCoAlarmManager.h b/examples/smoke-co-alarm-app/silabs/include/SmokeCoAlarmManager.h index 423ca1ca7a364f..7b1ebe6e042849 100644 --- a/examples/smoke-co-alarm-app/silabs/include/SmokeCoAlarmManager.h +++ b/examples/smoke-co-alarm-app/silabs/include/SmokeCoAlarmManager.h @@ -21,14 +21,17 @@ #include #include "AppEvent.h" - +#include #include #include #include -class SmokeCoAlarmManager +class SmokeCoAlarmManager : public chip::TestEventTriggerHandler { public: + SmokeCoAlarmManager() = default; + ~SmokeCoAlarmManager() = default; + CHIP_ERROR Init(); /** @@ -37,6 +40,14 @@ class SmokeCoAlarmManager */ void SelfTestingEventHandler(); + /** + * @brief Delegates handling to global `emberAfHandleEventTrigger` function. DO NOT EXTEND. + * + * @param eventTrigger - trigger to process. + * @return CHIP_NO_ERROR if properly handled, else another CHIP_ERROR. + */ + CHIP_ERROR HandleEventTrigger(uint64_t eventTrigger) override; + private: friend SmokeCoAlarmManager & AlarmMgr(void); diff --git a/examples/smoke-co-alarm-app/silabs/src/AppTask.cpp b/examples/smoke-co-alarm-app/silabs/src/AppTask.cpp index 9db4af7c127902..c9b4a3ab7281f1 100644 --- a/examples/smoke-co-alarm-app/silabs/src/AppTask.cpp +++ b/examples/smoke-co-alarm-app/silabs/src/AppTask.cpp @@ -18,25 +18,19 @@ #include "AppTask.h" #include "AppConfig.h" #include "AppEvent.h" - #include "LEDWidget.h" #include #include #include #include - #include - +#include +#include #include - #include #include -#include - -#include - #if (defined(SL_CATALOG_SIMPLE_LED_LED1_PRESENT) || defined(BRD4325B)) #define LIGHT_LED 1 #else @@ -83,6 +77,9 @@ CHIP_ERROR AppTask::Init() appError(err); } + // Register Smoke & Co Test Event Trigger + Server::GetInstance().GetTestEventTriggerDelegate()->AddHandler(&AlarmMgr()); + sAlarmLED.Init(LIGHT_LED); sAlarmLED.Set(false); diff --git a/examples/smoke-co-alarm-app/silabs/src/SmokeCoAlarmManager.cpp b/examples/smoke-co-alarm-app/silabs/src/SmokeCoAlarmManager.cpp index 66eef8a6f188cf..45757c49b73304 100644 --- a/examples/smoke-co-alarm-app/silabs/src/SmokeCoAlarmManager.cpp +++ b/examples/smoke-co-alarm-app/silabs/src/SmokeCoAlarmManager.cpp @@ -117,7 +117,7 @@ void SmokeCoAlarmManager::EndSelfTestingEventHandler(AppEvent * aEvent) SILABS_LOG("End self-testing!"); } -bool emberAfHandleEventTrigger(uint64_t eventTrigger) +CHIP_ERROR SmokeCoAlarmManager::HandleEventTrigger(uint64_t eventTrigger) { SmokeCOTrigger trigger = static_cast(eventTrigger); @@ -125,32 +125,32 @@ bool emberAfHandleEventTrigger(uint64_t eventTrigger) { case SmokeCOTrigger::kForceSmokeCritical: ChipLogProgress(Support, "[Smoke-CO-Alarm-Test-Event] => Force smoke (critical)"); - VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetSmokeState(1, AlarmStateEnum::kCritical), true); + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetSmokeState(1, AlarmStateEnum::kCritical), CHIP_NO_ERROR); SmokeCoAlarmServer::Instance().SetExpressedStateByPriority(1, sPriorityOrder); break; case SmokeCOTrigger::kForceSmokeWarning: ChipLogProgress(Support, "[Smoke-CO-Alarm-Test-Event] => Force smoke (warning)"); - VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetSmokeState(1, AlarmStateEnum::kWarning), true); + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetSmokeState(1, AlarmStateEnum::kWarning), CHIP_NO_ERROR); SmokeCoAlarmServer::Instance().SetExpressedStateByPriority(1, sPriorityOrder); break; case SmokeCOTrigger::kForceSmokeInterconnect: ChipLogProgress(Support, "[Smoke-CO-Alarm-Test-Event] => Force smoke interconnect (warning)"); - VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetInterconnectSmokeAlarm(1, AlarmStateEnum::kWarning), true); + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetInterconnectSmokeAlarm(1, AlarmStateEnum::kWarning), CHIP_NO_ERROR); SmokeCoAlarmServer::Instance().SetExpressedStateByPriority(1, sPriorityOrder); break; case SmokeCOTrigger::kForceCOCritical: ChipLogProgress(Support, "[Smoke-CO-Alarm-Test-Event] => Force CO (critical)"); - VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetCOState(1, AlarmStateEnum::kCritical), true); + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetCOState(1, AlarmStateEnum::kCritical), CHIP_NO_ERROR); SmokeCoAlarmServer::Instance().SetExpressedStateByPriority(1, sPriorityOrder); break; case SmokeCOTrigger::kForceCOWarning: ChipLogProgress(Support, "[Smoke-CO-Alarm-Test-Event] => Force CO (warning)"); - VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetCOState(1, AlarmStateEnum::kWarning), true); + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetCOState(1, AlarmStateEnum::kWarning), CHIP_NO_ERROR); SmokeCoAlarmServer::Instance().SetExpressedStateByPriority(1, sPriorityOrder); break; case SmokeCOTrigger::kForceCOInterconnect: ChipLogProgress(Support, "[Smoke-CO-Alarm-Test-Event] => Force CO (warning)"); - VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetInterconnectCOAlarm(1, AlarmStateEnum::kWarning), true); + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetInterconnectCOAlarm(1, AlarmStateEnum::kWarning), CHIP_NO_ERROR); SmokeCoAlarmServer::Instance().SetExpressedStateByPriority(1, sPriorityOrder); break; case SmokeCOTrigger::kForceSmokeContaminationHigh: @@ -171,22 +171,22 @@ bool emberAfHandleEventTrigger(uint64_t eventTrigger) break; case SmokeCOTrigger::kForceMalfunction: ChipLogProgress(Support, "[Smoke-CO-Alarm-Test-Event] => Force malfunction"); - VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetHardwareFaultAlert(1, true), true); + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetHardwareFaultAlert(1, true), CHIP_NO_ERROR); SmokeCoAlarmServer::Instance().SetExpressedStateByPriority(1, sPriorityOrder); break; case SmokeCOTrigger::kForceLowBatteryWarning: ChipLogProgress(Support, "[Smoke-CO-Alarm-Test-Event] => Force low battery (warning)"); - VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetBatteryAlert(1, AlarmStateEnum::kWarning), true); + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetBatteryAlert(1, AlarmStateEnum::kWarning), CHIP_NO_ERROR); SmokeCoAlarmServer::Instance().SetExpressedStateByPriority(1, sPriorityOrder); break; case SmokeCOTrigger::kForceLowBatteryCritical: ChipLogProgress(Support, "[Smoke-CO-Alarm-Test-Event] => Force low battery (critical)"); - VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetBatteryAlert(1, AlarmStateEnum::kCritical), true); + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetBatteryAlert(1, AlarmStateEnum::kCritical), CHIP_NO_ERROR); SmokeCoAlarmServer::Instance().SetExpressedStateByPriority(1, sPriorityOrder); break; case SmokeCOTrigger::kForceEndOfLife: ChipLogProgress(Support, "[Smoke-CO-Alarm-Test-Event] => Force end-of-life"); - VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetEndOfServiceAlert(1, EndOfServiceEnum::kExpired), true); + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetEndOfServiceAlert(1, EndOfServiceEnum::kExpired), CHIP_NO_ERROR); SmokeCoAlarmServer::Instance().SetExpressedStateByPriority(1, sPriorityOrder); break; case SmokeCOTrigger::kForceSilence: @@ -195,32 +195,32 @@ bool emberAfHandleEventTrigger(uint64_t eventTrigger) break; case SmokeCOTrigger::kClearSmoke: ChipLogProgress(Support, "[Smoke-CO-Alarm-Test-Event] => Clear smoke"); - VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetSmokeState(1, AlarmStateEnum::kNormal), true); + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetSmokeState(1, AlarmStateEnum::kNormal), CHIP_NO_ERROR); SmokeCoAlarmServer::Instance().SetExpressedStateByPriority(1, sPriorityOrder); break; case SmokeCOTrigger::kClearCO: ChipLogProgress(Support, "[Smoke-CO-Alarm-Test-Event] => Clear CO"); - VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetCOState(1, AlarmStateEnum::kNormal), true); + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetCOState(1, AlarmStateEnum::kNormal), CHIP_NO_ERROR); SmokeCoAlarmServer::Instance().SetExpressedStateByPriority(1, sPriorityOrder); break; case SmokeCOTrigger::kClearSmokeInterconnect: ChipLogProgress(Support, "[Smoke-CO-Alarm-Test-Event] => Clear smoke interconnect"); - VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetInterconnectSmokeAlarm(1, AlarmStateEnum::kNormal), true); + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetInterconnectSmokeAlarm(1, AlarmStateEnum::kNormal), CHIP_NO_ERROR); SmokeCoAlarmServer::Instance().SetExpressedStateByPriority(1, sPriorityOrder); break; case SmokeCOTrigger::kClearCOInterconnect: ChipLogProgress(Support, "[Smoke-CO-Alarm-Test-Event] => Clear CO interconnect"); - VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetInterconnectCOAlarm(1, AlarmStateEnum::kNormal), true); + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetInterconnectCOAlarm(1, AlarmStateEnum::kNormal), CHIP_NO_ERROR); SmokeCoAlarmServer::Instance().SetExpressedStateByPriority(1, sPriorityOrder); break; case SmokeCOTrigger::kClearMalfunction: ChipLogProgress(Support, "[Smoke-CO-Alarm-Test-Event] => Clear malfunction"); - VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetHardwareFaultAlert(1, false), true); + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetHardwareFaultAlert(1, false), CHIP_NO_ERROR); SmokeCoAlarmServer::Instance().SetExpressedStateByPriority(1, sPriorityOrder); break; case SmokeCOTrigger::kClearEndOfLife: ChipLogProgress(Support, "[Smoke-CO-Alarm-Test-Event] => Clear end-of-life"); - VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetEndOfServiceAlert(1, EndOfServiceEnum::kNormal), true); + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetEndOfServiceAlert(1, EndOfServiceEnum::kNormal), CHIP_NO_ERROR); SmokeCoAlarmServer::Instance().SetExpressedStateByPriority(1, sPriorityOrder); break; case SmokeCOTrigger::kClearSilence: @@ -229,7 +229,7 @@ bool emberAfHandleEventTrigger(uint64_t eventTrigger) break; case SmokeCOTrigger::kClearBatteryLevelLow: ChipLogProgress(Support, "[Smoke-CO-Alarm-Test-Event] => Clear low battery"); - VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetBatteryAlert(1, AlarmStateEnum::kNormal), true); + VerifyOrReturnValue(SmokeCoAlarmServer::Instance().SetBatteryAlert(1, AlarmStateEnum::kNormal), CHIP_NO_ERROR); SmokeCoAlarmServer::Instance().SetExpressedStateByPriority(1, sPriorityOrder); break; case SmokeCOTrigger::kClearContamination: @@ -242,8 +242,8 @@ bool emberAfHandleEventTrigger(uint64_t eventTrigger) break; default: - return false; + return CHIP_ERROR_INVALID_ARGUMENT; } - return true; + return CHIP_NO_ERROR; } From 2dd3bfd480ea3541208d7a9ebce57965968c9f9d Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Fri, 12 Apr 2024 18:12:57 -0400 Subject: [PATCH 055/468] Fix crash if commissioning is canceled while waiting on an attestation delegate. (#32974) When we extend the fail-safe after device attestation before calling into the delegate, we ended up with a dangling mInvokeCancelFn after the command finished and until CommissioningStageComplete(). That last would not happen until our delegate called back into us to continue commissioning. If an attempt was made to cancel commissioning during that time interval, we would end up crashing. --- src/controller/CHIPDeviceController.cpp | 32 +++++++---- src/controller/CHIPDeviceController.h | 1 + .../Framework/CHIPTests/MTRPairingTests.m | 57 +++++++++++++++++-- 3 files changed, 72 insertions(+), 18 deletions(-) diff --git a/src/controller/CHIPDeviceController.cpp b/src/controller/CHIPDeviceController.cpp index a9c41d87fd04fa..98e3012a49959f 100644 --- a/src/controller/CHIPDeviceController.cpp +++ b/src/controller/CHIPDeviceController.cpp @@ -1230,31 +1230,41 @@ void DeviceCommissioner::OnDeviceAttestationInformationVerification( } void DeviceCommissioner::OnArmFailSafeExtendedForDeviceAttestation( - void * context, const GeneralCommissioning::Commands::ArmFailSafeResponse::DecodableType & data) + void * context, const GeneralCommissioning::Commands::ArmFailSafeResponse::DecodableType &) { - // If this function starts using "data", need to fix ExtendArmFailSafeForDeviceAttestation accordingly. + ChipLogProgress(Controller, "Successfully extended fail-safe timer to handle DA failure"); DeviceCommissioner * commissioner = static_cast(context); - if (!commissioner->mDeviceBeingCommissioned) + // We have completed our command invoke, but we're not going to finish the + // commissioning step until our client examines the attestation + // information. Clear out mInvokeCancelFn (which points at the + // CommandSender we just finished using) now, so it's not dangling. + commissioner->mInvokeCancelFn = nullptr; + + commissioner->HandleDeviceAttestationCompleted(); +} + +void DeviceCommissioner::HandleDeviceAttestationCompleted() +{ + if (!mDeviceBeingCommissioned) { return; } - auto & params = commissioner->mDefaultCommissioner->GetCommissioningParameters(); + auto & params = mDefaultCommissioner->GetCommissioningParameters(); Credentials::DeviceAttestationDelegate * deviceAttestationDelegate = params.GetDeviceAttestationDelegate(); if (deviceAttestationDelegate) { ChipLogProgress(Controller, "Device attestation completed, delegating continuation to client"); - deviceAttestationDelegate->OnDeviceAttestationCompleted(commissioner, commissioner->mDeviceBeingCommissioned, - *commissioner->mAttestationDeviceInfo, - commissioner->mAttestationResult); + deviceAttestationDelegate->OnDeviceAttestationCompleted(this, mDeviceBeingCommissioned, *mAttestationDeviceInfo, + mAttestationResult); } else { ChipLogProgress(Controller, "Device attestation failed and no delegate set, failing commissioning"); CommissioningDelegate::CommissioningReport report; - report.Set(commissioner->mAttestationResult); - commissioner->CommissioningStageComplete(CHIP_ERROR_INTERNAL, report); + report.Set(mAttestationResult); + CommissioningStageComplete(CHIP_ERROR_INTERNAL, report); } } @@ -1371,9 +1381,7 @@ void DeviceCommissioner::ExtendArmFailSafeForDeviceAttestation(const Credentials if (!waitForFailsafeExtension) { - // Callee does not use data argument. - const GeneralCommissioning::Commands::ArmFailSafeResponse::DecodableType data; - OnArmFailSafeExtendedForDeviceAttestation(this, data); + HandleDeviceAttestationCompleted(); } } diff --git a/src/controller/CHIPDeviceController.h b/src/controller/CHIPDeviceController.h index 3d6e287ff17f44..b035334764b4a0 100644 --- a/src/controller/CHIPDeviceController.h +++ b/src/controller/CHIPDeviceController.h @@ -956,6 +956,7 @@ class DLL_EXPORT DeviceCommissioner : public DeviceController, static void OnArmFailSafeExtendedForDeviceAttestation( void * context, const chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafeResponse::DecodableType & data); static void OnFailedToExtendedArmFailSafeDeviceAttestation(void * context, CHIP_ERROR error); + void HandleDeviceAttestationCompleted(); static void OnICDManagementRegisterClientResponse( void * context, const app::Clusters::IcdManagement::Commands::RegisterClientResponse::DecodableType & data); diff --git a/src/darwin/Framework/CHIPTests/MTRPairingTests.m b/src/darwin/Framework/CHIPTests/MTRPairingTests.m index 8bd34a2ff2c11e..a5e44fff2632e7 100644 --- a/src/darwin/Framework/CHIPTests/MTRPairingTests.m +++ b/src/darwin/Framework/CHIPTests/MTRPairingTests.m @@ -48,18 +48,29 @@ // commissioning flows that have such a delegate. @interface NoOpAttestationDelegate : NSObject @property (nonatomic) XCTestExpectation * expectation; +@property (nonatomic) BOOL blockCommissioning; - (instancetype)initWithExpectation:(XCTestExpectation *)expectation; +// If blockCommissioning is YES, this delegate will never proceed from +// its attestation verification callback. +- (instancetype)initWithExpectation:(XCTestExpectation *)expectation blockCommissioning:(BOOL)blockCommissioning; @end @implementation NoOpAttestationDelegate + - (instancetype)initWithExpectation:(XCTestExpectation *)expectation +{ + return [self initWithExpectation:expectation blockCommissioning:NO]; +} + +- (instancetype)initWithExpectation:(XCTestExpectation *)expectation blockCommissioning:(BOOL)blockCommissioning; { if (!(self = [super init])) { return nil; } _expectation = expectation; + _blockCommissioning = blockCommissioning; return self; } @@ -74,7 +85,10 @@ - (void)deviceAttestationCompletedForController:(MTRDeviceController *)controlle XCTAssertEqualObjects(attestationDeviceInfo.productID, @(0x8001)); XCTAssertEqualObjects(attestationDeviceInfo.basicInformationVendorID, @(0xFFF1)); XCTAssertEqualObjects(attestationDeviceInfo.basicInformationProductID, @(0x8000)); - [controller continueCommissioningDevice:opaqueDeviceHandle ignoreAttestationFailure:NO error:nil]; + + if (!self.blockCommissioning) { + [controller continueCommissioningDevice:opaqueDeviceHandle ignoreAttestationFailure:NO error:nil]; + } } @end @@ -241,7 +255,7 @@ - (void)test004_PairWithAttestationDelegateFailsafeExtensionLong [self waitForExpectations:@[ expectation ] timeout:kTimeoutInSeconds]; } -- (void)doPairingAndWaitForProgress:(NSString *)trigger +- (void)doPairingAndWaitForProgress:(NSString *)trigger attestationDelegate:(nullable id)attestationDelegate { XCTestExpectation * expectation = [self expectationWithDescription:@"Trigger message seen"]; expectation.assertForOverFulfill = NO; @@ -251,9 +265,19 @@ - (void)doPairingAndWaitForProgress:(NSString *)trigger } }); + XCTestExpectation * attestationExpectation; + if (attestationDelegate == nil) { + attestationExpectation = [self expectationWithDescription:@"Attestation delegate called"]; + attestationDelegate = [[NoOpAttestationDelegate alloc] initWithExpectation:attestationExpectation]; + } + + // Make sure we exercise the codepath that has an attestation delegate and + // extends the fail-safe while waiting for that delegate. And make sure our + // fail-safe extension is long enough that we actually trigger a fail-safe + // extension (so longer than the 1-minute default). __auto_type * controllerDelegate = [[MTRPairingTestControllerDelegate alloc] initWithExpectation:nil - attestationDelegate:nil - failSafeExtension:nil]; + attestationDelegate:attestationDelegate + failSafeExtension:@(90)]; [sController setDeviceControllerDelegate:controllerDelegate queue:dispatch_get_main_queue()]; self.controllerDelegate = controllerDelegate; @@ -264,13 +288,17 @@ - (void)doPairingAndWaitForProgress:(NSString *)trigger XCTAssertNil(error); [self waitForExpectations:@[ expectation ] timeout:kPairingTimeoutInSeconds]; + + if (attestationExpectation) { + [self waitForExpectations:@[ attestationExpectation ] timeout:kTimeoutInSeconds]; + } MTRSetLogCallback(0, nil); } -- (void)doPairingTestAfterCancellationAtProgress:(NSString *)trigger +- (void)doPairingTestAfterCancellationAtProgress:(NSString *)trigger attestationDelegate:(nullable id)attestationDelegate { // Run pairing up and wait for the trigger - [self doPairingAndWaitForProgress:trigger]; + [self doPairingAndWaitForProgress:trigger attestationDelegate:attestationDelegate]; // Call StopPairing and wait for the commissioningComplete callback XCTestExpectation * expectation = [self expectationWithDescription:@"commissioningComplete delegate method called"]; @@ -289,6 +317,11 @@ - (void)doPairingTestAfterCancellationAtProgress:(NSString *)trigger [self doPairingTestWithAttestationDelegate:nil failSafeExtension:nil]; } +- (void)doPairingTestAfterCancellationAtProgress:(NSString *)trigger +{ + [self doPairingTestAfterCancellationAtProgress:trigger attestationDelegate:nil]; +} + - (void)test005_pairingAfterCancellation_ReadCommissioningInfo { // @"Sending read request for commissioning information" @@ -306,4 +339,16 @@ - (void)test007_pairingAfterCancellation_FindOperational [self doPairingTestAfterCancellationAtProgress:@"FindOrEstablishSession:"]; } +- (void)test008_pairingAfterCancellation_DeviceAttestationVerification +{ + // Cancel pairing while we are waiting for our client to decide what to do + // with the attestation information we got. + XCTestExpectation * attestationExpectation = [self expectationWithDescription:@"Blocking attestation delegate called"]; + __auto_type * attestationDelegate = [[NoOpAttestationDelegate alloc] initWithExpectation:attestationExpectation blockCommissioning:YES]; + + [self doPairingTestAfterCancellationAtProgress:@"Successfully extended fail-safe timer to handle DA failure" attestationDelegate:attestationDelegate]; + + [self waitForExpectations:@[ attestationExpectation ] timeout:kTimeoutInSeconds]; +} + @end From 3ddf53d9faf7aef86dad0aa5b93825ead67f50fd Mon Sep 17 00:00:00 2001 From: Jeff Tung <100387939+jtung-apple@users.noreply.github.com> Date: Fri, 12 Apr 2024 18:20:14 -0700 Subject: [PATCH 056/468] [Darwin] MTRDeviceControllerStorageDelegate should support bulk store/fetch (#32858) * [Darwin] MTRDeviceControllerStorageDelegate should support bulk store/fetch * Update src/darwin/Framework/CHIP/MTRDeviceControllerStorageDelegate.h Co-authored-by: Boris Zbarsky * MTRDeviceControllerStorageDelegate header documentation clarification * Update src/darwin/Framework/CHIP/MTRDevice.mm Co-authored-by: Boris Zbarsky * Update src/darwin/Framework/CHIP/MTRDeviceController.mm Co-authored-by: Boris Zbarsky * Update src/darwin/Framework/CHIP/MTRDeviceControllerDataStore.h Co-authored-by: Boris Zbarsky * Update src/darwin/Framework/CHIPTests/MTRPerControllerStorageTests.m Co-authored-by: Boris Zbarsky * Update src/darwin/Framework/CHIPTests/MTRPerControllerStorageTests.m Co-authored-by: Boris Zbarsky * Address review comments * Update src/darwin/Framework/CHIP/MTRDeviceControllerStorageDelegate.h Co-authored-by: Boris Zbarsky * Update src/darwin/Framework/CHIP/MTRDeviceControllerStorageDelegate.h Co-authored-by: Boris Zbarsky * Update src/darwin/Framework/CHIP/MTRDeviceControllerStorageDelegate.h Co-authored-by: Boris Zbarsky * Update src/darwin/Framework/CHIP/MTRDeviceControllerStorageDelegate.h Co-authored-by: Boris Zbarsky * Update src/darwin/Framework/CHIP/MTRDeviceControllerStorageDelegate.h Co-authored-by: Boris Zbarsky * Update src/darwin/Framework/CHIP/MTRDeviceControllerDataStore.h Co-authored-by: Boris Zbarsky * Move processing out of storage delegate queue dispatch_sync --------- Co-authored-by: Boris Zbarsky Co-authored-by: Justin Wood --- src/darwin/Framework/CHIP/MTRDevice.mm | 22 +++ .../Framework/CHIP/MTRDeviceController.mm | 66 +++++-- .../CHIP/MTRDeviceControllerDataStore.h | 9 + .../CHIP/MTRDeviceControllerDataStore.mm | 169 ++++++++++++++--- .../MTRDeviceControllerLocalTestStorage.mm | 48 ++++- .../CHIP/MTRDeviceControllerStorageDelegate.h | 44 +++-- .../Framework/CHIP/MTRDevice_Internal.h | 4 + .../CHIPTests/MTRPerControllerStorageTests.m | 173 +++++++++++++++++- .../TestHelpers/MTRTestDeclarations.h | 5 + .../TestHelpers/MTRTestPerControllerStorage.h | 11 ++ .../TestHelpers/MTRTestPerControllerStorage.m | 31 ++++ 11 files changed, 530 insertions(+), 52 deletions(-) diff --git a/src/darwin/Framework/CHIP/MTRDevice.mm b/src/darwin/Framework/CHIP/MTRDevice.mm index 9997b370320e7b..ee72c4cc815ad1 100644 --- a/src/darwin/Framework/CHIP/MTRDevice.mm +++ b/src/darwin/Framework/CHIP/MTRDevice.mm @@ -236,6 +236,20 @@ - (id)copyWithZone:(NSZone *)zone return [[MTRDeviceClusterData alloc] initWithDataVersion:_dataVersion attributes:_attributes]; } +- (BOOL)isEqualToClusterData:(MTRDeviceClusterData *)otherClusterData +{ + return [_dataVersion isEqual:otherClusterData.dataVersion] && [_attributes isEqual:otherClusterData.attributes]; +} + +- (BOOL)isEqual:(id)object +{ + if ([object class] != [self class]) { + return NO; + } + + return [self isEqualToClusterData:object]; +} + @end @interface MTRDevice () @@ -2250,6 +2264,14 @@ - (void)setAttributeValues:(NSArray *)attributeValues reportChan [self _setAttributeValues:attributeValues reportChanges:reportChanges]; } +#ifdef DEBUG +- (NSUInteger)unitTestAttributeCount +{ + std::lock_guard lock(_lock); + return _readCache.count; +} +#endif + - (void)setClusterData:(NSDictionary *)clusterData { MTR_LOG_INFO("%@ setClusterData count: %lu", self, static_cast(clusterData.count)); diff --git a/src/darwin/Framework/CHIP/MTRDeviceController.mm b/src/darwin/Framework/CHIP/MTRDeviceController.mm index 4c7c7c7c964659..ab2bba520b2675 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceController.mm @@ -576,6 +576,20 @@ - (BOOL)startup:(MTRDeviceControllerStartupParamsInternal *)startupParams return NO; } + if (_controllerDataStore) { + // If the storage delegate supports the bulk read API, then a dictionary of nodeID => cluster data dictionary would be passed to the handler. Otherwise this would be a no-op, and stored attributes for MTRDevice objects will be loaded lazily in -deviceForNodeID:. + [_controllerDataStore fetchAttributeDataForAllDevices:^(NSDictionary *> * _Nonnull clusterDataByNode) { + MTR_LOG_INFO("Loaded attribute values for %lu nodes from storage for controller uuid %@", static_cast(clusterDataByNode.count), self->_uniqueIdentifier); + + std::lock_guard lock(self->_deviceMapLock); + for (NSNumber * nodeID in clusterDataByNode) { + NSDictionary * clusterData = clusterDataByNode[nodeID]; + MTRDevice * device = [self _setupDeviceForNodeID:nodeID prefetchedClusterData:clusterData]; + MTR_LOG_INFO("Loaded %lu cluster data from storage for %@", static_cast(clusterData.count), device); + } + }]; + } + return YES; } @@ -919,20 +933,25 @@ - (MTRBaseDevice *)baseDeviceForNodeID:(NSNumber *)nodeID return [[MTRBaseDevice alloc] initWithNodeID:nodeID controller:self]; } -- (MTRDevice *)deviceForNodeID:(NSNumber *)nodeID +// If prefetchedClusterData is not provided, load attributes individually from controller data store +- (MTRDevice *)_setupDeviceForNodeID:(NSNumber *)nodeID prefetchedClusterData:(NSDictionary *)prefetchedClusterData { - std::lock_guard lock(_deviceMapLock); - MTRDevice * deviceToReturn = _nodeIDToDeviceMap[nodeID]; - if (!deviceToReturn) { - deviceToReturn = [[MTRDevice alloc] initWithNodeID:nodeID controller:self]; - // If we're not running, don't add the device to our map. That would - // create a cycle that nothing would break. Just return the device, - // which will be in exactly the state it would be in if it were created - // while we were running and then we got shut down. - if ([self isRunning]) { - _nodeIDToDeviceMap[nodeID] = deviceToReturn; - } + os_unfair_lock_assert_owner(&_deviceMapLock); + + MTRDevice * deviceToReturn = [[MTRDevice alloc] initWithNodeID:nodeID controller:self]; + // If we're not running, don't add the device to our map. That would + // create a cycle that nothing would break. Just return the device, + // which will be in exactly the state it would be in if it were created + // while we were running and then we got shut down. + if ([self isRunning]) { + _nodeIDToDeviceMap[nodeID] = deviceToReturn; + } + if (prefetchedClusterData) { + if (prefetchedClusterData.count) { + [deviceToReturn setClusterData:prefetchedClusterData]; + } + } else { #if !MTRDEVICE_ATTRIBUTE_CACHE_STORE_ATTRIBUTES_BY_CLUSTER // Load persisted attributes if they exist. NSArray * attributesFromCache = [_controllerDataStore getStoredAttributesForNodeID:nodeID]; @@ -952,6 +971,17 @@ - (MTRDevice *)deviceForNodeID:(NSNumber *)nodeID return deviceToReturn; } +- (MTRDevice *)deviceForNodeID:(NSNumber *)nodeID +{ + std::lock_guard lock(_deviceMapLock); + MTRDevice * deviceToReturn = _nodeIDToDeviceMap[nodeID]; + if (!deviceToReturn) { + deviceToReturn = [self _setupDeviceForNodeID:nodeID prefetchedClusterData:nil]; + } + + return deviceToReturn; +} + - (void)removeDevice:(MTRDevice *)device { std::lock_guard lock(_deviceMapLock); @@ -965,6 +995,18 @@ - (void)removeDevice:(MTRDevice *)device } } +#ifdef DEBUG +- (NSDictionary *)unitTestGetDeviceAttributeCounts +{ + std::lock_guard lock(_deviceMapLock); + NSMutableDictionary * deviceAttributeCounts = [NSMutableDictionary dictionary]; + for (NSNumber * nodeID in _nodeIDToDeviceMap) { + deviceAttributeCounts[nodeID] = @([_nodeIDToDeviceMap[nodeID] unitTestAttributeCount]); + } + return deviceAttributeCounts; +} +#endif + - (void)setDeviceControllerDelegate:(id)delegate queue:(dispatch_queue_t)queue { [self diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerDataStore.h b/src/darwin/Framework/CHIP/MTRDeviceControllerDataStore.h index 27019b06df1acb..bc3b8f37f90fbb 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerDataStore.h +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerDataStore.h @@ -44,6 +44,15 @@ NS_ASSUME_NONNULL_BEGIN storageDelegate:(id)storageDelegate storageDelegateQueue:(dispatch_queue_t)storageDelegateQueue; +// clusterDataByNode a dictionary: nodeID => cluster data dictionary +typedef void (^MTRDeviceControllerDataStoreClusterDataHandler)(NSDictionary *> * clusterDataByNode); + +/** + * Asks the data store to load cluster data for nodes in bulk. If the storageDelegate supports it, the handler will be called synchronously. + * If the storageDelegate does not support it, the handler will not be called at all. + */ +- (void)fetchAttributeDataForAllDevices:(MTRDeviceControllerDataStoreClusterDataHandler)clusterDataHandler; + /** * Resumption info APIs. */ diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerDataStore.mm b/src/darwin/Framework/CHIP/MTRDeviceControllerDataStore.mm index 4c7c43586aa29c..d6c7e8c00dfeb1 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerDataStore.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerDataStore.mm @@ -151,6 +151,20 @@ - (nullable instancetype)initWithController:(MTRDeviceController *)controller return self; } +- (void)fetchAttributeDataForAllDevices:(MTRDeviceControllerDataStoreClusterDataHandler)clusterDataHandler +{ + __block NSDictionary * dataStoreSecureLocalValues = nil; + dispatch_sync(_storageDelegateQueue, ^{ + if ([self->_storageDelegate respondsToSelector:@selector(valuesForController:securityLevel:sharingType:)]) { + dataStoreSecureLocalValues = [self->_storageDelegate valuesForController:self->_controller securityLevel:MTRStorageSecurityLevelSecure sharingType:MTRStorageSharingTypeNotShared]; + } + }); + + if (dataStoreSecureLocalValues.count) { + clusterDataHandler([self _getClusterDataFromSecureLocalValues:dataStoreSecureLocalValues]); + } +} + - (nullable MTRCASESessionResumptionInfo *)findResumptionInfoByNodeID:(NSNumber *)nodeID { return [self _findResumptionInfoWithKey:ResumptionByNodeIDKey(nodeID)]; @@ -337,6 +351,14 @@ - (BOOL)_storeAttributeCacheValue:(id)value forKey:(NSString *)key sharingType:MTRStorageSharingTypeNotShared]; } +- (BOOL)_bulkStoreAttributeCacheValues:(NSDictionary> *)values +{ + return [_storageDelegate controller:_controller + storeValues:values + securityLevel:MTRStorageSecurityLevelSecure + sharingType:MTRStorageSharingTypeNotShared]; +} + - (BOOL)_removeAttributeCacheValueForKey:(NSString *)key { return [_storageDelegate controller:_controller @@ -968,6 +990,76 @@ - (void)clearAllStoredAttributes return clusterDataToReturn; } +// Utility for constructing dictionary of nodeID to cluster data from dictionary of storage keys +- (nullable NSDictionary *> *)_getClusterDataFromSecureLocalValues:(NSDictionary *)secureLocalValues +{ + NSMutableDictionary *> * clusterDataByNodeToReturn = nil; + + if (![secureLocalValues isKindOfClass:[NSDictionary class]]) { + return nil; + } + + // Fetch node index + NSArray * nodeIndex = secureLocalValues[sAttributeCacheNodeIndexKey]; + + if (![nodeIndex isKindOfClass:[NSArray class]]) { + return nil; + } + + for (NSNumber * nodeID in nodeIndex) { + if (![nodeID isKindOfClass:[NSNumber class]]) { + continue; + } + + NSMutableDictionary * clusterDataForNode = nil; + NSArray * endpointIndex = secureLocalValues[[self _endpointIndexKeyForNodeID:nodeID]]; + + if (![endpointIndex isKindOfClass:[NSArray class]]) { + continue; + } + + for (NSNumber * endpointID in endpointIndex) { + if (![endpointID isKindOfClass:[NSNumber class]]) { + continue; + } + + NSArray * clusterIndex = secureLocalValues[[self _clusterIndexKeyForNodeID:nodeID endpointID:endpointID]]; + + if (![clusterIndex isKindOfClass:[NSArray class]]) { + continue; + } + + for (NSNumber * clusterID in clusterIndex) { + if (![clusterID isKindOfClass:[NSNumber class]]) { + continue; + } + + MTRDeviceClusterData * clusterData = secureLocalValues[[self _clusterDataKeyForNodeID:nodeID endpointID:endpointID clusterID:clusterID]]; + if (!clusterData) { + continue; + } + if (![clusterData isKindOfClass:[MTRDeviceClusterData class]]) { + continue; + } + MTRClusterPath * clusterPath = [MTRClusterPath clusterPathWithEndpointID:endpointID clusterID:clusterID]; + if (!clusterDataForNode) { + clusterDataForNode = [NSMutableDictionary dictionary]; + } + clusterDataForNode[clusterPath] = clusterData; + } + } + + if (clusterDataForNode.count) { + if (!clusterDataByNodeToReturn) { + clusterDataByNodeToReturn = [NSMutableDictionary dictionary]; + } + clusterDataByNodeToReturn[nodeID] = clusterDataForNode; + } + } + + return clusterDataByNodeToReturn; +} + - (void)storeClusterData:(NSDictionary *)clusterData forNodeID:(NSNumber *)nodeID { if (!nodeID) { @@ -983,6 +1075,11 @@ - (void)storeClusterData:(NSDictionary dispatch_async(_storageDelegateQueue, ^{ NSUInteger storeFailures = 0; + NSMutableDictionary> * bulkValuesToStore = nil; + if ([self->_storageDelegate respondsToSelector:@selector(controller:storeValues:securityLevel:sharingType:)]) { + bulkValuesToStore = [NSMutableDictionary dictionary]; + } + // A map of endpoint => list of clusters modified for that endpoint so cluster indexes can be updated later NSMutableDictionary *> * clustersModified = [NSMutableDictionary dictionary]; @@ -993,11 +1090,15 @@ - (void)storeClusterData:(NSDictionary MTR_LOG_INFO("Attempt to store clusterData @ node 0x%016llX endpoint %u cluster 0x%08lX", nodeID.unsignedLongLongValue, path.endpoint.unsignedShortValue, path.cluster.unsignedLongValue); #endif - // Store cluster data - BOOL storeFailed = ![self _storeClusterData:data forNodeID:nodeID endpointID:path.endpoint clusterID:path.cluster]; - if (storeFailed) { - storeFailures++; - MTR_LOG_INFO("Store failed for clusterDAta @ node 0x%016llX endpoint %u cluster 0x%08lX", nodeID.unsignedLongLongValue, path.endpoint.unsignedShortValue, path.cluster.unsignedLongValue); + if (bulkValuesToStore) { + bulkValuesToStore[[self _clusterDataKeyForNodeID:nodeID endpointID:path.endpoint clusterID:path.cluster]] = data; + } else { + // Store cluster data + BOOL storeFailed = ![self _storeClusterData:data forNodeID:nodeID endpointID:path.endpoint clusterID:path.cluster]; + if (storeFailed) { + storeFailures++; + MTR_LOG_INFO("Store failed for clusterData @ node 0x%016llX endpoint %u cluster 0x%08lX", nodeID.unsignedLongLongValue, path.endpoint.unsignedShortValue, path.cluster.unsignedLongValue); + } } // Note the cluster as modified for the endpoint @@ -1046,36 +1147,60 @@ - (void)storeClusterData:(NSDictionary } if (clusterIndexModified) { - BOOL storeFailed = ![self _storeClusterIndex:clusterIndexToStore forNodeID:nodeID endpointID:endpointID]; - if (storeFailed) { - storeFailures++; - MTR_LOG_INFO("Store failed for clusterIndex @ node 0x%016llX endpoint %u", nodeID.unsignedLongLongValue, endpointID.unsignedShortValue); - continue; + if (bulkValuesToStore) { + bulkValuesToStore[[self _clusterIndexKeyForNodeID:nodeID endpointID:endpointID]] = clusterIndexToStore; + } else { + BOOL storeFailed = ![self _storeClusterIndex:clusterIndexToStore forNodeID:nodeID endpointID:endpointID]; + if (storeFailed) { + storeFailures++; + MTR_LOG_INFO("Store failed for clusterIndex @ node 0x%016llX endpoint %u", nodeID.unsignedLongLongValue, endpointID.unsignedShortValue); + continue; + } } } } // Update endpoint index as needed if (endpointIndexModified) { - BOOL storeFailed = ![self _storeEndpointIndex:endpointIndexToStore forNodeID:nodeID]; - if (storeFailed) { - storeFailures++; - MTR_LOG_INFO("Store failed for endpointIndex @ node 0x%016llX", nodeID.unsignedLongLongValue); + if (bulkValuesToStore) { + bulkValuesToStore[[self _endpointIndexKeyForNodeID:nodeID]] = endpointIndexToStore; + } else { + BOOL storeFailed = ![self _storeEndpointIndex:endpointIndexToStore forNodeID:nodeID]; + if (storeFailed) { + storeFailures++; + MTR_LOG_INFO("Store failed for endpointIndex @ node 0x%016llX", nodeID.unsignedLongLongValue); + } } } - // Ensure node index exists + // Check if node index needs updating / creation NSArray * nodeIndex = [self _fetchNodeIndex]; - BOOL storeFailed = NO; + NSArray * nodeIndexToStore = nil; if (!nodeIndex) { - nodeIndex = [NSArray arrayWithObject:nodeID]; - storeFailed = ![self _storeNodeIndex:nodeIndex]; + // Ensure node index exists + nodeIndexToStore = [NSArray arrayWithObject:nodeID]; } else if (![nodeIndex containsObject:nodeID]) { - storeFailed = ![self _storeNodeIndex:[nodeIndex arrayByAddingObject:nodeID]]; + nodeIndexToStore = [nodeIndex arrayByAddingObject:nodeID]; } - if (storeFailed) { - storeFailures++; - MTR_LOG_INFO("Store failed for nodeIndex"); + + if (nodeIndexToStore) { + if (bulkValuesToStore) { + bulkValuesToStore[sAttributeCacheNodeIndexKey] = nodeIndexToStore; + } else { + BOOL storeFailed = ![self _storeNodeIndex:nodeIndexToStore]; + if (storeFailed) { + storeFailures++; + MTR_LOG_INFO("Store failed for nodeIndex"); + } + } + } + + if (bulkValuesToStore) { + BOOL storeFailed = ![self _bulkStoreAttributeCacheValues:bulkValuesToStore]; + if (storeFailed) { + storeFailures++; + MTR_LOG_INFO("Store failed for bulk values count %lu", static_cast(bulkValuesToStore.count)); + } } // In the rare event that store fails, allow all attribute store attempts to go through and prune empty branches at the end altogether. diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerLocalTestStorage.mm b/src/darwin/Framework/CHIP/MTRDeviceControllerLocalTestStorage.mm index 9ccd651760a47d..f51dae7bbbcaff 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerLocalTestStorage.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerLocalTestStorage.mm @@ -42,6 +42,7 @@ + (void)setLocalTestStorageEnabled:(BOOL)localTestStorageEnabled } } +// TODO: Add another init argument for controller so that this can support multiple-controllers. - (instancetype)initWithPassThroughStorage:(id)passThroughStorage { if (self = [super init]) { @@ -79,8 +80,12 @@ - (BOOL)controller:(MTRDeviceController *)controller sharingType:(MTRStorageSharingType)sharingType { if (sharingType == MTRStorageSharingTypeNotShared) { - NSError * error; + NSError * error = nil; NSData * data = [NSKeyedArchiver archivedDataWithRootObject:value requiringSecureCoding:YES error:&error]; + if (error) { + MTR_LOG_INFO("MTRDeviceControllerLocalTestStorage storeValue: failed to convert value object to data %@", error); + return NO; + } NSUserDefaults * defaults = [[NSUserDefaults alloc] initWithSuiteName:kLocalTestUserDefaultDomain]; [defaults setObject:data forKey:key]; return YES; @@ -112,4 +117,45 @@ - (BOOL)controller:(MTRDeviceController *)controller } } } + +- (NSDictionary> *)valuesForController:(MTRDeviceController *)controller securityLevel:(MTRStorageSecurityLevel)securityLevel sharingType:(MTRStorageSharingType)sharingType +{ + if (sharingType == MTRStorageSharingTypeNotShared) { + NSUserDefaults * defaults = [[NSUserDefaults alloc] initWithSuiteName:kLocalTestUserDefaultDomain]; + return [defaults dictionaryRepresentation]; + } else { + if (_passThroughStorage && [_passThroughStorage respondsToSelector:@selector(valuesForController:securityLevel:sharingType:)]) { + return [_passThroughStorage valuesForController:controller securityLevel:securityLevel sharingType:sharingType]; + } else { + MTR_LOG_INFO("MTRDeviceControllerLocalTestStorage valuesForController: shared type but no pass-through storage"); + return nil; + } + } +} + +- (BOOL)controller:(MTRDeviceController *)controller storeValues:(NSDictionary> *)values securityLevel:(MTRStorageSecurityLevel)securityLevel sharingType:(MTRStorageSharingType)sharingType +{ + if (sharingType == MTRStorageSharingTypeNotShared) { + NSUserDefaults * defaults = [[NSUserDefaults alloc] initWithSuiteName:kLocalTestUserDefaultDomain]; + BOOL success = YES; + for (NSString * key in values) { + NSError * error = nil; + NSData * data = [NSKeyedArchiver archivedDataWithRootObject:values[key] requiringSecureCoding:YES error:&error]; + if (error) { + MTR_LOG_INFO("MTRDeviceControllerLocalTestStorage storeValues: failed to convert value object to data %@", error); + success = NO; + continue; + } + [defaults setObject:data forKey:key]; + } + return success; + } else { + if (_passThroughStorage && [_passThroughStorage respondsToSelector:@selector(controller:storeValues:securityLevel:sharingType:)]) { + return [_passThroughStorage controller:controller storeValues:values securityLevel:securityLevel sharingType:sharingType]; + } else { + MTR_LOG_INFO("MTRDeviceControllerLocalTestStorage valuesForController: shared type but no pass-through storage"); + return NO; + } + } +} @end diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerStorageDelegate.h b/src/darwin/Framework/CHIP/MTRDeviceControllerStorageDelegate.h index bdf9bdb1a44c56..3e4e0575e56834 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerStorageDelegate.h +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerStorageDelegate.h @@ -47,7 +47,7 @@ typedef NS_ENUM(NSUInteger, MTRStorageSharingType) { /** * Protocol for storing and retrieving controller-specific data. * - * Implementations of this protocol MUST keep two things in mind: + * Implementations of this protocol MUST keep these things in mind: * * 1) The controller provided to the delegate methods may not be fully * initialized when the callbacks are called. The only safe thing to do with @@ -60,6 +60,10 @@ typedef NS_ENUM(NSUInteger, MTRStorageSharingType) { * this delegate, apart from de-serializing and serializing the items being * stored and calling MTRDeviceControllerStorageClasses(), is likely to lead * to deadlocks. + * + * 3) Security level and sharing type will always be the same for any given key value + * and are provided to describe the data should the storage delegate choose to + * implement separating storage location by security level and sharing type. */ MTR_NEWLY_AVAILABLE @protocol MTRDeviceControllerStorageDelegate @@ -68,10 +72,6 @@ MTR_NEWLY_AVAILABLE * Return the stored value for the given key, if any, for the provided * controller. Returns nil if there is no stored value. * - * securityLevel and dataType will always be the same for any given key value - * and are just present here to help locate the data if storage location is - * separated out by security level and data type. - * * The set of classes that might be decoded by this function is available by * calling MTRDeviceControllerStorageClasses(). */ @@ -82,9 +82,6 @@ MTR_NEWLY_AVAILABLE /** * Store a value for the given key. Returns whether the store succeeded. - * - * securityLevel and dataType will always be the same for any given key value - * and are present here as a hint to how the value should be stored. */ - (BOOL)controller:(MTRDeviceController *)controller storeValue:(id)value @@ -94,15 +91,38 @@ MTR_NEWLY_AVAILABLE /** * Remove the stored value for the given key. Returns whether the remove succeeded. - * - * securityLevel and dataType will always be the same for any given key value - * and are just present here to help locate the data if storage location is - * separated out by security level and data type. */ - (BOOL)controller:(MTRDeviceController *)controller removeValueForKey:(NSString *)key securityLevel:(MTRStorageSecurityLevel)securityLevel sharingType:(MTRStorageSharingType)sharingType; + +@optional +/** + * Return all keys and values stored, if any, for the provided controller, in a + * dictionary. Returns nil if there are no stored values. + * + * securityLevel and sharingType are provided as a hint for the storage delegate + * to load from the right security level and sharing type, if the implementation + * stores them separately. If the implementation includes key/value pairs from other + * security levels or sharing types, they will be ignored by the caller. + * + * The set of classes that might be decoded by this function is available by + * calling MTRDeviceControllerStorageClasses(). + */ +- (nullable NSDictionary> *)valuesForController:(MTRDeviceController *)controller + securityLevel:(MTRStorageSecurityLevel)securityLevel + sharingType:(MTRStorageSharingType)sharingType; + +/** + * Store a list of key/value pairs in the form of a dictionary. Returns whether + * the store succeeded. Specifically, if any keys in this dictionary fail to store, + * the storage delegate should return NO. + */ +- (BOOL)controller:(MTRDeviceController *)controller + storeValues:(NSDictionary> *)values + securityLevel:(MTRStorageSecurityLevel)securityLevel + sharingType:(MTRStorageSharingType)sharingType; @end MTR_EXTERN MTR_NEWLY_AVAILABLE diff --git a/src/darwin/Framework/CHIP/MTRDevice_Internal.h b/src/darwin/Framework/CHIP/MTRDevice_Internal.h index 1444e602bd5247..28833060ba6c27 100644 --- a/src/darwin/Framework/CHIP/MTRDevice_Internal.h +++ b/src/darwin/Framework/CHIP/MTRDevice_Internal.h @@ -90,6 +90,10 @@ MTR_TESTABLE // Currently contains data version information - (void)setClusterData:(NSDictionary *)clusterData; +#ifdef DEBUG +- (NSUInteger)unitTestAttributeCount; +#endif + @end #pragma mark - Utility for clamping numbers diff --git a/src/darwin/Framework/CHIPTests/MTRPerControllerStorageTests.m b/src/darwin/Framework/CHIPTests/MTRPerControllerStorageTests.m index 3355790c584e83..e652d2f9fddc0e 100644 --- a/src/darwin/Framework/CHIPTests/MTRPerControllerStorageTests.m +++ b/src/darwin/Framework/CHIPTests/MTRPerControllerStorageTests.m @@ -1035,6 +1035,23 @@ - (void)test007_TestMultipleControllers XCTAssertFalse([controller3 isRunning]); } +- (BOOL)_array:(NSArray *)one containsSameElementsAsArray:(NSArray *)other +{ + for (id object in one) { + if (![other containsObject:object]) { + return NO; + } + } + + for (id object in other) { + if (![one containsObject:object]) { + return NO; + } + } + + return YES; +} + - (void)test008_TestDataStoreDirect { __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; @@ -1046,7 +1063,7 @@ - (void)test008_TestDataStoreDirect __auto_type * operationalKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(operationalKeys); - __auto_type * storageDelegate = [[MTRTestPerControllerStorage alloc] initWithControllerID:[NSUUID UUID]]; + __auto_type * storageDelegate = [[MTRTestPerControllerStorageWithBulkReadWrite alloc] initWithControllerID:[NSUUID UUID]]; NSNumber * nodeID = @(123); NSNumber * fabricID = @(456); @@ -1103,6 +1120,7 @@ - (void)test008_TestDataStoreDirect XCTAssertEqual(dataStoreValues.count, 9); // Check values + NSUInteger unexpectedValues = 0; for (NSDictionary * responseValue in dataStoreValues) { MTRAttributePath * path = responseValue[MTRAttributePathKey]; XCTAssertNotNil(path); @@ -1132,8 +1150,11 @@ - (void)test008_TestDataStoreDirect XCTAssertEqualObjects(value, @(212)); } else if ([path.endpoint isEqualToNumber:@(2)] && [path.cluster isEqualToNumber:@(1)] && [path.attribute isEqualToNumber:@(3)]) { XCTAssertEqualObjects(value, @(213)); + } else { + unexpectedValues++; } } + XCTAssertEqual(unexpectedValues, 0); NSDictionary * dataStoreClusterData = [controller.controllerDataStore getStoredClusterDataForNodeID:@(1001)]; for (MTRClusterPath * path in testClusterData) { @@ -1188,11 +1209,100 @@ - (void)test008_TestDataStoreDirect id testNodeIndex = [storageDelegate controller:controller valueForKey:@"attrCacheNodeIndex" securityLevel:MTRStorageSecurityLevelSecure sharingType:MTRStorageSharingTypeNotShared]; XCTAssertNil(testNodeIndex); + // Now test bulk write + MTRClusterPath * bulkTestClusterPath11 = [MTRClusterPath clusterPathWithEndpointID:@(1) clusterID:@(1)]; + MTRDeviceClusterData * bulkTestClusterData11 = [[MTRDeviceClusterData alloc] init]; + bulkTestClusterData11.dataVersion = @(11); + bulkTestClusterData11.attributes = @{ + @(1) : @ { MTRTypeKey : MTRUnsignedIntegerValueType, MTRValueKey : @(111) }, + @(2) : @ { MTRTypeKey : MTRUnsignedIntegerValueType, MTRValueKey : @(112) }, + @(3) : @ { MTRTypeKey : MTRUnsignedIntegerValueType, MTRValueKey : @(113) }, + }; + MTRClusterPath * bulkTestClusterPath12 = [MTRClusterPath clusterPathWithEndpointID:@(1) clusterID:@(2)]; + MTRDeviceClusterData * bulkTestClusterData12 = [[MTRDeviceClusterData alloc] init]; + bulkTestClusterData12.dataVersion = @(12); + bulkTestClusterData12.attributes = @{ + @(1) : @ { MTRTypeKey : MTRUnsignedIntegerValueType, MTRValueKey : @(121) }, + @(2) : @ { MTRTypeKey : MTRUnsignedIntegerValueType, MTRValueKey : @(122) }, + @(3) : @ { MTRTypeKey : MTRUnsignedIntegerValueType, MTRValueKey : @(123) }, + }; + MTRClusterPath * bulkTestClusterPath13 = [MTRClusterPath clusterPathWithEndpointID:@(1) clusterID:@(3)]; + MTRDeviceClusterData * bulkTestClusterData13 = [[MTRDeviceClusterData alloc] init]; + bulkTestClusterData13.dataVersion = @(13); + bulkTestClusterData13.attributes = @{ + @(1) : @ { MTRTypeKey : MTRUnsignedIntegerValueType, MTRValueKey : @(131) }, + @(2) : @ { MTRTypeKey : MTRUnsignedIntegerValueType, MTRValueKey : @(132) }, + @(3) : @ { MTRTypeKey : MTRUnsignedIntegerValueType, MTRValueKey : @(133) }, + }; + MTRClusterPath * bulkTestClusterPath21 = [MTRClusterPath clusterPathWithEndpointID:@(2) clusterID:@(1)]; + MTRDeviceClusterData * bulkTestClusterData21 = [[MTRDeviceClusterData alloc] init]; + bulkTestClusterData21.dataVersion = @(21); + bulkTestClusterData21.attributes = @{ + @(1) : @ { MTRTypeKey : MTRUnsignedIntegerValueType, MTRValueKey : @(211) }, + @(2) : @ { MTRTypeKey : MTRUnsignedIntegerValueType, MTRValueKey : @(212) }, + @(3) : @ { MTRTypeKey : MTRUnsignedIntegerValueType, MTRValueKey : @(213) }, + }; + MTRClusterPath * bulkTestClusterPath22 = [MTRClusterPath clusterPathWithEndpointID:@(2) clusterID:@(2)]; + MTRDeviceClusterData * bulkTestClusterData22 = [[MTRDeviceClusterData alloc] init]; + bulkTestClusterData22.dataVersion = @(22); + bulkTestClusterData22.attributes = @{ + @(1) : @ { MTRTypeKey : MTRUnsignedIntegerValueType, MTRValueKey : @(221) }, + @(2) : @ { MTRTypeKey : MTRUnsignedIntegerValueType, MTRValueKey : @(222) }, + @(3) : @ { MTRTypeKey : MTRUnsignedIntegerValueType, MTRValueKey : @(223) }, + }; + NSDictionary * bulkTestClusterDataDictionary = @{ + bulkTestClusterPath11 : bulkTestClusterData11, + bulkTestClusterPath12 : bulkTestClusterData12, + bulkTestClusterPath13 : bulkTestClusterData13, + bulkTestClusterPath21 : bulkTestClusterData21, + bulkTestClusterPath22 : bulkTestClusterData22, + }; + + // Manually construct what the total dictionary should look like + NSDictionary> * testBulkValues = @{ + @"attrCacheNodeIndex" : @[ @(3001) ], + [controller.controllerDataStore _endpointIndexKeyForNodeID:@(3001)] : @[ @(1), @(2) ], + [controller.controllerDataStore _clusterIndexKeyForNodeID:@(3001) endpointID:@(1)] : @[ @(1), @(2), @(3) ], + [controller.controllerDataStore _clusterIndexKeyForNodeID:@(3001) endpointID:@(2)] : @[ @(1), @(2) ], + [controller.controllerDataStore _clusterDataKeyForNodeID:@(3001) endpointID:@(1) clusterID:@(1)] : bulkTestClusterData11, + [controller.controllerDataStore _clusterDataKeyForNodeID:@(3001) endpointID:@(1) clusterID:@(2)] : bulkTestClusterData12, + [controller.controllerDataStore _clusterDataKeyForNodeID:@(3001) endpointID:@(1) clusterID:@(3)] : bulkTestClusterData13, + [controller.controllerDataStore _clusterDataKeyForNodeID:@(3001) endpointID:@(2) clusterID:@(1)] : bulkTestClusterData21, + [controller.controllerDataStore _clusterDataKeyForNodeID:@(3001) endpointID:@(2) clusterID:@(2)] : bulkTestClusterData22, + }; + // Bulk store with delegate + dispatch_sync(_storageQueue, ^{ + [storageDelegate controller:controller storeValues:testBulkValues securityLevel:MTRStorageSecurityLevelSecure sharingType:MTRStorageSharingTypeNotShared]; + }); + // Verify that the store resulted in the correct values + dataStoreClusterData = [controller.controllerDataStore getStoredClusterDataForNodeID:@(3001)]; + XCTAssertEqualObjects(dataStoreClusterData, bulkTestClusterDataDictionary); + + // clear information before the next test + [controller.controllerDataStore clearStoredAttributesForNodeID:@(3001)]; + + // Now test bulk store through data store + [controller.controllerDataStore storeClusterData:bulkTestClusterDataDictionary forNodeID:@(3001)]; + dataStoreClusterData = [controller.controllerDataStore getStoredClusterDataForNodeID:@(3001)]; + XCTAssertEqualObjects(dataStoreClusterData, bulkTestClusterDataDictionary); + + // Now test bulk read directly from storage delegate + NSDictionary> * dataStoreBulkValues = [storageDelegate valuesForController:controller securityLevel:MTRStorageSecurityLevelSecure sharingType:MTRStorageSharingTypeNotShared]; + // Due to dictionary enumeration in storeClusterData:forNodeID:, the elements could be stored in a different order, but still be valid and equivalent + XCTAssertTrue(([self _array:(NSArray *) dataStoreBulkValues[[controller.controllerDataStore _endpointIndexKeyForNodeID:@(3001)]] containsSameElementsAsArray:@[ @(1), @(2) ]])); + XCTAssertTrue(([self _array:(NSArray *) dataStoreBulkValues[[controller.controllerDataStore _clusterIndexKeyForNodeID:@(3001) endpointID:@(1)]] containsSameElementsAsArray:@[ @(1), @(2), @(3) ]])); + XCTAssertTrue(([self _array:(NSArray *) dataStoreBulkValues[[controller.controllerDataStore _clusterIndexKeyForNodeID:@(3001) endpointID:@(2)]] containsSameElementsAsArray:@[ @(1), @(2) ]])); + XCTAssertEqualObjects(dataStoreBulkValues[[controller.controllerDataStore _clusterDataKeyForNodeID:@(3001) endpointID:@(1) clusterID:@(1)]], bulkTestClusterData11); + XCTAssertEqualObjects(dataStoreBulkValues[[controller.controllerDataStore _clusterDataKeyForNodeID:@(3001) endpointID:@(1) clusterID:@(2)]], bulkTestClusterData12); + XCTAssertEqualObjects(dataStoreBulkValues[[controller.controllerDataStore _clusterDataKeyForNodeID:@(3001) endpointID:@(1) clusterID:@(3)]], bulkTestClusterData13); + XCTAssertEqualObjects(dataStoreBulkValues[[controller.controllerDataStore _clusterDataKeyForNodeID:@(3001) endpointID:@(2) clusterID:@(1)]], bulkTestClusterData21); + XCTAssertEqualObjects(dataStoreBulkValues[[controller.controllerDataStore _clusterDataKeyForNodeID:@(3001) endpointID:@(2) clusterID:@(2)]], bulkTestClusterData22); + [controller shutdown]; XCTAssertFalse([controller isRunning]); } -- (void)test009_TestDataStoreMTRDevice +- (void)doDataStoreMTRDeviceTestWithStorageDelegate:(id)storageDelegate { __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; XCTAssertNotNil(factory); @@ -1205,8 +1315,6 @@ - (void)test009_TestDataStoreMTRDevice __auto_type * operationalKeys = [[MTRTestKeys alloc] init]; XCTAssertNotNil(operationalKeys); - __auto_type * storageDelegate = [[MTRTestPerControllerStorage alloc] initWithControllerID:[NSUUID UUID]]; - NSNumber * nodeID = @(123); NSNumber * fabricID = @(456); @@ -1311,7 +1419,7 @@ - (void)test009_TestDataStoreMTRDevice double storedAttributeDifferFromMTRDevicePercentage = storedAttributeDifferFromMTRDeviceCount * 100.0 / dataStoreValuesCount; XCTAssertTrue(storedAttributeDifferFromMTRDevicePercentage < 10.0); - // Now + // Now set up new delegate for the new device and verify that once subscription reestablishes, the data version filter loaded from storage will work __auto_type * newDelegate = [[MTRDeviceTestDelegate alloc] init]; XCTestExpectation * newDeviceSubscriptionExpectation = [self expectationWithDescription:@"Subscription has been set up for new device"]; @@ -1340,6 +1448,61 @@ - (void)test009_TestDataStoreMTRDevice XCTAssertFalse([controller isRunning]); } +- (void)test009_TestDataStoreMTRDevice +{ + [self doDataStoreMTRDeviceTestWithStorageDelegate:[[MTRTestPerControllerStorage alloc] initWithControllerID:[NSUUID UUID]]]; +} + +- (void)test010_TestDataStoreMTRDeviceWithBulkReadWrite +{ + __auto_type * storageDelegate = [[MTRTestPerControllerStorageWithBulkReadWrite alloc] initWithControllerID:[NSUUID UUID]]; + + // First do the same test as the above + [self doDataStoreMTRDeviceTestWithStorageDelegate:storageDelegate]; + + // Then restart controller with same storage and see that bulk read through MTRDevice initialization works + + __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; + XCTAssertNotNil(factory); + + __auto_type * rootKeys = [[MTRTestKeys alloc] init]; + XCTAssertNotNil(rootKeys); + + __auto_type * operationalKeys = [[MTRTestKeys alloc] init]; + XCTAssertNotNil(operationalKeys); + + NSNumber * nodeID = @(123); + NSNumber * fabricID = @(456); + + NSError * error; + + MTRPerControllerStorageTestsCertificateIssuer * certificateIssuer; + MTRDeviceController * controller = [self startControllerWithRootKeys:rootKeys + operationalKeys:operationalKeys + fabricID:fabricID + nodeID:nodeID + storage:storageDelegate + error:&error + certificateIssuer:&certificateIssuer]; + XCTAssertNil(error); + XCTAssertNotNil(controller); + XCTAssertTrue([controller isRunning]); + + XCTAssertEqualObjects(controller.controllerNodeID, nodeID); + + // No need to commission device - just look at device count + NSDictionary * deviceAttributeCounts = [controller unitTestGetDeviceAttributeCounts]; + XCTAssertTrue(deviceAttributeCounts.count > 0); + NSUInteger totalAttributes = 0; + for (NSNumber * nodeID in deviceAttributeCounts) { + totalAttributes += deviceAttributeCounts[nodeID].unsignedIntegerValue; + } + XCTAssertTrue(totalAttributes > 300); + + [controller shutdown]; + XCTAssertFalse([controller isRunning]); +} + // TODO: This might want to go in a separate test file, with some shared setup // across multiple tests, maybe. Would need to factor out // startControllerWithRootKeys into a test helper. diff --git a/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestDeclarations.h b/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestDeclarations.h index 68abb9a8fa319f..b3ef0327cb1bea 100644 --- a/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestDeclarations.h +++ b/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestDeclarations.h @@ -34,6 +34,7 @@ NS_ASSUME_NONNULL_BEGIN - (void)unitTestPruneEmptyStoredAttributesBranches; - (NSString *)_endpointIndexKeyForNodeID:(NSNumber *)nodeID; - (NSString *)_clusterIndexKeyForNodeID:(NSNumber *)nodeID endpointID:(NSNumber *)endpointID; +- (NSString *)_clusterDataKeyForNodeID:(NSNumber *)nodeID endpointID:(NSNumber *)endpointID clusterID:(NSNumber *)clusterID; - (NSString *)_attributeIndexKeyForNodeID:(NSNumber *)nodeID endpointID:(NSNumber *)endpointID clusterID:(NSNumber *)clusterID; - (NSString *)_attributeValueKeyForNodeID:(NSNumber *)nodeID endpointID:(NSNumber *)endpointID clusterID:(NSNumber *)clusterID attributeID:(NSNumber *)attributeID; @end @@ -52,6 +53,10 @@ NS_ASSUME_NONNULL_BEGIN #pragma mark - Declarations for items compiled only for DEBUG configuration #ifdef DEBUG +@interface MTRDeviceController (TestDebug) +- (NSDictionary *)unitTestGetDeviceAttributeCounts; +@end + @interface MTRBaseDevice (TestDebug) - (void)failSubscribers:(dispatch_queue_t)queue completion:(void (^)(void))completion; diff --git a/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestPerControllerStorage.h b/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestPerControllerStorage.h index b3052a9929a1af..b02bff9c01a46b 100644 --- a/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestPerControllerStorage.h +++ b/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestPerControllerStorage.h @@ -40,4 +40,15 @@ NS_ASSUME_NONNULL_BEGIN sharingType:(MTRStorageSharingType)sharingType; @end +@interface MTRTestPerControllerStorageWithBulkReadWrite : MTRTestPerControllerStorage +- (nullable NSDictionary> *)valuesForController:(MTRDeviceController *)controller + securityLevel:(MTRStorageSecurityLevel)securityLevel + sharingType:(MTRStorageSharingType)sharingType; +- (BOOL)controller:(MTRDeviceController *)controller + storeValues:(NSDictionary> *)values + securityLevel:(MTRStorageSecurityLevel)securityLevel + sharingType:(MTRStorageSharingType)sharingType; + +@end + NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestPerControllerStorage.m b/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestPerControllerStorage.m index 1898bd14832cf9..f0bce87bc47af1 100644 --- a/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestPerControllerStorage.m +++ b/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestPerControllerStorage.m @@ -83,3 +83,34 @@ - (BOOL)controller:(MTRDeviceController *)controller } @end + +@implementation MTRTestPerControllerStorageWithBulkReadWrite + +- (NSDictionary> *)valuesForController:(MTRDeviceController *)controller securityLevel:(MTRStorageSecurityLevel)securityLevel sharingType:(MTRStorageSharingType)sharingType +{ + XCTAssertEqualObjects(self.controllerID, controller.uniqueIdentifier); + + if (!self.storage.count) { + return nil; + } + + NSMutableDictionary * valuesToReturn = [NSMutableDictionary dictionary]; + for (NSString * key in self.storage) { + valuesToReturn[key] = [self controller:controller valueForKey:key securityLevel:securityLevel sharingType:sharingType]; + } + + return valuesToReturn; +} + +- (BOOL)controller:(MTRDeviceController *)controller storeValues:(NSDictionary> *)values securityLevel:(MTRStorageSecurityLevel)securityLevel sharingType:(MTRStorageSharingType)sharingType +{ + XCTAssertEqualObjects(self.controllerID, controller.uniqueIdentifier); + + for (NSString * key in values) { + [self controller:controller storeValue:values[key] forKey:key securityLevel:securityLevel sharingType:sharingType]; + } + + return YES; +} + +@end From 5d6ec006d2c0b321287db1f412f8fca9e07d71a1 Mon Sep 17 00:00:00 2001 From: Justin Wood Date: Fri, 12 Apr 2024 19:43:50 -0700 Subject: [PATCH 057/468] Splitting example and core workflows (#32976) --- .github/workflows/darwin.yaml | 49 ++++++++----------- .../workflows/example-tv-casting-darwin.yaml | 49 +++++++++++++++++++ 2 files changed, 69 insertions(+), 29 deletions(-) create mode 100644 .github/workflows/example-tv-casting-darwin.yaml diff --git a/.github/workflows/darwin.yaml b/.github/workflows/darwin.yaml index 3076f046e3f38f..dcc025b6e2b32d 100644 --- a/.github/workflows/darwin.yaml +++ b/.github/workflows/darwin.yaml @@ -17,13 +17,16 @@ name: Darwin on: push: branches-ignore: - - 'dependabot/**' + - "dependabot/**" pull_request: merge_group: workflow_dispatch: concurrency: - group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} + group: + ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == + 'pull_request' && github.event.number) || (github.event_name == + 'workflow_dispatch' && github.run_number) || github.sha }} cancel-in-progress: true env: @@ -51,16 +54,17 @@ jobs: - name: Checkout submodules & Bootstrap uses: ./.github/actions/checkout-submodules-and-bootstrap with: - platform: darwin - bootstrap-log-name: bootstrap-logs-framework-${{ matrix.options.flavor }} + platform: darwin + bootstrap-log-name: + bootstrap-logs-framework-${{ matrix.options.flavor }} - name: Block zap-cli from being used env: - PW_ENVSETUP_NO_BANNER: 1 + PW_ENVSETUP_NO_BANNER: 1 run: | - # Framework builds are NOT expected to require zap-cli - scripts/run_in_build_env.sh 'rm -- "$(which zap-cli)"' - # run_in_build_env.sh is used to ensure PATH is set to something that would otherwise find zap-cli - scripts/run_in_build_env.sh '(zap-cli --version && exit 1) || exit 0' + # Framework builds are NOT expected to require zap-cli + scripts/run_in_build_env.sh 'rm -- "$(which zap-cli)"' + # run_in_build_env.sh is used to ensure PATH is set to something that would otherwise find zap-cli + scripts/run_in_build_env.sh '(zap-cli --version && exit 1) || exit 0' - name: Build working-directory: src/darwin/Framework run: xcodebuild -target "Matter" ${{ matrix.options.arguments }} @@ -68,13 +72,15 @@ jobs: tests: name: Run framework tests if: github.actor != 'restyled-io[bot]' - needs: [ framework ] # serialize to avoid running to many parallel macos runners + needs: [framework] # serialize to avoid running to many parallel macos runners runs-on: macos-13 strategy: matrix: options: # We don't need a full matrix - flavor: asan - arguments: -enableAddressSanitizer YES -enableUndefinedBehaviorSanitizer YES + arguments: + -enableAddressSanitizer YES + -enableUndefinedBehaviorSanitizer YES - flavor: tsan arguments: -enableThreadSanitizer YES steps: @@ -83,8 +89,9 @@ jobs: - name: Checkout submodules & Bootstrap uses: ./.github/actions/checkout-submodules-and-bootstrap with: - platform: darwin - bootstrap-log-name: bootstrap-logs-framework-${{ matrix.options.flavor }} + platform: darwin + bootstrap-log-name: + bootstrap-logs-framework-${{ matrix.options.flavor }} - name: Build example All Clusters Server run: | scripts/examples/gn_build_example.sh examples/all-clusters-app/linux out/debug chip_config_network_layer_ble=false @@ -124,19 +131,3 @@ jobs: name: darwin-framework-test-logs-${{ matrix.options.flavor }} path: /tmp/darwin/framework-tests retention-days: 5 - - tv-casting-bridge: - name: Build TV Casting Bridge example - if: github.actor != 'restyled-io[bot]' - needs: [ framework ] # serialize to avoid running to many parallel macos runners - runs-on: macos-13 - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Checkout submodules & Bootstrap - uses: ./.github/actions/checkout-submodules-and-bootstrap - with: - platform: darwin - - name: Build - working-directory: examples/tv-casting-app/darwin/MatterTvCastingBridge - run: xcodebuild -target "MatterTvCastingBridge" -sdk iphoneos diff --git a/.github/workflows/example-tv-casting-darwin.yaml b/.github/workflows/example-tv-casting-darwin.yaml new file mode 100644 index 00000000000000..d9d9ef8f37cee9 --- /dev/null +++ b/.github/workflows/example-tv-casting-darwin.yaml @@ -0,0 +1,49 @@ +# 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. +# 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. + +name: TV Casting Example - Darwin + +on: + push: + branches-ignore: + - "dependabot/**" + pull_request: + merge_group: + workflow_dispatch: + +concurrency: + group: + ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == + 'pull_request' && github.event.number) || (github.event_name == + 'workflow_dispatch' && github.run_number) || github.sha }} + cancel-in-progress: true + +env: + CHIP_NO_LOG_TIMESTAMPS: true + +jobs: + tv-casting-bridge: + name: Build TV Casting Bridge example + if: github.actor != 'restyled-io[bot]' + runs-on: macos-13 + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap + with: + platform: darwin + - name: Build + working-directory: examples/tv-casting-app/darwin/MatterTvCastingBridge + run: xcodebuild -target "MatterTvCastingBridge" -sdk iphoneos From 3cb83827fc6d46d66fc34ca0a39b54dff2170c00 Mon Sep 17 00:00:00 2001 From: Sharad Binjola <31142146+sharadb-amazon@users.noreply.github.com> Date: Sat, 13 Apr 2024 01:13:13 -0700 Subject: [PATCH 058/468] Decouple android CHIP IM APIs from CHIPController to CHIPInteractionModel (#32978) --- examples/tv-casting-app/android/BUILD.gn | 3 + scripts/build/builders/android.py | 5 + .../dry_run_android-arm64-chip-tool.txt | 2 + .../generators/java/ChipClusters_java.jinja | 8 +- .../several_clusters/java/ChipClusters.java | 8 +- .../java/AndroidInteractionClient.cpp | 40 +++- .../java/AndroidInteractionClient.h | 1 + src/controller/java/BUILD.gn | 192 ++++++++++++------ .../java/CHIPDeviceController-JNI.cpp | 98 --------- .../java/CHIPInteractionClient-JNI.cpp | 140 +++++++++++++ .../java/CHIPInteractionClient-JNI.h | 24 +++ .../chip/devicecontroller/ChipClusters.java | 8 +- .../ChipDeviceController.java | 94 ++------- .../ChipInteractionClient.java | 82 ++++++++ 14 files changed, 460 insertions(+), 245 deletions(-) create mode 100644 src/controller/java/CHIPInteractionClient-JNI.cpp create mode 100644 src/controller/java/CHIPInteractionClient-JNI.h create mode 100644 src/controller/java/src/chip/devicecontroller/ChipInteractionClient.java diff --git a/examples/tv-casting-app/android/BUILD.gn b/examples/tv-casting-app/android/BUILD.gn index 52a3342773175b..416570417b0794 100644 --- a/examples/tv-casting-app/android/BUILD.gn +++ b/examples/tv-casting-app/android/BUILD.gn @@ -55,6 +55,7 @@ shared_library("jni") { "${chip_root}/examples/tv-casting-app/tv-casting-common", "${chip_root}/src/app/data-model:heap", "${chip_root}/src/app/server/java:jni", + "${chip_root}/src/controller/java:android_chip_im_jni", "${chip_root}/src/lib", "${chip_root}/third_party/inipp", ] @@ -72,6 +73,7 @@ android_library("java") { deps = [ ":android", "${chip_root}/src/app/server/java", + "${chip_root}/src/controller/java:android_chip_im", "${chip_root}/src/platform/android:java", "${chip_root}/third_party/android_deps:annotation", ] @@ -136,6 +138,7 @@ group("default") { ":java", ":jni", "${chip_root}/src/app/server/java", + "${chip_root}/src/controller/java:android_chip_im", "${chip_root}/src/platform/android:java", ] } diff --git a/scripts/build/builders/android.py b/scripts/build/builders/android.py index 0f7754b5553656..bd2c90c28136d6 100644 --- a/scripts/build/builders/android.py +++ b/scripts/build/builders/android.py @@ -243,6 +243,7 @@ def copyToSrcAndroid(self): jars = { "CHIPController.jar": "src/controller/java/CHIPController.jar", + "CHIPInteractionModel.jar": "src/controller/java/CHIPInteractionModel.jar", "OnboardingPayload.jar": "src/controller/java/OnboardingPayload.jar", "AndroidPlatform.jar": "src/platform/android/AndroidPlatform.jar", "libMatterJson.jar": "src/controller/java/libMatterJson.jar", @@ -489,6 +490,7 @@ def _build(self): jars = { "AndroidPlatform.jar": "third_party/connectedhomeip/src/platform/android/AndroidPlatform.jar", "CHIPAppServer.jar": "third_party/connectedhomeip/src/app/server/java/CHIPAppServer.jar", + "CHIPInteractionModel.jar": "third_party/connectedhomeip/src/controller/java/CHIPInteractionModel.jar", "TvCastingApp.jar": "TvCastingApp.jar", } @@ -606,6 +608,9 @@ def build_outputs(self): "CHIPController.jar": os.path.join( self.output_dir, "lib", "src/controller/java/CHIPController.jar" ), + "CHIPInteractionModel.jar": os.path.join( + self.output_dir, "lib", "src/controller/java/CHIPInteractionModel.jar" + ), "libMatterTlv.jar": os.path.join( self.output_dir, "lib", "src/controller/java/libMatterTlv.jar" ), diff --git a/scripts/build/testdata/dry_run_android-arm64-chip-tool.txt b/scripts/build/testdata/dry_run_android-arm64-chip-tool.txt index 8ff2afd8d8bb76..051f4dfbc9e42d 100644 --- a/scripts/build/testdata/dry_run_android-arm64-chip-tool.txt +++ b/scripts/build/testdata/dry_run_android-arm64-chip-tool.txt @@ -25,6 +25,8 @@ cp {out}/android-arm64-chip-tool/lib/jni/arm64-v8a/libc++_shared.so {root}/examp cp {out}/android-arm64-chip-tool/lib/src/controller/java/CHIPController.jar {root}/examples/android/CHIPTool/app/libs/CHIPController.jar +cp {out}/android-arm64-chip-tool/lib/src/controller/java/CHIPInteractionModel.jar {root}/examples/android/CHIPTool/app/libs/CHIPInteractionModel.jar + cp {out}/android-arm64-chip-tool/lib/src/controller/java/OnboardingPayload.jar {root}/examples/android/CHIPTool/app/libs/OnboardingPayload.jar cp {out}/android-arm64-chip-tool/lib/src/platform/android/AndroidPlatform.jar {root}/examples/android/CHIPTool/app/libs/AndroidPlatform.jar diff --git a/scripts/py_matter_idl/matter_idl/generators/java/ChipClusters_java.jinja b/scripts/py_matter_idl/matter_idl/generators/java/ChipClusters_java.jinja index 6c8ad742068684..fb49e5737271b9 100644 --- a/scripts/py_matter_idl/matter_idl/generators/java/ChipClusters_java.jinja +++ b/scripts/py_matter_idl/matter_idl/generators/java/ChipClusters_java.jinja @@ -198,7 +198,7 @@ public class ChipClusters { boolean isFabricFiltered) { ReportCallbackJni jniCallback = new ReportCallbackJni(null, callback, null); ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, attributeId); - ChipDeviceController.read(0, jniCallback.getCallbackHandle(), devicePtr, Arrays.asList(path), null, null, isFabricFiltered, timeoutMillis.orElse(0L).intValue(), null); + ChipInteractionClient.read(0, jniCallback.getCallbackHandle(), devicePtr, Arrays.asList(path), null, null, isFabricFiltered, timeoutMillis.orElse(0L).intValue(), null); } protected void writeAttribute( @@ -209,7 +209,7 @@ public class ChipClusters { WriteAttributesCallbackJni jniCallback = new WriteAttributesCallbackJni(callback); byte[] tlv = encodeToTlv(value); AttributeWriteRequest writeRequest = AttributeWriteRequest.newInstance(endpointId, clusterId, attributeId, tlv); - ChipDeviceController.write(0, jniCallback.getCallbackHandle(), devicePtr, Arrays.asList(writeRequest), timedRequestTimeoutMs, timeoutMillis.orElse(0L).intValue()); + ChipInteractionClient.write(0, jniCallback.getCallbackHandle(), devicePtr, Arrays.asList(writeRequest), timedRequestTimeoutMs, timeoutMillis.orElse(0L).intValue()); } protected void subscribeAttribute( @@ -219,7 +219,7 @@ public class ChipClusters { int maxInterval) { ReportCallbackJni jniCallback = new ReportCallbackJni(callback, callback, null); ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, attributeId); - ChipDeviceController.subscribe(0, jniCallback.getCallbackHandle(), devicePtr, Arrays.asList(path), null, null, minInterval, maxInterval, false, true, timeoutMillis.orElse(0L).intValue(), null); + ChipInteractionClient.subscribe(0, jniCallback.getCallbackHandle(), devicePtr, Arrays.asList(path), null, null, minInterval, maxInterval, false, true, timeoutMillis.orElse(0L).intValue(), null); } protected void invoke( @@ -230,7 +230,7 @@ public class ChipClusters { InvokeCallbackJni jniCallback = new InvokeCallbackJni(callback); byte[] tlv = encodeToTlv(value); InvokeElement element = InvokeElement.newInstance(endpointId, clusterId, commandId, tlv, null); - ChipDeviceController.invoke(0, jniCallback.getCallbackHandle(), devicePtr, element, timedRequestTimeoutMs, timeoutMillis.orElse(0L).intValue()); + ChipInteractionClient.invoke(0, jniCallback.getCallbackHandle(), devicePtr, element, timedRequestTimeoutMs, timeoutMillis.orElse(0L).intValue()); } private static native byte[] encodeToTlv(BaseTLVType value); diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/java/ChipClusters.java b/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/java/ChipClusters.java index 37c5c031b5c5ae..836940ab4e089f 100644 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/java/ChipClusters.java +++ b/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/java/ChipClusters.java @@ -121,7 +121,7 @@ protected void readAttribute( boolean isFabricFiltered) { ReportCallbackJni jniCallback = new ReportCallbackJni(null, callback, null); ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, attributeId); - ChipDeviceController.read(0, jniCallback.getCallbackHandle(), devicePtr, Arrays.asList(path), null, null, isFabricFiltered, timeoutMillis.orElse(0L).intValue(), null); + ChipInteractionClient.read(0, jniCallback.getCallbackHandle(), devicePtr, Arrays.asList(path), null, null, isFabricFiltered, timeoutMillis.orElse(0L).intValue(), null); } protected void writeAttribute( @@ -132,7 +132,7 @@ protected void writeAttribute( WriteAttributesCallbackJni jniCallback = new WriteAttributesCallbackJni(callback); byte[] tlv = encodeToTlv(value); AttributeWriteRequest writeRequest = AttributeWriteRequest.newInstance(endpointId, clusterId, attributeId, tlv); - ChipDeviceController.write(0, jniCallback.getCallbackHandle(), devicePtr, Arrays.asList(writeRequest), timedRequestTimeoutMs, timeoutMillis.orElse(0L).intValue()); + ChipInteractionClient.write(0, jniCallback.getCallbackHandle(), devicePtr, Arrays.asList(writeRequest), timedRequestTimeoutMs, timeoutMillis.orElse(0L).intValue()); } protected void subscribeAttribute( @@ -142,7 +142,7 @@ protected void subscribeAttribute( int maxInterval) { ReportCallbackJni jniCallback = new ReportCallbackJni(callback, callback, null); ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, attributeId); - ChipDeviceController.subscribe(0, jniCallback.getCallbackHandle(), devicePtr, Arrays.asList(path), null, null, minInterval, maxInterval, false, true, timeoutMillis.orElse(0L).intValue(), null); + ChipInteractionClient.subscribe(0, jniCallback.getCallbackHandle(), devicePtr, Arrays.asList(path), null, null, minInterval, maxInterval, false, true, timeoutMillis.orElse(0L).intValue(), null); } protected void invoke( @@ -153,7 +153,7 @@ protected void invoke( InvokeCallbackJni jniCallback = new InvokeCallbackJni(callback); byte[] tlv = encodeToTlv(value); InvokeElement element = InvokeElement.newInstance(endpointId, clusterId, commandId, tlv, null); - ChipDeviceController.invoke(0, jniCallback.getCallbackHandle(), devicePtr, element, timedRequestTimeoutMs, timeoutMillis.orElse(0L).intValue()); + ChipInteractionClient.invoke(0, jniCallback.getCallbackHandle(), devicePtr, element, timedRequestTimeoutMs, timeoutMillis.orElse(0L).intValue()); } private static native byte[] encodeToTlv(BaseTLVType value); diff --git a/src/controller/java/AndroidInteractionClient.cpp b/src/controller/java/AndroidInteractionClient.cpp index a62e0c82723f7b..6ab01bc01034fc 100644 --- a/src/controller/java/AndroidInteractionClient.cpp +++ b/src/controller/java/AndroidInteractionClient.cpp @@ -24,7 +24,6 @@ #include "AndroidInteractionClient.h" #include "AndroidCallbacks.h" -#include "AndroidDeviceControllerWrapper.h" #include @@ -629,6 +628,45 @@ CHIP_ERROR extendableInvoke(JNIEnv * env, jlong handle, jlong callbackHandle, jl return err; } +CHIP_ERROR shutdownSubscriptions(JNIEnv * env, jlong handle, jobject fabricIndex, jobject peerNodeId, jobject subscriptionId) +{ + chip::DeviceLayer::StackLock lock; + if (fabricIndex == nullptr && peerNodeId == nullptr && subscriptionId == nullptr) + { + app::InteractionModelEngine::GetInstance()->ShutdownAllSubscriptions(); + return CHIP_NO_ERROR; + } + + if (fabricIndex != nullptr && peerNodeId != nullptr && subscriptionId == nullptr) + { + jint jFabricIndex = chip::JniReferences::GetInstance().IntegerToPrimitive(fabricIndex); + jlong jPeerNodeId = chip::JniReferences::GetInstance().LongToPrimitive(peerNodeId); + app::InteractionModelEngine::GetInstance()->ShutdownSubscriptions(static_cast(jFabricIndex), + static_cast(jPeerNodeId)); + return CHIP_NO_ERROR; + } + + if (fabricIndex != nullptr && peerNodeId == nullptr && subscriptionId == nullptr) + { + jint jFabricIndex = chip::JniReferences::GetInstance().IntegerToPrimitive(fabricIndex); + app::InteractionModelEngine::GetInstance()->ShutdownSubscriptions(static_cast(jFabricIndex)); + return CHIP_NO_ERROR; + } + + if (fabricIndex != nullptr && peerNodeId != nullptr && subscriptionId != nullptr) + { + jint jFabricIndex = chip::JniReferences::GetInstance().IntegerToPrimitive(fabricIndex); + jlong jPeerNodeId = chip::JniReferences::GetInstance().LongToPrimitive(peerNodeId); + jlong jSubscriptionId = chip::JniReferences::GetInstance().LongToPrimitive(subscriptionId); + app::InteractionModelEngine::GetInstance()->ShutdownSubscription( + chip::ScopedNodeId(static_cast(jPeerNodeId), static_cast(jFabricIndex)), + static_cast(jSubscriptionId)); + return CHIP_NO_ERROR; + } + + return CHIP_ERROR_INVALID_ARGUMENT; +} + CHIP_ERROR invoke(JNIEnv * env, jlong handle, jlong callbackHandle, jlong devicePtr, jobject invokeElement, jint timedRequestTimeoutMs, jint imTimeoutMs) { diff --git a/src/controller/java/AndroidInteractionClient.h b/src/controller/java/AndroidInteractionClient.h index f38af6f4eb2a96..32ee629856df1c 100644 --- a/src/controller/java/AndroidInteractionClient.h +++ b/src/controller/java/AndroidInteractionClient.h @@ -31,3 +31,4 @@ CHIP_ERROR invoke(JNIEnv * env, jlong handle, jlong callbackHandle, jlong device jint timedRequestTimeoutMs, jint imTimeoutMs); CHIP_ERROR extendableInvoke(JNIEnv * env, jlong handle, jlong callbackHandle, jlong devicePtr, jobject invokeElementList, jint timedRequestTimeoutMs, jint imTimeoutMs); +CHIP_ERROR shutdownSubscriptions(JNIEnv * env, jlong handle, jobject fabricIndex, jobject peerNodeId, jobject subscriptionId); diff --git a/src/controller/java/BUILD.gn b/src/controller/java/BUILD.gn index 9342f1330a6b5f..129ebe6e816339 100644 --- a/src/controller/java/BUILD.gn +++ b/src/controller/java/BUILD.gn @@ -42,6 +42,66 @@ if (!matter_enable_java_compilation) { import("${build_root}/config/android_abi.gni") } +source_set("android_chip_im_jni") { + sources = [ + "AndroidCallbacks-JNI.cpp", + "AndroidCallbacks.cpp", + "AndroidCallbacks.h", + "AndroidConnectionFailureExceptions.cpp", + "AndroidConnectionFailureExceptions.h", + "AndroidControllerExceptions.cpp", + "AndroidControllerExceptions.h", + "AndroidInteractionClient.cpp", + "AndroidInteractionClient.h", + "BaseCHIPCluster-JNI.cpp", + "CHIPAttributeTLVValueDecoder.h", + "CHIPEventTLVValueDecoder.h", + "CHIPInteractionClient-JNI.cpp", + "CHIPInteractionClient-JNI.h", + ] + + if (matter_enable_tlv_decoder_api) { + defines = [ "USE_JAVA_TLV_ENCODE_DECODE" ] + sources += [ + "CHIPTLVValueDecoder-JNI.cpp", + "zap-generated/CHIPAttributeTLVValueDecoder.cpp", + "zap-generated/CHIPEventTLVValueDecoder.cpp", + ] + } + + deps = [ + "${chip_root}/src/lib", + "${chip_root}/src/lib/support/jsontlv", + "${chip_root}/src/platform", + ] + + if (current_os == "mac") { + ldflags = [ "-Wl,-dead_strip" ] + } else { + ldflags = [ "-Wl,--gc-sections" ] + } + + if (matter_enable_java_compilation) { + include_dirs = java_matter_controller_dependent_paths + if (current_os == "mac") { + deps += [ "${chip_root}/src/platform/Darwin" ] + } else { + deps += [ "${chip_root}/src/platform/Linux" ] + } + + cflags = [ + "-Wno-unknown-pragmas", + "-Wconversion", + ] + + output_dir = "${root_out_dir}/lib/jni" + } else { + deps += [ "${chip_root}/src/platform/android" ] + output_dir = "${root_out_dir}/lib/jni/${android_abi}" + } + public_configs = [ "${chip_root}/src:includes" ] +} + shared_library("jni") { output_name = "libCHIPController" @@ -56,33 +116,21 @@ shared_library("jni") { check_includes = false sources = [ - "AndroidCallbacks-JNI.cpp", - "AndroidCallbacks.cpp", - "AndroidCallbacks.h", "AndroidCheckInDelegate.cpp", "AndroidCheckInDelegate.h", "AndroidClusterExceptions.cpp", "AndroidClusterExceptions.h", "AndroidCommissioningWindowOpener.cpp", "AndroidCommissioningWindowOpener.h", - "AndroidConnectionFailureExceptions.cpp", - "AndroidConnectionFailureExceptions.h", - "AndroidControllerExceptions.cpp", - "AndroidControllerExceptions.h", "AndroidCurrentFabricRemover.cpp", "AndroidCurrentFabricRemover.h", "AndroidDeviceControllerWrapper.cpp", "AndroidDeviceControllerWrapper.h", - "AndroidInteractionClient.cpp", - "AndroidInteractionClient.h", "AndroidOperationalCredentialsIssuer.cpp", "AndroidOperationalCredentialsIssuer.h", "AttestationTrustStoreBridge.cpp", "AttestationTrustStoreBridge.h", - "BaseCHIPCluster-JNI.cpp", - "CHIPAttributeTLVValueDecoder.h", "CHIPDeviceController-JNI.cpp", - "CHIPEventTLVValueDecoder.h", "DeviceAttestation-JNI.cpp", "DeviceAttestationDelegateBridge.cpp", "DeviceAttestationDelegateBridge.h", @@ -92,6 +140,7 @@ shared_library("jni") { ] deps = [ + ":android_chip_im_jni", ":controller_config", "${chip_root}/src/app/icd/client:handler", "${chip_root}/src/app/icd/client:manager", @@ -102,16 +151,6 @@ shared_library("jni") { "${chip_root}/src/platform", ] - if (matter_enable_tlv_decoder_api) { - defines += [ "USE_JAVA_TLV_ENCODE_DECODE" ] - - sources += [ - "CHIPTLVValueDecoder-JNI.cpp", - "zap-generated/CHIPAttributeTLVValueDecoder.cpp", - "zap-generated/CHIPEventTLVValueDecoder.cpp", - ] - } - if (chip_build_controller_dynamic_server) { sources += [ "BdxOTASender.cpp", @@ -175,6 +214,7 @@ if (chip_link_tests) { public_configs = [ "${chip_root}/src:includes" ] deps = [ + ":android_chip_im_jni", ":jni", "${chip_root}/src/messaging/tests:helpers", ] @@ -452,58 +492,24 @@ android_library("chipclusterID") { ] } -android_library("java") { - output_name = "CHIPController.jar" - - deps = [ - ":chipcluster", - ":chipclusterID", - "${chip_root}/third_party/java_deps:annotation", - ] - - data_deps = [ ":jni" ] +# Android CHIP IM .java files +android_library("android_chip_im") { + output_name = "CHIPInteractionModel.jar" sources = [ - "src/chip/devicecontroller/AttestationInfo.java", - "src/chip/devicecontroller/AttestationTrustStoreDelegate.java", - "src/chip/devicecontroller/CSRInfo.java", "src/chip/devicecontroller/ChipClusterException.java", - "src/chip/devicecontroller/ChipCommandType.java", - "src/chip/devicecontroller/ChipDeviceController.java", "src/chip/devicecontroller/ChipDeviceControllerException.java", - "src/chip/devicecontroller/CommissioningWindowStatus.java", - "src/chip/devicecontroller/ConnectionFailureException.java", - "src/chip/devicecontroller/ControllerParams.java", - "src/chip/devicecontroller/DeviceAttestation.java", - "src/chip/devicecontroller/DeviceAttestationDelegate.java", - "src/chip/devicecontroller/DiscoveredDevice.java", + "src/chip/devicecontroller/ChipInteractionClient.java", "src/chip/devicecontroller/ExtendableInvokeCallback.java", "src/chip/devicecontroller/ExtendableInvokeCallbackJni.java", "src/chip/devicecontroller/GetConnectedDeviceCallbackJni.java", - "src/chip/devicecontroller/GroupKeySecurityPolicy.java", - "src/chip/devicecontroller/ICDCheckInDelegate.java", - "src/chip/devicecontroller/ICDCheckInDelegateWrapper.java", - "src/chip/devicecontroller/ICDClientInfo.java", - "src/chip/devicecontroller/ICDDeviceInfo.java", - "src/chip/devicecontroller/ICDRegistrationInfo.java", "src/chip/devicecontroller/InvokeCallback.java", "src/chip/devicecontroller/InvokeCallbackJni.java", - "src/chip/devicecontroller/KeypairDelegate.java", - "src/chip/devicecontroller/NetworkCredentials.java", - "src/chip/devicecontroller/NetworkLocation.java", - "src/chip/devicecontroller/OTAProviderDelegate.java", - "src/chip/devicecontroller/OpenCommissioningCallback.java", - "src/chip/devicecontroller/OperationalKeyConfig.java", - "src/chip/devicecontroller/PairingHintBitmap.java", - "src/chip/devicecontroller/PaseVerifierParams.java", "src/chip/devicecontroller/ReportCallback.java", "src/chip/devicecontroller/ReportCallbackJni.java", "src/chip/devicecontroller/ResubscriptionAttemptCallback.java", "src/chip/devicecontroller/StatusException.java", "src/chip/devicecontroller/SubscriptionEstablishedCallback.java", - "src/chip/devicecontroller/ThreadScanResult.java", - "src/chip/devicecontroller/UnpairDeviceCallback.java", - "src/chip/devicecontroller/WiFiScanResult.java", "src/chip/devicecontroller/WriteAttributesCallback.java", "src/chip/devicecontroller/WriteAttributesCallbackJni.java", "src/chip/devicecontroller/model/AttributeState.java", @@ -544,6 +550,72 @@ android_library("java") { ] } + deps = [ + ":chipcluster", + ":chipclusterID", + "${chip_root}/third_party/java_deps:annotation", + ] + + if (matter_enable_java_compilation) { + deps += [ + "${chip_root}/third_party/java_deps:json", + "${chip_root}/third_party/java_deps/stub_src", + ] + } else { + deps += [ ":android" ] + + data_deps = [ "${chip_root}/build/chip/java:shared_cpplib" ] + } + + javac_flags = [ + "-Xlint:deprecation", + "-parameters", # Store infomation about method parameters + ] +} + +android_library("java") { + output_name = "CHIPController.jar" + + deps = [ + ":android_chip_im", + ":chipcluster", + ":chipclusterID", + "${chip_root}/third_party/java_deps:annotation", + ] + + data_deps = [ ":jni" ] + + sources = [ + "src/chip/devicecontroller/AttestationInfo.java", + "src/chip/devicecontroller/AttestationTrustStoreDelegate.java", + "src/chip/devicecontroller/CSRInfo.java", + "src/chip/devicecontroller/ChipCommandType.java", + "src/chip/devicecontroller/ChipDeviceController.java", + "src/chip/devicecontroller/CommissioningWindowStatus.java", + "src/chip/devicecontroller/ConnectionFailureException.java", + "src/chip/devicecontroller/ControllerParams.java", + "src/chip/devicecontroller/DeviceAttestation.java", + "src/chip/devicecontroller/DeviceAttestationDelegate.java", + "src/chip/devicecontroller/DiscoveredDevice.java", + "src/chip/devicecontroller/GroupKeySecurityPolicy.java", + "src/chip/devicecontroller/ICDCheckInDelegate.java", + "src/chip/devicecontroller/ICDCheckInDelegateWrapper.java", + "src/chip/devicecontroller/ICDClientInfo.java", + "src/chip/devicecontroller/ICDDeviceInfo.java", + "src/chip/devicecontroller/ICDRegistrationInfo.java", + "src/chip/devicecontroller/KeypairDelegate.java", + "src/chip/devicecontroller/NetworkCredentials.java", + "src/chip/devicecontroller/NetworkLocation.java", + "src/chip/devicecontroller/OTAProviderDelegate.java", + "src/chip/devicecontroller/OpenCommissioningCallback.java", + "src/chip/devicecontroller/OperationalKeyConfig.java", + "src/chip/devicecontroller/PairingHintBitmap.java", + "src/chip/devicecontroller/PaseVerifierParams.java", + "src/chip/devicecontroller/ThreadScanResult.java", + "src/chip/devicecontroller/UnpairDeviceCallback.java", + "src/chip/devicecontroller/WiFiScanResult.java", + ] + if (matter_enable_java_compilation) { deps += [ "${chip_root}/third_party/java_deps:json", diff --git a/src/controller/java/CHIPDeviceController-JNI.cpp b/src/controller/java/CHIPDeviceController-JNI.cpp index 82a0485718a21e..b62ece066013ca 100644 --- a/src/controller/java/CHIPDeviceController-JNI.cpp +++ b/src/controller/java/CHIPDeviceController-JNI.cpp @@ -1726,45 +1726,6 @@ JNI_METHOD(jint, getFabricIndex)(JNIEnv * env, jobject self, jlong handle) return wrapper->Controller()->GetFabricIndex(); } -JNI_METHOD(void, shutdownSubscriptions) -(JNIEnv * env, jobject self, jobject handle, jobject fabricIndex, jobject peerNodeId, jobject subscriptionId) -{ - chip::DeviceLayer::StackLock lock; - if (fabricIndex == nullptr && peerNodeId == nullptr && subscriptionId == nullptr) - { - app::InteractionModelEngine::GetInstance()->ShutdownAllSubscriptions(); - return; - } - - if (fabricIndex != nullptr && peerNodeId != nullptr && subscriptionId == nullptr) - { - jint jFabricIndex = chip::JniReferences::GetInstance().IntegerToPrimitive(fabricIndex); - jlong jPeerNodeId = chip::JniReferences::GetInstance().LongToPrimitive(peerNodeId); - app::InteractionModelEngine::GetInstance()->ShutdownSubscriptions(static_cast(jFabricIndex), - static_cast(jPeerNodeId)); - return; - } - - if (fabricIndex != nullptr && peerNodeId == nullptr && subscriptionId == nullptr) - { - jint jFabricIndex = chip::JniReferences::GetInstance().IntegerToPrimitive(fabricIndex); - app::InteractionModelEngine::GetInstance()->ShutdownSubscriptions(static_cast(jFabricIndex)); - return; - } - - if (fabricIndex != nullptr && peerNodeId != nullptr && subscriptionId != nullptr) - { - jint jFabricIndex = chip::JniReferences::GetInstance().IntegerToPrimitive(fabricIndex); - jlong jPeerNodeId = chip::JniReferences::GetInstance().LongToPrimitive(peerNodeId); - jlong jSubscriptionId = chip::JniReferences::GetInstance().LongToPrimitive(subscriptionId); - app::InteractionModelEngine::GetInstance()->ShutdownSubscription( - chip::ScopedNodeId(static_cast(jPeerNodeId), static_cast(jFabricIndex)), - static_cast(jSubscriptionId)); - return; - } - ChipLogError(Controller, "Failed to shutdown subscriptions with correct input paramemeter"); -} - JNI_METHOD(jstring, getIpAddress)(JNIEnv * env, jobject self, jlong handle, jlong deviceId) { chip::DeviceLayer::StackLock lock; @@ -2260,65 +2221,6 @@ JNI_METHOD(jobject, getICDClientInfo)(JNIEnv * env, jobject self, jlong handle, return jInfo; } -JNI_METHOD(void, subscribe) -(JNIEnv * env, jclass clz, jlong handle, jlong callbackHandle, jlong devicePtr, jobject attributePathList, jobject eventPathList, - jobject dataVersionFilterList, jint minInterval, jint maxInterval, jboolean keepSubscriptions, jboolean isFabricFiltered, - jint imTimeoutMs, jobject eventMin) -{ - CHIP_ERROR err = subscribe(env, handle, callbackHandle, devicePtr, attributePathList, eventPathList, dataVersionFilterList, - minInterval, maxInterval, keepSubscriptions, isFabricFiltered, imTimeoutMs, eventMin); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Controller, "JNI IM Subscribe Error: %" CHIP_ERROR_FORMAT, err.Format()); - } -} - -JNI_METHOD(void, read) -(JNIEnv * env, jclass clz, jlong handle, jlong callbackHandle, jlong devicePtr, jobject attributePathList, jobject eventPathList, - jobject dataVersionFilterList, jboolean isFabricFiltered, jint imTimeoutMs, jobject eventMin) -{ - CHIP_ERROR err = read(env, handle, callbackHandle, devicePtr, attributePathList, eventPathList, dataVersionFilterList, - isFabricFiltered, imTimeoutMs, eventMin); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Controller, "JNI IM Read Error: %" CHIP_ERROR_FORMAT, err.Format()); - } -} - -JNI_METHOD(void, write) -(JNIEnv * env, jclass clz, jlong handle, jlong callbackHandle, jlong devicePtr, jobject attributeList, jint timedRequestTimeoutMs, - jint imTimeoutMs) -{ - CHIP_ERROR err = write(env, handle, callbackHandle, devicePtr, attributeList, timedRequestTimeoutMs, imTimeoutMs); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Controller, "JNI IM Write Error: %" CHIP_ERROR_FORMAT, err.Format()); - } -} - -JNI_METHOD(void, invoke) -(JNIEnv * env, jclass clz, jlong handle, jlong callbackHandle, jlong devicePtr, jobject invokeElement, jint timedRequestTimeoutMs, - jint imTimeoutMs) -{ - CHIP_ERROR err = invoke(env, handle, callbackHandle, devicePtr, invokeElement, timedRequestTimeoutMs, imTimeoutMs); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Controller, "JNI IM Invoke Error: %" CHIP_ERROR_FORMAT, err.Format()); - } -} - -JNI_METHOD(void, extendableInvoke) -(JNIEnv * env, jclass clz, jlong handle, jlong callbackHandle, jlong devicePtr, jobject invokeElementList, - jint timedRequestTimeoutMs, jint imTimeoutMs) -{ - CHIP_ERROR err = - extendableInvoke(env, handle, callbackHandle, devicePtr, invokeElementList, timedRequestTimeoutMs, imTimeoutMs); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Controller, "JNI IM Batch Invoke Error: %" CHIP_ERROR_FORMAT, err.Format()); - } -} - void * IOThreadMain(void * arg) { JNIEnv * env; diff --git a/src/controller/java/CHIPInteractionClient-JNI.cpp b/src/controller/java/CHIPInteractionClient-JNI.cpp new file mode 100644 index 00000000000000..62abf35ddca956 --- /dev/null +++ b/src/controller/java/CHIPInteractionClient-JNI.cpp @@ -0,0 +1,140 @@ +/* + * Copyright (c) 2024 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 "CHIPInteractionClient-JNI.h" +#include "AndroidInteractionClient.h" + +#include +#include +#include + +#define JNI_METHOD(RETURN, METHOD_NAME) \ + extern "C" JNIEXPORT RETURN JNICALL Java_chip_devicecontroller_ChipInteractionClient_##METHOD_NAME + +jint AndroidChipInteractionJNI_OnLoad(JavaVM * jvm, void * reserved) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env; + + ChipLogProgress(Controller, "AndroidChipInteractionJNI_OnLoad called"); + + chip::Platform::MemoryInit(); + + // Save a reference to the JVM. Will need this to call back into Java. + chip::JniReferences::GetInstance().SetJavaVm(jvm, "chip/devicecontroller/ChipInteractionClient"); + + // Get a JNI environment object. + env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + VerifyOrExit(env != nullptr, err = CHIP_JNI_ERROR_NO_ENV); + VerifyOrExit(env != nullptr, err = CHIP_JNI_ERROR_NO_ENV); + + ChipLogProgress(Controller, "Loading Java class references."); + + // Get various class references need by the API. + jclass controllerExceptionCls; + err = chip::JniReferences::GetInstance().GetLocalClassRef(env, "chip/devicecontroller/ChipDeviceControllerException", + controllerExceptionCls); + VerifyOrReturnValue(err == CHIP_NO_ERROR, JNI_ERR); + + ChipLogProgress(Controller, "Java class references loaded."); + +exit: + if (err != CHIP_NO_ERROR) + { + chip::JniReferences::GetInstance().ThrowError(env, controllerExceptionCls, err); + chip::DeviceLayer::StackUnlock unlock; + JNI_OnUnload(jvm, reserved); + } + + return (err == CHIP_NO_ERROR) ? JNI_VERSION_1_6 : JNI_ERR; +} + +void AndroidChipInteractionJNI_OnUnload(JavaVM * jvm, void * reserved) +{ + chip::DeviceLayer::StackLock lock; + ChipLogProgress(AppServer, "AndroidChipInteractionJNI_OnUnload() called"); + chip::Platform::MemoryShutdown(); +} + +JNI_METHOD(void, subscribe) +(JNIEnv * env, jobject self, jlong handle, jlong callbackHandle, jlong devicePtr, jobject attributePathList, jobject eventPathList, + jobject dataVersionFilterList, jint minInterval, jint maxInterval, jboolean keepSubscriptions, jboolean isFabricFiltered, + jint imTimeoutMs, jobject eventMin) +{ + CHIP_ERROR err = subscribe(env, handle, callbackHandle, devicePtr, attributePathList, eventPathList, dataVersionFilterList, + minInterval, maxInterval, keepSubscriptions, isFabricFiltered, imTimeoutMs, eventMin); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Controller, "JNI IM Subscribe Error: %" CHIP_ERROR_FORMAT, err.Format()); + } +} + +JNI_METHOD(void, read) +(JNIEnv * env, jobject self, jlong handle, jlong callbackHandle, jlong devicePtr, jobject attributePathList, jobject eventPathList, + jobject dataVersionFilterList, jboolean isFabricFiltered, jint imTimeoutMs, jobject eventMin) +{ + CHIP_ERROR err = read(env, handle, callbackHandle, devicePtr, attributePathList, eventPathList, dataVersionFilterList, + isFabricFiltered, imTimeoutMs, eventMin); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Controller, "JNI IM Read Error: %" CHIP_ERROR_FORMAT, err.Format()); + } +} + +JNI_METHOD(void, write) +(JNIEnv * env, jobject self, jlong handle, jlong callbackHandle, jlong devicePtr, jobject attributeList, jint timedRequestTimeoutMs, + jint imTimeoutMs) +{ + CHIP_ERROR err = write(env, handle, callbackHandle, devicePtr, attributeList, timedRequestTimeoutMs, imTimeoutMs); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Controller, "JNI IM Write Error: %" CHIP_ERROR_FORMAT, err.Format()); + } +} + +JNI_METHOD(void, invoke) +(JNIEnv * env, jobject self, jlong handle, jlong callbackHandle, jlong devicePtr, jobject invokeElement, jint timedRequestTimeoutMs, + jint imTimeoutMs) +{ + CHIP_ERROR err = invoke(env, handle, callbackHandle, devicePtr, invokeElement, timedRequestTimeoutMs, imTimeoutMs); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Controller, "JNI IM Invoke Error: %" CHIP_ERROR_FORMAT, err.Format()); + } +} + +JNI_METHOD(void, extendableInvoke) +(JNIEnv * env, jobject self, jlong handle, jlong callbackHandle, jlong devicePtr, jobject invokeElementList, + jint timedRequestTimeoutMs, jint imTimeoutMs) +{ + CHIP_ERROR err = + extendableInvoke(env, handle, callbackHandle, devicePtr, invokeElementList, timedRequestTimeoutMs, imTimeoutMs); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Controller, "JNI IM Batch Invoke Error: %" CHIP_ERROR_FORMAT, err.Format()); + } +} + +JNI_METHOD(void, shutdownSubscriptions) +(JNIEnv * env, jobject self, jlong handle, jobject fabricIndex, jobject peerNodeId, jobject subscriptionId) +{ + CHIP_ERROR err = shutdownSubscriptions(env, handle, fabricIndex, peerNodeId, subscriptionId); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Controller, "Failed to shutdown subscriptions with Error: %" CHIP_ERROR_FORMAT, err.Format()); + } +} diff --git a/src/controller/java/CHIPInteractionClient-JNI.h b/src/controller/java/CHIPInteractionClient-JNI.h new file mode 100644 index 00000000000000..1944552d192b39 --- /dev/null +++ b/src/controller/java/CHIPInteractionClient-JNI.h @@ -0,0 +1,24 @@ +/* + * + * Copyright (c) 2024 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 + +jint AndroidChipInteractionJNI_OnLoad(JavaVM * jvm, void * reserved); + +void AndroidChipInteractionJNI_OnUnload(JavaVM * jvm, void * reserved); diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java index c55a45b77aaca8..66ae0a97ce86a6 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java @@ -121,7 +121,7 @@ protected void readAttribute( boolean isFabricFiltered) { ReportCallbackJni jniCallback = new ReportCallbackJni(null, callback, null); ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, attributeId); - ChipDeviceController.read(0, jniCallback.getCallbackHandle(), devicePtr, Arrays.asList(path), null, null, isFabricFiltered, timeoutMillis.orElse(0L).intValue(), null); + ChipInteractionClient.read(0, jniCallback.getCallbackHandle(), devicePtr, Arrays.asList(path), null, null, isFabricFiltered, timeoutMillis.orElse(0L).intValue(), null); } protected void writeAttribute( @@ -132,7 +132,7 @@ protected void writeAttribute( WriteAttributesCallbackJni jniCallback = new WriteAttributesCallbackJni(callback); byte[] tlv = encodeToTlv(value); AttributeWriteRequest writeRequest = AttributeWriteRequest.newInstance(endpointId, clusterId, attributeId, tlv); - ChipDeviceController.write(0, jniCallback.getCallbackHandle(), devicePtr, Arrays.asList(writeRequest), timedRequestTimeoutMs, timeoutMillis.orElse(0L).intValue()); + ChipInteractionClient.write(0, jniCallback.getCallbackHandle(), devicePtr, Arrays.asList(writeRequest), timedRequestTimeoutMs, timeoutMillis.orElse(0L).intValue()); } protected void subscribeAttribute( @@ -142,7 +142,7 @@ protected void subscribeAttribute( int maxInterval) { ReportCallbackJni jniCallback = new ReportCallbackJni(callback, callback, null); ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, attributeId); - ChipDeviceController.subscribe(0, jniCallback.getCallbackHandle(), devicePtr, Arrays.asList(path), null, null, minInterval, maxInterval, false, true, timeoutMillis.orElse(0L).intValue(), null); + ChipInteractionClient.subscribe(0, jniCallback.getCallbackHandle(), devicePtr, Arrays.asList(path), null, null, minInterval, maxInterval, false, true, timeoutMillis.orElse(0L).intValue(), null); } protected void invoke( @@ -153,7 +153,7 @@ protected void invoke( InvokeCallbackJni jniCallback = new InvokeCallbackJni(callback); byte[] tlv = encodeToTlv(value); InvokeElement element = InvokeElement.newInstance(endpointId, clusterId, commandId, tlv, null); - ChipDeviceController.invoke(0, jniCallback.getCallbackHandle(), devicePtr, element, timedRequestTimeoutMs, timeoutMillis.orElse(0L).intValue()); + ChipInteractionClient.invoke(0, jniCallback.getCallbackHandle(), devicePtr, element, timedRequestTimeoutMs, timeoutMillis.orElse(0L).intValue()); } private static native byte[] encodeToTlv(BaseTLVType value); diff --git a/src/controller/java/src/chip/devicecontroller/ChipDeviceController.java b/src/controller/java/src/chip/devicecontroller/ChipDeviceController.java index 3be1a69ca04b41..482bc2e917a425 100644 --- a/src/controller/java/src/chip/devicecontroller/ChipDeviceController.java +++ b/src/controller/java/src/chip/devicecontroller/ChipDeviceController.java @@ -757,12 +757,13 @@ public List getICDClientInfo(int fabricIndex) { /* Shuts down all active subscriptions. */ public void shutdownSubscriptions() { - shutdownSubscriptions(deviceControllerPtr, null, null, null); + ChipInteractionClient.shutdownSubscriptions(deviceControllerPtr, null, null, null); } /* Shuts down all active subscriptions for the fabric at the given fabricIndex */ public void shutdownSubscriptions(int fabricIndex) { - shutdownSubscriptions(deviceControllerPtr, Integer.valueOf(fabricIndex), null, null); + ChipInteractionClient.shutdownSubscriptions( + deviceControllerPtr, Integer.valueOf(fabricIndex), null, null); } /** @@ -772,7 +773,7 @@ public void shutdownSubscriptions(int fabricIndex) { * @param peerNodeId the node ID of the device for which subscriptions should be canceled */ public void shutdownSubscriptions(int fabricIndex, long peerNodeId) { - shutdownSubscriptions( + ChipInteractionClient.shutdownSubscriptions( deviceControllerPtr, Integer.valueOf(fabricIndex), Long.valueOf(peerNodeId), null); } @@ -784,7 +785,7 @@ public void shutdownSubscriptions(int fabricIndex, long peerNodeId) { * @param subscriptionId the ID of the subscription on the node which should be canceled */ public void shutdownSubscriptions(int fabricIndex, long peerNodeId, long subscriptionId) { - shutdownSubscriptions( + ChipInteractionClient.shutdownSubscriptions( deviceControllerPtr, Integer.valueOf(fabricIndex), Long.valueOf(peerNodeId), @@ -825,7 +826,7 @@ public void subscribeToAttributePath( int imTimeoutMs) { ReportCallbackJni jniCallback = new ReportCallbackJni(subscriptionEstablishedCallback, reportCallback, null); - subscribe( + ChipInteractionClient.subscribe( deviceControllerPtr, jniCallback.getCallbackHandle(), devicePtr, @@ -863,7 +864,7 @@ public void subscribeToEventPath( int imTimeoutMs) { ReportCallbackJni jniCallback = new ReportCallbackJni(subscriptionEstablishedCallback, reportCallback, null); - subscribe( + ChipInteractionClient.subscribe( deviceControllerPtr, jniCallback.getCallbackHandle(), devicePtr, @@ -889,7 +890,7 @@ public void subscribeToEventPath( @Nullable Long eventMin) { ReportCallbackJni jniCallback = new ReportCallbackJni(subscriptionEstablishedCallback, reportCallback, null); - subscribe( + ChipInteractionClient.subscribe( deviceControllerPtr, jniCallback.getCallbackHandle(), devicePtr, @@ -923,7 +924,7 @@ public void subscribeToPath( ReportCallbackJni jniCallback = new ReportCallbackJni( subscriptionEstablishedCallback, reportCallback, resubscriptionAttemptCallback); - subscribe( + ChipInteractionClient.subscribe( deviceControllerPtr, jniCallback.getCallbackHandle(), devicePtr, @@ -975,7 +976,7 @@ public void subscribeToPath( ReportCallbackJni jniCallback = new ReportCallbackJni( subscriptionEstablishedCallback, reportCallback, resubscriptionAttemptCallback); - subscribe( + ChipInteractionClient.subscribe( deviceControllerPtr, jniCallback.getCallbackHandle(), devicePtr, @@ -1006,7 +1007,7 @@ public void subscribeToPath( ReportCallbackJni jniCallback = new ReportCallbackJni( subscriptionEstablishedCallback, reportCallback, resubscriptionAttemptCallback); - subscribe( + ChipInteractionClient.subscribe( deviceControllerPtr, jniCallback.getCallbackHandle(), devicePtr, @@ -1036,7 +1037,7 @@ public void readAttributePath( List attributePaths, int imTimeoutMs) { ReportCallbackJni jniCallback = new ReportCallbackJni(null, callback, null); - read( + ChipInteractionClient.read( deviceControllerPtr, jniCallback.getCallbackHandle(), devicePtr, @@ -1060,7 +1061,7 @@ public void readAttributePath( public void readEventPath( ReportCallback callback, long devicePtr, List eventPaths, int imTimeoutMs) { ReportCallbackJni jniCallback = new ReportCallbackJni(null, callback, null); - read( + ChipInteractionClient.read( deviceControllerPtr, jniCallback.getCallbackHandle(), devicePtr, @@ -1080,7 +1081,7 @@ public void readEventPath( int imTimeoutMs, @Nullable Long eventMin) { ReportCallbackJni jniCallback = new ReportCallbackJni(null, callback, null); - read( + ChipInteractionClient.read( deviceControllerPtr, jniCallback.getCallbackHandle(), devicePtr, @@ -1101,7 +1102,7 @@ public void readPath( boolean isFabricFiltered, int imTimeoutMs) { ReportCallbackJni jniCallback = new ReportCallbackJni(null, callback, null); - read( + ChipInteractionClient.read( deviceControllerPtr, jniCallback.getCallbackHandle(), devicePtr, @@ -1133,7 +1134,7 @@ public void readPath( boolean isFabricFiltered, int imTimeoutMs) { ReportCallbackJni jniCallback = new ReportCallbackJni(null, callback, null); - read( + ChipInteractionClient.read( deviceControllerPtr, jniCallback.getCallbackHandle(), devicePtr, @@ -1155,7 +1156,7 @@ public void readPath( int imTimeoutMs, @Nullable Long eventMin) { ReportCallbackJni jniCallback = new ReportCallbackJni(null, callback, null); - read( + ChipInteractionClient.read( deviceControllerPtr, jniCallback.getCallbackHandle(), devicePtr, @@ -1184,7 +1185,7 @@ public void write( int timedRequestTimeoutMs, int imTimeoutMs) { WriteAttributesCallbackJni jniCallback = new WriteAttributesCallbackJni(callback); - write( + ChipInteractionClient.write( deviceControllerPtr, jniCallback.getCallbackHandle(), devicePtr, @@ -1210,7 +1211,7 @@ public void invoke( int timedRequestTimeoutMs, int imTimeoutMs) { InvokeCallbackJni jniCallback = new InvokeCallbackJni(callback); - invoke( + ChipInteractionClient.invoke( deviceControllerPtr, jniCallback.getCallbackHandle(), devicePtr, @@ -1236,7 +1237,7 @@ public void extendableInvoke( int timedRequestTimeoutMs, int imTimeoutMs) { ExtendableInvokeCallbackJni jniCallback = new ExtendableInvokeCallbackJni(callback); - extendableInvoke( + ChipInteractionClient.extendableInvoke( deviceControllerPtr, jniCallback.getCallbackHandle(), devicePtr, @@ -1378,55 +1379,6 @@ public void shutdownCommissioning() { private native PaseVerifierParams computePaseVerifier( long deviceControllerPtr, long devicePtr, long setupPincode, long iterations, byte[] salt); - static native void subscribe( - long deviceControllerPtr, - long callbackHandle, - long devicePtr, - List attributePaths, - List eventPaths, - List dataVersionFilters, - int minInterval, - int maxInterval, - boolean keepSubscriptions, - boolean isFabricFiltered, - int imTimeoutMs, - @Nullable Long eventMin); - - static native void read( - long deviceControllerPtr, - long callbackHandle, - long devicePtr, - List attributePaths, - List eventPaths, - List dataVersionFilters, - boolean isFabricFiltered, - int imTimeoutMs, - @Nullable Long eventMin); - - static native void write( - long deviceControllerPtr, - long callbackHandle, - long devicePtr, - List attributeList, - int timedRequestTimeoutMs, - int imTimeoutMs); - - static native void invoke( - long deviceControllerPtr, - long callbackHandle, - long devicePtr, - InvokeElement invokeElement, - int timedRequestTimeoutMs, - int imTimeoutMs); - - static native void extendableInvoke( - long deviceControllerPtr, - long callbackHandle, - long devicePtr, - List invokeElementList, - int timedRequestTimeoutMs, - int imTimeoutMs); - private native long newDeviceController(ControllerParams params); private native void setDeviceAttestationDelegate( @@ -1580,12 +1532,6 @@ private native void updateCommissioningICDRegistrationInfo( private native int getFabricIndex(long deviceControllerPtr); - private native void shutdownSubscriptions( - long deviceControllerPtr, - @Nullable Integer fabricIndex, - @Nullable Long peerNodeId, - @Nullable Long subscriptionId); - private native void shutdownCommissioning(long deviceControllerPtr); static { diff --git a/src/controller/java/src/chip/devicecontroller/ChipInteractionClient.java b/src/controller/java/src/chip/devicecontroller/ChipInteractionClient.java new file mode 100644 index 00000000000000..d06f1170efebcd --- /dev/null +++ b/src/controller/java/src/chip/devicecontroller/ChipInteractionClient.java @@ -0,0 +1,82 @@ +/* + * + * Copyright (c) 2024 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. + */ +package chip.devicecontroller; + +import chip.devicecontroller.model.AttributeWriteRequest; +import chip.devicecontroller.model.ChipAttributePath; +import chip.devicecontroller.model.ChipEventPath; +import chip.devicecontroller.model.DataVersionFilter; +import chip.devicecontroller.model.InvokeElement; +import java.util.List; +import javax.annotation.Nullable; + +public class ChipInteractionClient { + static native void subscribe( + long deviceControllerPtr, + long callbackHandle, + long devicePtr, + List attributePaths, + List eventPaths, + List dataVersionFilters, + int minInterval, + int maxInterval, + boolean keepSubscriptions, + boolean isFabricFiltered, + int imTimeoutMs, + @Nullable Long eventMin); + + static native void read( + long deviceControllerPtr, + long callbackHandle, + long devicePtr, + List attributePaths, + List eventPaths, + List dataVersionFilters, + boolean isFabricFiltered, + int imTimeoutMs, + @Nullable Long eventMin); + + static native void write( + long deviceControllerPtr, + long callbackHandle, + long devicePtr, + List attributeList, + int timedRequestTimeoutMs, + int imTimeoutMs); + + static native void invoke( + long deviceControllerPtr, + long callbackHandle, + long devicePtr, + InvokeElement invokeElement, + int timedRequestTimeoutMs, + int imTimeoutMs); + + static native void extendableInvoke( + long deviceControllerPtr, + long callbackHandle, + long devicePtr, + List invokeElementList, + int timedRequestTimeoutMs, + int imTimeoutMs); + + static native void shutdownSubscriptions( + long deviceControllerPtr, + @Nullable Integer fabricIndex, + @Nullable Long peerNodeId, + @Nullable Long subscriptionId); +} From 8480b14fd4c34fcc224ab54115e861a6411e5869 Mon Sep 17 00:00:00 2001 From: erwinpan1 Date: Mon, 15 Apr 2024 16:03:36 +0800 Subject: [PATCH 059/468] Support write events as string through RPC --- examples/common/pigweed/BUILD.gn | 1 + examples/common/pigweed/protos/event_service.options | 1 + examples/common/pigweed/protos/event_service.proto | 7 +++---- examples/common/pigweed/rpc_services/Event.h | 11 +++++------ examples/platform/linux/Rpc.cpp | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) create mode 100644 examples/common/pigweed/protos/event_service.options diff --git a/examples/common/pigweed/BUILD.gn b/examples/common/pigweed/BUILD.gn index 638707c72040d1..2eb4edeee3581f 100644 --- a/examples/common/pigweed/BUILD.gn +++ b/examples/common/pigweed/BUILD.gn @@ -74,6 +74,7 @@ pw_proto_library("button_service") { pw_proto_library("event_service") { sources = [ "protos/event_service.proto" ] + inputs = [ "protos/event_service.options" ] deps = [ "$dir_pw_protobuf:common_protos" ] strip_prefix = "protos" prefix = "event_service" diff --git a/examples/common/pigweed/protos/event_service.options b/examples/common/pigweed/protos/event_service.options new file mode 100644 index 00000000000000..cee34667155c87 --- /dev/null +++ b/examples/common/pigweed/protos/event_service.options @@ -0,0 +1 @@ +chip.rpc.EventSetRequest.event_payload max_size:2048 // max event size diff --git a/examples/common/pigweed/protos/event_service.proto b/examples/common/pigweed/protos/event_service.proto index 01c5589fe1aebe..2adc79ab9598cb 100644 --- a/examples/common/pigweed/protos/event_service.proto +++ b/examples/common/pigweed/protos/event_service.proto @@ -1,14 +1,13 @@ syntax = "proto3"; -import 'pw_protobuf_protos/common.proto'; - package chip.rpc; +import 'pw_protobuf_protos/common.proto'; + message EventSetRequest { uint32 endpoint_id = 1; uint32 cluster_id = 2; - uint32 event_id = 3; - std::string event_payload = 4; + string event_payload = 3; // } message EventSetResponse { diff --git a/examples/common/pigweed/rpc_services/Event.h b/examples/common/pigweed/rpc_services/Event.h index d40a95e64dd88e..55c46304a0293e 100644 --- a/examples/common/pigweed/rpc_services/Event.h +++ b/examples/common/pigweed/rpc_services/Event.h @@ -31,13 +31,12 @@ namespace rpc { class Event final : public pw_rpc::nanopb::Event::Service { public: - virtual ~Event() = default; - - virtual pw::Status Set(const chip_rpc_EventSetRequest & request, chip_rpc_EventSetResponse & response) + ::pw::Status Set( const ::chip_rpc_EventSetRequest& request, ::chip_rpc_EventSetResponse& response) { EndpointId endpointId = request.endpoint_id; uint8_t newPosition = 1 ; // to be parsed from request.event_payload +printf("\033[41m %s, %d, request.event_playload=%s \033[0m \n", __func__, __LINE__, request.event_payload); EventNumber eventNumber; { DeviceLayer::StackLock lock; @@ -53,10 +52,10 @@ class Event final : public pw_rpc::nanopb::Event::Service return pw::OkStatus(); } - virtual pw::Status Get(const chip_rpc_EventGetRequest & request, chip_rpc_EventGetResponse & response) + ::pw::Status Get( const ::chip_rpc_EventGetRequest& request, ::chip_rpc_EventGetResponse& response) { EndpointId endpointId = request.endpoint_id; - uint32 event_id = 1; // TBD + // uint32_t event_id = 1; // TBD { DeviceLayer::StackLock lock; @@ -64,7 +63,7 @@ class Event final : public pw_rpc::nanopb::Event::Service // RETURN_STATUS_IF_NOT_OK(app::Clusters::Switch::Attributes::StateValue::Get(endpointId, &state_value)); } - response.state.event_id = event_id; + response.event_id = endpointId; return pw::OkStatus(); } }; diff --git a/examples/platform/linux/Rpc.cpp b/examples/platform/linux/Rpc.cpp index 6e5f2433cfaf03..5da57a37011408 100644 --- a/examples/platform/linux/Rpc.cpp +++ b/examples/platform/linux/Rpc.cpp @@ -89,7 +89,7 @@ Device device_service; #endif // defined(PW_RPC_DEVICE_SERVICE) && PW_RPC_DEVICE_SERVICE #if defined(PW_RPC_EVENT_SERVICE) && PW_RPC_EVENT_SERVICE -BooleanState event_service; +Event event_service; #endif // defined(PW_RPC_EVENT_SERVICE) && PW_RPC_EVENT_SERVICE #if defined(PW_RPC_LIGHTING_SERVICE) && PW_RPC_LIGHTING_SERVICE From de798bb4acb02f9192575a5087635383da02686d Mon Sep 17 00:00:00 2001 From: erwinpan1 Date: Mon, 15 Apr 2024 18:10:18 +0800 Subject: [PATCH 060/468] Revert Chef stubs.cpp to not using AttributeDelegate --- .../common/clusters/switch/SwitchDelegate.cpp | 46 ----------- examples/chef/common/stubs.cpp | 77 +++---------------- examples/chef/common/stubs.h | 65 ---------------- 3 files changed, 12 insertions(+), 176 deletions(-) delete mode 100644 examples/chef/common/stubs.h diff --git a/examples/chef/common/clusters/switch/SwitchDelegate.cpp b/examples/chef/common/clusters/switch/SwitchDelegate.cpp index 511c51779ecbb2..79dd58c6d97381 100644 --- a/examples/chef/common/clusters/switch/SwitchDelegate.cpp +++ b/examples/chef/common/clusters/switch/SwitchDelegate.cpp @@ -21,7 +21,6 @@ #include #include #include -#include "stubs.h" using namespace chip; using namespace chip::app; @@ -135,20 +134,6 @@ void SwitchEventHandler::OnSwitchMultiPressCompleteHandler(uint8_t previousPosit static std::map gSwitchEventHandlers{}; - -class SwitchAttributeDelegate : public AttributeDelegate -{ -public: - SwitchAttributeDelegate (ClusterId clusterId) : AttributeDelegate(clusterId) {} - - chip::Protocols::InteractionModel::Status PreAttributeChangeCallback(const chip::app::ConcreteAttributePath & attributePath, uint8_t type, uint16_t size, uint8_t * value) override; - - void PostAttributeChangeCallback(const chip::app::ConcreteAttributePath & attributePath, uint8_t type, uint16_t size, uint8_t * value) override; - -private: -}; - - SwitchEventHandler * GetSwitchEventHandler(EndpointId endpointId) { if (gSwitchEventHandlers.find(endpointId) == gSwitchEventHandlers.end()) { @@ -158,41 +143,10 @@ SwitchEventHandler * GetSwitchEventHandler(EndpointId endpointId) return gSwitchEventHandlers[endpointId]; } -chip::Protocols::InteractionModel::Status SwitchAttributeDelegate::PreAttributeChangeCallback(const chip::app::ConcreteAttributePath & attributePath, uint8_t type, uint16_t size, uint8_t * value) -{ - chip::Protocols::InteractionModel::Status ret = chip::Protocols::InteractionModel::Status::Success; -printf("\033[41m %s, %d \033[0m \n", __func__, __LINE__); - ChipLogProgress(Zcl, "SwitchAttributeDelegate::PostAttributeChangeCallback Endpoint: %d, Cluster: " ChipLogFormatMEI ", Type: %u, length %u", attributePath.mEndpointId, ChipLogValueMEI(attributePath.mClusterId), type, size); - - - return ret; -} - -void SwitchAttributeDelegate::PostAttributeChangeCallback(const chip::app::ConcreteAttributePath & attributePath, uint8_t type, uint16_t size, uint8_t * value) -{ -printf("\033[41m %s, %d \033[0m \n", __func__, __LINE__); - ChipLogProgress(Zcl, "SwitchAttributeDelegate::PostAttributeChangeCallback Endpoint: %d, Cluster: " ChipLogFormatMEI ", Type: %u, length %u", attributePath.mEndpointId, ChipLogValueMEI(attributePath.mClusterId), type, size); - - switch (attributePath.mAttributeId) { - case Attributes::CurrentPosition::Id: { - SwitchEventHandler *eventHandler = GetSwitchEventHandler(attributePath.mEndpointId); - uint8_t newPosition = *value; - - if (eventHandler) { - eventHandler->OnSwitchLatchedHandler(newPosition); - } - } - break; - default: - break; - } -} - void emberAfSwitchClusterInitCallback(EndpointId endpoint) { ChipLogProgress(Zcl, "Chef: emberAfSwitchClusterInitCallback"); gSwitchEventHandlers[endpoint] = new SwitchEventHandler(endpoint); - RegisterApplicationAttributeDelegate(Switch::Id, new SwitchAttributeDelegate(Switch::Id)); printf("\033[44m %s, %d, Switch::ID=%u \033[0m \n", __func__, __LINE__, Switch::Id); } diff --git a/examples/chef/common/stubs.cpp b/examples/chef/common/stubs.cpp index dec32c340e8a52..91a7b5a84d10e1 100644 --- a/examples/chef/common/stubs.cpp +++ b/examples/chef/common/stubs.cpp @@ -19,36 +19,12 @@ #include "chef-concentration-measurement.h" #endif -#include "stubs.h" -#include - using chip::app::DataModel::Nullable; using namespace chip; using namespace chip::app; using namespace chip::app::Clusters; -static std::map gApplicationAttributeDelegates{}; - -void chip::app::RegisterApplicationAttributeDelegate(ClusterId clusterId, AttributeDelegate * delegate) -{ - // TODO assert (gApplicationAttributeDelegates.find(clusterId) == gApplicationAttributeDelegates.end() ) - - gApplicationAttributeDelegates[clusterId] = delegate; - -} - - -AttributeDelegate * GetApplicationAttributeDelegate(ClusterId clusterId) -{ - if (gApplicationAttributeDelegates.find(clusterId) == gApplicationAttributeDelegates.end()) { - return nullptr; - } - - return gApplicationAttributeDelegates[clusterId]; -} - - Protocols::InteractionModel::Status emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId, const EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer, uint16_t maxReadLength) @@ -137,54 +113,25 @@ Protocols::InteractionModel::Status emberAfExternalAttributeWriteCallback(Endpoi void emberAfPluginSmokeCoAlarmSelfTestRequestCommand(EndpointId endpointId) {} - -chip::Protocols::InteractionModel::Status -MatterPreAttributeChangeCallback(const chip::app::ConcreteAttributePath & attributePath, uint8_t type, uint16_t size, - uint8_t * value) -{ - chip::Protocols::InteractionModel::Status ret = chip::Protocols::InteractionModel::Status::Success; - - ChipLogProgress(Zcl, "MatterPostAttributeChangeCallback Endpoint: %d, Cluster: " ChipLogFormatMEI ", Type: %u, length %u", attributePath.mEndpointId, ChipLogValueMEI(attributePath.mClusterId), type, size); -printf("\033[41m %s, %d \033[0m \n", __func__, __LINE__); - - AttributeDelegate * delegate = GetApplicationAttributeDelegate(attributePath.mClusterId); - if (delegate) { - ret = delegate->PreAttributeChangeCallback(attributePath, type, size, value); - } - - return ret; -} - void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & attributePath, uint8_t type, uint16_t size, uint8_t * value) { -// AttributeId attributeId = attributePath.mAttributeId; - ChipLogProgress(Zcl, "MatterPostAttributeChangeCallback Endpoint: %d, Cluster: " ChipLogFormatMEI ", Type: %u, length %u", attributePath.mEndpointId, ChipLogValueMEI(attributePath.mClusterId), type, size); -printf("\033[41m %s, %d \033[0m \n", __func__, __LINE__); + ClusterId clusterId = attributePath.mClusterId; + AttributeId attributeId = attributePath.mAttributeId; + ChipLogProgress(Zcl, "Cluster callback: " ChipLogFormatMEI, ChipLogValueMEI(clusterId)); - AttributeDelegate * delegate = GetApplicationAttributeDelegate(attributePath.mClusterId); - if (delegate) { - delegate->PostAttributeChangeCallback(attributePath, type, size, value); - } - -#if 0 - switch (clusterId) { - case OnOff::Id: - ChipLogProgress(Zcl, "OnOff Cluster attribute ID: " ChipLogFormatMEI " Type: %u Value: %u, length %u", ChipLogValueMEI(attributeId), + if (clusterId == OnOff::Id && attributeId == OnOff::Attributes::OnOff::Id) + { + ChipLogProgress(Zcl, "OnOff attribute ID: " ChipLogFormatMEI " Type: %u Value: %u, length %u", ChipLogValueMEI(attributeId), type, *value, size); - break; - case LevelControl::Id: - ChipLogProgress(Zcl, "Level Control Cluster attribute ID: " ChipLogFormatMEI " Type: %u Value: %u, length %u", - ChipLogValueMEI(attributeId), type, *value, size); - break; - case Switch::Id: - ChipLogProgress(Zcl, "Switch Cluster attribute ID: " ChipLogFormatMEI " Type: %u Value: %u, length %u", + } + else if (clusterId == LevelControl::Id) + { + ChipLogProgress(Zcl, "Level Control attribute ID: " ChipLogFormatMEI " Type: %u Value: %u, length %u", ChipLogValueMEI(attributeId), type, *value, size); - break; - default: - break; + + // WIP Apply attribute change to Light } -#endif } /** @brief OnOff Cluster Init diff --git a/examples/chef/common/stubs.h b/examples/chef/common/stubs.h deleted file mode 100644 index 4f039830024c4c..00000000000000 --- a/examples/chef/common/stubs.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#pragma once - -#include -#include - -namespace chip { -namespace app { - -class AttributeDelegate -{ -public: - AttributeDelegate (ClusterId clusterId) : mClusterId(clusterId) {} - - virtual ~AttributeDelegate() {} - /** - * xxxx - */ - virtual chip::Protocols::InteractionModel::Status PreAttributeChangeCallback(const chip::app::ConcreteAttributePath & attributePath, uint8_t type, uint16_t size, uint8_t * value) { return chip::Protocols::InteractionModel::Status::Success; } - /** - * xxxx - */ - virtual void PostAttributeChangeCallback(const chip::app::ConcreteAttributePath & attributePath, uint8_t type, uint16_t size, uint8_t * value) {} - /** - * xxxx - */ - virtual Protocols::InteractionModel::Status ExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId, const EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer) {return Protocols::InteractionModel::Status::Success;} - /** - * xxxx - */ - virtual Protocols::InteractionModel::Status ExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId, const EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer, uint16_t maxReadLength) {return Protocols::InteractionModel::Status::Success;} - -private: - ClusterId mClusterId; -}; - -void RegisterApplicationAttributeDelegate(ClusterId clusterId, AttributeDelegate * delegate); - -} // namespace app -} // namespace chip - - - -//class AllClustersCommandDelegate : public NamedPipeCommandDelegate -//{ -//public: -// void OnEventCommandReceived(const char * json) override; -//}; From 3a4f4e8e243eb5ad5ff9dc39b47e6c68fcb074c2 Mon Sep 17 00:00:00 2001 From: C Freeman Date: Mon, 15 Apr 2024 10:16:49 -0400 Subject: [PATCH 061/468] Docs: Add documentation from SDK testing session at the Singapore member meeting (#32831) * as converted * Moving to individual files, adding plantuml source * spelling * remove syntax markers, apparently this is unsupported * why do we not have a coding dictionary * Apply suggestions from code review Co-authored-by: Rob Bultman * Restyled by prettier-markdown --------- Co-authored-by: Rob Bultman Co-authored-by: Restyled.io --- .github/.wordlist.txt | 5 + docs/testing/img/integration_tests.png | Bin 0 -> 111930 bytes docs/testing/img/plant_uml_source.txt | 55 ++++++ docs/testing/img/unit_testable_clusters.png | Bin 0 -> 72129 bytes .../unit_testable_clusters_all_classes.png | Bin 0 -> 15600 bytes .../img/unit_testable_clusters_context.png | Bin 0 -> 19979 bytes .../img/unit_testable_clusters_driver.png | Bin 0 -> 18518 bytes .../img/unit_testable_clusters_logic.png | Bin 0 -> 18868 bytes .../img/unit_testable_clusters_server.png | Bin 0 -> 23881 bytes docs/testing/img/unit_tests.png | Bin 0 -> 28991 bytes docs/testing/index.md | 23 ++- docs/testing/integration_test_utilities.md | 134 ++++++++++++++ docs/testing/unit_testing.md | 121 +++++++++++- docs/testing/unit_testing_clusters.md | 172 ++++++++++++++++++ 14 files changed, 506 insertions(+), 4 deletions(-) create mode 100644 docs/testing/img/integration_tests.png create mode 100644 docs/testing/img/plant_uml_source.txt create mode 100644 docs/testing/img/unit_testable_clusters.png create mode 100644 docs/testing/img/unit_testable_clusters_all_classes.png create mode 100644 docs/testing/img/unit_testable_clusters_context.png create mode 100644 docs/testing/img/unit_testable_clusters_driver.png create mode 100644 docs/testing/img/unit_testable_clusters_logic.png create mode 100644 docs/testing/img/unit_testable_clusters_server.png create mode 100644 docs/testing/img/unit_tests.png create mode 100644 docs/testing/integration_test_utilities.md create mode 100644 docs/testing/unit_testing_clusters.md diff --git a/.github/.wordlist.txt b/.github/.wordlist.txt index 543786c1473460..b891546f940e53 100644 --- a/.github/.wordlist.txt +++ b/.github/.wordlist.txt @@ -585,6 +585,8 @@ GenericWiFiConfigurationManagerImpl GetDeviceId GetDeviceInfo GetDns +getter +getters GetInDevelopmentTests GetIP getManualTests @@ -907,6 +909,7 @@ Multicast multilib Multiprotocol multithreaded +mutex mutexes mv MX @@ -936,6 +939,7 @@ nfds NitricOxideConcentrationMeasurement NitrogenDioxideConcentrationMeasurement nl +nltest NLUnitTest NLUnitTests nmcli @@ -1499,6 +1503,7 @@ utils UUID ux validator +valgrind vcom VCP Vectorcall diff --git a/docs/testing/img/integration_tests.png b/docs/testing/img/integration_tests.png new file mode 100644 index 0000000000000000000000000000000000000000..dd83695cf2016399440560c41c9252757ca1510c GIT binary patch literal 111930 zcmeFZXH=9~*DYGMZQE^ZL_o5F2!enpNDhjCWXTy6R73+g>5&$;8AF^)e}imK8om(Nudxr6)Y_F*uX zgYs7{t79vqie5WbIac8y6sJj zxwVbeO>R3g+nYD7?QYxH&+M*}z+jGJ;bdH(qb1T<2>lXTA>2x&V;nP=FPph9e z>UA{C_N8;v@9+F?zdi7fFXUZx|1*YP_zr#aKG#6f{8fN2Y)ne?K=PcAucp1VWR>Lb zJJm(k#m`-CMNUC8OLJYg;+cZ1HGRwMg~8RLG|NJx*_kV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+ZT8J zF6?-uXT!vK7|Rz=-eN8{KksQ9_H*aiMn)xQWbvyF^JMl;8kjYhC=AA)JF9n%?DRN# zpm)v0Nt`y(h^5brI#H4LYy9NkZCF8bd2YPNbLp-g_OBTnpi?b7Ah>vJ*{jVf&M#-* zjoc4(f}$~xhT(7gjb7tQ=@8eavZg*2k2^cZgvW(?*^s1@?8K+{m>h|noI^gV==Kh@ zycKSmE_ZbDdUJ2n^#*U0mK@RWSTQ|+;MZy8qR#H+d2 zSRXCm;Z42Kz#rtwK0_JH9*0-P$iHzD`k)=V+lT#z+7kN3vqoH;X%zHPX+5zIC)+=((=r16=_=UAW11q9$N&B-B_?qdd7F|G zW=cl?k2~G}VRQWZE0d3e@fY2Rzcykid2ea4+4VLG4_rs}eW!2gGldtSv$KL5FHHld zi+gC%SPaxPW9~>6wEv^~;oF^bEv9p3l6fwFFMLkBpZQRDtI$Ta8BX6ubL(V(-{~mF zyA92kx6{XQWJzzdo%k31>2#02&p!U@bUf`Qgl{D58E~h+>Ck0OWS?7=HIsCaq%K+K z$>U!-TK~yk`)dRI_g5yL1mpkW6#qTQQ^WW7O#Tz=`k$kye~$@MDIm*;R^#um?klK2 z^UUbr9(k6XnIX} ze2U!pUKc;fR&SJpXB`ENElo8EAM6&5)p6O34@)ffo9?qrg*&&Ze`~9IjqS>S#L>dW34F!XK0O%V0b + mClusterId : ClusterId + Read(...) + Write(...) +} + +class CommandHandlerInterface { + InvokeCommand(...) +} + +class ClusterServer { + Read(...) + Write(...) + InvokeCommand(...) + RegisterEndpoint(...) + mEndpoints: ClusterLogic[] +} + +class MatterContext { + LogEvent() + MarkAttributeDirty() + mPersistentStorageDelegate + mOtherFakeableThings +} + +class ClusterLogic { + Init(...) + GetXAttribute(...) + SetXAttribute(...) + HandleXCommand(...) + mStateVariables +} + +class ClusterDriver { + OnClusterStateChange(...) + RegisterListener(...) + mListener +} + +AttributeAccessInterface <|-- ClusterServer +CommandHandlerInterface <|-- ClusterServer +ClusterServer "1" *-- "Many" ClusterLogic +ClusterLogic "1" *-- "1" ClusterDriver +ClusterLogic "1" *-- "1" MatterContext + +hide ClusterServer members +hide AttributeAccessInterface members +hide CommandHandlerInterface members +hide ClusterLogic members +hide ClusterDriver members +hide MatterContext members + +@enduml diff --git a/docs/testing/img/unit_testable_clusters.png b/docs/testing/img/unit_testable_clusters.png new file mode 100644 index 0000000000000000000000000000000000000000..61f6c51f59b765708785cbf31a1a88036b759cef GIT binary patch literal 72129 zcmeEu^+Q$b@;-`)lz=n{2q;KMcZ#H>bazR2r*tDCAT1!>(k(6B-E8U3P4j)X=N|95 zpZh0#@A}~!cC5AEHSf$b&pb2Bkasd-Xvl=faBy&FZ^eb>;oy*q;o$CXJ$eY;G7JW<2^>UJ9TcpM9h~*-jNnYHtSyaR*&Emy8CluCw|3ZvZ{~-C zdj|JbSWwX=d1v0!Vtn=D{4fl$OzK^`31iQYS{Eg%-!a+k7twoceaqO7=dss}jTyN$ z`{FD+bNcD%!>ooy`os6`;Yn(QzUwHd^Qp*K!IleIfqx`%4@cPigYwMiKIvl3BIWwn zNa{k+#3U_Q%is+c)RC;Sd4X$pbYfxx7p(GM$58(zuKT^eU%|mO;rkc-`_*$YO@u$M zo*^yM{CNTQ_L0iJPZNJr12fTI$LlApN`L;Xt568y=j1o64ItMGFU~gQ243s5IwwwF`S6&Zkj)@%Oc_y@{N>G_SVl_Uj5$2!n1dA{icF&83N5pkUfcuI^$f&#MedjfocUKae1P9kRZ7(~C z13rO+JClbw_*7Uww})z(3Rqvlh2MnexcBujpFJLqB_7;YXScmg?%&bkdiv_@-~JEh z!Suhd0T%py{0|KNwglY&(DdIi@;|rupIiK8f&Wp5Kc4VE?)AqM|6`Q@qvU@%!~Y76 ze+R|?_m!H2On-mBoV@(VvX0+Fw9q1rYFzi-;NUM@_QpX_?J|9lvdKSjevwdUe+09uPsq(aAE%JNn9*gN>~tLnN$j z)#{JY-Efy_5ESI(yr6ba|EF%=aP=?1?)&sYQolFumB@U0LqkLEvHP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wqrm?Izrq*o literal 0 HcmV?d00001 diff --git a/docs/testing/img/unit_testable_clusters_context.png b/docs/testing/img/unit_testable_clusters_context.png new file mode 100644 index 0000000000000000000000000000000000000000..3a42eca37be258ab6d578aa6945a6834466c7c63 GIT binary patch literal 19979 zcmd43WmuHk-!`nYbccw8fRr=>l0zecGy)RRC<1~YNDdtW4&5Pw5+WeoE!`o~-Q6%S z!@F?r{eSm;-_P?L&vCq8-VYuiv#u4twbn1r^SmZRO+|qK_crd08#f3PAIoaoxN)-# z{0qTB1AphtKt&Gk-?X1{eh=cb-6k^|`^4-ko-Y41 zjG1?^6@&Jdu~I#&+~;&8{Bv+oOaLail>bXfIbySr`|N|k1OoKWx)2TB35)iYmM%UP zF3u};g{uom!nT(EuB-DY)8l%fR5-r$I1oxFH1I#nC+(}4EGi1vTgf{l8)EFO&P89})iibWWx|lwMkg6{8w>b$6fyok zWqNul#c>^S}aF{gkYZ;+i0Mp{i+WHkwZMM6Y(gCJ1xe^nWcn zYuuaF-lHnNCpW)Dxh%#m>P1w+^(4=f!6trnBURKzI-=>yL^sde!b06a+W}Y!E52`S zbPNI!SJd>pd}{AFrZy`;>?-X$H9#pdY}w1r)e0LcCMGkvH|s9rkBNc7N{)NRf*(r$ zuLZfCGx{6rUMYTXVF}C*e9H)bX8lq(9Uc{^+9Da_=Omwy(byqNV<3{LQvq#Wz(he` zOY`u5AbfPsLSF7DH3k*Va_X-}8r_G(PyYAfHcr~fKG+t$zonXS1?@lFck=q?*gGM> z`ThGuRq2aLuUENfY#Ah+LDP9XE*=~l9F-xgoF9Vs9PEn(Y#P?Xcw|iEBVS?AI1{_d z5t{g$tusc;781fdjO?Wc2g5J=K3=qEay(MAh}rzr_Kv0nIaTyD+0u4W&?;Lu#;bRP z>weU?I%*vY_I`0ivnQ*$8yt<_o_$Y3olFwixyfbmH{;7$C|D}@^rwneloaR9ez~5+7kNudOZ&yPW0SzBWcQ_`S3l48Wv-{eaI-NS!|us>)-v(Lmy+5( zv|2vJ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LM|*%@beI4+BrU4hJri7Z}FA>b{Yde5(V#1Yn4-H1cPROUlz<-n;~!N*Ww3 zV@FjSJOiP>fxNR#ivLvtlx)daJH!3k1YDP1k^o2)pheyw z_2XWCu--L(&P;3XipuaJ1+yue?j8}$k4})9)N^<=F{l71(jDu(x zBsi_|z_`2vLOPk-lsa*>d* zt(B)o;wm)o`cS0*t@FIdGW|P1fZ`3BXZ;D8BNj?H|7!0EC|SWv?0^pauMhE{A=6!s X=#sj5eDJ*>EEy@qC!Zd@eEa_Z0y_G+ literal 0 HcmV?d00001 diff --git a/docs/testing/img/unit_testable_clusters_logic.png b/docs/testing/img/unit_testable_clusters_logic.png new file mode 100644 index 0000000000000000000000000000000000000000..9ebed283777b4ebc23af98af8e4021198c6611d4 GIT binary patch literal 18868 zcmdVCbySpH+c#_>rGO|M15!$NGYBFfC4z{6bV`SSz<|;SGK4gUG)i}abc1wvcgGC% z?eWs<_IcL*u5YdPzxNN;8fKq6j^jM~`0eq3rXY12ixlh1l`FSpq$QqTxpK7_{6%0~ z1K(Khe8j(UMaD%&LQKU;Ycn2O^WKZo7A56pDk>^Jn3itKvOn$O%r(iN^NXmSV${xN zmd94!B~?ATQ2r^$Wo6}0WDt3J?c)P+LIaHFZw$5O2D$fD@s|inF0CkHo4L3uv6(x% zJNM6pAyDIPLx=8nUl5xDg6o>q&{}_h=_Yj}NGDmBX zV~?2sq@>%$SXQA+DOm?rqkOB1xu%yz^r@S@y}h2^eUDqy4JY`2?PMizubseQjk zK)_-1;@xkeht*+K&MZAU^#@VBAM!gQ@9!<#O3kJCMcQ4w3eOyqf?*yLLVEjsd5Wkx6V0S6|IuhNZ@uh=@Hiiv;-GI!Q^{a}@ z2fN!o6oN%tBl(}$TUMu_T(N<>sY{vu*_ww<=%$K=P8ozu(qrexrDuB`J&lNP4%7zU z1v!300KT(9CuQW3ITuYr%Dm{{|flkQk`c0lpQBl#+ zH78oGTx5HydT4q&-SYJ^>+3O#$%;m~v^==AaI0re%5z6NQX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89+BS?F_`w%1bRDb#>%E{;70+$K@AniQERr3}hG;C+)C!nm zCVj|yx>4Bm0u~dZnA!M!>Q{XJfR>MMSchFgO3Lc~cj8-|KBU*R04}VeE-hHmB4Cny z`NTv4f{l&6+Y}WQ1rnlJq6QKg>2!>1S}vpl-(g&!@o89;pJvEZz-j01^a0fy8}@ ayQ^D#S@`_6A^0_>D>6?MByz-cJpMmZ#j_Ov literal 0 HcmV?d00001 diff --git a/docs/testing/img/unit_testable_clusters_server.png b/docs/testing/img/unit_testable_clusters_server.png new file mode 100644 index 0000000000000000000000000000000000000000..d8632e73a3233815ca6e06a5a2e2ed444aa11dba GIT binary patch literal 23881 zcmd43by$?!+cpd$q9CGDN{C2HH;90sk^)LdGa%h9HGqPEbazWhNl6Sbbf;3%QiF61 zHRQX-jeGCsd4A9F9mn_n^Zv1qjWg?B>$=yv)>Y?ujsHt|Nqk%~Tnr2hd}*m?iWnG} zL*T!$tCzqh#S_|#7#P|&rJso@JL{|`<2VxyPq%sFewdaH8_2|_6$|)D%%phz`6bLo zyh~j;4`1`_-ou+_rhJvjbXi=AukMNXeOko_m&J*cAKhY0uf$MP-1j)=5O5M0e9Ir% z+qZV?HqFo=9?tI{}?@V;TRY%FEv0hG14x-LtVmnat#BC zjq&a_1_BQQgAT(S4&%4dmg#(Vzx~xl@5Bps>;{Ztgsi)8OBU8;!4S3_BaS*E46OT> za7j}3s;JwS#OU%f0!bR6?_Y)UK~@fokYZOKs%uZ)x`f1*z((K+ei1;*X?=af%F4>k zjXd0*9~&DJ6cl`sgZ(750ZQFYYz)tS=TlNr(%IR$yu7?nulhwx?-478Yvzxh%KJ1z zE=nuMkq_!{;wRlmrp2v=Pav{ zeb5whfTr~ge5v9}>(?E;yv9Pe@=n3&XLa9Xi95gU?KgJ+r`)V>a^St{BeAbY za3kx&zH*knO8qFj7U%T6DOZP5Q?)>=#6ob?Xu3CtHE~bPS6B~-bi=pkmZ}*u_?w0k|=j!v68%psMbzopiP$0|P6PoeCn zS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qD_x5~l<{h};B#p3cIeFd(5Z3jbF5Gi?kCENqPyH~;$tGIT-aDqTg9%RNhEPf$iqQa1<_zho8t zBIgGy>Hzv=B9TiV9FnWxH8zg&@nL$O2(ZShmDHos%?q7Du0u+`6J|J)&;FAb3ZJ5B zcZS}!3J@~|2cTz=woD_ec1)j^7@Z;Ri50eBY;MbO^)59&toRDET!T)AebLxpL?>9p zz0hAdv8f)$l$)U7fzi@Uy=sQ>O0Y<4uKHT_vEb^nR4$)Xfslg|PDT+<)E6GYM+A7>9f!lyphdCZ0^01BRJvVZurM?v;qsbwst=G=1p#f>=2o2e# z$8nxOj4_)4RAK?g?zu~kV}iT&JE~*9(XwUB-P3t~OQFl%FdS5ib5uaN^)otYCL^L+ zxaT5-{^*;yPFUma9RA3qh&&v*RkBe!mjX@06h2|aXPvpQ$Sir=c)iOdqqerb+Uxt_ z!_4`d!TmRTnx!uUp5k%UUSblPl(Po^s1qCl3TPh6hyg@|C;Mvoi|0g0 zr`+1W9@1bj5OcH&;5pHu;gmuN613Ubi&H__LVG#0I29Wzj4NfuS)FlE2F+L59#@dp7$B;j@fWhmWp!KOdx%fWWiT99tlh# zBGjzBtmv(+DdOiUSb^-~>}x4CByGCOXpv|gbNK^zecN_C31<;c7Wb~fPx#dI!+gXS z0+52Ae%~W11%}++dwl}V zOYoB> zCMNemK=2l+?CxbQ)7U{Y00P{eVNeZJZmvm7PUwvApZjPGLN$xUef%rITQ#@t?3-|B zUd~E?$GNGS8+RF(-Jd;y(s=puC1WQJcTMts-)O1ZgN)(~{;<_gd;NviTnws3#l)uN zPs`>7=Evvf=hx9-0~^MoI;W3^6m1oiK-Th);y8haj!x(9_I@GlwrJNExn4k}oK9Qa LK<%}P-M#+-&c;L( literal 0 HcmV?d00001 diff --git a/docs/testing/img/unit_tests.png b/docs/testing/img/unit_tests.png new file mode 100644 index 0000000000000000000000000000000000000000..95b29b415c967c4877679866a19e7e98311f2601 GIT binary patch literal 28991 zcmeFaXINF)+AX*(ORX}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r#R8Kf*;py3A9at-84iHm`E*Z?DrfAS ziZ5yW1<&dj0LT_<+kFh3{(@9;e?G^50Uy4GKu`E65PZ=OZutGTUH!lRearxd-7 +#include +#include + +class YourTestContext : public Test::AppContext { + ... +}; + + +static void TestName(nlTestSuite * apSuite, void * apContext) { + // If you register the test suite with a context, cast + // apContext as appropriate + YourTestContext * ctx = static_cast(aContext); + + // Do some test things here, then check the results using NL_TEST_ASSERT + NL_TEST_ASSERT(apSuite, ) +} + +static const nlTest sTests[] = +{ + NL_TEST_DEF("TestName", TestName), // Can have multiple of these + NL_TEST_SENTINEL() // If you forget this, you’re going to have a bad time +}; + +nlTestSuite sSuite = +{ + "TheNameOfYourTestSuite", // Test name + &sTests[0], // The list of tests to run + TestContext::Initialize, // Runs before all the tests (can be nullptr) + TestContext::Finalize // Runs after all the tests (can be nullptr) +}; + +int YourTestSuiteName() +{ + return chip::ExecuteTestsWithContext(&sSuite); // or “without” +} + +CHIP_REGISTER_TEST_SUITE(YourTestSuiteName) +``` + +Each test gets an nlTestSuite object (apSuite) that is passed into the test +assertions, and a void\* context (apContext) that is yours to do with as you +require. + +The apContext should be derived from +[Test::AppContext](https://github.com/project-chip/connectedhomeip/blob/master/src/app/tests/AppTestContext.h) + +See +[TestSpan.cpp](https://github.com/project-chip/connectedhomeip/blob/master/src/lib/support/tests/TestSpan.cpp) +for a great example of a good unit test. + +## nlUnitTest - Compiling and running + +- Add to src/some_directory/tests/BUILD.gn + - chip_test_suite_using_nltest("tests") + - See for example + [src/lib/support/tests/BUILD.gn](https://github.com/project-chip/connectedhomeip/blob/master/src/lib/support/tests/BUILD.gn) +- [./gn_build.sh](https://github.com/project-chip/connectedhomeip/blob/master/gn_build.sh) + will build and run all tests + - CI runs this, so any unit tests that get added will automatically be + added to the CI +- Test binaries are compiled into: + - out/debug//tests + - e.g. out/debug/linux_x64_clang/tests +- Tests are run when ./gn_build.sh runs, but you can run them individually in + a debugger from their location. + +## Debugging unit tests + +- After running ./gn_build.sh, test binaries are compiled into + - out/debug//tests + - e.g. out/debug/linux_x64_clang/tests +- Individual binaries, can be run through regular tools: + - gdb + - valgrind + - Your favorite tool that you tell everyone about. + +## Utilities + +We have a small number of unit testing utilities that should be used in unit +tests. + +Consider adding more utilities for general use if you require them for your +tests. + +### Mock clock + +The mock clock is located in +[src/system/SystemClock.h](https://github.com/project-chip/connectedhomeip/blob/master/src/system/SystemClock.h) +as `System::Clock::Internal::MockClock`. + +To use the mock clock, use the `chip::System::SystemClock()` function as normal. +In the test, instantiate a MockClock and use the `SetSystemClockForTesting` to +inject the clock. The Set and Advance functions in the MockClock can then be +used to set exact times for testing. This allows testing specific edge +conditions in tests, helps reduce test flakiness due to race conditions, and +reduces the time required for testing as tests no long require real-time waits. + +### TestPersistentStorageDelegate + +The TestPersistentStorageDelegate is an in-memory version of storage that easily +allows removal of keys, presence checks, etc. It is available at +[src/lib/support/TestPersistentStorageDelegate.h](https://github.com/project-chip/connectedhomeip/blob/master/src/lib/support/TestPersistentStorageDelegate.h) diff --git a/docs/testing/unit_testing_clusters.md b/docs/testing/unit_testing_clusters.md new file mode 100644 index 00000000000000..b2806c8084b6ee --- /dev/null +++ b/docs/testing/unit_testing_clusters.md @@ -0,0 +1,172 @@ +# Designing Clusters for Testing and Portability + +## Unit Testable, Modular Cluster Design + +When designing new clusters, consider the following approach: + +- Separate the cluster logic from the on-the-wire data model + - Server vs. ClusterLogic + - Makes the cluster logic unit-testable without generating TLV. +- Separate the basic cluster logic from code that is platform- or + device-specific. + - ClusterLogic uses a ClusterDriver + - Makes the cluster logic portable between platforms / manufacturers + - Removes necessity of overriding global singleton functions like + PostAttributeChangeCallback. + +General approach: + +![](./img/unit_testable_clusters.png) + +Class proposal: + +![](./img/unit_testable_clusters_all_classes.png) + +### ClusterServer + +![](./img/unit_testable_clusters_server.png) + +The ClusterServerClass is a **Very** light wrapper over ClusterLogic. It +translates Interaction Model wire format handling into API calls for cluster +logic methods. + +This class implements both the AttributeAccessInterface and the CommandHandler +interfaces so ClusterLogic properly handles data dependencies between commands +and attributes. + +An example code snippet showing the translation of the TLV into API calls to the +ClusterLogic class: + +``` +CHIP_ERROR DiscoBallServer::Read(const ConcreteReadAttributePath & aPath, + AttributeValueEncoder & aEncoder) +{ + DiscoBallClusterLogic * cluster = FindEndpoint(aPath.mEndpointId); + VerifyOrReturnError(cluster != nullptr, CHIP_IM_GLOBAL_STATUS(UnsupportedEndpoint)); + + switch (aPath.mAttributeId) + { + case Clusters::DiscoBall::Attributes::Run::Id: + return aEncoder.Encode(cluster->GetRunAttribute()); + … + } +} +``` + +### ClusterLogic + +![](./img/unit_testable_clusters_logic.png) + +The ClusterLogic class is for all the code that is SHARED between platforms. It +does NOT include any TLV parsing or direct calls to Ember/IM/LogEvent etc. + +The class should include attribute getters/setters and handlers for all +commands. + +The class receives “plain data” Matter requests from ClusterServer class, +performs required common actions, and calls driver class to perform platform- or +hardware-specific actions. It also receives driver updates (e.g. +application-driven value changes) from the ClusterDriver class and updates state +as appropriate. + +The class should handle spec-requirements for: + + - Range checking (CONSTRAINT_ERROR) + - Attribute and metadata storage (persistent or in-memory) + - Data dependencies between commands and attributes + - Event generation / dirty attributes (callback to server) + - Calling driver when platform or hardware interactions are required + +API recommendation: + + - Maintain all cluster state in a separate data-only class. + - Provider getters/setters for application logic to use. + - Implement handlers for all commands, conditional on features. + - Let the caller provide (inject) dependencies. Avoid explicit memory + management. + +### ClusterDriver + +Implements hardware or platform-specific actions required on cluster +interactions or when application wants to report state changes. + +![](./img/unit_testable_clusters_driver.png) + +### MatterContext + +The ClusterLogic class must not directly use global resource because they cannot +be isolated for testing. Instead, the MatterContext holds pointers to Matter +stack objects, which can be be injected / faked for testing. This includes - +Wrapper over IM Engine interface functions for marking attributes dirty, and +logging events. - Storage - Anything you would normally access with +Server::GetInstance() + +![](./img/unit_testable_clusters_context.png) + +### ClusterDriver + +The ClusterDriver is called by the ClusterLogic class and is used to translate +attribute changes and commands into application actions. It also reports +external changes back to the ClusterLogic class. + +The API design for this class will vary by the cluster, but it is generally +recommended to use a generic API where possible, so the API ports easily to +other platforms, for example an attribute changed callback with the changes +listed. It is important to be careful about the design and revisit this early if +issues arise. + +## Unit testing with the modular cluster design + +### ClusterLogic class + +The unit test instantiates the ClusterLogic, provides MatterContext and +ClusterDriver instance with fakes/mocks for testing. + +Unit test against the API, and check the fakes/mocks to ensure they are being +called as appropriate. + +As with all unit tests, prefer testing for behavior rather than implementation +details. + +Important tests to consider: + +- Initialization and initial attribute correctness. +- Errors for out-of-range on all attribute setters and command handlers. +- All spec-defined error conditions, especially ones that are difficult to + trigger. +- Data dependencies between commands and attributes. +- Incoming actions in different states (stopped, running, etc). +- Calls out to storage for persistent attributes. +- Calls out to driver for changes as appropriate. +- Driver error reporting. +- Event generation and dirty attribute marking, including attributes that are + changed from the driver side. +- Others - very dependent on the cluster. + +# Unit testing ClusterServer + +- Best to have the lightest wrapping possible + - If the wrapper is light, the code can be covered by integration or unit + tests, or a combination. + - Correctness can mostly be validated by inspection if it’s trivial. +- Important tests + - Errors when ClusterLogic instances aren’t properly registered. + - Flow through to ClusterLogic for all reads/writes/commands. +- Can unit test this class by generating the TLV / path for input, parsing the + TLV output. + +# Unit testing existing clusters + +- Important for clusters where there are multiple configurations that cannot + easily be represented with example apps +- Option 1 + - Refactor the cluster logic to be unit-testable. +- Option 2 + - Test at AttributeAccessInterface boundary. + - Instantiate or access the cluster server instance in the test. + - Read / Write TLV and use TLV encode/decode functions to verify + correctness. + - See TestPowerSourceCluster for an example of how to do this +- Additional test coverage on clusters, especially for hard to trigger + conditions, is important. However, **don’t let perfection be the enemy of + progress** . From ef4422690383a3b6fdf3542a2cba82f896fe55fa Mon Sep 17 00:00:00 2001 From: cdj <45139296+DejinChen@users.noreply.github.com> Date: Mon, 15 Apr 2024 22:52:21 +0800 Subject: [PATCH 062/468] print the port data in DNS shell commands. (#32982) --- src/lib/shell/commands/Dns.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib/shell/commands/Dns.cpp b/src/lib/shell/commands/Dns.cpp index 14955335daaad0..ff9edad52445a5 100644 --- a/src/lib/shell/commands/Dns.cpp +++ b/src/lib/shell/commands/Dns.cpp @@ -135,6 +135,10 @@ class DnsShellResolverDelegate : public Dnssd::DiscoverNodeDelegate, public Addr { streamer_printf(streamer_get(), " %s\r\n", nodeData.resolutionData.ipAddress[i].ToString(ipAddressBuf)); } + if (nodeData.resolutionData.port > 0) + { + streamer_printf(streamer_get(), " Port: %u\r\n", nodeData.resolutionData.port); + } } private: From a104eb469a1929599872b4eb621708dff29910c5 Mon Sep 17 00:00:00 2001 From: erwinpan1 Date: Tue, 16 Apr 2024 00:00:35 +0800 Subject: [PATCH 063/468] RPC can call delegate to SwitchManager/EventHandler --- .../common/clusters/switch/SwitchDelegate.h | 43 --------- ...tchDelegate.cpp => SwitchEventHandler.cpp} | 82 +++-------------- .../clusters/switch/SwitchEventHandler.h | 90 +++++++++++++++++++ .../common/clusters/switch/SwitchManager.cpp | 67 ++++++++++++++ examples/chef/linux/BUILD.gn | 3 +- examples/common/pigweed/rpc_services/Event.h | 24 +++-- examples/platform/linux/Rpc.cpp | 62 +++++++++++++ examples/platform/linux/Rpc.h | 10 +++ 8 files changed, 251 insertions(+), 130 deletions(-) delete mode 100644 examples/chef/common/clusters/switch/SwitchDelegate.h rename examples/chef/common/clusters/switch/{SwitchDelegate.cpp => SwitchEventHandler.cpp} (53%) create mode 100644 examples/chef/common/clusters/switch/SwitchEventHandler.h create mode 100644 examples/chef/common/clusters/switch/SwitchManager.cpp diff --git a/examples/chef/common/clusters/switch/SwitchDelegate.h b/examples/chef/common/clusters/switch/SwitchDelegate.h deleted file mode 100644 index b8fa13fba66ce6..00000000000000 --- a/examples/chef/common/clusters/switch/SwitchDelegate.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#pragma once - -#include -#include - -#include - -namespace chip { -namespace app { -namespace Clusters { - -namespace Switch { - -} // namespace Switch -} // namespace Clusters -} // namespace app -} // namespace chip - - - -//class AllClustersCommandDelegate : public NamedPipeCommandDelegate -//{ -//public: -// void OnEventCommandReceived(const char * json) override; -//}; diff --git a/examples/chef/common/clusters/switch/SwitchDelegate.cpp b/examples/chef/common/clusters/switch/SwitchEventHandler.cpp similarity index 53% rename from examples/chef/common/clusters/switch/SwitchDelegate.cpp rename to examples/chef/common/clusters/switch/SwitchEventHandler.cpp index 79dd58c6d97381..061d7c1d0bbb3b 100644 --- a/examples/chef/common/clusters/switch/SwitchDelegate.cpp +++ b/examples/chef/common/clusters/switch/SwitchEventHandler.cpp @@ -22,81 +22,37 @@ #include #include +#include "SwitchEventHandler.h" + using namespace chip; using namespace chip::app; using namespace chip::app::Clusters; using namespace chip::app::Clusters::Switch; using namespace chip::DeviceLayer; -class SwitchEventHandler -{ -public: - SwitchEventHandler(EndpointId endpoint):mEndpointId(endpoint){}; - - /** - * Should be called when the latching switch is moved to a new position. - */ - void OnSwitchLatchedHandler(uint8_t newPosition); - - /** - * Should be called when the momentary switch starts to be pressed. - */ - void OnSwitchInitialPressedHandler(uint8_t newPosition); - - /** - * Should be called when the momentary switch has been pressed for a "long" time. - */ - void OnSwitchLongPressedHandler(uint8_t newPosition); - - /** - * Should be called when the momentary switch has been released. - */ - void OnSwitchShortReleasedHandler(uint8_t previousPosition); - - /** - * Should be called when the momentary switch has been released after having been pressed for a long time. - */ - void OnSwitchLongReleasedHandler(uint8_t previousPosition); - - /** - * Should be called to indicate how many times the momentary switch has been pressed in a multi-press - * sequence, during that sequence. - */ - void OnSwitchMultiPressOngoingHandler(uint8_t newPosition, uint8_t count); - - /** - * Should be called to indicate how many times the momentary switch has been pressed in a multi-press - * sequence, after it has been detected that the sequence has ended. - */ - void OnSwitchMultiPressCompleteHandler(uint8_t previousPosition, uint8_t count); - -private: - EndpointId mEndpointId; -}; - - -void SwitchEventHandler::OnSwitchLatchedHandler(uint8_t newPosition) + +void SwitchEventHandler::OnSwitchLatched(uint8_t newPosition) { ChipLogDetail(NotSpecified, "The latching switch is moved to a new position:%d", newPosition); Clusters::SwitchServer::Instance().OnSwitchLatch(mEndpointId, newPosition); } -void SwitchEventHandler::OnSwitchInitialPressedHandler(uint8_t newPosition) +void SwitchEventHandler::OnSwitchInitialPressed(uint8_t newPosition) { ChipLogDetail(NotSpecified, "The new position when the momentary switch starts to be pressed:%d", newPosition); Clusters::SwitchServer::Instance().OnInitialPress(mEndpointId, newPosition); } -void SwitchEventHandler::OnSwitchLongPressedHandler(uint8_t newPosition) +void SwitchEventHandler::OnSwitchLongPressed(uint8_t newPosition) { ChipLogDetail(NotSpecified, "The new position when the momentary switch has been pressed for a long time:%d", newPosition); Clusters::SwitchServer::Instance().OnLongPress(mEndpointId, newPosition); } -void SwitchEventHandler::OnSwitchShortReleasedHandler(uint8_t previousPosition) +void SwitchEventHandler::OnSwitchShortReleased(uint8_t previousPosition) { ChipLogDetail(NotSpecified, "The the previous value of the CurrentPosition when the momentary switch has been released:%d", previousPosition); @@ -104,7 +60,7 @@ void SwitchEventHandler::OnSwitchShortReleasedHandler(uint8_t previousPosition) Clusters::SwitchServer::Instance().OnShortRelease(mEndpointId, previousPosition); } -void SwitchEventHandler::OnSwitchLongReleasedHandler(uint8_t previousPosition) +void SwitchEventHandler::OnSwitchLongReleased(uint8_t previousPosition) { ChipLogDetail(NotSpecified, "The the previous value of the CurrentPosition when the momentary switch has been released after having been " @@ -114,7 +70,7 @@ void SwitchEventHandler::OnSwitchLongReleasedHandler(uint8_t previousPosition) Clusters::SwitchServer::Instance().OnLongRelease(mEndpointId, previousPosition); } -void SwitchEventHandler::OnSwitchMultiPressOngoingHandler(uint8_t newPosition, uint8_t count) +void SwitchEventHandler::OnSwitchMultiPressOngoing(uint8_t newPosition, uint8_t count) { ChipLogDetail(NotSpecified, "The new position when the momentary switch has been pressed in a multi-press sequence:%d", newPosition); @@ -123,7 +79,7 @@ void SwitchEventHandler::OnSwitchMultiPressOngoingHandler(uint8_t newPosition, u Clusters::SwitchServer::Instance().OnMultiPressOngoing(mEndpointId, newPosition, count); } -void SwitchEventHandler::OnSwitchMultiPressCompleteHandler(uint8_t previousPosition, uint8_t count) +void SwitchEventHandler::OnSwitchMultiPressComplete(uint8_t previousPosition, uint8_t count) { ChipLogDetail(NotSpecified, "The previous position when the momentary switch has been pressed in a multi-press sequence:%d", previousPosition); @@ -132,22 +88,4 @@ void SwitchEventHandler::OnSwitchMultiPressCompleteHandler(uint8_t previousPosit Clusters::SwitchServer::Instance().OnMultiPressComplete(mEndpointId, previousPosition, count); } -static std::map gSwitchEventHandlers{}; - -SwitchEventHandler * GetSwitchEventHandler(EndpointId endpointId) -{ - if (gSwitchEventHandlers.find(endpointId) == gSwitchEventHandlers.end()) { - return nullptr; - } - - return gSwitchEventHandlers[endpointId]; -} - -void emberAfSwitchClusterInitCallback(EndpointId endpoint) -{ - ChipLogProgress(Zcl, "Chef: emberAfSwitchClusterInitCallback"); - gSwitchEventHandlers[endpoint] = new SwitchEventHandler(endpoint); -printf("\033[44m %s, %d, Switch::ID=%u \033[0m \n", __func__, __LINE__, Switch::Id); -} - diff --git a/examples/chef/common/clusters/switch/SwitchEventHandler.h b/examples/chef/common/clusters/switch/SwitchEventHandler.h new file mode 100644 index 00000000000000..39fd8a34da1e29 --- /dev/null +++ b/examples/chef/common/clusters/switch/SwitchEventHandler.h @@ -0,0 +1,90 @@ +/* + * + * Copyright (c) 2022 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include +#include + +#include + +namespace chip { +namespace app { +namespace Clusters { + +namespace Switch { + +class SwitchEventHandler +{ +public: + SwitchEventHandler(EndpointId endpoint):mEndpointId(endpoint){}; + + /** + * Should be called when the latching switch is moved to a new position. + */ + void OnSwitchLatched(uint8_t newPosition); + + /** + * Should be called when the momentary switch starts to be pressed. + */ + void OnSwitchInitialPressed(uint8_t newPosition); + + /** + * Should be called when the momentary switch has been pressed for a "long" time. + */ + void OnSwitchLongPressed(uint8_t newPosition); + + /** + * Should be called when the momentary switch has been released. + */ + void OnSwitchShortReleased(uint8_t previousPosition); + + /** + * Should be called when the momentary switch has been released after having been pressed for a long time. + */ + void OnSwitchLongReleased(uint8_t previousPosition); + + /** + * Should be called to indicate how many times the momentary switch has been pressed in a multi-press + * sequence, during that sequence. + */ + void OnSwitchMultiPressOngoing(uint8_t newPosition, uint8_t count); + + /** + * Should be called to indicate how many times the momentary switch has been pressed in a multi-press + * sequence, after it has been detected that the sequence has ended. + */ + void OnSwitchMultiPressComplete(uint8_t previousPosition, uint8_t count); + +private: + EndpointId mEndpointId; +}; + + +} // namespace Switch +} // namespace Clusters +} // namespace app +} // namespace chip + + + +//class AllClustersCommandDelegate : public NamedPipeCommandDelegate +//{ +//public: +// void OnEventCommandReceived(const char * json) override; +//}; diff --git a/examples/chef/common/clusters/switch/SwitchManager.cpp b/examples/chef/common/clusters/switch/SwitchManager.cpp new file mode 100644 index 00000000000000..e075c848ae55d5 --- /dev/null +++ b/examples/chef/common/clusters/switch/SwitchManager.cpp @@ -0,0 +1,67 @@ +/* + * + * Copyright (c) 2022 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include +#include +#include +#include +#include "SwitchEventHandler.h" + +#include "Rpc.h" + +using namespace chip; +using namespace chip::app; +using namespace chip::app::Clusters; +using namespace chip::app::Clusters::Switch; +using namespace chip::DeviceLayer; + +using namespace chip::rpc; + +static std::map gSwitchEventHandlers{}; + +SwitchEventHandler * GetSwitchEventHandler(EndpointId endpointId) +{ + if (gSwitchEventHandlers.find(endpointId) == gSwitchEventHandlers.end()) { + return nullptr; + } + + return gSwitchEventHandlers[endpointId]; +} + +void SwitchManagerEventHandler(intptr_t ctx, struct EventsRequest * data) +{ + SwitchEventHandler * handler = GetSwitchEventHandler(data->endpointId); + + if (nullptr == handler) { + // TODO: Error + return; + } + // Parse data->events + // According to data->events, to dispatch events +} + +void emberAfSwitchClusterInitCallback(EndpointId endpoint) +{ + ChipLogProgress(Zcl, "Chef: emberAfSwitchClusterInitCallback"); + gSwitchEventHandlers[endpoint] = new SwitchEventHandler(endpoint); +printf("\033[44m %s, %d, Switch::ID=%u \033[0m \n", __func__, __LINE__, Switch::Id); + RpcRegisterAppEventsHandler( Switch::Id, SwitchManagerEventHandler, reinterpret_cast(&gSwitchEventHandlers)); +} + + diff --git a/examples/chef/linux/BUILD.gn b/examples/chef/linux/BUILD.gn index 73c13e9e0324eb..d30da3aa12f759 100644 --- a/examples/chef/linux/BUILD.gn +++ b/examples/chef/linux/BUILD.gn @@ -58,7 +58,8 @@ executable("${sample_name}") { "${project_dir}/common/clusters/low-power/LowPowerManager.cpp", "${project_dir}/common/clusters/media-input/MediaInputManager.cpp", "${project_dir}/common/clusters/media-playback/MediaPlaybackManager.cpp", - "${project_dir}/common/clusters/switch/SwitchDelegate.cpp", + "${project_dir}/common/clusters/switch/SwitchEventHandler.cpp", + "${project_dir}/common/clusters/switch/SwitchManager.cpp", "${project_dir}/common/clusters/target-navigator/TargetNavigatorManager.cpp", "${project_dir}/common/clusters/wake-on-lan/WakeOnLanManager.cpp", "${project_dir}/common/stubs.cpp", diff --git a/examples/common/pigweed/rpc_services/Event.h b/examples/common/pigweed/rpc_services/Event.h index 55c46304a0293e..7f6853a4f3a1a7 100644 --- a/examples/common/pigweed/rpc_services/Event.h +++ b/examples/common/pigweed/rpc_services/Event.h @@ -33,22 +33,10 @@ class Event final : public pw_rpc::nanopb::Event::Service public: ::pw::Status Set( const ::chip_rpc_EventSetRequest& request, ::chip_rpc_EventSetResponse& response) { - EndpointId endpointId = request.endpoint_id; - uint8_t newPosition = 1 ; // to be parsed from request.event_payload - -printf("\033[41m %s, %d, request.event_playload=%s \033[0m \n", __func__, __LINE__, request.event_payload); - EventNumber eventNumber; - { - DeviceLayer::StackLock lock; - - // Update attribute first, then emit SwitchLatched event only on success. - RETURN_STATUS_IF_NOT_OK(app::Clusters::Switch::Attributes::CurrentPosition::Set(endpointId, newPosition)); +printf("\033[41m %s, %d, request.endpoint_id=%d, request.cluster_id=%d, request.event_playload=%s \033[0m \n", __func__, __LINE__, request.endpoint_id, request.cluster_id, request.event_payload); - chip::app::Clusters::Switch::Events::SwitchLatched::Type event{ newPosition }; - RETURN_STATUS_IF_NOT_OK(app::LogEvent(event, endpointId, eventNumber)); - } + mEventsSubscriber(request.endpoint_id, request.cluster_id, request.event_payload); - response.event_number = static_cast(eventNumber); return pw::OkStatus(); } @@ -66,6 +54,14 @@ printf("\033[41m %s, %d, request.event_playload=%s \033[0m \n", __func__, __LINE response.event_id = endpointId; return pw::OkStatus(); } + + using EventsSubscriber = void (*)(EndpointId endpointId, ClusterId clusterId, std::string events); + + void RegisterEventsSubscriber(EventsSubscriber subscriber) { mEventsSubscriber = subscriber; } + +private: + EventsSubscriber mEventsSubscriber; + }; } // namespace rpc diff --git a/examples/platform/linux/Rpc.cpp b/examples/platform/linux/Rpc.cpp index 5da57a37011408..4b82075afbab8c 100644 --- a/examples/platform/linux/Rpc.cpp +++ b/examples/platform/linux/Rpc.cpp @@ -21,6 +21,10 @@ #include "pw_rpc_system_server/socket.h" #include +#include + +#include +#include "Rpc.h" #if defined(PW_RPC_ATTRIBUTE_SERVICE) && PW_RPC_ATTRIBUTE_SERVICE #include "pigweed/rpc_services/Attributes.h" @@ -40,6 +44,63 @@ #if defined(PW_RPC_EVENT_SERVICE) && PW_RPC_EVENT_SERVICE #include "pigweed/rpc_services/Event.h" +namespace chip { +namespace rpc { + +struct EventsCallback { + chip::rpc::AppEventsHandler eventsCallback; + intptr_t eventsCallbackCtx; +}; + +static std::map gEventsCallbackMap {}; + +struct EventsCallback * RpcFindEventsCallback(ClusterId clusterId) +{ + if (gEventsCallbackMap.find(clusterId) != gEventsCallbackMap.end()) { + return gEventsCallbackMap[clusterId]; + } + + return nullptr; +} + +void __attribute__ ((unused)) RpcRegisterAppEventsHandler(ClusterId clusterId, chip::rpc::AppEventsHandler eventsCallback, intptr_t ctx) +{ + if ( nullptr == RpcFindEventsCallback(clusterId) ) { + // Register new EventsCallback + gEventsCallbackMap[clusterId] = new EventsCallback{eventsCallback, ctx}; + return; + } + + // TBD: print already registered +} + +using namespace chip::rpc; +void RpcEventsAsyncDispatcher(intptr_t arg) +{ + struct EventsRequest * data = reinterpret_cast(arg); +printf("\033[41m %s , %d, endpoint=%d, clusterId=%d, events=%s \033[0m \n", __func__, __LINE__, data->endpointId, data->clusterId, data->events.c_str()); + + struct EventsCallback * eventsCallbackRecord = RpcFindEventsCallback(data->clusterId); + if ( nullptr == eventsCallbackRecord ) { + // TBD: Error cluster not registered + return; + } + + eventsCallbackRecord->eventsCallback(eventsCallbackRecord->eventsCallbackCtx, data); + + delete data; +} + +void RpcEventsSubscriber(EndpointId endpoint, ClusterId clusterId, std::string events) +{ + struct EventsRequest * data = new EventsRequest{endpoint, clusterId, events}; +printf("\033[41m %s , %d \033[0m \n", __func__, __LINE__); + DeviceLayer::PlatformMgr().ScheduleWork(RpcEventsAsyncDispatcher, reinterpret_cast(data)); + +} + +} // rpc +} // chip #endif // defined(PW_RPC_EVENT_SERVICE) && PW_RPC_EVENT_SERVICE #if defined(PW_RPC_LIGHTING_SERVICE) && PW_RPC_LIGHTING_SERVICE @@ -120,6 +181,7 @@ void RegisterServices(pw::rpc::Server & server) #if defined(PW_RPC_EVENT_SERVICE) && PW_RPC_EVENT_SERVICE server.RegisterService(event_service); + event_service.RegisterEventsSubscriber(RpcEventsSubscriber); #endif // defined(PW_RPC_EVENT_SERVICE) && PW_RPC_EVENT_SERVICE #if defined(PW_RPC_LIGHTING_SERVICE) && PW_RPC_LIGHTING_SERVICE diff --git a/examples/platform/linux/Rpc.h b/examples/platform/linux/Rpc.h index fbcfc6ed63f4f2..7cb51dd505ec38 100644 --- a/examples/platform/linux/Rpc.h +++ b/examples/platform/linux/Rpc.h @@ -21,6 +21,16 @@ namespace chip { namespace rpc { +struct EventsRequest { + EndpointId endpointId; + ClusterId clusterId; + std::string events; +}; + +using AppEventsHandler = void (*)(intptr_t ctx, struct EventsRequest * data); + +void __attribute__ ((unused)) RpcRegisterAppEventsHandler(ClusterId clusterId, chip::rpc::AppEventsHandler eventsCallback, intptr_t ctx); + int Init(uint16_t rpcServerPort); } // namespace rpc From aa2d923b082f1f1af7de5615835e0cc7df6dfa7b Mon Sep 17 00:00:00 2001 From: erwinpan1 Date: Tue, 16 Apr 2024 00:23:07 +0800 Subject: [PATCH 064/468] Rmove ununsed RPC command delegate --- .../chef/common/chef-rpc-command-delegate.cpp | 231 ------------------ .../chef/common/chef-rpc-command-delegate.h | 85 ------- 2 files changed, 316 deletions(-) delete mode 100644 examples/chef/common/chef-rpc-command-delegate.cpp delete mode 100644 examples/chef/common/chef-rpc-command-delegate.h diff --git a/examples/chef/common/chef-rpc-command-delegate.cpp b/examples/chef/common/chef-rpc-command-delegate.cpp deleted file mode 100644 index 1bcbdcfa8202d2..00000000000000 --- a/examples/chef/common/chef-rpc-command-delegate.cpp +++ /dev/null @@ -1,231 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "AllClustersCommandDelegate.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -using namespace chip; -using namespace chip::app; -using namespace chip::app::Clusters; -using namespace chip::DeviceLayer; - -ChefRpcCommandHandler * ChefRpcCommandHandler::FromJSON(const char * json) -{ - Json::Reader reader; - Json::Value value; - - if (!reader.parse(json, value)) - { - ChipLogError(NotSpecified, - "AllClusters App: Error parsing JSON with error %s:", reader.getFormattedErrorMessages().c_str()); - return nullptr; - } - - if (value.empty() || !value.isObject()) - { - ChipLogError(NotSpecified, "AllClusters App: Invalid JSON command received"); - return nullptr; - } - - if (!value.isMember("Name") || !value["Name"].isString()) - { - ChipLogError(NotSpecified, "AllClusters App: Invalid JSON command received: command name is missing"); - return nullptr; - } - - return Platform::New(std::move(value)); -} - -void ChefRpcCommandHandler::HandleCommand(intptr_t context) -{ - auto * self = reinterpret_cast(context); - std::string name = self->mJsonValue["Name"].asString(); - - VerifyOrExit(!self->mJsonValue.empty(), ChipLogError(NotSpecified, "Invalid JSON event command received")); - - if (name == "SwitchLatched") - { - uint8_t newPosition = static_cast(self->mJsonValue["NewPosition"].asUInt()); - self->OnSwitchLatchedHandler(newPosition); - } - else if (name == "InitialPress") - { - uint8_t newPosition = static_cast(self->mJsonValue["NewPosition"].asUInt()); - self->OnSwitchInitialPressedHandler(newPosition); - } - else if (name == "LongPress") - { - uint8_t newPosition = static_cast(self->mJsonValue["NewPosition"].asUInt()); - self->OnSwitchLongPressedHandler(newPosition); - } - else if (name == "ShortRelease") - { - uint8_t previousPosition = static_cast(self->mJsonValue["PreviousPosition"].asUInt()); - self->OnSwitchShortReleasedHandler(previousPosition); - } - else if (name == "LongRelease") - { - uint8_t previousPosition = static_cast(self->mJsonValue["PreviousPosition"].asUInt()); - self->OnSwitchLongReleasedHandler(previousPosition); - } - else if (name == "MultiPressOngoing") - { - uint8_t newPosition = static_cast(self->mJsonValue["NewPosition"].asUInt()); - uint8_t count = static_cast(self->mJsonValue["CurrentNumberOfPressesCounted"].asUInt()); - self->OnSwitchMultiPressOngoingHandler(newPosition, count); - } - else if (name == "MultiPressComplete") - { - uint8_t previousPosition = static_cast(self->mJsonValue["PreviousPosition"].asUInt()); - uint8_t count = static_cast(self->mJsonValue["TotalNumberOfPressesCounted"].asUInt()); - self->OnSwitchMultiPressCompleteHandler(previousPosition, count); - } - else - { - ChipLogError(NotSpecified, "Unhandled command: Should never happens"); - } - -exit: - Platform::Delete(self); -} - -bool ChefRpcCommandHandler::IsClusterPresentOnAnyEndpoint(ClusterId clusterId) -{ - EnabledEndpointsWithServerCluster enabledEndpoints(clusterId); - - return (enabledEndpoints.begin() != enabledEndpoints.end()); -} - -void ChefRpcCommandHandler::OnSwitchLatchedHandler(uint8_t newPosition) -{ - EndpointId endpoint = 1; - - Protocols::InteractionModel::Status status = Switch::Attributes::CurrentPosition::Set(endpoint, newPosition); - VerifyOrReturn(Protocols::InteractionModel::Status::Success == status, - ChipLogError(NotSpecified, "Failed to set CurrentPosition attribute")); - ChipLogDetail(NotSpecified, "The latching switch is moved to a new position:%d", newPosition); - - Clusters::SwitchServer::Instance().OnSwitchLatch(endpoint, newPosition); -} - -void ChefRpcCommandHandler::OnSwitchInitialPressedHandler(uint8_t newPosition) -{ - EndpointId endpoint = 1; - - Protocols::InteractionModel::Status status = Switch::Attributes::CurrentPosition::Set(endpoint, newPosition); - VerifyOrReturn(Protocols::InteractionModel::Status::Success == status, - ChipLogError(NotSpecified, "Failed to set CurrentPosition attribute")); - ChipLogDetail(NotSpecified, "The new position when the momentary switch starts to be pressed:%d", newPosition); - - Clusters::SwitchServer::Instance().OnInitialPress(endpoint, newPosition); -} - -void ChefRpcCommandHandler::OnSwitchLongPressedHandler(uint8_t newPosition) -{ - EndpointId endpoint = 1; - - Protocols::InteractionModel::Status status = Switch::Attributes::CurrentPosition::Set(endpoint, newPosition); - VerifyOrReturn(Protocols::InteractionModel::Status::Success == status, - ChipLogError(NotSpecified, "Failed to set CurrentPosition attribute")); - ChipLogDetail(NotSpecified, "The new position when the momentary switch has been pressed for a long time:%d", newPosition); - - Clusters::SwitchServer::Instance().OnLongPress(endpoint, newPosition); - - // Long press to trigger smokeco self-test - SmokeCoAlarmServer::Instance().RequestSelfTest(endpoint); -} - -void ChefRpcCommandHandler::OnSwitchShortReleasedHandler(uint8_t previousPosition) -{ - EndpointId endpoint = 1; - - Protocols::InteractionModel::Status status = Switch::Attributes::CurrentPosition::Set(endpoint, 0); - VerifyOrReturn(Protocols::InteractionModel::Status::Success == status, - ChipLogError(NotSpecified, "Failed to reset CurrentPosition attribute")); - ChipLogDetail(NotSpecified, "The the previous value of the CurrentPosition when the momentary switch has been released:%d", - previousPosition); - - Clusters::SwitchServer::Instance().OnShortRelease(endpoint, previousPosition); -} - -void ChefRpcCommandHandler::OnSwitchLongReleasedHandler(uint8_t previousPosition) -{ - EndpointId endpoint = 1; - - Protocols::InteractionModel::Status status = Switch::Attributes::CurrentPosition::Set(endpoint, 0); - VerifyOrReturn(Protocols::InteractionModel::Status::Success == status, - ChipLogError(NotSpecified, "Failed to reset CurrentPosition attribute")); - ChipLogDetail(NotSpecified, - "The the previous value of the CurrentPosition when the momentary switch has been released after having been " - "pressed for a long time:%d", - previousPosition); - - Clusters::SwitchServer::Instance().OnLongRelease(endpoint, previousPosition); -} - -void ChefRpcCommandHandler::OnSwitchMultiPressOngoingHandler(uint8_t newPosition, uint8_t count) -{ - EndpointId endpoint = 1; - - Protocols::InteractionModel::Status status = Switch::Attributes::CurrentPosition::Set(endpoint, newPosition); - VerifyOrReturn(Protocols::InteractionModel::Status::Success == status, - ChipLogError(NotSpecified, "Failed to set CurrentPosition attribute")); - ChipLogDetail(NotSpecified, "The new position when the momentary switch has been pressed in a multi-press sequence:%d", - newPosition); - ChipLogDetail(NotSpecified, "%d times the momentary switch has been pressed", count); - - Clusters::SwitchServer::Instance().OnMultiPressOngoing(endpoint, newPosition, count); -} - -void ChefRpcCommandHandler::OnSwitchMultiPressCompleteHandler(uint8_t previousPosition, uint8_t count) -{ - EndpointId endpoint = 1; - - Protocols::InteractionModel::Status status = Switch::Attributes::CurrentPosition::Set(endpoint, 0); - VerifyOrReturn(Protocols::InteractionModel::Status::Success == status, - ChipLogError(NotSpecified, "Failed to reset CurrentPosition attribute")); - ChipLogDetail(NotSpecified, "The previous position when the momentary switch has been pressed in a multi-press sequence:%d", - previousPosition); - ChipLogDetail(NotSpecified, "%d times the momentary switch has been pressed", count); - - Clusters::SwitchServer::Instance().OnMultiPressComplete(endpoint, previousPosition, count); -} - - -void ChefRpcCommandDelegate::OnEventCommandReceived(const char * json) -{ - auto handler = ChefRpcCommandHandler::FromJSON(json); - if (nullptr == handler) - { - ChipLogError(NotSpecified, "AllClusters App: Unable to instantiate a command handler"); - return; - } - - chip::DeviceLayer::PlatformMgr().ScheduleWork(ChefRpcCommandHandler::HandleCommand, reinterpret_cast(handler)); -} diff --git a/examples/chef/common/chef-rpc-command-delegate.h b/examples/chef/common/chef-rpc-command-delegate.h deleted file mode 100644 index bfa8291fb45d1b..00000000000000 --- a/examples/chef/common/chef-rpc-command-delegate.h +++ /dev/null @@ -1,85 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#pragma once - -#include "NamedPipeCommands.h" - -#include -#include - -#include - -class ChefRpcCommandHandler -{ -public: - static ChefRpcCommandHandler * FromJSON(const char * json); - - static void HandleCommand(intptr_t context); - - ChefRpcCommandHandler(Json::Value && jasonValue) : mJsonValue(std::move(jasonValue)) {} - -private: - Json::Value mJsonValue; - - bool IsClusterPresentOnAnyEndpoint(chip::ClusterId clusterId); - - /** - * Should be called when the latching switch is moved to a new position. - */ - void OnSwitchLatchedHandler(uint8_t newPosition); - - /** - * Should be called when the momentary switch starts to be pressed. - */ - void OnSwitchInitialPressedHandler(uint8_t newPosition); - - /** - * Should be called when the momentary switch has been pressed for a "long" time. - */ - void OnSwitchLongPressedHandler(uint8_t newPosition); - - /** - * Should be called when the momentary switch has been released. - */ - void OnSwitchShortReleasedHandler(uint8_t previousPosition); - - /** - * Should be called when the momentary switch has been released after having been pressed for a long time. - */ - void OnSwitchLongReleasedHandler(uint8_t previousPosition); - - /** - * Should be called to indicate how many times the momentary switch has been pressed in a multi-press - * sequence, during that sequence. - */ - void OnSwitchMultiPressOngoingHandler(uint8_t newPosition, uint8_t count); - - /** - * Should be called to indicate how many times the momentary switch has been pressed in a multi-press - * sequence, after it has been detected that the sequence has ended. - */ - void OnSwitchMultiPressCompleteHandler(uint8_t previousPosition, uint8_t count); - -}; - -class ChefRpcCommandDelegate -{ -public: - void OnEventCommandReceived(const char * json) override; -}; From 8d47f401cc4dfb174fed1404674d58f5a1c89ee7 Mon Sep 17 00:00:00 2001 From: mkardous-silabs <84793247+mkardous-silabs@users.noreply.github.com> Date: Mon, 15 Apr 2024 11:51:14 -0500 Subject: [PATCH 065/468] Add adv change event to silabs platforms (#32987) --- src/platform/silabs/efr32/BLEManagerImpl.cpp | 44 +++++++++++++------ src/platform/silabs/rs911x/BLEManagerImpl.cpp | 32 ++++++++++---- 2 files changed, 54 insertions(+), 22 deletions(-) diff --git a/src/platform/silabs/efr32/BLEManagerImpl.cpp b/src/platform/silabs/efr32/BLEManagerImpl.cpp index db9939819b77b7..64bab16f2e249a 100644 --- a/src/platform/silabs/efr32/BLEManagerImpl.cpp +++ b/src/platform/silabs/efr32/BLEManagerImpl.cpp @@ -532,11 +532,12 @@ CHIP_ERROR BLEManagerImpl::ConfigureAdvertisingData(void) CHIP_ERROR BLEManagerImpl::StartAdvertising(void) { - CHIP_ERROR err; - sl_status_t ret; - uint32_t interval_min; - uint32_t interval_max; + CHIP_ERROR err = CHIP_NO_ERROR; + sl_status_t ret = SL_STATUS_OK; + uint32_t interval_min = 0; + uint32_t interval_max = 0; uint16_t numConnectionss = NumConnections(); + bool postAdvChangeEvent = false; uint8_t connectableAdv = (numConnectionss < kMaxConnections) ? sl_bt_advertiser_connectable_scannable : sl_bt_advertiser_scannable_non_connectable; @@ -548,6 +549,7 @@ CHIP_ERROR BLEManagerImpl::StartAdvertising(void) else { ChipLogDetail(DeviceLayer, "Start BLE advertisement"); + postAdvChangeEvent = true; } err = ConfigureAdvertisingData(); @@ -586,18 +588,26 @@ CHIP_ERROR BLEManagerImpl::StartAdvertising(void) SuccessOrExit(err); sl_bt_advertiser_configure(advertising_set_handle, 1); + ret = sl_bt_legacy_advertiser_start(advertising_set_handle, connectableAdv); + err = MapBLEError(ret); + SuccessOrExit(err); - if (SL_STATUS_OK == ret) + if (mFlags.Has(Flags::kFastAdvertisingEnabled)) { - if (mFlags.Has(Flags::kFastAdvertisingEnabled)) - { - StartBleAdvTimeoutTimer(CHIP_DEVICE_CONFIG_BLE_ADVERTISING_INTERVAL_CHANGE_TIME); - } - mFlags.Set(Flags::kAdvertising); + StartBleAdvTimeoutTimer(CHIP_DEVICE_CONFIG_BLE_ADVERTISING_INTERVAL_CHANGE_TIME); } + mFlags.Set(Flags::kAdvertising); - err = MapBLEError(ret); + if (postAdvChangeEvent) + { + // Post CHIPoBLEAdvertisingChange event. + ChipDeviceEvent advChange; + advChange.Type = DeviceEventType::kCHIPoBLEAdvertisingChange; + advChange.CHIPoBLEAdvertisingChange.Result = kActivity_Started; + + ReturnErrorOnFailure(PlatformMgr().PostEvent(&advChange)); + } exit: return err; @@ -606,10 +616,11 @@ CHIP_ERROR BLEManagerImpl::StartAdvertising(void) CHIP_ERROR BLEManagerImpl::StopAdvertising(void) { CHIP_ERROR err = CHIP_NO_ERROR; - sl_status_t ret; if (mFlags.Has(Flags::kAdvertising)) { + sl_status_t ret = SL_STATUS_OK; + mFlags.Clear(Flags::kAdvertising).Clear(Flags::kRestartAdvertising); mFlags.Set(Flags::kFastAdvertisingEnabled, true); @@ -617,12 +628,17 @@ CHIP_ERROR BLEManagerImpl::StopAdvertising(void) sl_bt_advertiser_delete_set(advertising_set_handle); advertising_set_handle = 0xff; err = MapBLEError(ret); - SuccessOrExit(err); + VerifyOrReturnError(err == CHIP_NO_ERROR, err); CancelBleAdvTimeoutTimer(); + + // Post CHIPoBLEAdvertisingChange event. + ChipDeviceEvent advChange; + advChange.Type = DeviceEventType::kCHIPoBLEAdvertisingChange; + advChange.CHIPoBLEAdvertisingChange.Result = kActivity_Stopped; + err = PlatformMgr().PostEvent(&advChange); } -exit: return err; } diff --git a/src/platform/silabs/rs911x/BLEManagerImpl.cpp b/src/platform/silabs/rs911x/BLEManagerImpl.cpp index 53fd807519cf43..4ce7ef6973b553 100644 --- a/src/platform/silabs/rs911x/BLEManagerImpl.cpp +++ b/src/platform/silabs/rs911x/BLEManagerImpl.cpp @@ -678,8 +678,9 @@ CHIP_ERROR BLEManagerImpl::ConfigureAdvertisingData(void) CHIP_ERROR BLEManagerImpl::StartAdvertising(void) { - CHIP_ERROR err = CHIP_NO_ERROR; - int32_t status = 0; + CHIP_ERROR err = CHIP_NO_ERROR; + int32_t status = 0; + bool postAdvChangeEvent = false; ChipLogProgress(DeviceLayer, "StartAdvertising start"); @@ -695,6 +696,7 @@ CHIP_ERROR BLEManagerImpl::StartAdvertising(void) else { ChipLogDetail(DeviceLayer, "Start BLE advertisement"); + postAdvChangeEvent = true; } if (!(mFlags.Has(Flags::kAdvertising))) @@ -719,6 +721,16 @@ CHIP_ERROR BLEManagerImpl::StartAdvertising(void) StartBleAdvTimeoutTimer(CHIP_DEVICE_CONFIG_BLE_ADVERTISING_INTERVAL_CHANGE_TIME); } mFlags.Set(Flags::kAdvertising); + + if (postAdvChangeEvent) + { + // Post CHIPoBLEAdvertisingChange event. + ChipDeviceEvent advChange; + advChange.Type = DeviceEventType::kCHIPoBLEAdvertisingChange; + advChange.CHIPoBLEAdvertisingChange.Result = kActivity_Started; + + ReturnErrorOnFailure(PlatformMgr().PostEvent(&advChange)); + } } else { @@ -726,8 +738,9 @@ CHIP_ERROR BLEManagerImpl::StartAdvertising(void) } exit: + // TODO: Add MapBLEError to return the correct error code ChipLogError(DeviceLayer, "StartAdvertising() End error: %s", ErrorStr(err)); - return CHIP_NO_ERROR; // err; + return err; } int32_t BLEManagerImpl::SendBLEAdvertisementCommand(void) @@ -756,7 +769,6 @@ int32_t BLEManagerImpl::SendBLEAdvertisementCommand(void) return rsi_ble_start_advertising_with_values(&ble_adv); } -// TODO:: Implementation need to be done. CHIP_ERROR BLEManagerImpl::StopAdvertising(void) { CHIP_ERROR err = CHIP_NO_ERROR; @@ -772,12 +784,16 @@ CHIP_ERROR BLEManagerImpl::StopAdvertising(void) mFlags.Set(Flags::kFastAdvertisingEnabled, true); advertising_set_handle = 0xff; CancelBleAdvTimeoutTimer(); - } - else - { - ChipLogProgress(DeviceLayer, "advertising failed to stop, with status = 0x%lx", status); + + // Post CHIPoBLEAdvertisingChange event. + ChipDeviceEvent advChange; + advChange.Type = DeviceEventType::kCHIPoBLEAdvertisingChange; + advChange.CHIPoBLEAdvertisingChange.Result = kActivity_Stopped; + err = PlatformMgr().PostEvent(&advChange); } } + + // TODO: Add MapBLEError to return the correct error code return err; } From 25d4643bb54d48989782527e43e1ab50e1dda6b8 Mon Sep 17 00:00:00 2001 From: joonhaengHeo <85541460+joonhaengHeo@users.noreply.github.com> Date: Tue, 16 Apr 2024 01:52:42 +0900 Subject: [PATCH 066/468] [Android] Add Stay Active Button in Chiptool (#32983) * Add send Stay Active in Android Chiptool * Add kotlin static exception --- .../com/google/chip/chiptool/ChipClient.kt | 8 + .../clusterclient/AddressUpdateFragment.kt | 162 +++++++++++++++++- .../res/layout/address_update_fragment.xml | 84 +++++++-- .../app/src/main/res/values/strings.xml | 2 + kotlin-detect-config.yaml | 1 + 5 files changed, 238 insertions(+), 19 deletions(-) diff --git a/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/ChipClient.kt b/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/ChipClient.kt index 0534f7f3ee3589..bee06caf2b50d6 100644 --- a/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/ChipClient.kt +++ b/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/ChipClient.kt @@ -33,6 +33,7 @@ import chip.platform.NsdManagerServiceResolver import chip.platform.PreferencesConfigurationManager import chip.platform.PreferencesKeyValueStoreManager import com.google.chip.chiptool.attestation.ExampleAttestationTrustStoreDelegate +import com.google.chip.chiptool.clusterclient.ICDCheckInCallback import kotlin.coroutines.resume import kotlin.coroutines.resumeWithException import kotlinx.coroutines.suspendCancellableCoroutine @@ -45,6 +46,8 @@ object ChipClient { /* 0xFFF4 is a test vendor ID, replace with your assigned company ID */ const val VENDOR_ID = 0xFFF4 + private var icdCheckInCallback: ICDCheckInCallback? = null + fun getDeviceController(context: Context): ChipDeviceController { getAndroidChipPlatform(context) @@ -67,6 +70,7 @@ object ChipClient { object : ICDCheckInDelegate { override fun onCheckInComplete(info: ICDClientInfo) { Log.d(TAG, "onCheckInComplete : $info") + icdCheckInCallback?.notifyCheckInMessage(info) } override fun onKeyRefreshNeeded(info: ICDClientInfo): ByteArray? { @@ -106,6 +110,10 @@ object ChipClient { return androidPlatform } + fun setICDCheckInCallback(callback: ICDCheckInCallback) { + icdCheckInCallback = callback + } + /** * Wrapper around [ChipDeviceController.getConnectedDevicePointer] to return the value directly. */ diff --git a/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/AddressUpdateFragment.kt b/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/AddressUpdateFragment.kt index b4c87dc53c6538..1fa6fadcff9ed3 100644 --- a/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/AddressUpdateFragment.kt +++ b/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/AddressUpdateFragment.kt @@ -2,25 +2,37 @@ package com.google.chip.chiptool.clusterclient import android.content.Context import android.os.Bundle +import android.os.Handler +import android.os.Looper import android.util.Log import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import android.widget.AdapterView import android.widget.ArrayAdapter +import android.widget.Toast import androidx.fragment.app.Fragment +import androidx.lifecycle.lifecycleScope +import chip.devicecontroller.ChipClusterException +import chip.devicecontroller.ChipClusters import chip.devicecontroller.ChipDeviceController +import chip.devicecontroller.ICDClientInfo import com.google.chip.chiptool.ChipClient import com.google.chip.chiptool.databinding.AddressUpdateFragmentBinding import com.google.chip.chiptool.util.DeviceIdUtil +import kotlin.coroutines.resume +import kotlin.coroutines.resumeWithException +import kotlin.coroutines.suspendCoroutine +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.launch /** Fragment for updating the address of a device given its fabric and node ID. */ -class AddressUpdateFragment : Fragment() { +class AddressUpdateFragment : ICDCheckInCallback, Fragment() { private val deviceController: ChipDeviceController get() = ChipClient.getDeviceController(requireContext()) val deviceId: Long - get() = binding.deviceIdEd.text.toString().toULong().toLong() + get() = binding.deviceIdEd.text.toString().toULong(16).toLong() var endpointId: Int get() = binding.epIdEd.text.toString().toInt() @@ -32,22 +44,44 @@ class AddressUpdateFragment : Fragment() { private val binding get() = _binding!! + private lateinit var scope: CoroutineScope + + private var icdDeviceId: Long = 0L + private var icdTotalRemainStayActiveTimeMs = 0L + private var icdDeviceRemainStayActiveTimeMs = 0L + private var isSendingStayActiveCommand = false + private val icdRequestActiveDurationMs: Long + get() = binding.icdActiveDurationEd.text.toString().toLong() * 1000 + + private val handler = Handler(Looper.getMainLooper()) + override fun onCreateView( inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle? ): View { _binding = AddressUpdateFragmentBinding.inflate(inflater, container, false) + scope = viewLifecycleOwner.lifecycleScope return binding.root } override fun onViewCreated(view: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) + ChipClient.setICDCheckInCallback(this) + val compressedFabricId = deviceController.compressedFabricId - binding.fabricIdEd.setText(compressedFabricId.toULong().toString().padStart(16, '0')) + binding.fabricIdEd.setText(compressedFabricId.toULong().toString(16).padStart(16, '0')) binding.deviceIdEd.setText(DeviceIdUtil.getLastDeviceId(requireContext()).toString(16)) binding.epIdEd.setText(endpointId.toString()) + binding.icdActiveDurationEd.setText((ICD_STAY_ACTIVE_DURATION / 1000).toString()) + + binding.icdInteractionSwitch.setOnClickListener { + val isChecked = binding.icdInteractionSwitch.isChecked + if (updateUIForICDInteractionSwitch(isChecked)) { + icdInteractionSwitchClick(isChecked) + } + } updateDeviceIdSpinner() } @@ -68,6 +102,61 @@ class AddressUpdateFragment : Fragment() { } } + private fun icdInteractionSwitchClick(isEnabled: Boolean) { + if (isEnabled) { + icdDeviceId = deviceId + } else { + icdDeviceId = 0 + if (icdDeviceRemainStayActiveTimeMs != 0L || icdTotalRemainStayActiveTimeMs != 0L) { + scope.launch { + icdDeviceRemainStayActiveTimeMs = sendStayActive(0L) + icdTotalRemainStayActiveTimeMs = icdDeviceRemainStayActiveTimeMs + } + } + } + } + + private suspend fun sendStayActive(duration: Long): Long { + isSendingStayActiveCommand = true + val devicePtr = + try { + ChipClient.getConnectedDevicePointer(requireContext(), deviceId) + } catch (e: IllegalStateException) { + Log.d(TAG, "getConnectedDevicePointer exception", e) + showToastMessage("Get DevicePointer fail!") + throw e + } + + val cluster = ChipClusters.IcdManagementCluster(devicePtr, 0) + val duration = suspendCoroutine { cont -> + cluster.stayActiveRequest( + object : ChipClusters.IcdManagementCluster.StayActiveResponseCallback { + override fun onError(error: Exception) { + cont.resumeWithException(error) + } + + override fun onSuccess(promisedActiveDuration: Long) { + cont.resume(promisedActiveDuration) + } + }, + duration + ) + } + isSendingStayActiveCommand = false + return duration + } + + private fun updateUIForICDInteractionSwitch(isEnabled: Boolean): Boolean { + val isICD = + deviceController.icdClientInfo.firstOrNull { info -> info.peerNodeId == deviceId } != null + if (isEnabled && !isICD) { + binding.icdInteractionSwitch.isChecked = false + return false + } + + return true + } + override fun onDestroyView() { super.onDestroyView() _binding = null @@ -81,6 +170,12 @@ class AddressUpdateFragment : Fragment() { } } + private fun showToastMessage(msg: String) { + requireActivity().runOnUiThread { + Toast.makeText(requireActivity(), msg, Toast.LENGTH_SHORT).show() + } + } + fun isGroupId(): Boolean { return isGroupNodeId(getNodeId()) } @@ -90,7 +185,58 @@ class AddressUpdateFragment : Fragment() { } fun getNodeId(): ULong { - return binding.deviceIdEd.text.toString().toULong() + return binding.deviceIdEd.text.toString().toULong(16) + } + + override fun notifyCheckInMessage(info: ICDClientInfo) { + if (info.peerNodeId != icdDeviceId) { + return + } + + scope.launch { + try { + icdDeviceRemainStayActiveTimeMs = sendStayActive(icdRequestActiveDurationMs) + icdTotalRemainStayActiveTimeMs = icdRequestActiveDurationMs + turnOnActiveMode() + } catch (e: IllegalStateException) { + Log.d(TAG, "IlligalStateException", e) + } catch (e: ChipClusterException) { + Log.d(TAG, "ChipClusterException", e) + } + } + } + + private fun turnOnActiveMode() { + requireActivity().runOnUiThread { + binding.icdProgressBar.max = (icdTotalRemainStayActiveTimeMs / 1000).toInt() + binding.icdProgressBar.progress = (icdTotalRemainStayActiveTimeMs / 1000).toInt() + } + + val runnable = + object : Runnable { + override fun run() { + if (icdTotalRemainStayActiveTimeMs >= ICD_PROGRESS_STEP) { + icdDeviceRemainStayActiveTimeMs -= ICD_PROGRESS_STEP + icdTotalRemainStayActiveTimeMs -= ICD_PROGRESS_STEP + handler.postDelayed(this, ICD_PROGRESS_STEP) + requireActivity().runOnUiThread { + binding.icdProgressBar.progress = (icdTotalRemainStayActiveTimeMs / 1000).toInt() + } + + if ( + !isSendingStayActiveCommand && + (ICD_RESEND_STAY_ACTIVE_TIME > icdDeviceRemainStayActiveTimeMs) && + (ICD_RESEND_STAY_ACTIVE_TIME < icdTotalRemainStayActiveTimeMs) + ) + scope.launch { + icdDeviceRemainStayActiveTimeMs = sendStayActive(icdTotalRemainStayActiveTimeMs) + } + } else { + requireActivity().runOnUiThread { binding.icdProgressBar.progress = 0 } + } + } + } + handler.post(runnable) } companion object { @@ -99,6 +245,10 @@ class AddressUpdateFragment : Fragment() { private const val MIN_GROUP_NODE_ID = 0xFFFF_FFFF_FFFF_0000UL private const val MASK_GROUP_ID = 0x0000_0000_0000_FFFFUL + private const val ICD_STAY_ACTIVE_DURATION = 30000L // 30 secs. + private const val ICD_PROGRESS_STEP = 1000L // 1 sec. + private const val ICD_RESEND_STAY_ACTIVE_TIME = 2000L // 2 secs. + fun isGroupNodeId(nodeId: ULong): Boolean { return nodeId >= MIN_GROUP_NODE_ID } @@ -112,3 +262,7 @@ class AddressUpdateFragment : Fragment() { } } } + +interface ICDCheckInCallback { + fun notifyCheckInMessage(info: ICDClientInfo) +} diff --git a/examples/android/CHIPTool/app/src/main/res/layout/address_update_fragment.xml b/examples/android/CHIPTool/app/src/main/res/layout/address_update_fragment.xml index c7883536078439..f206db45b62e29 100644 --- a/examples/android/CHIPTool/app/src/main/res/layout/address_update_fragment.xml +++ b/examples/android/CHIPTool/app/src/main/res/layout/address_update_fragment.xml @@ -9,20 +9,24 @@ android:id="@+id/fabricIdEd" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:textSize="20sp" + android:textSize="16sp" android:hint="@string/enter_fabric_id_hint_text" - android:inputType="number" + android:digits="0123456789ABCDEF" + android:inputType="textCapCharacters" app:layout_constraintTop_toTopOf="parent" - app:layout_constraintRight_toLeftOf="@+id/deviceIdEd"/> + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintRight_toLeftOf="@id/deviceIdEd"/> - + + + + + + + + + + + \ No newline at end of file diff --git a/examples/android/CHIPTool/app/src/main/res/values/strings.xml b/examples/android/CHIPTool/app/src/main/res/values/strings.xml index b9f659ac33793c..7b15bbdb53fc3e 100644 --- a/examples/android/CHIPTool/app/src/main/res/values/strings.xml +++ b/examples/android/CHIPTool/app/src/main/res/values/strings.xml @@ -31,6 +31,8 @@ Update address Device address update failed: %1$s Commissioned Device ID : + ICD Stay Active : + Duration Commission with IP address 3840 diff --git a/kotlin-detect-config.yaml b/kotlin-detect-config.yaml index c8398293d93e8b..f039b94ee0deae 100644 --- a/kotlin-detect-config.yaml +++ b/kotlin-detect-config.yaml @@ -287,6 +287,7 @@ complexity: excludes: - "**/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/CHIPToolActivity.kt" - "**/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/clusterinteraction/ClusterDetailFragment.kt" + - "**/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/AddressUpdateFragment.kt" - "**/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/GroupSettingFragment.kt" - "**/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/OnOffClientFragment.kt" - "**/examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/clusterclient/OtaProviderClientFragment.kt" From 03d2fa8f2b2f71aa7616f9fec96543ef4ce1595e Mon Sep 17 00:00:00 2001 From: chrisdecenzo <61757564+chrisdecenzo@users.noreply.github.com> Date: Mon, 15 Apr 2024 10:01:41 -0700 Subject: [PATCH 067/468] Fix 32957 : Matter TV: commissioner passcode flow does not accept CommissionerPasscodeReady flag (#32958) * Temp fix for 32875 * Clarify comments * Fix commissioner passcode flow * Make test shell commands for commissionerpasscode always trigger passcode dialog * Make commissioner passcode commissioning work for casting app using shell commands * Fix CI, address comments, wire CDC callback to CastingServer * Fix CI * Fix CI * Restyled by clang-format (#32968) Co-authored-by: Restyled.io * Fix CI --------- Co-authored-by: restyled-io[bot] <32688539+restyled-io[bot]@users.noreply.github.com> Co-authored-by: Restyled.io --- examples/platform/linux/CommissionerMain.cpp | 7 + .../linux/CastingShellCommands.cpp | 35 +++++ .../tv-casting-common/include/CastingServer.h | 17 +++ .../tv-casting-common/src/CastingServer.cpp | 35 +++++ .../CommissionerDiscoveryController.cpp | 129 ++++++++++++------ .../CommissionerDiscoveryController.h | 18 +++ .../UDCClientState.h | 1 + .../UserDirectedCommissioning.h | 27 ++++ .../UserDirectedCommissioningServer.cpp | 70 +++++++++- .../tests/TestUdcMessages.cpp | 4 + 10 files changed, 302 insertions(+), 41 deletions(-) diff --git a/examples/platform/linux/CommissionerMain.cpp b/examples/platform/linux/CommissionerMain.cpp index d4155ac5bc3f24..3ffac89a6e08e9 100644 --- a/examples/platform/linux/CommissionerMain.cpp +++ b/examples/platform/linux/CommissionerMain.cpp @@ -277,6 +277,13 @@ void PairingCommand::OnStatusUpdate(DevicePairingDelegate::Status status) break; case DevicePairingDelegate::Status::SecurePairingFailed: ChipLogError(AppServer, "Secure Pairing Failed"); +#if CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED + CommissionerDiscoveryController * cdc = GetCommissionerDiscoveryController(); + if (cdc != nullptr) + { + cdc->CommissioningFailed(CHIP_ERROR_CONNECTION_ABORTED); + } +#endif // CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED break; } } diff --git a/examples/tv-casting-app/linux/CastingShellCommands.cpp b/examples/tv-casting-app/linux/CastingShellCommands.cpp index bf20ccdec73b7f..e82c0491a00c51 100644 --- a/examples/tv-casting-app/linux/CastingShellCommands.cpp +++ b/examples/tv-casting-app/linux/CastingShellCommands.cpp @@ -24,6 +24,7 @@ #include "CastingServer.h" #include "CastingUtils.h" #include "app/clusters/bindings/BindingManager.h" +#include #include #include #include @@ -34,6 +35,13 @@ #include #include +using namespace chip; +using namespace chip::DeviceLayer; + +namespace { +LinuxCommissionableDataProvider gCommissionableDataProvider; +} + namespace chip { namespace Shell { @@ -120,6 +128,17 @@ static CHIP_ERROR CastingHandler(int argc, char ** argv) int index = (int) strtol(argv[1], &eptr, 10); return RequestCommissioning(index); } + if (strcmp(argv[0], "setusecommissionerpasscode") == 0) + { + ChipLogProgress(DeviceLayer, "setusecommissionerpasscode"); + if (argc < 2) + { + return PrintAllCommands(); + } + char * eptr; + int useCP = (int) strtol(argv[1], &eptr, 10); + CastingServer::GetInstance()->SetCommissionerPasscodeEnabled(useCP == 1); + } if (strcmp(argv[0], "launch") == 0) { ChipLogProgress(DeviceLayer, "launch"); @@ -179,6 +198,8 @@ static CHIP_ERROR CastingHandler(int argc, char ** argv) Protocols::UserDirectedCommissioning::IdentificationDeclaration id; id.SetCommissionerPasscode(true); + id.SetVendorId(1244); // set non-standard vid-pid to prevent dummy content apps from returning a passcode + id.SetProductId(2234); if (argc > 3) { id.SetCommissionerPasscodeReady(strcmp(argv[3], "t") == 0); @@ -202,6 +223,20 @@ static CHIP_ERROR CastingHandler(int argc, char ** argv) return Server::GetInstance().SendUserDirectedCommissioningRequest(chip::Transport::PeerAddress::UDP(commissioner, port), id); } + if (strcmp(argv[0], "setcommissionerpasscode") == 0) + { + + char * eptr; + uint32_t passcode = (uint32_t) strtol(argv[1], &eptr, 10); + LinuxDeviceOptions::GetInstance().payload.setUpPINCode = passcode; + + VerifyOrDie(chip::examples::InitCommissionableDataProvider(gCommissionableDataProvider, + LinuxDeviceOptions::GetInstance()) == CHIP_NO_ERROR); + + DeviceLayer::SetCommissionableDataProvider(&gCommissionableDataProvider); + + CastingServer::GetInstance()->SetCommissionerPasscodeReady(); + } if (strcmp(argv[0], "testudc") == 0) { char * eptr; diff --git a/examples/tv-casting-app/tv-casting-common/include/CastingServer.h b/examples/tv-casting-app/tv-casting-common/include/CastingServer.h index d64f5049df1a8f..49eb65d13786fb 100644 --- a/examples/tv-casting-app/tv-casting-common/include/CastingServer.h +++ b/examples/tv-casting-app/tv-casting-common/include/CastingServer.h @@ -50,6 +50,10 @@ inline constexpr chip::System::Clock::Seconds16 kCommissioningWindowTimeout = ch * as a singleton and is to be used across Linux, Android and iOS. */ class CastingServer : public AppDelegate +#if CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONER_DISCOVERY_CLIENT + , + chip::Protocols::UserDirectedCommissioning::CommissionerDeclarationHandler +#endif // CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONER_DISCOVERY_CLIENT { public: CastingServer(CastingServer & other) = delete; @@ -61,6 +65,13 @@ class CastingServer : public AppDelegate CHIP_ERROR InitBindingHandlers(); void InitAppDelegation(); +#if CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONER_DISCOVERY_CLIENT + void SetCommissionerPasscodeEnabled(bool enabled) { mUdcCommissionerPasscodeEnabled = enabled; }; + void SetCommissionerPasscodeReady() { mUdcCommissionerPasscodeReady = true; }; + void OnCommissionerDeclarationMessage(const chip::Transport::PeerAddress & source, + chip::Protocols::UserDirectedCommissioning::CommissionerDeclaration cd) override; +#endif // CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONER_DISCOVERY_CLIENT + CHIP_ERROR DiscoverCommissioners(chip::Controller::DeviceDiscoveryDelegate * deviceDiscoveryDelegate = nullptr); const chip::Dnssd::DiscoveredNodeData * GetDiscoveredCommissioner(int index, chip::Optional & outAssociatedConnectableVideoPlayer); @@ -470,6 +481,12 @@ class CastingServer : public AppDelegate PersistenceManager mPersistenceManager; bool mInited = false; bool mUdcInProgress = false; +#if CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONER_DISCOVERY_CLIENT + bool mUdcCommissionerPasscodeEnabled = false; + bool mUdcCommissionerPasscodeReady = false; + char mUdcCommissionerPasscodeInstanceName[chip::Dnssd::Commission::kInstanceNameMaxLength + 1] = ""; +#endif // CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONER_DISCOVERY_CLIENT + chip::Dnssd::DiscoveredNodeData mStrNodeDataList[kMaxCachedVideoPlayers]; TargetVideoPlayerInfo mActiveTargetVideoPlayerInfo; TargetVideoPlayerInfo mCachedTargetVideoPlayerInfo[kMaxCachedVideoPlayers]; diff --git a/examples/tv-casting-app/tv-casting-common/src/CastingServer.cpp b/examples/tv-casting-app/tv-casting-common/src/CastingServer.cpp index b98647db802050..3c77048e67d551 100644 --- a/examples/tv-casting-app/tv-casting-common/src/CastingServer.cpp +++ b/examples/tv-casting-app/tv-casting-common/src/CastingServer.cpp @@ -20,6 +20,7 @@ #include "ConversionUtils.h" #include "app/clusters/bindings/BindingManager.h" +#include using namespace chip; using namespace chip::Controller; @@ -67,6 +68,10 @@ CHIP_ERROR CastingServer::Init(AppParams * AppParams) // Add callback to send Content casting commands after commissioning completes ReturnErrorOnFailure(DeviceLayer::PlatformMgrImpl().AddEventHandler(DeviceEventCallback, 0)); +#if CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONER_DISCOVERY_CLIENT + Server::GetInstance().GetUserDirectedCommissioningClient()->SetCommissionerDeclarationHandler(this); +#endif // CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONER_DISCOVERY_CLIENT + mInited = true; return CHIP_NO_ERROR; } @@ -189,10 +194,40 @@ void CastingServer::OnCommissioningSessionEstablishmentStarted() } #if CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONER_DISCOVERY_CLIENT +void CastingServer::OnCommissionerDeclarationMessage(const chip::Transport::PeerAddress & source, + chip::Protocols::UserDirectedCommissioning::CommissionerDeclaration cd) +{ + ChipLogProgress(AppServer, "CastingServer::OnCommissionerDeclarationMessage"); + // TODO: call a mCommissioningCallbacks +} + CHIP_ERROR CastingServer::SendUserDirectedCommissioningRequest(chip::Transport::PeerAddress commissioner) { // TODO: expose options to the higher layer Protocols::UserDirectedCommissioning::IdentificationDeclaration id; + if (mUdcCommissionerPasscodeEnabled) + { + id.SetCommissionerPasscode(true); + if (mUdcCommissionerPasscodeReady) + { + id.SetCommissionerPasscodeReady(true); + id.SetInstanceName(mUdcCommissionerPasscodeInstanceName); + mUdcCommissionerPasscodeReady = false; + } + else + { + CHIP_ERROR err = app::DnssdServer::Instance().GetCommissionableInstanceName( + mUdcCommissionerPasscodeInstanceName, sizeof(mUdcCommissionerPasscodeInstanceName)); + if (err != CHIP_NO_ERROR) + { + ChipLogError(AppServer, "Failed to get mdns instance name error: %" CHIP_ERROR_FORMAT, err.Format()); + } + else + { + id.SetInstanceName(mUdcCommissionerPasscodeInstanceName); + } + } + } return Server::GetInstance().SendUserDirectedCommissioningRequest(commissioner, id); } diff --git a/src/controller/CommissionerDiscoveryController.cpp b/src/controller/CommissionerDiscoveryController.cpp index a4d874f0243b2f..4df133c59e99f3 100644 --- a/src/controller/CommissionerDiscoveryController.cpp +++ b/src/controller/CommissionerDiscoveryController.cpp @@ -61,53 +61,98 @@ void CommissionerDiscoveryController::ValidateSession() ResetState(); } -void CommissionerDiscoveryController::OnUserDirectedCommissioningRequest(UDCClientState state) +void CommissionerDiscoveryController::OnCancel(UDCClientState state) { - ValidateSession(); + if (mReady) + { + // if state was ready for a new session, + // then we have lost our discovery controller context and can't perform the commissioning request + ChipLogDetail(Controller, "CommissionerDiscoveryController::OnCancel received when no current instance."); + return; + } - if (!mReady) + if (strncmp(mCurrentInstance, state.GetInstanceName(), sizeof(mCurrentInstance)) != 0) { - ChipLogDetail(Controller, "CommissionerDiscoveryController not ready. Current instance=%s", mCurrentInstance); + // if the instance doesn't match the one in our discovery controller context, + // then we can't perform the commissioning request + ChipLogDetail(Controller, "CommissionerDiscoveryController::OnCancel received mismatched instance. Current instance=%s", + mCurrentInstance); return; } - // first check if this is a cancel - if (state.GetCancelPasscode()) + + ChipLogDetail(Controller, "------PROMPT USER: %s cancelled commissioning [" ChipLogFormatMEI "," ChipLogFormatMEI ",%s]", + state.GetDeviceName(), ChipLogValueMEI(state.GetVendorId()), ChipLogValueMEI(state.GetProductId()), + state.GetInstanceName()); + if (mUserPrompter != nullptr) { - ChipLogDetail(Controller, "------PROMPT USER: %s cancelled commissioning [" ChipLogFormatMEI "," ChipLogFormatMEI ",%s]", - state.GetDeviceName(), ChipLogValueMEI(state.GetVendorId()), ChipLogValueMEI(state.GetProductId()), - state.GetInstanceName()); - if (mUserPrompter != nullptr) - { - mUserPrompter->HidePromptsOnCancel(state.GetVendorId(), state.GetProductId(), state.GetDeviceName()); - } + mUserPrompter->HidePromptsOnCancel(state.GetVendorId(), state.GetProductId(), state.GetDeviceName()); + } + return; +} + +void CommissionerDiscoveryController::OnCommissionerPasscodeReady(UDCClientState state) +{ + if (mReady) + { + // if state was ready for a new session, + // then we have lost our discovery controller context and can't perform the commissioning request + ChipLogDetail(Controller, + "CommissionerDiscoveryController::OnCommissionerPasscodeReady received when no current instance."); return; } - if (state.GetCommissionerPasscodeReady() && state.GetCdPort() != 0) + + if (strncmp(mCurrentInstance, state.GetInstanceName(), sizeof(mCurrentInstance)) != 0) { - uint32_t passcode = state.GetCachedCommissionerPasscode(); - if (!mReady || passcode == 0) - { - ChipLogError(AppServer, "On UDC: commissioner passcode ready but no passcode"); - CommissionerDeclaration cd; - cd.SetErrorCode(CommissionerDeclaration::CdError::kUnexpectedCommissionerPasscodeReady); + // if the instance doesn't match the one in our discovery controller context, + // then we can't perform the commissioning request + ChipLogDetail( + Controller, + "CommissionerDiscoveryController::OnCommissionerPasscodeReady received mismatched instance. Current instance=%s", + mCurrentInstance); + return; + } - if (mUdcServer == nullptr) - { - ChipLogError(AppServer, "On UDC: no udc server"); - return; - } - mUdcServer->SendCDCMessage(cd, Transport::PeerAddress::UDP(state.GetPeerAddress().GetIPAddress(), state.GetCdPort())); - return; - } - else - { - // can only get here is ok() has already been called - ChipLogDetail(AppServer, "On UDC: commissioner passcode ready with passcode - commissioning"); + if (state.GetCdPort() == 0) + { + ChipLogDetail(Controller, "CommissionerDiscoveryController::OnCommissionerPasscodeReady no port"); + return; + } - // start commissioning using the cached passcode - CommissionWithPasscode(passcode); + uint32_t passcode = state.GetCachedCommissionerPasscode(); + if (passcode == 0) + { + ChipLogError(AppServer, "On UDC: commissioner passcode ready but no passcode"); + CommissionerDeclaration cd; + cd.SetErrorCode(CommissionerDeclaration::CdError::kUnexpectedCommissionerPasscodeReady); + + if (mUdcServer == nullptr) + { + ChipLogError(AppServer, "On UDC: no udc server"); return; } + mUdcServer->SendCDCMessage(cd, Transport::PeerAddress::UDP(state.GetPeerAddress().GetIPAddress(), state.GetCdPort())); + return; + } + else + { + // can only get here is ok() has already been called + ChipLogDetail(AppServer, "On UDC: commissioner passcode ready with passcode - commissioning"); + + // start commissioning using the cached passcode + CommissionWithPasscode(passcode); + return; + } +} + +void CommissionerDiscoveryController::OnUserDirectedCommissioningRequest(UDCClientState state) +{ + ValidateSession(); + + if (!mReady) + { + // we must currently have discovery controller context (a UDC prompt under way) + ChipLogDetail(Controller, "CommissionerDiscoveryController not ready. Current instance=%s", mCurrentInstance); + return; } mReady = false; @@ -398,6 +443,7 @@ void CommissionerDiscoveryController::InternalHandleContentAppPasscodeResponse() return; } client->SetCachedCommissionerPasscode(passcode); + client->SetUDCClientProcessingState(UDCClientProcessingState::kWaitingForCommissionerPasscodeReady); CommissionerDeclaration cd; cd.SetCommissionerPasscode(true); @@ -482,7 +528,7 @@ void CommissionerDiscoveryController::InternalCommissionWithPasscode() if (!mPendingConsent) { - ChipLogError(AppServer, "UX Cancel: no current instance"); + ChipLogError(AppServer, "UX CommissionWithPasscode: no current instance"); return; } if (mUdcServer == nullptr) @@ -493,7 +539,7 @@ void CommissionerDiscoveryController::InternalCommissionWithPasscode() UDCClientState * client = mUdcServer->GetUDCClients().FindUDCClientState(mCurrentInstance); if (client == nullptr) { - ChipLogError(AppServer, "UX Ok: could not find instance=%s", mCurrentInstance); + ChipLogError(AppServer, "UX CommissionWithPasscode: could not find instance=%s", mCurrentInstance); return; } // state needs to be either kPromptingUser or kObtainingOnboardingPayload @@ -566,13 +612,18 @@ void CommissionerDiscoveryController::CommissioningFailed(CHIP_ERROR error) } if (mUdcServer == nullptr) { - ChipLogError(AppServer, "UX Cancel: no udc server"); + ChipLogError(AppServer, "UX CommissioningFailed: no udc server"); return; } UDCClientState * client = mUdcServer->GetUDCClients().FindUDCClientState(mCurrentInstance); - if (client == nullptr || client->GetUDCClientProcessingState() != UDCClientProcessingState::kCommissioningNode) + if (client == nullptr) { - ChipLogError(AppServer, "UX Cancel: invalid state for cancel"); + ChipLogError(AppServer, "UX CommissioningFailed: no client"); + return; + } + if (client->GetUDCClientProcessingState() != UDCClientProcessingState::kCommissioningNode) + { + ChipLogError(AppServer, "UX CommissioningFailed: invalid state"); return; } client->SetUDCClientProcessingState(UDCClientProcessingState::kCommissioningFailed); diff --git a/src/controller/CommissionerDiscoveryController.h b/src/controller/CommissionerDiscoveryController.h index c4c90c32342bc1..521fe5c611dc3c 100644 --- a/src/controller/CommissionerDiscoveryController.h +++ b/src/controller/CommissionerDiscoveryController.h @@ -275,6 +275,24 @@ class CommissionerDiscoveryController : public chip::Protocols::UserDirectedComm */ void OnUserDirectedCommissioningRequest(UDCClientState state) override; + /** + * UserConfirmationProvider callback. + * + * Notification that a Cancel UDC protocol message was received. + * + * This code will call the registered UserPrompter's HidePromptsOnCancel + */ + void OnCancel(UDCClientState state) override; + + /** + * UserConfirmationProvider callback. + * + * Notification that a CommissionerPasscodeReady UDC protocol message was received. + * + * This code will trigger the Commissioner to begin commissioning + */ + void OnCommissionerPasscodeReady(UDCClientState state) override; + /** * This method should be called after the user has given consent for commissioning of the client * indicated in the UserPrompter's PromptForCommissionOKPermission callback diff --git a/src/protocols/user_directed_commissioning/UDCClientState.h b/src/protocols/user_directed_commissioning/UDCClientState.h index e87e303340560c..259f6eedf1c0dc 100644 --- a/src/protocols/user_directed_commissioning/UDCClientState.h +++ b/src/protocols/user_directed_commissioning/UDCClientState.h @@ -37,6 +37,7 @@ enum class UDCClientProcessingState : uint8_t kPromptingUser, kUserDeclined, kObtainingOnboardingPayload, + kWaitingForCommissionerPasscodeReady, kCommissioningNode, kCommissioningFailed, }; diff --git a/src/protocols/user_directed_commissioning/UserDirectedCommissioning.h b/src/protocols/user_directed_commissioning/UserDirectedCommissioning.h index 7f22c92be0b71c..86fd4d51ed4e48 100644 --- a/src/protocols/user_directed_commissioning/UserDirectedCommissioning.h +++ b/src/protocols/user_directed_commissioning/UserDirectedCommissioning.h @@ -448,6 +448,30 @@ class DLL_EXPORT UserConfirmationProvider */ virtual void OnUserDirectedCommissioningRequest(UDCClientState state) = 0; + /** + * @brief + * Called when an Identification Declaration UDC message has been received + * with the cancel flag set. + * It is expected that the implementer will tear down any dialog prompts for the + * commissionee instance (identified in the UDC client state argument). + * + * @param[in] state The state for the UDC Client. + * + */ + virtual void OnCancel(UDCClientState state) = 0; + + /** + * @brief + * Called when an Identification Declaration UDC message has been received + * with the commissioner passcode ready flag set. + * It is expected that the implementer will invoke commissioning on the + * commissionee instance (identified in the UDC client state argument). + * + * @param[in] state The state for the UDC Client. + * + */ + virtual void OnCommissionerPasscodeReady(UDCClientState state) = 0; + virtual ~UserConfirmationProvider() = default; }; @@ -625,6 +649,9 @@ class DLL_EXPORT UserDirectedCommissioningServer : public TransportMgrDelegate InstanceNameResolver * mInstanceNameResolver = nullptr; UserConfirmationProvider * mUserConfirmationProvider = nullptr; + void HandleNewUDC(const Transport::PeerAddress & source, IdentificationDeclaration & id); + void HandleUDCCancel(IdentificationDeclaration & id); + void HandleUDCCommissionerPasscodeReady(IdentificationDeclaration & id); void OnMessageReceived(const Transport::PeerAddress & source, System::PacketBufferHandle && msgBuf) override; UDCClients mUdcClients; // < Active UDC clients diff --git a/src/protocols/user_directed_commissioning/UserDirectedCommissioningServer.cpp b/src/protocols/user_directed_commissioning/UserDirectedCommissioningServer.cpp index f63a10c94965f5..b96c45630166fa 100644 --- a/src/protocols/user_directed_commissioning/UserDirectedCommissioningServer.cpp +++ b/src/protocols/user_directed_commissioning/UserDirectedCommissioningServer.cpp @@ -61,9 +61,25 @@ void UserDirectedCommissioningServer::OnMessageReceived(const Transport::PeerAdd IdentificationDeclaration id; id.ReadPayload(udcPayload, sizeof(udcPayload)); - char * instanceName = (char *) id.GetInstanceName(); + if (id.GetCancelPasscode()) + { + HandleUDCCancel(id); + return; + } - ChipLogProgress(AppServer, "UDC instance=%s ", id.GetInstanceName()); + if (id.GetCommissionerPasscodeReady()) + { + HandleUDCCommissionerPasscodeReady(id); + return; + } + + HandleNewUDC(source, id); +} + +void UserDirectedCommissioningServer::HandleNewUDC(const Transport::PeerAddress & source, IdentificationDeclaration & id) +{ + char * instanceName = (char *) id.GetInstanceName(); + ChipLogProgress(AppServer, "HandleNewUDC instance=%s ", id.GetInstanceName()); UDCClientState * client = mUdcClients.FindUDCClientState(instanceName); if (client == nullptr) @@ -109,8 +125,58 @@ void UserDirectedCommissioningServer::OnMessageReceived(const Transport::PeerAdd ChipLogError(AppServer, "UserDirectedCommissioningServer::OnMessageReceived no mInstanceNameResolver registered"); } } + mUdcClients.MarkUDCClientActive(client); +} + +void UserDirectedCommissioningServer::HandleUDCCancel(IdentificationDeclaration & id) +{ + char * instanceName = (char *) id.GetInstanceName(); + ChipLogProgress(AppServer, "HandleUDCCancel instance=%s ", id.GetInstanceName()); + UDCClientState * client = mUdcClients.FindUDCClientState(instanceName); + if (client == nullptr) + { + ChipLogProgress(AppServer, "UDC no matching instance found"); + return; + } + id.DebugLog(); mUdcClients.MarkUDCClientActive(client); + + // Call the registered mUserConfirmationProvider, if any. + if (mUserConfirmationProvider != nullptr) + { + mUserConfirmationProvider->OnCancel(*client); + } + + // reset this entry so that the client can try again without waiting an hour + client->Reset(); +} + +void UserDirectedCommissioningServer::HandleUDCCommissionerPasscodeReady(IdentificationDeclaration & id) +{ + char * instanceName = (char *) id.GetInstanceName(); + ChipLogProgress(AppServer, "HandleUDCCommissionerPasscodeReady instance=%s ", id.GetInstanceName()); + + UDCClientState * client = mUdcClients.FindUDCClientState(instanceName); + if (client == nullptr) + { + ChipLogProgress(AppServer, "UDC no matching instance found"); + return; + } + if (client->GetUDCClientProcessingState() != UDCClientProcessingState::kWaitingForCommissionerPasscodeReady) + { + ChipLogProgress(AppServer, "UDC instance not in waiting for passcode ready state"); + return; + } + id.DebugLog(); + mUdcClients.MarkUDCClientActive(client); + client->SetUDCClientProcessingState(UDCClientProcessingState::kObtainingOnboardingPayload); + + // Call the registered mUserConfirmationProvider, if any. + if (mUserConfirmationProvider != nullptr) + { + mUserConfirmationProvider->OnCommissionerPasscodeReady(*client); + } } CHIP_ERROR UserDirectedCommissioningServer::SendCDCMessage(CommissionerDeclaration cd, chip::Transport::PeerAddress peerAddress) diff --git a/src/protocols/user_directed_commissioning/tests/TestUdcMessages.cpp b/src/protocols/user_directed_commissioning/tests/TestUdcMessages.cpp index 9c171b5efad5b8..a62aa52b94a2e3 100644 --- a/src/protocols/user_directed_commissioning/tests/TestUdcMessages.cpp +++ b/src/protocols/user_directed_commissioning/tests/TestUdcMessages.cpp @@ -37,6 +37,10 @@ class DLL_EXPORT TestCallback : public UserConfirmationProvider, public Instance mState = state; } + void OnCancel(UDCClientState state) {} + + void OnCommissionerPasscodeReady(UDCClientState state) {} + void FindCommissionableNode(char * instanceName) { mFindCommissionableNodeCalled = true; From fd72eae01f6dec6e3bd05996eedb985521069beb Mon Sep 17 00:00:00 2001 From: Vatsal Ghelani <152916324+vatsalghelani-csa@users.noreply.github.com> Date: Mon, 15 Apr 2024 14:13:07 -0400 Subject: [PATCH 068/468] Added scripts to get metadata (runner arguments) associated with the python_testing scripts for automating the process (#32752) * Create unit test to test metadata parser * Create test script metadata parser * Create test environment file * Added Copyright Code * Added Copyright code * Added copyright code * Added run arguments comment header * Created BUILD.gn for metadata parser * Added reference to the metadata parser BUILD.gn * Added TC_RR_1_1_Test.py for testing purpose * Reverted back the testing changes done to the original file * Updated TC_RR_1_1_Test.py with comments as it was * Update test_metadata.py to correct the location for TC_RR* test script * Updated BUILD.gn with the correct naming tests * Rename env.yaml to test_env.yaml as it is for testing only * Updated test_metadata.py with the corrected test env file * Updated and rename TC_RR_1_1_Test.py to simple_run_args.py Just keeping the runner arguments required for testing purpose and removing all the unwanted test script code for this current testing use case * Updated test_metadata.py to the new name reference of the testing file * Renamed test method to test_run_metadata_parser * Removed the unwanted print method * Removed handling for int/bool/hex args and trace args * Remove try-catch block * Replaced == to is for null comparsion * Removed argument validation method * Added the dataclass to be optional * Updated the test script to be a .txt file and changed the designed to be all run arguments in one line * Rename simple_run_args.py to simple_run_args.txt * Updated BUILD.gn * Rename scripts/tests/py/test_env.yaml to env_example.yaml * Rename env_example.yaml to scripts/tests/py/env_example.yaml * Updated path of the environment file * Change the test script file type * Updated metadata_parser reference * Rename env_example.yaml to env_test.yaml * Update environment file name * Created __init__.py file * Added reference for __init__.py in the source * Created pyproject.toml file * Created setup.py file * Created setup.cfg file * Changed the path of the folder where the scripts are located * Added print statement * Updated print statement * Added inputs to the BUILD.gn file * Updated paths for file references * Added test script path to the inputs * Added sources for the file not find error fix * Updated metadata.py changes as suggested in the PR comments review * Updated test script * Updated license comment * Removed from pathlib import Path * Added Print Statement * Removed the print debug line * Updated it to use relative path instead of absolute path * Changed copyright year and removed unwanted sources * Updated copyright year to be 2024 * Updated copyright year to be 2024 * Updated copyright year to be 2024 * Updated copyright year to be 2024 * Updated copyright year to be 2024 * Updated copyright year to be 2024 * Update comment Co-authored-by: Andrei Litvin * Updated the class name to MetadataReader * Updated class name to MetadataReader * Removed optional on factoryreset * Renamed env_yaml_file_path and solved inline inside constructor * Update metadata.py * Update metadata.py * Delete scripts/tests/py/simple_run_args.txt * Update BUILD.gn * Updated test_metadata.py * Updated metadata.py * Create simple_run_args.txt * Update BUILD.gn * Delete scripts/tests/py/simple_run_args.txt * Update BUILD.gn * Updated test_metadata.py * Restyled by whitespace * Restyled by gn * Restyled by prettier-yaml * Restyled by autopep8 * Restyled by isort * Fixed the spell error * Fixed comments from the PR * Removed extra print line * Restyled by autopep8 * Test via comment space * Test via removed comment space * Test via comment space * Restyled by autopep8 * Fixed mypy erros and test script line readability fixes * Restyled by autopep8 * Removed unawanted variables * Removing unused Union * Restyled by autopep8 --------- Co-authored-by: Andrei Litvin Co-authored-by: Restyled.io --- BUILD.gn | 1 + scripts/tests/py/BUILD.gn | 36 +++++ scripts/tests/py/__init__.py | 0 scripts/tests/py/env_test.yaml | 32 +++++ scripts/tests/py/metadata.py | 217 ++++++++++++++++++++++++++++++ scripts/tests/py/pyproject.toml | 17 +++ scripts/tests/py/setup.cfg | 19 +++ scripts/tests/py/setup.py | 20 +++ scripts/tests/py/test_metadata.py | 51 +++++++ 9 files changed, 393 insertions(+) create mode 100644 scripts/tests/py/BUILD.gn create mode 100644 scripts/tests/py/__init__.py create mode 100644 scripts/tests/py/env_test.yaml create mode 100644 scripts/tests/py/metadata.py create mode 100644 scripts/tests/py/pyproject.toml create mode 100644 scripts/tests/py/setup.cfg create mode 100644 scripts/tests/py/setup.py create mode 100644 scripts/tests/py/test_metadata.py diff --git a/BUILD.gn b/BUILD.gn index 0992c61b0510c6..5de6441925c6e6 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -233,6 +233,7 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") { "//scripts/build:build_examples.tests", "//scripts/py_matter_idl:matter_idl.tests", "//scripts/py_matter_yamltests:matter_yamltests.tests", + "//scripts/tests/py:metadata_parser.tests", "//src:tests_run", ] diff --git a/scripts/tests/py/BUILD.gn b/scripts/tests/py/BUILD.gn new file mode 100644 index 00000000000000..e77297ac4e0955 --- /dev/null +++ b/scripts/tests/py/BUILD.gn @@ -0,0 +1,36 @@ +# Copyright (c) 2024 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/pigweed.gni") +import("$dir_pw_build/python.gni") + +pw_python_package("metadata_parser") { + setup = [ + "setup.py", + "setup.cfg", + "pyproject.toml", + ] + + inputs = [ "env_test.yaml" ] + + sources = [ + "__init__.py", + "metadata.py", + ] + + tests = [ "test_metadata.py" ] +} diff --git a/scripts/tests/py/__init__.py b/scripts/tests/py/__init__.py new file mode 100644 index 00000000000000..e69de29bb2d1d6 diff --git a/scripts/tests/py/env_test.yaml b/scripts/tests/py/env_test.yaml new file mode 100644 index 00000000000000..170da16676fcc9 --- /dev/null +++ b/scripts/tests/py/env_test.yaml @@ -0,0 +1,32 @@ +# Copyright (c) 2024 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. + +# test environment argument definitions for metadata parser +discriminator: 1234 +KVS: kvs1 +trace-to-appjson: json:out/trace_data/app-{SCRIPT_BASE_NAME}.json +enable-key: 000102030405060708090a0b0c0d0e0f + +storage-path: admin_storage.json +commissioning-method: on-network +passcode: 20202021 +endpoint: 1 +trace-to-testjson: json:out/trace_data/test-{SCRIPT_BASE_NAME}.json +trace-to-testperfetto: perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto +manual-code: 10054912339 +PICS: src/app/tests/suites/certification/ci-pics-values + +app: + all-clusters: out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app + lock: out/linux-x64-lock-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-lock-app diff --git a/scripts/tests/py/metadata.py b/scripts/tests/py/metadata.py new file mode 100644 index 00000000000000..0445b3a31b4a6e --- /dev/null +++ b/scripts/tests/py/metadata.py @@ -0,0 +1,217 @@ +#!/usr/bin/python3 +# Copyright (c) 2024 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 re +from dataclasses import dataclass +from typing import Dict, List, Optional + +import yaml + + +@dataclass +class Metadata: + py_script_path: Optional[str] = None + run: Optional[str] = None + app: Optional[str] = None + discriminator: Optional[str] = None + passcode: Optional[str] = None + + def copy_from_dict(self, attr_dict: Dict[str, str]) -> None: + """ + Sets the value of the attributes from a dictionary. + + Attributes: + + attr_dict: + Dictionary that stores attributes value that should + be transferred to this class. + """ + + if "app" in attr_dict: + self.app = attr_dict["app"] + + if "run" in attr_dict: + self.run = attr_dict["run"] + + if "discriminator" in attr_dict: + self.discriminator = attr_dict["discriminator"] + + if "passcode" in attr_dict: + self.passcode = attr_dict["passcode"] + + if "py_script_path" in attr_dict: + self.py_script_path = attr_dict["py_script_path"] + + # TODO - set other attributes as well + + +class MetadataReader: + """ + A class to parse run arguments from the test scripts and + resolve them to environment specific values. + """ + + def __init__(self, env_yaml_file_path: str): + """ + Reads the YAML file and Constructs the environment object + + Parameters: + + env_yaml_file_path: + Path to the environment file that contains the YAML configuration. + """ + with open(env_yaml_file_path) as stream: + self.env = yaml.safe_load(stream) + + def __resolve_env_vals__(self, metadata_dict: Dict[str, str]) -> None: + """ + Resolves the argument defined in the test script to environment values. + For example, if a test script defines "all_clusters" as the value for app + name, we will check the environment configuration to see what raw value is + assocaited with the "all_cluster" variable and set the value for "app" option + to this raw value. + + Parameter: + + metadata_dict: + Dictionary where each key represent a particular argument and its value represent + the value for that argument defined in the test script. + """ + + for run_arg, run_arg_val in metadata_dict.items(): + + if not type(run_arg_val) == str or run_arg == "run": + metadata_dict[run_arg] = run_arg_val + continue + + if run_arg_val is None: + continue + + sub_args = run_arg_val.split('/') + + if len(sub_args) not in [1, 2]: + err = """The argument is not in the correct format. + The argument must follow the format of arg1 or arg1/arg2. + For example, arg1 represents the argument type and optionally arg2 + represents a specific variable defined in the environment file whose + value should be used as the argument value. If arg2 is not specified, + we will just use the first value associated with arg1 in the environment file.""" + raise Exception(err) + + if len(sub_args) == 1: + run_arg_val = self.env.get(sub_args[0]) + + elif len(sub_args) == 2: + run_arg_val = self.env.get(sub_args[0]).get(sub_args[1]) + + # if a argument has been specified in the comment header + # but can't be found in the env file, consider it to be + # boolean value. + if run_arg_val is None: + run_arg_val = True + + metadata_dict[run_arg] = run_arg_val + + def __read_args__(self, run_args_lines: List[str]) -> Dict[str, str]: + """ + Parses a list of lines and extracts argument + values from it. + + Parameters: + + run_args_lines: + Line in test script header that contains run argument definition. + Each line will contain a list of run arguments separated by a space. + Line below is one example of what the run argument line will look like: + "app/all-clusters discriminator KVS storage-path" + + In this case the line defines that app, discriminator, KVS, and storage-path + are the arguments that should be used with this run. + + An argument can be defined multiple times in the same line or in different lines. + The last definition will override any previous definition. For example, + "KVS/kvs1 KVS/kvs2 KVS/kvs3" line will lead to KVS value of kvs3. + """ + metadata_dict = {} + + for run_line in run_args_lines: + for run_arg_word in run_line.strip().split(): + ''' + We expect the run arg to be defined in one of the + following two formats: + 1. run_arg + 2. run_arg/run_arg_val + + Examples: "discriminator" and "app/all_clusters" + + ''' + run_arg = run_arg_word.split('/', 1)[0] + metadata_dict[run_arg] = run_arg_word + + return metadata_dict + + def parse_script(self, py_script_path: str) -> List[Metadata]: + """ + Parses a script and returns a list of metadata object where + each element of that list representing run arguments associated + with a particular run. + + Parameter: + + py_script_path: + path to the python test script + + Return: + + List[Metadata] + List of Metadata object where each Metadata element represents + the run arguments associated with a particular run defined in + the script file. + """ + + runs_def_ptrn = re.compile(r'^\s*#\s*test-runner-runs:\s*(.*)$') + args_def_ptrn = re.compile(r'^\s*#\s*test-runner-run/([a-zA-Z0-9_]+):\s*(.*)$') + + runs_arg_lines: Dict[str, List[str]] = {} + runs_metadata = [] + + with open(py_script_path, 'r', encoding='utf8') as py_script: + for line in py_script.readlines(): + + runs_match = runs_def_ptrn.match(line.strip()) + args_match = args_def_ptrn.match(line.strip()) + + if runs_match: + for run in runs_match.group(1).strip().split(): + runs_arg_lines[run] = [] + + elif args_match: + runs_arg_lines[args_match.group(1)].append(args_match.group(2)) + + for run, lines in runs_arg_lines.items(): + metadata_dict = self.__read_args__(lines) + self.__resolve_env_vals__(metadata_dict) + + # store the run value and script location in the + # metadata object + metadata_dict['py_script_path'] = py_script_path + metadata_dict['run'] = run + + metadata = Metadata() + + metadata.copy_from_dict(metadata_dict) + runs_metadata.append(metadata) + + return runs_metadata diff --git a/scripts/tests/py/pyproject.toml b/scripts/tests/py/pyproject.toml new file mode 100644 index 00000000000000..f62115ec75168a --- /dev/null +++ b/scripts/tests/py/pyproject.toml @@ -0,0 +1,17 @@ +# Copyright (c) 2024 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. + +[build-system] +requires = ['setuptools', 'wheel'] +build-backend = 'setuptools.build_meta' diff --git a/scripts/tests/py/setup.cfg b/scripts/tests/py/setup.cfg new file mode 100644 index 00000000000000..464e36c03d3e2f --- /dev/null +++ b/scripts/tests/py/setup.cfg @@ -0,0 +1,19 @@ +# Copyright (c) 2024 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. + +[metadata] +name = metadata_parser +version = 0.0.1 +author = Project CHIP Authors +description = Scripts to get metadata (runner arguments) associated with the python_testing scripts diff --git a/scripts/tests/py/setup.py b/scripts/tests/py/setup.py new file mode 100644 index 00000000000000..8a92fbd313d1c7 --- /dev/null +++ b/scripts/tests/py/setup.py @@ -0,0 +1,20 @@ +# Copyright (c) 2024 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. + + +"""The metadata_parser package.""" + +import setuptools # type: ignore + +setuptools.setup() # Package definition in setup.cfg diff --git a/scripts/tests/py/test_metadata.py b/scripts/tests/py/test_metadata.py new file mode 100644 index 00000000000000..7c2594d08134c2 --- /dev/null +++ b/scripts/tests/py/test_metadata.py @@ -0,0 +1,51 @@ +#!/usr/bin/python3 +# Copyright (c) 2024 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 os +import unittest +from os import path + +from metadata import Metadata, MetadataReader + + +class TestMetadataReader(unittest.TestCase): + path_under_test = path_under_test = path.join(path.dirname(__file__), "simple_run_args.txt") + + def setUp(self): + + # build the reader object + self.reader = MetadataReader(path.join(path.dirname(__file__), "env_test.yaml")) + with open(self.path_under_test, 'w', encoding='utf8') as test_file: + test_file.writelines(''' + # test-runner-runs: run1 + # test-runner-run/run1: app/all-clusters discriminator KVS storage-path commissioning-method discriminator passcode + ''') + + def test_parse_single_run(self): + + expected_runs_metadata = [] + + expected_runs_metadata.append(Metadata(app="out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app", + discriminator=1234, py_script_path=self.path_under_test, run="run1", passcode=20202021)) + + self.assertEqual(self.reader.parse_script(self.path_under_test), expected_runs_metadata) + + def tearDown(self): + if os.path.exists(self.path_under_test): + os.remove(self.path_under_test) + + +if __name__ == "__main__": + unittest.main() From 74e2cd455699923f18693ba2676f80e9f0b69cee Mon Sep 17 00:00:00 2001 From: C Freeman Date: Mon, 15 Apr 2024 16:27:09 -0400 Subject: [PATCH 069/468] DM XML scrape for 1.3 (#32972) --- .../clusters/BooleanStateConfiguration.xml | 14 ++++---- data_model/clusters/ColorControl.xml | 1 - data_model/clusters/DiagnosticsGeneral.xml | 4 +-- data_model/clusters/EnergyEVSE.xml | 2 +- data_model/clusters/LevelControl.xml | 5 ++- data_model/clusters/MicrowaveOvenControl.xml | 25 +++++++++----- data_model/clusters/Mode_RVCClean.xml | 28 ++++++++-------- data_model/clusters/Mode_RVCRun.xml | 28 ++++++++-------- .../clusters/NetworkCommissioningCluster.xml | 1 - data_model/clusters/OperationalState.xml | 5 ++- data_model/clusters/OperationalState_RVC.xml | 33 ++++++++++--------- data_model/clusters/PowerTopology.xml | 2 -- data_model/clusters/Scenes.xml | 3 ++ data_model/clusters/TimeSync.xml | 2 +- .../clusters/network_infrastructure.xml | 4 ++- data_model/device_types/Aggregator.xml | 1 - data_model/device_types/BaseDeviceType.xml | 3 +- data_model/device_types/BasicVideoPlayer.xml | 1 - data_model/device_types/BridgedNode.xml | 1 - .../device_types/CastingVideoClient.xml | 1 - .../device_types/CastingVideoPlayer.xml | 3 +- data_model/device_types/ColorDimmerSwitch.xml | 1 - .../device_types/ColorTemperatureLight.xml | 9 +++-- data_model/device_types/ContentApp.xml | 3 +- data_model/device_types/ControlBridge.xml | 2 -- data_model/device_types/CookSurface.xml | 2 +- data_model/device_types/DimmableLight.xml | 7 ++-- .../device_types/DimmablePlug-InUnit.xml | 7 ++-- data_model/device_types/DimmerSwitch.xml | 1 - data_model/device_types/Dishwasher.xml | 2 +- data_model/device_types/DoorLock.xml | 5 ++- .../device_types/DoorLockController.xml | 1 - .../device_types/EnergyTariffCalendar.xml | 4 +-- .../device_types/ExtendedColorLight.xml | 15 ++++----- data_model/device_types/FlowSensor.xml | 1 - data_model/device_types/GenericSwitch.xml | 1 - data_model/device_types/HumiditySensor.xml | 1 - data_model/device_types/LaundryDryer.xml | 2 +- data_model/device_types/LaundryWasher.xml | 2 +- data_model/device_types/LightSensor.xml | 1 - .../device_types/ModeSelectDeviceType.xml | 1 - data_model/device_types/OccupancySensor.xml | 7 +--- data_model/device_types/OnOffLight.xml | 7 ++-- data_model/device_types/OnOffLightSwitch.xml | 1 - data_model/device_types/OnOffPlug-inUnit.xml | 7 ++-- data_model/device_types/OnOffSensor.xml | 2 -- data_model/device_types/OtaProvider.xml | 9 +++-- data_model/device_types/OtaRequestor.xml | 5 ++- data_model/device_types/PressureSensor.xml | 1 - data_model/device_types/Pump.xml | 1 - data_model/device_types/PumpController.xml | 1 - .../device_types/RoomAirConditioner.xml | 2 +- .../device_types/RootNodeDeviceType.xml | 15 +++------ data_model/device_types/Speaker.xml | 1 - data_model/device_types/TemperatureSensor.xml | 1 - data_model/device_types/Thermostat.xml | 1 - .../device_types/ThreadBorderRouter.xml | 2 +- .../device_types/VideoRemoteControl.xml | 1 - data_model/device_types/WaterHeater.xml | 8 ++--- data_model/device_types/WindowCovering.xml | 21 +++++++----- .../device_types/WindowCoveringController.xml | 3 +- data_model/spec_sha | 2 +- 62 files changed, 150 insertions(+), 183 deletions(-) diff --git a/data_model/clusters/BooleanStateConfiguration.xml b/data_model/clusters/BooleanStateConfiguration.xml index dc17f93a7295f0..a9c370b95fe15c 100644 --- a/data_model/clusters/BooleanStateConfiguration.xml +++ b/data_model/clusters/BooleanStateConfiguration.xml @@ -104,7 +104,7 @@ Davis, CA 95616, USA - + @@ -112,7 +112,7 @@ Davis, CA 95616, USA - + @@ -120,7 +120,7 @@ Davis, CA 95616, USA - + @@ -128,7 +128,7 @@ Davis, CA 95616, USA - + @@ -137,13 +137,13 @@ Davis, CA 95616, USA - + - + @@ -153,7 +153,7 @@ Davis, CA 95616, USA - + diff --git a/data_model/clusters/ColorControl.xml b/data_model/clusters/ColorControl.xml index 14d471b78a3043..b913009f852761 100644 --- a/data_model/clusters/ColorControl.xml +++ b/data_model/clusters/ColorControl.xml @@ -107,7 +107,6 @@ Davis, CA 95616, USA - diff --git a/data_model/clusters/DiagnosticsGeneral.xml b/data_model/clusters/DiagnosticsGeneral.xml index 27046ded399425..1141123c83b6be 100644 --- a/data_model/clusters/DiagnosticsGeneral.xml +++ b/data_model/clusters/DiagnosticsGeneral.xml @@ -65,9 +65,7 @@ Davis, CA 95616, USA - - - + diff --git a/data_model/clusters/EnergyEVSE.xml b/data_model/clusters/EnergyEVSE.xml index fa15692e78896d..d7786da5cda99d 100644 --- a/data_model/clusters/EnergyEVSE.xml +++ b/data_model/clusters/EnergyEVSE.xml @@ -68,7 +68,7 @@ Davis, CA 95616, USA - + diff --git a/data_model/clusters/LevelControl.xml b/data_model/clusters/LevelControl.xml index 13522bf0698b9e..5cacf7e89a5162 100644 --- a/data_model/clusters/LevelControl.xml +++ b/data_model/clusters/LevelControl.xml @@ -79,8 +79,8 @@ Davis, CA 95616, USA + The Pulse Width Modulation cluster was created + for frequency control."> @@ -126,7 +126,6 @@ Davis, CA 95616, USA - diff --git a/data_model/clusters/MicrowaveOvenControl.xml b/data_model/clusters/MicrowaveOvenControl.xml index d7c6f72f740d3d..27f31dcba966b7 100644 --- a/data_model/clusters/MicrowaveOvenControl.xml +++ b/data_model/clusters/MicrowaveOvenControl.xml @@ -70,7 +70,10 @@ Davis, CA 95616, USA - + + + + @@ -125,16 +128,22 @@ Davis, CA 95616, USA - - - + + + + + + - - - + + + + + + @@ -165,7 +174,7 @@ Davis, CA 95616, USA - + diff --git a/data_model/clusters/Mode_RVCClean.xml b/data_model/clusters/Mode_RVCClean.xml index d1b2272fc7e756..0738d20c0c23dd 100644 --- a/data_model/clusters/Mode_RVCClean.xml +++ b/data_model/clusters/Mode_RVCClean.xml @@ -66,20 +66,6 @@ Davis, CA 95616, USA - - - - - - - - - - - - - - @@ -94,4 +80,18 @@ Davis, CA 95616, USA + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/clusters/Mode_RVCRun.xml b/data_model/clusters/Mode_RVCRun.xml index 8e19b45a8385fc..b5811a0a6cfe05 100644 --- a/data_model/clusters/Mode_RVCRun.xml +++ b/data_model/clusters/Mode_RVCRun.xml @@ -66,20 +66,6 @@ Davis, CA 95616, USA - - - - - - - - - - - - - - @@ -94,4 +80,18 @@ Davis, CA 95616, USA + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/clusters/NetworkCommissioningCluster.xml b/data_model/clusters/NetworkCommissioningCluster.xml index 745a659f1b900b..f9810212a79659 100644 --- a/data_model/clusters/NetworkCommissioningCluster.xml +++ b/data_model/clusters/NetworkCommissioningCluster.xml @@ -54,7 +54,6 @@ This notice and disclaimer must be included on all copies of this document. Connectivity Standards Alliance 508 Second Street, Suite 206 Davis, CA 95616, USA - --> diff --git a/data_model/clusters/OperationalState.xml b/data_model/clusters/OperationalState.xml index 37dc6b6e2f8cf4..98990eac3ded4d 100644 --- a/data_model/clusters/OperationalState.xml +++ b/data_model/clusters/OperationalState.xml @@ -203,7 +203,10 @@ Davis, CA 95616, USA - + + + + diff --git a/data_model/clusters/OperationalState_RVC.xml b/data_model/clusters/OperationalState_RVC.xml index 6426e2639a7b83..7e37a6b5f6f01b 100644 --- a/data_model/clusters/OperationalState_RVC.xml +++ b/data_model/clusters/OperationalState_RVC.xml @@ -66,21 +66,6 @@ Davis, CA 95616, USA - - - - - - - - - - - - - - - @@ -120,4 +105,22 @@ Davis, CA 95616, USA + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/clusters/PowerTopology.xml b/data_model/clusters/PowerTopology.xml index d8c8a50d22a3a6..dac690fdcc465d 100644 --- a/data_model/clusters/PowerTopology.xml +++ b/data_model/clusters/PowerTopology.xml @@ -54,8 +54,6 @@ This notice and disclaimer must be included on all copies of this document. Connectivity Standards Alliance 508 Second Street, Suite 206 Davis, CA 95616, USA - -:xrefstyle: short --> diff --git a/data_model/clusters/Scenes.xml b/data_model/clusters/Scenes.xml index 5d9be300d1abbc..d9c0ee76fe37d2 100644 --- a/data_model/clusters/Scenes.xml +++ b/data_model/clusters/Scenes.xml @@ -121,14 +121,17 @@ Davis, CA 95616, USA + + + diff --git a/data_model/clusters/TimeSync.xml b/data_model/clusters/TimeSync.xml index c6c57ece628bbd..68e98a1bf427fe 100644 --- a/data_model/clusters/TimeSync.xml +++ b/data_model/clusters/TimeSync.xml @@ -92,7 +92,7 @@ Davis, CA 95616, USA - + diff --git a/data_model/clusters/network_infrastructure.xml b/data_model/clusters/network_infrastructure.xml index 7e75cc0af8229f..8045740d5de0b6 100644 --- a/data_model/clusters/network_infrastructure.xml +++ b/data_model/clusters/network_infrastructure.xml @@ -58,5 +58,7 @@ This notice and disclaimer must be included on all copies of this document. Connectivity Standards Alliance 508 Second Street, Suite 206 Davis, CA 95616, USA + +:toc: --> - + \ No newline at end of file diff --git a/data_model/device_types/Aggregator.xml b/data_model/device_types/Aggregator.xml index 4e0eb1cee512c3..48aa4347d850e1 100644 --- a/data_model/device_types/Aggregator.xml +++ b/data_model/device_types/Aggregator.xml @@ -57,7 +57,6 @@ Davis, CA 95616, USA --> - diff --git a/data_model/device_types/BaseDeviceType.xml b/data_model/device_types/BaseDeviceType.xml index 0df3ba00d26e2b..ddcc49f258f0cb 100644 --- a/data_model/device_types/BaseDeviceType.xml +++ b/data_model/device_types/BaseDeviceType.xml @@ -57,7 +57,6 @@ Davis, CA 95616, USA --> - @@ -66,7 +65,7 @@ Davis, CA 95616, USA - + diff --git a/data_model/device_types/BasicVideoPlayer.xml b/data_model/device_types/BasicVideoPlayer.xml index 2b9b52c3b43ee6..ed82d08bc7a112 100644 --- a/data_model/device_types/BasicVideoPlayer.xml +++ b/data_model/device_types/BasicVideoPlayer.xml @@ -57,7 +57,6 @@ Davis, CA 95616, USA --> - diff --git a/data_model/device_types/BridgedNode.xml b/data_model/device_types/BridgedNode.xml index 29b7a59299c37b..59414205c052b5 100644 --- a/data_model/device_types/BridgedNode.xml +++ b/data_model/device_types/BridgedNode.xml @@ -57,7 +57,6 @@ Davis, CA 95616, USA --> - diff --git a/data_model/device_types/CastingVideoClient.xml b/data_model/device_types/CastingVideoClient.xml index d79506b9cf66a0..8f816b3e2a8056 100644 --- a/data_model/device_types/CastingVideoClient.xml +++ b/data_model/device_types/CastingVideoClient.xml @@ -57,7 +57,6 @@ Davis, CA 95616, USA --> - diff --git a/data_model/device_types/CastingVideoPlayer.xml b/data_model/device_types/CastingVideoPlayer.xml index 336416508660a8..0b65f4f7aab57d 100644 --- a/data_model/device_types/CastingVideoPlayer.xml +++ b/data_model/device_types/CastingVideoPlayer.xml @@ -57,7 +57,6 @@ Davis, CA 95616, USA --> - @@ -109,7 +108,7 @@ launch Content Apps and represent these apps as separate endpoints."/> - + diff --git a/data_model/device_types/ColorDimmerSwitch.xml b/data_model/device_types/ColorDimmerSwitch.xml index 0da15b82a2cd08..e391700918e1c4 100644 --- a/data_model/device_types/ColorDimmerSwitch.xml +++ b/data_model/device_types/ColorDimmerSwitch.xml @@ -57,7 +57,6 @@ Davis, CA 95616, USA --> - diff --git a/data_model/device_types/ColorTemperatureLight.xml b/data_model/device_types/ColorTemperatureLight.xml index 5a54a36a7a0fbf..e782dd24f58f4f 100644 --- a/data_model/device_types/ColorTemperatureLight.xml +++ b/data_model/device_types/ColorTemperatureLight.xml @@ -57,7 +57,6 @@ Davis, CA 95616, USA --> - @@ -80,7 +79,7 @@ Davis, CA 95616, USA - + @@ -88,10 +87,10 @@ Davis, CA 95616, USA - + - + @@ -118,7 +117,7 @@ Davis, CA 95616, USA - + diff --git a/data_model/device_types/ContentApp.xml b/data_model/device_types/ContentApp.xml index 84bf58698f426d..300e3122336ef4 100644 --- a/data_model/device_types/ContentApp.xml +++ b/data_model/device_types/ContentApp.xml @@ -57,7 +57,6 @@ Davis, CA 95616, USA --> - @@ -86,7 +85,7 @@ Davis, CA 95616, USA - + diff --git a/data_model/device_types/ControlBridge.xml b/data_model/device_types/ControlBridge.xml index f427becc14f791..27e00f69403728 100644 --- a/data_model/device_types/ControlBridge.xml +++ b/data_model/device_types/ControlBridge.xml @@ -57,8 +57,6 @@ Davis, CA 95616, USA --> - diff --git a/data_model/device_types/CookSurface.xml b/data_model/device_types/CookSurface.xml index b18897b3f0f9ff..a32425e2f1df08 100644 --- a/data_model/device_types/CookSurface.xml +++ b/data_model/device_types/CookSurface.xml @@ -65,7 +65,7 @@ Davis, CA 95616, USA - + diff --git a/data_model/device_types/DimmableLight.xml b/data_model/device_types/DimmableLight.xml index ce0c280de6f0a6..ec66b81a610451 100644 --- a/data_model/device_types/DimmableLight.xml +++ b/data_model/device_types/DimmableLight.xml @@ -57,7 +57,6 @@ Davis, CA 95616, USA --> - @@ -79,7 +78,7 @@ Davis, CA 95616, USA - + @@ -87,10 +86,10 @@ Davis, CA 95616, USA - + - + diff --git a/data_model/device_types/DimmablePlug-InUnit.xml b/data_model/device_types/DimmablePlug-InUnit.xml index 98895640fe1bc5..bbd043912ab6d7 100644 --- a/data_model/device_types/DimmablePlug-InUnit.xml +++ b/data_model/device_types/DimmablePlug-InUnit.xml @@ -57,7 +57,6 @@ Davis, CA 95616, USA --> - @@ -80,7 +79,7 @@ Davis, CA 95616, USA - + @@ -88,10 +87,10 @@ Davis, CA 95616, USA - + - + diff --git a/data_model/device_types/DimmerSwitch.xml b/data_model/device_types/DimmerSwitch.xml index 137adfd9117cf7..008e54eee8efc3 100644 --- a/data_model/device_types/DimmerSwitch.xml +++ b/data_model/device_types/DimmerSwitch.xml @@ -57,7 +57,6 @@ Davis, CA 95616, USA --> - diff --git a/data_model/device_types/Dishwasher.xml b/data_model/device_types/Dishwasher.xml index a07fdc9c3adddb..6e351f38360e4e 100644 --- a/data_model/device_types/Dishwasher.xml +++ b/data_model/device_types/Dishwasher.xml @@ -68,7 +68,7 @@ Davis, CA 95616, USA - + diff --git a/data_model/device_types/DoorLock.xml b/data_model/device_types/DoorLock.xml index 9b6c7fd145621d..8b73bbf8679a6b 100644 --- a/data_model/device_types/DoorLock.xml +++ b/data_model/device_types/DoorLock.xml @@ -57,7 +57,6 @@ Davis, CA 95616, USA --> - @@ -77,7 +76,7 @@ Davis, CA 95616, USA - + @@ -90,7 +89,7 @@ Davis, CA 95616, USA - + diff --git a/data_model/device_types/DoorLockController.xml b/data_model/device_types/DoorLockController.xml index 0279f0100a5fc0..30342b95a126bd 100644 --- a/data_model/device_types/DoorLockController.xml +++ b/data_model/device_types/DoorLockController.xml @@ -57,7 +57,6 @@ Davis, CA 95616, USA --> - diff --git a/data_model/device_types/EnergyTariffCalendar.xml b/data_model/device_types/EnergyTariffCalendar.xml index 7b0becfc52e1c9..ee3a6b9347db38 100644 --- a/data_model/device_types/EnergyTariffCalendar.xml +++ b/data_model/device_types/EnergyTariffCalendar.xml @@ -55,9 +55,9 @@ Connectivity Standards Alliance 508 Second Street, Suite 206 Davis, CA 95616, USA --> - + - + diff --git a/data_model/device_types/ExtendedColorLight.xml b/data_model/device_types/ExtendedColorLight.xml index 97cb3eaf66377c..75988addc3f8cd 100644 --- a/data_model/device_types/ExtendedColorLight.xml +++ b/data_model/device_types/ExtendedColorLight.xml @@ -57,7 +57,6 @@ Davis, CA 95616, USA --> - @@ -80,7 +79,7 @@ Davis, CA 95616, USA - + @@ -88,10 +87,10 @@ Davis, CA 95616, USA - + - + @@ -118,19 +117,19 @@ Davis, CA 95616, USA - + - + - + - + diff --git a/data_model/device_types/FlowSensor.xml b/data_model/device_types/FlowSensor.xml index 8c604586481536..bcc27b318aac36 100644 --- a/data_model/device_types/FlowSensor.xml +++ b/data_model/device_types/FlowSensor.xml @@ -57,7 +57,6 @@ Davis, CA 95616, USA --> - diff --git a/data_model/device_types/GenericSwitch.xml b/data_model/device_types/GenericSwitch.xml index e381914be42921..acfa0a95005291 100644 --- a/data_model/device_types/GenericSwitch.xml +++ b/data_model/device_types/GenericSwitch.xml @@ -57,7 +57,6 @@ Davis, CA 95616, USA --> - diff --git a/data_model/device_types/HumiditySensor.xml b/data_model/device_types/HumiditySensor.xml index d59ed7caf43abe..4a1808d7e0c580 100644 --- a/data_model/device_types/HumiditySensor.xml +++ b/data_model/device_types/HumiditySensor.xml @@ -57,7 +57,6 @@ Davis, CA 95616, USA --> - diff --git a/data_model/device_types/LaundryDryer.xml b/data_model/device_types/LaundryDryer.xml index 78f9383800ad8c..d4692c7ad818a5 100644 --- a/data_model/device_types/LaundryDryer.xml +++ b/data_model/device_types/LaundryDryer.xml @@ -68,7 +68,7 @@ Davis, CA 95616, USA - + diff --git a/data_model/device_types/LaundryWasher.xml b/data_model/device_types/LaundryWasher.xml index f0f48212b8d062..03b85f3bd363b4 100644 --- a/data_model/device_types/LaundryWasher.xml +++ b/data_model/device_types/LaundryWasher.xml @@ -68,7 +68,7 @@ Davis, CA 95616, USA - + diff --git a/data_model/device_types/LightSensor.xml b/data_model/device_types/LightSensor.xml index 618901b398b5f8..0eca130f921623 100644 --- a/data_model/device_types/LightSensor.xml +++ b/data_model/device_types/LightSensor.xml @@ -57,7 +57,6 @@ Davis, CA 95616, USA --> - diff --git a/data_model/device_types/ModeSelectDeviceType.xml b/data_model/device_types/ModeSelectDeviceType.xml index 748dc1bae2f0a3..7848ba0adc787f 100644 --- a/data_model/device_types/ModeSelectDeviceType.xml +++ b/data_model/device_types/ModeSelectDeviceType.xml @@ -57,7 +57,6 @@ Davis, CA 95616, USA --> - diff --git a/data_model/device_types/OccupancySensor.xml b/data_model/device_types/OccupancySensor.xml index 1ac4e0ab937830..29213e43beb8f1 100644 --- a/data_model/device_types/OccupancySensor.xml +++ b/data_model/device_types/OccupancySensor.xml @@ -55,13 +55,11 @@ Connectivity Standards Alliance 508 Second Street, Suite 206 Davis, CA 95616, USA --> - + - - @@ -69,9 +67,6 @@ Davis, CA 95616, USA - - - diff --git a/data_model/device_types/OnOffLight.xml b/data_model/device_types/OnOffLight.xml index 59e8739cab0275..fe98ac6b6d7028 100644 --- a/data_model/device_types/OnOffLight.xml +++ b/data_model/device_types/OnOffLight.xml @@ -57,7 +57,6 @@ Davis, CA 95616, USA --> - @@ -79,7 +78,7 @@ Davis, CA 95616, USA - + @@ -87,10 +86,10 @@ Davis, CA 95616, USA - + - + diff --git a/data_model/device_types/OnOffLightSwitch.xml b/data_model/device_types/OnOffLightSwitch.xml index 9b9d72ba4f0964..9896264d5b9e4f 100644 --- a/data_model/device_types/OnOffLightSwitch.xml +++ b/data_model/device_types/OnOffLightSwitch.xml @@ -57,7 +57,6 @@ Davis, CA 95616, USA --> - diff --git a/data_model/device_types/OnOffPlug-inUnit.xml b/data_model/device_types/OnOffPlug-inUnit.xml index 4b4f49725cf9fa..dbcb7f7e739629 100644 --- a/data_model/device_types/OnOffPlug-inUnit.xml +++ b/data_model/device_types/OnOffPlug-inUnit.xml @@ -57,7 +57,6 @@ Davis, CA 95616, USA --> - @@ -79,7 +78,7 @@ Davis, CA 95616, USA - + @@ -87,10 +86,10 @@ Davis, CA 95616, USA - + - + diff --git a/data_model/device_types/OnOffSensor.xml b/data_model/device_types/OnOffSensor.xml index e1bd3c3806c8a4..cdd59585119fa2 100644 --- a/data_model/device_types/OnOffSensor.xml +++ b/data_model/device_types/OnOffSensor.xml @@ -57,8 +57,6 @@ Davis, CA 95616, USA --> - diff --git a/data_model/device_types/OtaProvider.xml b/data_model/device_types/OtaProvider.xml index 28c4e3c70b88e9..375ab4e36aa987 100644 --- a/data_model/device_types/OtaProvider.xml +++ b/data_model/device_types/OtaProvider.xml @@ -57,16 +57,15 @@ Davis, CA 95616, USA --> - - - - - + + + + \ No newline at end of file diff --git a/data_model/device_types/OtaRequestor.xml b/data_model/device_types/OtaRequestor.xml index 7f5a8ca11c58c8..840e322bdccb72 100644 --- a/data_model/device_types/OtaRequestor.xml +++ b/data_model/device_types/OtaRequestor.xml @@ -57,15 +57,14 @@ Davis, CA 95616, USA --> - - + - + diff --git a/data_model/device_types/PressureSensor.xml b/data_model/device_types/PressureSensor.xml index f472daaf4e39ff..f2b7855db91c83 100644 --- a/data_model/device_types/PressureSensor.xml +++ b/data_model/device_types/PressureSensor.xml @@ -57,7 +57,6 @@ Davis, CA 95616, USA --> - diff --git a/data_model/device_types/Pump.xml b/data_model/device_types/Pump.xml index 9ab8700abb10f5..f8c0ce92b1229d 100644 --- a/data_model/device_types/Pump.xml +++ b/data_model/device_types/Pump.xml @@ -57,7 +57,6 @@ Davis, CA 95616, USA --> - diff --git a/data_model/device_types/PumpController.xml b/data_model/device_types/PumpController.xml index ca1486e4ea657e..3b27f35737197b 100644 --- a/data_model/device_types/PumpController.xml +++ b/data_model/device_types/PumpController.xml @@ -57,7 +57,6 @@ Davis, CA 95616, USA --> - diff --git a/data_model/device_types/RoomAirConditioner.xml b/data_model/device_types/RoomAirConditioner.xml index e8c557a21800b9..7f3acd50eb2c91 100644 --- a/data_model/device_types/RoomAirConditioner.xml +++ b/data_model/device_types/RoomAirConditioner.xml @@ -72,7 +72,7 @@ Davis, CA 95616, USA - + diff --git a/data_model/device_types/RootNodeDeviceType.xml b/data_model/device_types/RootNodeDeviceType.xml index 57b204036092c7..c2028f07d91548 100644 --- a/data_model/device_types/RootNodeDeviceType.xml +++ b/data_model/device_types/RootNodeDeviceType.xml @@ -57,7 +57,6 @@ Davis, CA 95616, USA --> - @@ -155,17 +154,11 @@ Davis, CA 95616, USA - - - - - - - - - + + + - + diff --git a/data_model/device_types/Speaker.xml b/data_model/device_types/Speaker.xml index f8bc0ab150036e..d1d9d85beb84c8 100644 --- a/data_model/device_types/Speaker.xml +++ b/data_model/device_types/Speaker.xml @@ -57,7 +57,6 @@ Davis, CA 95616, USA --> - diff --git a/data_model/device_types/TemperatureSensor.xml b/data_model/device_types/TemperatureSensor.xml index 19d3fef781c717..d6ccd5c18db89f 100644 --- a/data_model/device_types/TemperatureSensor.xml +++ b/data_model/device_types/TemperatureSensor.xml @@ -57,7 +57,6 @@ Davis, CA 95616, USA --> - diff --git a/data_model/device_types/Thermostat.xml b/data_model/device_types/Thermostat.xml index 9f5c8e7de5b11c..16c0efe75620a0 100644 --- a/data_model/device_types/Thermostat.xml +++ b/data_model/device_types/Thermostat.xml @@ -57,7 +57,6 @@ Davis, CA 95616, USA --> - diff --git a/data_model/device_types/ThreadBorderRouter.xml b/data_model/device_types/ThreadBorderRouter.xml index 5a069e57e93243..a0aee3bfeb0433 100644 --- a/data_model/device_types/ThreadBorderRouter.xml +++ b/data_model/device_types/ThreadBorderRouter.xml @@ -68,7 +68,7 @@ Davis, CA 95616, USA - + diff --git a/data_model/device_types/VideoRemoteControl.xml b/data_model/device_types/VideoRemoteControl.xml index 33bab95b9207c1..7896a6f6ee6be5 100644 --- a/data_model/device_types/VideoRemoteControl.xml +++ b/data_model/device_types/VideoRemoteControl.xml @@ -57,7 +57,6 @@ Davis, CA 95616, USA --> - diff --git a/data_model/device_types/WaterHeater.xml b/data_model/device_types/WaterHeater.xml index 7b06da2add9de3..eeebfee95ea300 100644 --- a/data_model/device_types/WaterHeater.xml +++ b/data_model/device_types/WaterHeater.xml @@ -71,10 +71,10 @@ Davis, CA 95616, USA - + - + @@ -85,10 +85,10 @@ Davis, CA 95616, USA - + - + diff --git a/data_model/device_types/WindowCovering.xml b/data_model/device_types/WindowCovering.xml index b9a33b47ac4d9b..e647e8aa005959 100644 --- a/data_model/device_types/WindowCovering.xml +++ b/data_model/device_types/WindowCovering.xml @@ -57,7 +57,6 @@ Davis, CA 95616, USA --> - @@ -94,25 +93,29 @@ Davis, CA 95616, USA - - + + - + + + - + - - + + - + - + + + diff --git a/data_model/device_types/WindowCoveringController.xml b/data_model/device_types/WindowCoveringController.xml index 76f0cf1b1e2147..406953630947ea 100644 --- a/data_model/device_types/WindowCoveringController.xml +++ b/data_model/device_types/WindowCoveringController.xml @@ -57,7 +57,6 @@ Davis, CA 95616, USA --> - @@ -90,7 +89,7 @@ Davis, CA 95616, USA - + diff --git a/data_model/spec_sha b/data_model/spec_sha index e9d780b94f334a..cb39a57acee19b 100644 --- a/data_model/spec_sha +++ b/data_model/spec_sha @@ -1 +1 @@ -c1a1e1e6bcf201334eb0b5216a464b39d9827ec4 +5cf986ac3980bb2b658bae7bf13df8aeec021999 From 2f6d9109a0b92dfdda375cf4c3fb616325eb5c55 Mon Sep 17 00:00:00 2001 From: Rob Bultman Date: Mon, 15 Apr 2024 16:28:20 -0400 Subject: [PATCH 070/468] [FAN] Fan add constraint checks (#32861) * Changes per issue * Update tests * Restyled by autopep8 * Fix lint error from CI * Added skip tests if bit not supported * Remove delays * Restyled by isort --------- Co-authored-by: Restyled.io --- src/python_testing/TC_FAN_3_3.py | 73 ++++++++++++++++++++++++++------ src/python_testing/TC_FAN_3_4.py | 62 ++++++++++++++++++++++----- 2 files changed, 110 insertions(+), 25 deletions(-) diff --git a/src/python_testing/TC_FAN_3_3.py b/src/python_testing/TC_FAN_3_3.py index c1f0993466c434..ab74644f0b2f53 100644 --- a/src/python_testing/TC_FAN_3_3.py +++ b/src/python_testing/TC_FAN_3_3.py @@ -16,11 +16,10 @@ # import logging -import time import chip.clusters as Clusters from chip.interaction_model import Status -from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main +from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts logger = logging.getLogger(__name__) @@ -42,6 +41,30 @@ async def write_rock_setting(self, endpoint, rock_setting): result = await self.default_controller.WriteAttribute(self.dut_node_id, [(endpoint, Clusters.FanControl.Attributes.RockSetting(rock_setting))]) asserts.assert_equal(result[0].Status, Status.Success, "RockSetting write failed") + async def write_rock_setting_expect_failure(self, endpoint, rock_setting): + result = await self.default_controller.WriteAttribute(self.dut_node_id, [(endpoint, Clusters.FanControl.Attributes.RockSetting(rock_setting))]) + asserts.assert_equal(result[0].Status, Status.ConstraintError, "Expected ConstraintError but received a different error.") + + def desc_TC_FAN_3_3(self) -> str: + return "[TC-FAN-3.3] Optional rock functionality with DUT as Server" + + def steps_TC_FAN_3_3(self) -> list[TestStep]: + steps = [ + TestStep(1, "Commissioning, already done", is_commissioning=True), + TestStep(2, "Read from the DUT the RockSupport attribute and store"), + TestStep(3, "RockLeftRight is supported, so write 0x01 to RockSetting"), + TestStep(4, "Read from the DUT the RockSetting attribute"), + TestStep(5, "RockLeftRight is not supported, so write 0x01 to RockSetting to check for constraint error"), + TestStep(6, "RockUpDown is supported, so write 0x02 to RockSetting"), + TestStep(7, "Read from the DUT the RockSetting attribute"), + TestStep(8, "RockUpDown is not supported, so write 0x02 to RockSetting to check for constraint error"), + TestStep(9, "RockRound is supported, so write 0x04 to RockSetting"), + TestStep(10, "Read from the DUT the RockSetting attribute"), + TestStep(11, "RockRound is not supported, so write 0x04 to RockSetting to check for constraint error"), + TestStep(12, "Write RockSetting to 0x00"), + ] + return steps + def pics_TC_FAN_3_3(self) -> list[str]: return ["FAN.S"] @@ -49,43 +72,65 @@ def pics_TC_FAN_3_3(self) -> list[str]: async def test_TC_FAN_3_3(self): if not self.check_pics("FAN.S.F02"): logger.info("Test skipped because PICS FAN.S.F02 is not set") + self.skip_all_remaining_steps(1) return endpoint = self.user_params.get("endpoint", 1) - self.print_step(1, "Commissioning, already done") + self.step(1) - self.print_step(2, "Read from the DUT the RockSupport attribute and store") + self.step(2) rock_support = await self.read_rock_support(endpoint=endpoint) if rock_support & Clusters.FanControl.Bitmaps.RockBitmap.kRockLeftRight: - self.print_step(3, "RockLeftRight is supported, so write 0x01 to RockSetting") + self.step(3) await self.write_rock_setting(endpoint=endpoint, rock_setting=Clusters.FanControl.Bitmaps.RockBitmap.kRockLeftRight) - time.sleep(1) - self.print_step(4, "Read from the DUT the RockSetting attribute") + self.step(4) rock_setting = await self.read_rock_setting(endpoint=endpoint) asserts.assert_equal(rock_setting, Clusters.FanControl.Bitmaps.RockBitmap.kRockLeftRight, "RockSetting is not 0x01") + self.skip_step(5) + else: + self.skip_step(3) + self.skip_step(4) + + self.step(5) + self.write_rock_setting_expect_failure( + endpoint=endpoint, rock_setting=Clusters.FanControl.Bitmaps.RockBitmap.kRockLeftRight) + if rock_support & Clusters.FanControl.Bitmaps.RockBitmap.kRockUpDown: - self.print_step(5, "RockUpDown is supported, so write 0x02 to RockSetting") + self.step(6) await self.write_rock_setting(endpoint=endpoint, rock_setting=Clusters.FanControl.Bitmaps.RockBitmap.kRockUpDown) - time.sleep(1) - self.print_step(6, "Read from the DUT the RockSetting attribute") + self.step(7) rock_setting = await self.read_rock_setting(endpoint=endpoint) asserts.assert_equal(rock_setting, Clusters.FanControl.Bitmaps.RockBitmap.kRockUpDown, "RockSetting is not 0x02") + self.skip_step(8) + else: + self.skip_step(6) + self.skip_step(7) + + self.step(8) + await self.write_rock_setting_expect_failure(endpoint=endpoint, rock_setting=Clusters.FanControl.Bitmaps.RockBitmap.kRockUpDown) + if rock_support & Clusters.FanControl.Bitmaps.RockBitmap.kRockRound: - self.print_step(7, "RockRound is supported, so write 0x04 to RockSetting") + self.step(9) await self.write_rock_setting(endpoint=endpoint, rock_setting=Clusters.FanControl.Bitmaps.RockBitmap.kRockRound) - time.sleep(1) - self.print_step(8, "Read from the DUT the RockSetting attribute") + self.step(10) rock_setting = await self.read_rock_setting(endpoint=endpoint) asserts.assert_equal(rock_setting, Clusters.FanControl.Bitmaps.RockBitmap.kRockRound, "RockSetting is not 0x04") + self.skip_step(11) + else: + self.skip_step(9) + self.skip_step(10) + + self.step(11) + await self.write_rock_setting_expect_failure(endpoint=endpoint, rock_setting=Clusters.FanControl.Bitmaps.RockBitmap.kRockRound) - self.print_step(9, "Write RockSetting to 0x00") + self.step(12) await self.write_rock_setting(endpoint=endpoint, rock_setting=0x00) diff --git a/src/python_testing/TC_FAN_3_4.py b/src/python_testing/TC_FAN_3_4.py index 9eb20f1ca035e9..a69a9550040a79 100644 --- a/src/python_testing/TC_FAN_3_4.py +++ b/src/python_testing/TC_FAN_3_4.py @@ -16,13 +16,15 @@ # import logging -import time import chip.clusters as Clusters from chip.interaction_model import Status -from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main +from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts +#import time + + logger = logging.getLogger(__name__) @@ -42,41 +44,79 @@ async def write_wind_setting(self, endpoint, wind_setting): result = await self.default_controller.WriteAttribute(self.dut_node_id, [(endpoint, Clusters.FanControl.Attributes.WindSetting(wind_setting))]) asserts.assert_equal(result[0].Status, Status.Success, "WindSetting write failed") + async def write_wind_setting_expect_failure(self, endpoint, wind_setting): + result = await self.default_controller.WriteAttribute(self.dut_node_id, [(endpoint, Clusters.FanControl.Attributes.WindSetting(wind_setting))]) + asserts.assert_equal(result[0].Status, Status.ConstraintError, "Expected ConstraintError but received a different error.") + + def desc_TC_FAN_3_4(self) -> str: + return "[TC-FAN-3.4] Optional wind functionality with DUT as Server" + + def steps_TC_FAN_3_4(self) -> list[TestStep]: + steps = [ + TestStep(1, "Commissioning, already done", is_commissioning=True), + TestStep(2, "Read from the DUT the WindSupport attribute and store"), + TestStep(3, "SleepWind is supported, so write 0x01 to WindSetting"), + TestStep(4, "Read from the DUT the WindSetting attribute"), + TestStep(5, "SleepWind is not supported, so write 0x01 to WindSetting to check for constraint error"), + TestStep(6, "NaturalWind is supported, so write 0x02 to WindSetting"), + TestStep(7, "Read from the DUT the WindSetting attribute"), + TestStep(8, "NaturalWind is not supported, so write 0x02 to WindSetting to check for constraint error"), + TestStep(9, "Write WindSetting to 0x00"), + ] + return steps + def pics_TC_FAN_3_4(self) -> list[str]: return ["FAN.S"] @async_test_body async def test_TC_FAN_3_4(self): if not self.check_pics("FAN.S.F03"): + self.skip_all_remaining_steps(1) logger.info("Test skipped because PICS FAN.S.F03 is not set") return endpoint = self.user_params.get("endpoint", 1) - self.print_step(1, "Commissioning, already done") + self.step(1) - self.print_step(2, "Read from the DUT the WindSupport attribute and store") + self.step(2) wind_support = await self.read_wind_support(endpoint=endpoint) if wind_support & Clusters.FanControl.Bitmaps.WindBitmap.kSleepWind: - self.print_step(3, "SleepWind is supported, so write 0x01 to WindSetting") + self.step(3) await self.write_wind_setting(endpoint=endpoint, wind_setting=Clusters.FanControl.Bitmaps.WindBitmap.kSleepWind) - time.sleep(1) + # time.sleep(1) - self.print_step(4, "Read from the DUT the WindSetting attribute") + self.step(4) wind_setting = await self.read_wind_setting(endpoint=endpoint) asserts.assert_equal(wind_setting, Clusters.FanControl.Bitmaps.WindBitmap.kSleepWind, "WindSetting is not 0x01") + self.skip_step(5) + else: + self.skip_step(3) + self.skip_step(4) + + self.step(5) + await self.write_wind_setting_expect_failure(endpoint=endpoint, wind_setting=Clusters.FanControl.Bitmaps.WindBitmap.kSleepWind) + if wind_support & Clusters.FanControl.Bitmaps.WindBitmap.kNaturalWind: - self.print_step(5, "NaturalWind is supported, so write 0x02 to WindSetting") + self.step(6) await self.write_wind_setting(endpoint=endpoint, wind_setting=Clusters.FanControl.Bitmaps.WindBitmap.kNaturalWind) - time.sleep(1) + # time.sleep(1) - self.print_step(6, "Read from the DUT the WindSetting attribute") + self.step(7) wind_setting = await self.read_wind_setting(endpoint=endpoint) asserts.assert_equal(wind_setting, Clusters.FanControl.Bitmaps.WindBitmap.kNaturalWind, "WindSetting is not 0x02") - self.print_step(9, "Write WindSetting to 0x00") + self.skip_step(8) + else: + self.skip_step(6) + self.skip_step(7) + + self.step(8) + await self.write_wind_setting_expect_failure(endpoint=endpoint, wind_setting=Clusters.FanControl.Bitmaps.WindBitmap.kNaturalWind) + + self.step(9) await self.write_wind_setting(endpoint=endpoint, wind_setting=0x00) From 5727ff038771dade19955b93df45c701d661e230 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Mon, 15 Apr 2024 17:18:37 -0400 Subject: [PATCH 071/468] Split out `AttributeAccessInterface.h` into separate headers/cpp for each underlying class (#32984) * Switch out AttributeReportBuilder * Restyle * Moved things around * Split out the decoder as well * Fix lists to be working * Restyle * Fix up some headers * Fix includes * Fix copyrights * Fix another include * Restyle --- .../clusters/media-input/MediaInputManager.h | 2 +- .../interaction_model/DecoderCustomLog.cpp | 1 - .../tv-app/android/include/cluster-init.cpp | 1 - .../content-app-observer/ContentAppObserver.h | 2 - .../content-control/ContentController.h | 3 +- .../java/ContentAppAttributeDelegate.cpp | 1 - .../java/ContentAppAttributeDelegate.h | 2 +- .../android/java/ContentLauncherManager.cpp | 2 - .../android/java/ContentLauncherManager.h | 2 +- .../tv-app/android/java/MediaInputManager.h | 2 +- .../content-app-observer/ContentAppObserver.h | 4 - .../content-control/ContentController.h | 3 +- .../content-launcher/ContentLauncherManager.h | 4 +- .../clusters/media-input/MediaInputManager.h | 2 +- .../content-app-observer/ContentAppObserver.h | 2 - src/app/AttributeAccessInterface.h | 363 +----------------- src/app/AttributeReportBuilder.cpp | 57 +++ src/app/AttributeReportBuilder.h | 78 ++++ src/app/AttributeValueDecoder.h | 74 ++++ ...nterface.cpp => AttributeValueEncoder.cpp} | 40 +- src/app/AttributeValueEncoder.h | 286 ++++++++++++++ src/app/BUILD.gn | 6 +- src/app/ReadHandler.h | 2 +- .../application-basic-delegate.h | 2 +- .../application-launcher-delegate.h | 3 +- .../audio-output-delegate.h | 3 +- .../channel-server/channel-delegate.h | 3 +- .../content-control-delegate.h | 2 +- .../content-launch-delegate.h | 3 +- .../dishwasher-alarm-delegate.h | 1 - .../electrical-energy-measurement-server.cpp | 2 +- .../fan-control-server/fan-control-delegate.h | 1 - .../fan-control-server/fan-control-server.cpp | 4 - .../general-diagnostics-server.h | 1 - .../laundry-dryer-controls-delegate.h | 2 +- .../laundry-dryer-controls-server.cpp | 2 +- .../laundry-washer-controls-delegate.h | 3 +- .../laundry-washer-controls-server.cpp | 2 +- .../media-input-server/media-input-delegate.h | 3 +- .../media-playback-delegate.h | 3 +- .../messages-server/messages-delegate.h | 2 +- .../software-diagnostics-server.h | 1 - .../clusters/switch-server/switch-server.cpp | 1 - .../clusters/switch-server/switch-server.h | 1 - .../target-navigator-delegate.h | 3 +- .../thread-network-diagnostics-provider.h | 2 +- .../wake-on-lan-server/wake-on-lan-delegate.h | 2 +- .../window-covering-delegate.h | 1 - src/app/data-model/BUILD.gn | 1 - src/app/data-model/TagBoundEncoder.h | 76 ---- src/app/tests/TestAclAttribute.cpp | 2 - src/app/tests/TestAclEvent.cpp | 2 - src/app/tests/TestAttributeValueDecoder.cpp | 2 +- src/app/tests/TestAttributeValueEncoder.cpp | 2 +- src/app/tests/TestReadInteraction.cpp | 2 +- .../tests/integration/chip_im_responder.cpp | 2 +- src/app/util/attribute-storage.h | 1 - .../util/ember-compatibility-functions.cpp | 1 + src/app/util/ember-compatibility-functions.h | 3 +- src/app/util/mock/Functions.h | 2 +- src/app/util/mock/attribute-storage.cpp | 2 +- src/controller/tests/TestEventCaching.cpp | 1 - .../tests/TestEventNumberCaching.cpp | 4 - src/controller/tests/data_model/TestWrite.cpp | 1 + 64 files changed, 542 insertions(+), 554 deletions(-) create mode 100644 src/app/AttributeReportBuilder.cpp create mode 100644 src/app/AttributeReportBuilder.h create mode 100644 src/app/AttributeValueDecoder.h rename src/app/{AttributeAccessInterface.cpp => AttributeValueEncoder.cpp} (72%) create mode 100644 src/app/AttributeValueEncoder.h delete mode 100644 src/app/data-model/TagBoundEncoder.h diff --git a/examples/chef/common/clusters/media-input/MediaInputManager.h b/examples/chef/common/clusters/media-input/MediaInputManager.h index ebd4a436fdbf24..e5b88c5a7a67d5 100644 --- a/examples/chef/common/clusters/media-input/MediaInputManager.h +++ b/examples/chef/common/clusters/media-input/MediaInputManager.h @@ -18,7 +18,7 @@ #pragma once -#include +#include #include #include diff --git a/examples/common/tracing/decoder/interaction_model/DecoderCustomLog.cpp b/examples/common/tracing/decoder/interaction_model/DecoderCustomLog.cpp index f6b014704296ae..089a32b380a111 100644 --- a/examples/common/tracing/decoder/interaction_model/DecoderCustomLog.cpp +++ b/examples/common/tracing/decoder/interaction_model/DecoderCustomLog.cpp @@ -20,7 +20,6 @@ #include "../logging/Log.h" -#include #include #include #include diff --git a/examples/tv-app/android/include/cluster-init.cpp b/examples/tv-app/android/include/cluster-init.cpp index cde32581ecabb6..e6f0cd8b481f57 100644 --- a/examples/tv-app/android/include/cluster-init.cpp +++ b/examples/tv-app/android/include/cluster-init.cpp @@ -24,7 +24,6 @@ #include #include #include -#include #include using namespace chip; diff --git a/examples/tv-app/android/include/content-app-observer/ContentAppObserver.h b/examples/tv-app/android/include/content-app-observer/ContentAppObserver.h index d866362191b880..eaffdf853a9a50 100644 --- a/examples/tv-app/android/include/content-app-observer/ContentAppObserver.h +++ b/examples/tv-app/android/include/content-app-observer/ContentAppObserver.h @@ -18,9 +18,7 @@ #pragma once -#include #include -#include using ContentAppObserverDelegate = chip::app::Clusters::ContentAppObserver::Delegate; using ContentAppMessageResponse = chip::app::Clusters::ContentAppObserver::Commands::ContentAppMessageResponse::Type; diff --git a/examples/tv-app/android/include/content-control/ContentController.h b/examples/tv-app/android/include/content-control/ContentController.h index 40b0636efa4cf8..b711f7e445e8c1 100644 --- a/examples/tv-app/android/include/content-control/ContentController.h +++ b/examples/tv-app/android/include/content-control/ContentController.h @@ -18,9 +18,8 @@ #pragma once -#include +#include #include -#include using ContentControlDelegate = chip::app::Clusters::ContentControl::Delegate; using ResetPINResponseType = chip::app::Clusters::ContentControl::Commands::ResetPINResponse::Type; diff --git a/examples/tv-app/android/java/ContentAppAttributeDelegate.cpp b/examples/tv-app/android/java/ContentAppAttributeDelegate.cpp index 651ce4562c94ef..767656ff64a4be 100644 --- a/examples/tv-app/android/java/ContentAppAttributeDelegate.cpp +++ b/examples/tv-app/android/java/ContentAppAttributeDelegate.cpp @@ -22,7 +22,6 @@ #include "ContentAppAttributeDelegate.h" #include -#include #include #include #include diff --git a/examples/tv-app/android/java/ContentAppAttributeDelegate.h b/examples/tv-app/android/java/ContentAppAttributeDelegate.h index 8a39b004f4f821..29219109b42d82 100644 --- a/examples/tv-app/android/java/ContentAppAttributeDelegate.h +++ b/examples/tv-app/android/java/ContentAppAttributeDelegate.h @@ -23,7 +23,7 @@ #pragma once #include -#include +#include #include #include #include diff --git a/examples/tv-app/android/java/ContentLauncherManager.cpp b/examples/tv-app/android/java/ContentLauncherManager.cpp index 449f6d136f9e42..9aacc2d6e56b22 100644 --- a/examples/tv-app/android/java/ContentLauncherManager.cpp +++ b/examples/tv-app/android/java/ContentLauncherManager.cpp @@ -27,8 +27,6 @@ #include #include -#include - using namespace std; using namespace chip; using namespace chip::app::DataModel; diff --git a/examples/tv-app/android/java/ContentLauncherManager.h b/examples/tv-app/android/java/ContentLauncherManager.h index 6e858ddebf18a0..c31a1d41b6bdaa 100644 --- a/examples/tv-app/android/java/ContentLauncherManager.h +++ b/examples/tv-app/android/java/ContentLauncherManager.h @@ -18,7 +18,7 @@ #pragma once -#include +#include #include #include #include diff --git a/examples/tv-app/android/java/MediaInputManager.h b/examples/tv-app/android/java/MediaInputManager.h index fdc014ab1b331e..5baaa84f121f7e 100644 --- a/examples/tv-app/android/java/MediaInputManager.h +++ b/examples/tv-app/android/java/MediaInputManager.h @@ -18,7 +18,7 @@ #pragma once -#include +#include #include #include #include diff --git a/examples/tv-app/tv-common/clusters/content-app-observer/ContentAppObserver.h b/examples/tv-app/tv-common/clusters/content-app-observer/ContentAppObserver.h index 0c0f6fb6efbaec..d0db28d6383919 100644 --- a/examples/tv-app/tv-common/clusters/content-app-observer/ContentAppObserver.h +++ b/examples/tv-app/tv-common/clusters/content-app-observer/ContentAppObserver.h @@ -18,9 +18,7 @@ #pragma once -#include #include -#include using ContentAppObserverDelegate = chip::app::Clusters::ContentAppObserver::Delegate; using ContentAppMessageResponse = chip::app::Clusters::ContentAppObserver::Commands::ContentAppMessageResponse::Type; @@ -32,6 +30,4 @@ class ContentAppObserverManager : public ContentAppObserverDelegate void HandleContentAppMessage(chip::app::CommandResponseHelper & helper, const chip::Optional & data, const chip::CharSpan & encodingHint) override; - -protected: }; diff --git a/examples/tv-app/tv-common/clusters/content-control/ContentController.h b/examples/tv-app/tv-common/clusters/content-control/ContentController.h index cc58a5502d082e..63e0ca251f50f0 100644 --- a/examples/tv-app/tv-common/clusters/content-control/ContentController.h +++ b/examples/tv-app/tv-common/clusters/content-control/ContentController.h @@ -18,9 +18,8 @@ #pragma once -#include +#include #include -#include using ContentControlDelegate = chip::app::Clusters::ContentControl::Delegate; using ResetPINResponseType = chip::app::Clusters::ContentControl::Commands::ResetPINResponse::Type; diff --git a/examples/tv-app/tv-common/clusters/content-launcher/ContentLauncherManager.h b/examples/tv-app/tv-common/clusters/content-launcher/ContentLauncherManager.h index eb470068386e3e..bd186accd2f185 100644 --- a/examples/tv-app/tv-common/clusters/content-launcher/ContentLauncherManager.h +++ b/examples/tv-app/tv-common/clusters/content-launcher/ContentLauncherManager.h @@ -1,5 +1,4 @@ /* - * * Copyright (c) 2021 Project CHIP Authors * All rights reserved. * @@ -15,10 +14,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - #pragma once #include + +#include #include #include diff --git a/examples/tv-app/tv-common/clusters/media-input/MediaInputManager.h b/examples/tv-app/tv-common/clusters/media-input/MediaInputManager.h index 1b8a78503b1d27..352ae082a75adb 100644 --- a/examples/tv-app/tv-common/clusters/media-input/MediaInputManager.h +++ b/examples/tv-app/tv-common/clusters/media-input/MediaInputManager.h @@ -18,7 +18,7 @@ #pragma once -#include +#include #include #include diff --git a/examples/tv-casting-app/tv-casting-common/clusters/content-app-observer/ContentAppObserver.h b/examples/tv-casting-app/tv-casting-common/clusters/content-app-observer/ContentAppObserver.h index 0c0f6fb6efbaec..5fba7f48714b75 100644 --- a/examples/tv-casting-app/tv-casting-common/clusters/content-app-observer/ContentAppObserver.h +++ b/examples/tv-casting-app/tv-casting-common/clusters/content-app-observer/ContentAppObserver.h @@ -18,9 +18,7 @@ #pragma once -#include #include -#include using ContentAppObserverDelegate = chip::app::Clusters::ContentAppObserver::Delegate; using ContentAppMessageResponse = chip::app::Clusters::ContentAppObserver::Commands::ContentAppMessageResponse::Type; diff --git a/src/app/AttributeAccessInterface.h b/src/app/AttributeAccessInterface.h index c195dd4f8b66ef..f92b5987684039 100644 --- a/src/app/AttributeAccessInterface.h +++ b/src/app/AttributeAccessInterface.h @@ -18,19 +18,10 @@ #pragma once -#include -#include -#include -#include -#include -#include -#include -#include // So we can encode lists -#include -#include -#include -#include -#include +#include +#include +#include +#include /** * Callback class that clusters can implement in order to interpose custom @@ -45,352 +36,6 @@ namespace chip { namespace app { -/** - * The AttributeReportBuilder is a helper class for filling a single report in AttributeReportIBs. - * - * Possible usage of AttributeReportBuilder might be: - * - * AttributeReportBuilder builder; - * ReturnErrorOnFailure(builder.PrepareAttribute(...)); - * ReturnErrorOnFailure(builder.Encode(...)); - * ReturnErrorOnFailure(builder.FinishAttribute()); - */ -class AttributeReportBuilder -{ -public: - /** - * PrepareAttribute encodes the "header" part of an attribute report including the path and data version. - * Path will be encoded according to section 10.5.4.3.1 in the spec. - * Note: Only append is supported currently (encode a null list index), other operations won't encode a list index in the - * attribute path field. - * TODO: Add support for encoding a single element in the list (path with a valid list index). - */ - CHIP_ERROR PrepareAttribute(AttributeReportIBs::Builder & aAttributeReportIBs, const ConcreteDataAttributePath & aPath, - DataVersion aDataVersion); - - /** - * FinishAttribute encodes the "footer" part of an attribute report (it closes the containers opened in PrepareAttribute) - */ - CHIP_ERROR FinishAttribute(AttributeReportIBs::Builder & aAttributeReportIBs); - - /** - * EncodeValue encodes the value field of the report, it should be called exactly once. - */ - template ::value, bool> = true, typename... Ts> - CHIP_ERROR EncodeValue(AttributeReportIBs::Builder & aAttributeReportIBs, TLV::Tag tag, T && item, Ts &&... aArgs) - { - return DataModel::Encode(*(aAttributeReportIBs.GetAttributeReport().GetAttributeData().GetWriter()), tag, item, - std::forward(aArgs)...); - } - - template ::value, bool> = true, typename... Ts> - CHIP_ERROR EncodeValue(AttributeReportIBs::Builder & aAttributeReportIBs, TLV::Tag tag, FabricIndex accessingFabricIndex, - T && item, Ts &&... aArgs) - { - return DataModel::EncodeForRead(*(aAttributeReportIBs.GetAttributeReport().GetAttributeData().GetWriter()), tag, - accessingFabricIndex, item, std::forward(aArgs)...); - } -}; - -/** - * The AttributeValueEncoder is a helper class for filling report payloads into AttributeReportIBs. - * The attribute value encoder can be initialized with a AttributeEncodeState for saving and recovering its state between encode - * sessions (chunkings). - * - * When Encode returns recoverable errors (e.g. CHIP_ERROR_NO_MEMORY) the state can be used to initialize the AttributeValueEncoder - * for future use on the same attribute path. - */ -class AttributeValueEncoder -{ -public: - class ListEncodeHelper - { - public: - ListEncodeHelper(AttributeValueEncoder & encoder) : mAttributeValueEncoder(encoder) {} - - template ::value, bool> = true> - CHIP_ERROR Encode(T && aArg) const - { - VerifyOrReturnError(aArg.GetFabricIndex() != kUndefinedFabricIndex, CHIP_ERROR_INVALID_FABRIC_INDEX); - - // If we are encoding for a fabric filtered attribute read and the fabric index does not match that present in the - // request, skip encoding this list item. - VerifyOrReturnError(!mAttributeValueEncoder.mIsFabricFiltered || - aArg.GetFabricIndex() == mAttributeValueEncoder.mAccessingFabricIndex, - CHIP_NO_ERROR); - return mAttributeValueEncoder.EncodeListItem(mAttributeValueEncoder.mAccessingFabricIndex, std::forward(aArg)); - } - - template ::value, bool> = true> - CHIP_ERROR Encode(T && aArg) const - { - return mAttributeValueEncoder.EncodeListItem(std::forward(aArg)); - } - - private: - AttributeValueEncoder & mAttributeValueEncoder; - }; - - class AttributeEncodeState - { - public: - AttributeEncodeState() : mAllowPartialData(false), mCurrentEncodingListIndex(kInvalidListIndex) {} - bool AllowPartialData() const { return mAllowPartialData; } - - private: - friend class AttributeValueEncoder; - /** - * When an attempt to encode an attribute returns an error, the buffer may contain tailing dirty data - * (since the put was aborted). The report engine normally rolls back the buffer to right before encoding - * of the attribute started on errors. - * - * When chunking a list, EncodeListItem will atomically encode list items, ensuring that the - * state of the buffer is valid to send (i.e. contains no trailing garbage), and return an error - * if the list doesn't entirely fit. In this situation, mAllowPartialData is set to communicate to the - * report engine that it should not roll back the list items. - * - * TODO: There might be a better name for this variable. - */ - bool mAllowPartialData = false; - /** - * If set to kInvalidListIndex, indicates that we have not encoded any data for the list yet and - * need to start by encoding an empty list before we start encoding any list items. - * - * When set to a valid ListIndex value, indicates the index of the next list item that needs to be - * encoded (i.e. the count of items encoded so far). - */ - ListIndex mCurrentEncodingListIndex = kInvalidListIndex; - }; - - AttributeValueEncoder(AttributeReportIBs::Builder & aAttributeReportIBsBuilder, FabricIndex aAccessingFabricIndex, - const ConcreteAttributePath & aPath, DataVersion aDataVersion, bool aIsFabricFiltered = false, - const AttributeEncodeState & aState = AttributeEncodeState()) : - mAttributeReportIBsBuilder(aAttributeReportIBsBuilder), - mAccessingFabricIndex(aAccessingFabricIndex), mPath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId), - mDataVersion(aDataVersion), mIsFabricFiltered(aIsFabricFiltered), mEncodeState(aState) - {} - - /** - * Encode a single value. This value will not be chunked; it will either be - * entirely encoded or fail to be encoded. Consumers are allowed to make - * either one call to Encode or one call to EncodeList to handle a read. - */ - template - CHIP_ERROR Encode(Ts &&... aArgs) - { - mTriedEncode = true; - return EncodeAttributeReportIB(std::forward(aArgs)...); - } - - /** - * Encode an explicit null value. - */ - CHIP_ERROR EncodeNull() - { - // Doesn't matter what type Nullable we use here. - return Encode(DataModel::Nullable()); - } - - /** - * Encode an explicit empty list. - */ - CHIP_ERROR EncodeEmptyList() - { - // Doesn't matter what type List we use here. - return Encode(DataModel::List()); - } - - /** - * aCallback is expected to take a const auto & argument and Encode() on it as many times as needed to encode all the list - * elements one by one. If any of those Encode() calls returns failure, aCallback must stop encoding and return failure. When - * all items are encoded aCallback is expected to return success. - * - * aCallback may not be called. Consumers must not assume it will be called. - * - * When EncodeList returns an error, the consumers must abort the encoding, and return the exact error to the caller. - * - * TODO: Can we hold a error state in the AttributeValueEncoder itself so functions in ember-compatibility-functions don't have - * to rely on the above assumption? - * - * Consumers are allowed to make either one call to EncodeList or one call to Encode to handle a read. - * - */ - template - CHIP_ERROR EncodeList(ListGenerator aCallback) - { - mTriedEncode = true; - // Spec 10.5.4.3.1, 10.5.4.6 (Replace a list w/ Multiple IBs) - // EmptyList acts as the beginning of the whole array type attribute report. - // An empty list is encoded iff both mCurrentEncodingListIndex and mEncodeState.mCurrentEncodingListIndex are invalid - // values. After encoding the empty list, mEncodeState.mCurrentEncodingListIndex and mCurrentEncodingListIndex are set to 0. - ReturnErrorOnFailure(EnsureListStarted()); - CHIP_ERROR err = aCallback(ListEncodeHelper(*this)); - - // Even if encoding list items failed, make sure we EnsureListEnded(). - // Since we encode list items atomically, in the case when we just - // didn't fit the next item we want to make sure our list is properly - // ended before the reporting engine starts chunking. - EnsureListEnded(); - if (err == CHIP_NO_ERROR) - { - // The Encode procedure finished without any error, clear the state. - mEncodeState = AttributeEncodeState(); - } - return err; - } - - bool TriedEncode() const { return mTriedEncode; } - - /** - * The accessing fabric index for this read or subscribe interaction. - */ - FabricIndex AccessingFabricIndex() const { return mAccessingFabricIndex; } - - /** - * AttributeValueEncoder is a short lived object, and the state is persisted by mEncodeState and restored by constructor. - */ - const AttributeEncodeState & GetState() const { return mEncodeState; } - -private: - // We made EncodeListItem() private, and ListEncoderHelper will expose it by Encode() - friend class ListEncodeHelper; - - template - CHIP_ERROR EncodeListItem(Ts &&... aArgs) - { - // EncodeListItem must be called after EnsureListStarted(), thus mCurrentEncodingListIndex and - // mEncodeState.mCurrentEncodingListIndex are not invalid values. - if (mCurrentEncodingListIndex < mEncodeState.mCurrentEncodingListIndex) - { - // We have encoded this element in previous chunks, skip it. - mCurrentEncodingListIndex++; - return CHIP_NO_ERROR; - } - - TLV::TLVWriter backup; - mAttributeReportIBsBuilder.Checkpoint(backup); - - CHIP_ERROR err; - if (mEncodingInitialList) - { - // Just encode a single item, with an anonymous tag. - AttributeReportBuilder builder; - err = builder.EncodeValue(mAttributeReportIBsBuilder, TLV::AnonymousTag(), std::forward(aArgs)...); - } - else - { - err = EncodeAttributeReportIB(std::forward(aArgs)...); - } - if (err != CHIP_NO_ERROR) - { - // For list chunking, ReportEngine should not rollback the buffer when CHIP_ERROR_NO_MEMORY or similar error occurred. - // However, the error might be raised in the middle of encoding procedure, then the buffer may contain partial data, - // unclosed containers etc. This line clears all possible partial data and makes EncodeListItem is atomic. - mAttributeReportIBsBuilder.Rollback(backup); - return err; - } - - mCurrentEncodingListIndex++; - mEncodeState.mCurrentEncodingListIndex++; - mEncodedAtLeastOneListItem = true; - return CHIP_NO_ERROR; - } - - /** - * Builds a single AttributeReportIB in AttributeReportIBs. The caller is - * responsible for setting up mPath correctly. - * - * In particular, when we are encoding a single element in the list, mPath - * must indicate a null list index to represent an "append" operation. - * operation. - */ - template - CHIP_ERROR EncodeAttributeReportIB(Ts &&... aArgs) - { - AttributeReportBuilder builder; - ReturnErrorOnFailure(builder.PrepareAttribute(mAttributeReportIBsBuilder, mPath, mDataVersion)); - ReturnErrorOnFailure(builder.EncodeValue(mAttributeReportIBsBuilder, TLV::ContextTag(AttributeDataIB::Tag::kData), - std::forward(aArgs)...)); - - return builder.FinishAttribute(mAttributeReportIBsBuilder); - } - - /** - * EnsureListStarted sets our mCurrentEncodingListIndex to 0, and: - * - * * If we are just starting the list, gets us ready to encode list items. - * - * * If we are continuing a chunked list, guarantees that mPath.mListOp is - * AppendItem after it returns. - */ - CHIP_ERROR EnsureListStarted(); - - /** - * EnsureListEnded writes out the end of the list and our attribute data IB, - * if we were encoding our initial list - */ - void EnsureListEnded(); - - bool mTriedEncode = false; - AttributeReportIBs::Builder & mAttributeReportIBsBuilder; - const FabricIndex mAccessingFabricIndex; - ConcreteDataAttributePath mPath; - DataVersion mDataVersion; - bool mIsFabricFiltered = false; - // mEncodingInitialList is true if we're encoding a list and we have not - // started chunking it yet, so we're encoding a single attribute report IB - // for the whole list, not one per item. - bool mEncodingInitialList = false; - // mEncodedAtLeastOneListItem becomes true once we successfully encode a list item. - bool mEncodedAtLeastOneListItem = false; - AttributeEncodeState mEncodeState; - ListIndex mCurrentEncodingListIndex = kInvalidListIndex; -}; - -class AttributeValueDecoder -{ -public: - AttributeValueDecoder(TLV::TLVReader & aReader, const Access::SubjectDescriptor & aSubjectDescriptor) : - mReader(aReader), mSubjectDescriptor(aSubjectDescriptor) - {} - - template ::value, bool> = true> - CHIP_ERROR Decode(T & aArg) - { - mTriedDecode = true; - return DataModel::Decode(mReader, aArg); - } - - template ::value, bool> = true> - CHIP_ERROR Decode(T & aArg) - { - mTriedDecode = true; - // The WriteRequest comes with no fabric index, this will happen when receiving a write request on a PASE session before - // AddNOC. - VerifyOrReturnError(AccessingFabricIndex() != kUndefinedFabricIndex, CHIP_IM_GLOBAL_STATUS(UnsupportedAccess)); - ReturnErrorOnFailure(DataModel::Decode(mReader, aArg)); - aArg.SetFabricIndex(AccessingFabricIndex()); - return CHIP_NO_ERROR; - } - - bool TriedDecode() const { return mTriedDecode; } - - /** - * The accessing fabric index for this write interaction. - */ - FabricIndex AccessingFabricIndex() const { return mSubjectDescriptor.fabricIndex; } - - /** - * The accessing subject descriptor for this write interaction. - */ - const Access::SubjectDescriptor & GetSubjectDescriptor() const { return mSubjectDescriptor; } - -private: - TLV::TLVReader & mReader; - bool mTriedDecode = false; - const Access::SubjectDescriptor mSubjectDescriptor; -}; - class AttributeAccessInterface { public: diff --git a/src/app/AttributeReportBuilder.cpp b/src/app/AttributeReportBuilder.cpp new file mode 100644 index 00000000000000..20c2d8f6ae4a4c --- /dev/null +++ b/src/app/AttributeReportBuilder.cpp @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2021-2024 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 + +namespace chip { +namespace app { + +CHIP_ERROR AttributeReportBuilder::PrepareAttribute(AttributeReportIBs::Builder & aAttributeReportIBsBuilder, + const ConcreteDataAttributePath & aPath, DataVersion aDataVersion) +{ + AttributeReportIB::Builder & attributeReportIBBuilder = aAttributeReportIBsBuilder.CreateAttributeReport(); + ReturnErrorOnFailure(aAttributeReportIBsBuilder.GetError()); + + AttributeDataIB::Builder & attributeDataIBBuilder = attributeReportIBBuilder.CreateAttributeData(); + ReturnErrorOnFailure(attributeReportIBBuilder.GetError()); + + attributeDataIBBuilder.DataVersion(aDataVersion); + + AttributePathIB::Builder & attributePathIBBuilder = attributeDataIBBuilder.CreatePath(); + ReturnErrorOnFailure(attributeDataIBBuilder.GetError()); + + attributePathIBBuilder.Endpoint(aPath.mEndpointId).Cluster(aPath.mClusterId).Attribute(aPath.mAttributeId); + + if (aPath.mListOp == ConcreteDataAttributePath::ListOperation::AppendItem) + { + // An append to a list (or a data chunk consisting just one list entry that's part of a bigger list) is represented by a + // null list index in the path. + attributePathIBBuilder.ListIndex(DataModel::Nullable()); + } + + ReturnErrorOnFailure(attributePathIBBuilder.EndOfAttributePathIB()); + + return attributeDataIBBuilder.GetError(); +} + +CHIP_ERROR AttributeReportBuilder::FinishAttribute(AttributeReportIBs::Builder & aAttributeReportIBsBuilder) +{ + ReturnErrorOnFailure(aAttributeReportIBsBuilder.GetAttributeReport().GetAttributeData().EndOfAttributeDataIB()); + return aAttributeReportIBsBuilder.GetAttributeReport().EndOfAttributeReportIB(); +} + +} // namespace app +} // namespace chip diff --git a/src/app/AttributeReportBuilder.h b/src/app/AttributeReportBuilder.h new file mode 100644 index 00000000000000..0874c7d739beff --- /dev/null +++ b/src/app/AttributeReportBuilder.h @@ -0,0 +1,78 @@ +/* + * Copyright (c) 2021-2024 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 // So we can encode lists +#include + +#include + +namespace chip { +namespace app { + +/** + * The AttributeReportBuilder is a helper class for filling a single report in AttributeReportIBs. + * + * Possible usage of AttributeReportBuilder might be: + * + * AttributeReportBuilder builder; + * ReturnErrorOnFailure(builder.PrepareAttribute(...)); + * ReturnErrorOnFailure(builder.Encode(...)); + * ReturnErrorOnFailure(builder.FinishAttribute()); + */ +class AttributeReportBuilder +{ +public: + /** + * PrepareAttribute encodes the "header" part of an attribute report including the path and data version. + * Path will be encoded according to section 10.5.4.3.1 in the spec. + * Note: Only append is supported currently (encode a null list index), other operations won't encode a list index in the + * attribute path field. + * TODO: Add support for encoding a single element in the list (path with a valid list index). + */ + CHIP_ERROR PrepareAttribute(AttributeReportIBs::Builder & aAttributeReportIBs, const ConcreteDataAttributePath & aPath, + DataVersion aDataVersion); + + /** + * FinishAttribute encodes the "footer" part of an attribute report (it closes the containers opened in PrepareAttribute) + */ + CHIP_ERROR FinishAttribute(AttributeReportIBs::Builder & aAttributeReportIBs); + + /** + * EncodeValue encodes the value field of the report, it should be called exactly once. + */ + template ::value, bool> = true, typename... Ts> + CHIP_ERROR EncodeValue(AttributeReportIBs::Builder & aAttributeReportIBs, TLV::Tag tag, T && item, Ts &&... aArgs) + { + return DataModel::Encode(*(aAttributeReportIBs.GetAttributeReport().GetAttributeData().GetWriter()), tag, item, + std::forward(aArgs)...); + } + + template ::value, bool> = true, typename... Ts> + CHIP_ERROR EncodeValue(AttributeReportIBs::Builder & aAttributeReportIBs, TLV::Tag tag, FabricIndex accessingFabricIndex, + T && item, Ts &&... aArgs) + { + return DataModel::EncodeForRead(*(aAttributeReportIBs.GetAttributeReport().GetAttributeData().GetWriter()), tag, + accessingFabricIndex, item, std::forward(aArgs)...); + } +}; + +} // namespace app +} // namespace chip diff --git a/src/app/AttributeValueDecoder.h b/src/app/AttributeValueDecoder.h new file mode 100644 index 00000000000000..5f5e2255b2fa3e --- /dev/null +++ b/src/app/AttributeValueDecoder.h @@ -0,0 +1,74 @@ +/* + * Copyright (c) 2021-2024 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#pragma once + +#include +#include +#include +#include + +#include + +namespace chip { +namespace app { + +class AttributeValueDecoder +{ +public: + AttributeValueDecoder(TLV::TLVReader & aReader, const Access::SubjectDescriptor & aSubjectDescriptor) : + mReader(aReader), mSubjectDescriptor(aSubjectDescriptor) + {} + + template ::value, bool> = true> + CHIP_ERROR Decode(T & aArg) + { + mTriedDecode = true; + return DataModel::Decode(mReader, aArg); + } + + template ::value, bool> = true> + CHIP_ERROR Decode(T & aArg) + { + mTriedDecode = true; + // The WriteRequest comes with no fabric index, this will happen when receiving a write request on a PASE session before + // AddNOC. + VerifyOrReturnError(AccessingFabricIndex() != kUndefinedFabricIndex, CHIP_IM_GLOBAL_STATUS(UnsupportedAccess)); + ReturnErrorOnFailure(DataModel::Decode(mReader, aArg)); + aArg.SetFabricIndex(AccessingFabricIndex()); + return CHIP_NO_ERROR; + } + + bool TriedDecode() const { return mTriedDecode; } + + /** + * The accessing fabric index for this write interaction. + */ + FabricIndex AccessingFabricIndex() const { return mSubjectDescriptor.fabricIndex; } + + /** + * The accessing subject descriptor for this write interaction. + */ + const Access::SubjectDescriptor & GetSubjectDescriptor() const { return mSubjectDescriptor; } + +private: + TLV::TLVReader & mReader; + bool mTriedDecode = false; + const Access::SubjectDescriptor mSubjectDescriptor; +}; + +} // namespace app +} // namespace chip diff --git a/src/app/AttributeAccessInterface.cpp b/src/app/AttributeValueEncoder.cpp similarity index 72% rename from src/app/AttributeAccessInterface.cpp rename to src/app/AttributeValueEncoder.cpp index 3152bbf604ffd9..da4edd1fc483e7 100644 --- a/src/app/AttributeAccessInterface.cpp +++ b/src/app/AttributeValueEncoder.cpp @@ -1,6 +1,5 @@ /* - * - * Copyright (c) 2021 Project CHIP Authors + * Copyright (c) 2021-2024 Project CHIP Authors * All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -15,46 +14,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - -#include +#include namespace chip { namespace app { -CHIP_ERROR AttributeReportBuilder::PrepareAttribute(AttributeReportIBs::Builder & aAttributeReportIBsBuilder, - const ConcreteDataAttributePath & aPath, DataVersion aDataVersion) -{ - AttributeReportIB::Builder & attributeReportIBBuilder = aAttributeReportIBsBuilder.CreateAttributeReport(); - ReturnErrorOnFailure(aAttributeReportIBsBuilder.GetError()); - - AttributeDataIB::Builder & attributeDataIBBuilder = attributeReportIBBuilder.CreateAttributeData(); - ReturnErrorOnFailure(attributeReportIBBuilder.GetError()); - - attributeDataIBBuilder.DataVersion(aDataVersion); - - AttributePathIB::Builder & attributePathIBBuilder = attributeDataIBBuilder.CreatePath(); - ReturnErrorOnFailure(attributeDataIBBuilder.GetError()); - - attributePathIBBuilder.Endpoint(aPath.mEndpointId).Cluster(aPath.mClusterId).Attribute(aPath.mAttributeId); - - if (aPath.mListOp == ConcreteDataAttributePath::ListOperation::AppendItem) - { - // An append to a list (or a data chunk consisting just one list entry that's part of a bigger list) is represented by a - // null list index in the path. - attributePathIBBuilder.ListIndex(DataModel::Nullable()); - } - - ReturnErrorOnFailure(attributePathIBBuilder.EndOfAttributePathIB()); - - return attributeDataIBBuilder.GetError(); -} - -CHIP_ERROR AttributeReportBuilder::FinishAttribute(AttributeReportIBs::Builder & aAttributeReportIBsBuilder) -{ - ReturnErrorOnFailure(aAttributeReportIBsBuilder.GetAttributeReport().GetAttributeData().EndOfAttributeDataIB()); - return aAttributeReportIBsBuilder.GetAttributeReport().EndOfAttributeReportIB(); -} - namespace { constexpr uint32_t kEndOfListByteCount = 1; diff --git a/src/app/AttributeValueEncoder.h b/src/app/AttributeValueEncoder.h new file mode 100644 index 00000000000000..d5efe1768c9d06 --- /dev/null +++ b/src/app/AttributeValueEncoder.h @@ -0,0 +1,286 @@ +/* + * Copyright (c) 2021-2024 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 + +namespace chip { +namespace app { + +/** + * The AttributeValueEncoder is a helper class for filling report payloads into AttributeReportIBs. + * The attribute value encoder can be initialized with a AttributeEncodeState for saving and recovering its state between encode + * sessions (chunkings). + * + * When Encode returns recoverable errors (e.g. CHIP_ERROR_NO_MEMORY) the state can be used to initialize the AttributeValueEncoder + * for future use on the same attribute path. + */ +class AttributeValueEncoder +{ +public: + class ListEncodeHelper + { + public: + ListEncodeHelper(AttributeValueEncoder & encoder) : mAttributeValueEncoder(encoder) {} + + template ::value, bool> = true> + CHIP_ERROR Encode(T && aArg) const + { + VerifyOrReturnError(aArg.GetFabricIndex() != kUndefinedFabricIndex, CHIP_ERROR_INVALID_FABRIC_INDEX); + + // If we are encoding for a fabric filtered attribute read and the fabric index does not match that present in the + // request, skip encoding this list item. + VerifyOrReturnError(!mAttributeValueEncoder.mIsFabricFiltered || + aArg.GetFabricIndex() == mAttributeValueEncoder.mAccessingFabricIndex, + CHIP_NO_ERROR); + return mAttributeValueEncoder.EncodeListItem(mAttributeValueEncoder.mAccessingFabricIndex, std::forward(aArg)); + } + + template ::value, bool> = true> + CHIP_ERROR Encode(T && aArg) const + { + return mAttributeValueEncoder.EncodeListItem(std::forward(aArg)); + } + + private: + AttributeValueEncoder & mAttributeValueEncoder; + }; + + class AttributeEncodeState + { + public: + AttributeEncodeState() : mAllowPartialData(false), mCurrentEncodingListIndex(kInvalidListIndex) {} + bool AllowPartialData() const { return mAllowPartialData; } + + private: + friend class AttributeValueEncoder; + /** + * When an attempt to encode an attribute returns an error, the buffer may contain tailing dirty data + * (since the put was aborted). The report engine normally rolls back the buffer to right before encoding + * of the attribute started on errors. + * + * When chunking a list, EncodeListItem will atomically encode list items, ensuring that the + * state of the buffer is valid to send (i.e. contains no trailing garbage), and return an error + * if the list doesn't entirely fit. In this situation, mAllowPartialData is set to communicate to the + * report engine that it should not roll back the list items. + * + * TODO: There might be a better name for this variable. + */ + bool mAllowPartialData = false; + /** + * If set to kInvalidListIndex, indicates that we have not encoded any data for the list yet and + * need to start by encoding an empty list before we start encoding any list items. + * + * When set to a valid ListIndex value, indicates the index of the next list item that needs to be + * encoded (i.e. the count of items encoded so far). + */ + ListIndex mCurrentEncodingListIndex = kInvalidListIndex; + }; + + AttributeValueEncoder(AttributeReportIBs::Builder & aAttributeReportIBsBuilder, FabricIndex aAccessingFabricIndex, + const ConcreteAttributePath & aPath, DataVersion aDataVersion, bool aIsFabricFiltered = false, + const AttributeEncodeState & aState = AttributeEncodeState()) : + mAttributeReportIBsBuilder(aAttributeReportIBsBuilder), + mAccessingFabricIndex(aAccessingFabricIndex), mPath(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId), + mDataVersion(aDataVersion), mIsFabricFiltered(aIsFabricFiltered), mEncodeState(aState) + {} + + /** + * Encode a single value. This value will not be chunked; it will either be + * entirely encoded or fail to be encoded. Consumers are allowed to make + * either one call to Encode or one call to EncodeList to handle a read. + */ + template + CHIP_ERROR Encode(Ts &&... aArgs) + { + mTriedEncode = true; + return EncodeAttributeReportIB(std::forward(aArgs)...); + } + + /** + * Encode an explicit null value. + */ + CHIP_ERROR EncodeNull() + { + // Doesn't matter what type Nullable we use here. + return Encode(DataModel::Nullable()); + } + + /** + * Encode an explicit empty list. + */ + CHIP_ERROR EncodeEmptyList() + { + // Doesn't matter what type List we use here. + return Encode(DataModel::List()); + } + + /** + * aCallback is expected to take a const auto & argument and Encode() on it as many times as needed to encode all the list + * elements one by one. If any of those Encode() calls returns failure, aCallback must stop encoding and return failure. When + * all items are encoded aCallback is expected to return success. + * + * aCallback may not be called. Consumers must not assume it will be called. + * + * When EncodeList returns an error, the consumers must abort the encoding, and return the exact error to the caller. + * + * TODO: Can we hold a error state in the AttributeValueEncoder itself so functions in ember-compatibility-functions don't have + * to rely on the above assumption? + * + * Consumers are allowed to make either one call to EncodeList or one call to Encode to handle a read. + * + */ + template + CHIP_ERROR EncodeList(ListGenerator aCallback) + { + mTriedEncode = true; + // Spec 10.5.4.3.1, 10.5.4.6 (Replace a list w/ Multiple IBs) + // EmptyList acts as the beginning of the whole array type attribute report. + // An empty list is encoded iff both mCurrentEncodingListIndex and mEncodeState.mCurrentEncodingListIndex are invalid + // values. After encoding the empty list, mEncodeState.mCurrentEncodingListIndex and mCurrentEncodingListIndex are set to 0. + ReturnErrorOnFailure(EnsureListStarted()); + CHIP_ERROR err = aCallback(ListEncodeHelper(*this)); + + // Even if encoding list items failed, make sure we EnsureListEnded(). + // Since we encode list items atomically, in the case when we just + // didn't fit the next item we want to make sure our list is properly + // ended before the reporting engine starts chunking. + EnsureListEnded(); + if (err == CHIP_NO_ERROR) + { + // The Encode procedure finished without any error, clear the state. + mEncodeState = AttributeEncodeState(); + } + return err; + } + + bool TriedEncode() const { return mTriedEncode; } + + /** + * The accessing fabric index for this read or subscribe interaction. + */ + FabricIndex AccessingFabricIndex() const { return mAccessingFabricIndex; } + + /** + * AttributeValueEncoder is a short lived object, and the state is persisted by mEncodeState and restored by constructor. + */ + const AttributeEncodeState & GetState() const { return mEncodeState; } + +private: + // We made EncodeListItem() private, and ListEncoderHelper will expose it by Encode() + friend class ListEncodeHelper; + + template + CHIP_ERROR EncodeListItem(Ts &&... aArgs) + { + // EncodeListItem must be called after EnsureListStarted(), thus mCurrentEncodingListIndex and + // mEncodeState.mCurrentEncodingListIndex are not invalid values. + if (mCurrentEncodingListIndex < mEncodeState.mCurrentEncodingListIndex) + { + // We have encoded this element in previous chunks, skip it. + mCurrentEncodingListIndex++; + return CHIP_NO_ERROR; + } + + TLV::TLVWriter backup; + mAttributeReportIBsBuilder.Checkpoint(backup); + + CHIP_ERROR err; + if (mEncodingInitialList) + { + // Just encode a single item, with an anonymous tag. + AttributeReportBuilder builder; + err = builder.EncodeValue(mAttributeReportIBsBuilder, TLV::AnonymousTag(), std::forward(aArgs)...); + } + else + { + err = EncodeAttributeReportIB(std::forward(aArgs)...); + } + if (err != CHIP_NO_ERROR) + { + // For list chunking, ReportEngine should not rollback the buffer when CHIP_ERROR_NO_MEMORY or similar error occurred. + // However, the error might be raised in the middle of encoding procedure, then the buffer may contain partial data, + // unclosed containers etc. This line clears all possible partial data and makes EncodeListItem is atomic. + mAttributeReportIBsBuilder.Rollback(backup); + return err; + } + + mCurrentEncodingListIndex++; + mEncodeState.mCurrentEncodingListIndex++; + mEncodedAtLeastOneListItem = true; + return CHIP_NO_ERROR; + } + + /** + * Builds a single AttributeReportIB in AttributeReportIBs. The caller is + * responsible for setting up mPath correctly. + * + * In particular, when we are encoding a single element in the list, mPath + * must indicate a null list index to represent an "append" operation. + * operation. + */ + template + CHIP_ERROR EncodeAttributeReportIB(Ts &&... aArgs) + { + AttributeReportBuilder builder; + ReturnErrorOnFailure(builder.PrepareAttribute(mAttributeReportIBsBuilder, mPath, mDataVersion)); + ReturnErrorOnFailure(builder.EncodeValue(mAttributeReportIBsBuilder, TLV::ContextTag(AttributeDataIB::Tag::kData), + std::forward(aArgs)...)); + + return builder.FinishAttribute(mAttributeReportIBsBuilder); + } + + /** + * EnsureListStarted sets our mCurrentEncodingListIndex to 0, and: + * + * * If we are just starting the list, gets us ready to encode list items. + * + * * If we are continuing a chunked list, guarantees that mPath.mListOp is + * AppendItem after it returns. + */ + CHIP_ERROR EnsureListStarted(); + + /** + * EnsureListEnded writes out the end of the list and our attribute data IB, + * if we were encoding our initial list + */ + void EnsureListEnded(); + + bool mTriedEncode = false; + AttributeReportIBs::Builder & mAttributeReportIBsBuilder; + const FabricIndex mAccessingFabricIndex; + ConcreteDataAttributePath mPath; + DataVersion mDataVersion; + bool mIsFabricFiltered = false; + // mEncodingInitialList is true if we're encoding a list and we have not + // started chunking it yet, so we're encoding a single attribute report IB + // for the whole list, not one per item. + bool mEncodingInitialList = false; + // mEncodedAtLeastOneListItem becomes true once we successfully encode a list item. + bool mEncodedAtLeastOneListItem = false; + AttributeEncodeState mEncodeState; + ListIndex mCurrentEncodingListIndex = kInvalidListIndex; +}; + +} // namespace app +} // namespace chip diff --git a/src/app/BUILD.gn b/src/app/BUILD.gn index f368f068445d39..042d3ba92281d4 100644 --- a/src/app/BUILD.gn +++ b/src/app/BUILD.gn @@ -277,11 +277,15 @@ source_set("events") { static_library("attribute-access") { sources = [ - "AttributeAccessInterface.cpp", "AttributeAccessInterface.h", "AttributeAccessInterfaceCache.h", "AttributeAccessInterfaceRegistry.cpp", "AttributeAccessInterfaceRegistry.h", + "AttributeReportBuilder.cpp", + "AttributeReportBuilder.h", + "AttributeValueDecoder.h", + "AttributeValueEncoder.cpp", + "AttributeValueEncoder.h", ] deps = [ diff --git a/src/app/ReadHandler.h b/src/app/ReadHandler.h index bf7d229e51f346..f5355372ac5301 100644 --- a/src/app/ReadHandler.h +++ b/src/app/ReadHandler.h @@ -25,9 +25,9 @@ #pragma once #include -#include #include #include +#include #include #include #include diff --git a/src/app/clusters/application-basic-server/application-basic-delegate.h b/src/app/clusters/application-basic-server/application-basic-delegate.h index e128963bc4a410..6d9b796ca29c39 100644 --- a/src/app/clusters/application-basic-server/application-basic-delegate.h +++ b/src/app/clusters/application-basic-server/application-basic-delegate.h @@ -20,7 +20,7 @@ #include -#include +#include #include #include diff --git a/src/app/clusters/application-launcher-server/application-launcher-delegate.h b/src/app/clusters/application-launcher-server/application-launcher-delegate.h index 0d4276d1e1b35e..bcdac7cca7dd3b 100644 --- a/src/app/clusters/application-launcher-server/application-launcher-delegate.h +++ b/src/app/clusters/application-launcher-server/application-launcher-delegate.h @@ -20,9 +20,8 @@ #include -#include +#include #include -#include namespace chip { namespace app { diff --git a/src/app/clusters/audio-output-server/audio-output-delegate.h b/src/app/clusters/audio-output-server/audio-output-delegate.h index 1477121e957c9f..5da11c044fcf84 100644 --- a/src/app/clusters/audio-output-server/audio-output-delegate.h +++ b/src/app/clusters/audio-output-server/audio-output-delegate.h @@ -20,8 +20,7 @@ #include -#include -#include +#include namespace chip { namespace app { diff --git a/src/app/clusters/channel-server/channel-delegate.h b/src/app/clusters/channel-server/channel-delegate.h index 24c42ebc2df053..24ef8705a214ec 100644 --- a/src/app/clusters/channel-server/channel-delegate.h +++ b/src/app/clusters/channel-server/channel-delegate.h @@ -19,9 +19,8 @@ #pragma once #include -#include +#include #include -#include namespace chip { namespace app { diff --git a/src/app/clusters/content-control-server/content-control-delegate.h b/src/app/clusters/content-control-server/content-control-delegate.h index e03f39f44113b7..ee5b484cf479eb 100644 --- a/src/app/clusters/content-control-server/content-control-delegate.h +++ b/src/app/clusters/content-control-server/content-control-delegate.h @@ -19,7 +19,7 @@ #pragma once #include -#include +#include #include namespace chip { diff --git a/src/app/clusters/content-launch-server/content-launch-delegate.h b/src/app/clusters/content-launch-server/content-launch-delegate.h index e2a66dd559c581..7c4a9653bd9fed 100644 --- a/src/app/clusters/content-launch-server/content-launch-delegate.h +++ b/src/app/clusters/content-launch-server/content-launch-delegate.h @@ -20,9 +20,8 @@ #include -#include +#include #include -#include namespace chip { namespace app { diff --git a/src/app/clusters/dishwasher-alarm-server/dishwasher-alarm-delegate.h b/src/app/clusters/dishwasher-alarm-server/dishwasher-alarm-delegate.h index 0de17f679eac4d..82c7af17bccc85 100644 --- a/src/app/clusters/dishwasher-alarm-server/dishwasher-alarm-delegate.h +++ b/src/app/clusters/dishwasher-alarm-server/dishwasher-alarm-delegate.h @@ -19,7 +19,6 @@ #pragma once #include -#include #include namespace chip { diff --git a/src/app/clusters/electrical-energy-measurement-server/electrical-energy-measurement-server.cpp b/src/app/clusters/electrical-energy-measurement-server/electrical-energy-measurement-server.cpp index 4f527882c7284d..f5c8c281615435 100644 --- a/src/app/clusters/electrical-energy-measurement-server/electrical-energy-measurement-server.cpp +++ b/src/app/clusters/electrical-energy-measurement-server/electrical-energy-measurement-server.cpp @@ -19,8 +19,8 @@ #include -#include #include +#include #include #include #include diff --git a/src/app/clusters/fan-control-server/fan-control-delegate.h b/src/app/clusters/fan-control-server/fan-control-delegate.h index 4879a9836f1eb2..e5cf3cddce17ce 100644 --- a/src/app/clusters/fan-control-server/fan-control-delegate.h +++ b/src/app/clusters/fan-control-server/fan-control-delegate.h @@ -19,7 +19,6 @@ #pragma once #include -#include #include namespace chip { diff --git a/src/app/clusters/fan-control-server/fan-control-server.cpp b/src/app/clusters/fan-control-server/fan-control-server.cpp index d8e80b8f86f429..46f4c6d7c0bb70 100644 --- a/src/app/clusters/fan-control-server/fan-control-server.cpp +++ b/src/app/clusters/fan-control-server/fan-control-server.cpp @@ -20,14 +20,10 @@ * @brief Implementation for the Fan Control Server Cluster ***************************************************************************/ -#include -#include - #include #include #include #include -#include #include #include #include diff --git a/src/app/clusters/general-diagnostics-server/general-diagnostics-server.h b/src/app/clusters/general-diagnostics-server/general-diagnostics-server.h index dfb5993874fad8..8505a6ee8a1459 100644 --- a/src/app/clusters/general-diagnostics-server/general-diagnostics-server.h +++ b/src/app/clusters/general-diagnostics-server/general-diagnostics-server.h @@ -19,7 +19,6 @@ #pragma once #include -#include #include #include diff --git a/src/app/clusters/laundry-dryer-controls-server/laundry-dryer-controls-delegate.h b/src/app/clusters/laundry-dryer-controls-server/laundry-dryer-controls-delegate.h index 253ad62ca549fe..36f32f3f97bde7 100644 --- a/src/app/clusters/laundry-dryer-controls-server/laundry-dryer-controls-delegate.h +++ b/src/app/clusters/laundry-dryer-controls-server/laundry-dryer-controls-delegate.h @@ -17,8 +17,8 @@ */ #pragma once + #include -#include namespace chip { namespace app { diff --git a/src/app/clusters/laundry-dryer-controls-server/laundry-dryer-controls-server.cpp b/src/app/clusters/laundry-dryer-controls-server/laundry-dryer-controls-server.cpp index 9870c858eca766..d8270a17bc46f6 100644 --- a/src/app/clusters/laundry-dryer-controls-server/laundry-dryer-controls-server.cpp +++ b/src/app/clusters/laundry-dryer-controls-server/laundry-dryer-controls-server.cpp @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-delegate.h b/src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-delegate.h index c90923c775e5f3..e0bcf387aba4f9 100644 --- a/src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-delegate.h +++ b/src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-delegate.h @@ -15,10 +15,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - #pragma once + #include -#include namespace chip { namespace app { diff --git a/src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-server.cpp b/src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-server.cpp index 6f0f84fae808bc..2fa6ee838c14b2 100644 --- a/src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-server.cpp +++ b/src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-server.cpp @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/app/clusters/media-input-server/media-input-delegate.h b/src/app/clusters/media-input-server/media-input-delegate.h index f010b5a0c2b597..ecad2b172fed49 100644 --- a/src/app/clusters/media-input-server/media-input-delegate.h +++ b/src/app/clusters/media-input-server/media-input-delegate.h @@ -19,8 +19,7 @@ #pragma once #include -#include -#include +#include namespace chip { namespace app { diff --git a/src/app/clusters/media-playback-server/media-playback-delegate.h b/src/app/clusters/media-playback-server/media-playback-delegate.h index b54948924e26dd..175096fa34503b 100644 --- a/src/app/clusters/media-playback-server/media-playback-delegate.h +++ b/src/app/clusters/media-playback-server/media-playback-delegate.h @@ -20,9 +20,8 @@ #include -#include +#include #include -#include namespace chip { namespace app { diff --git a/src/app/clusters/messages-server/messages-delegate.h b/src/app/clusters/messages-server/messages-delegate.h index 7d33627ab30ae7..9e763ede854842 100644 --- a/src/app/clusters/messages-server/messages-delegate.h +++ b/src/app/clusters/messages-server/messages-delegate.h @@ -20,7 +20,7 @@ #include -#include +#include #include namespace chip { diff --git a/src/app/clusters/software-diagnostics-server/software-diagnostics-server.h b/src/app/clusters/software-diagnostics-server/software-diagnostics-server.h index e7ca342c6993a1..01908ce12ef90b 100644 --- a/src/app/clusters/software-diagnostics-server/software-diagnostics-server.h +++ b/src/app/clusters/software-diagnostics-server/software-diagnostics-server.h @@ -19,7 +19,6 @@ #pragma once #include -#include #include #include diff --git a/src/app/clusters/switch-server/switch-server.cpp b/src/app/clusters/switch-server/switch-server.cpp index 7a9dd1c0957101..ca29bce051a5b8 100644 --- a/src/app/clusters/switch-server/switch-server.cpp +++ b/src/app/clusters/switch-server/switch-server.cpp @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include diff --git a/src/app/clusters/switch-server/switch-server.h b/src/app/clusters/switch-server/switch-server.h index 5eb12056bddd69..ba6fd1cad0cf47 100644 --- a/src/app/clusters/switch-server/switch-server.h +++ b/src/app/clusters/switch-server/switch-server.h @@ -19,7 +19,6 @@ #pragma once #include -#include #include namespace chip { diff --git a/src/app/clusters/target-navigator-server/target-navigator-delegate.h b/src/app/clusters/target-navigator-server/target-navigator-delegate.h index dd0d80cce91cc9..6db1c03d4d36fa 100644 --- a/src/app/clusters/target-navigator-server/target-navigator-delegate.h +++ b/src/app/clusters/target-navigator-server/target-navigator-delegate.h @@ -20,9 +20,8 @@ #include -#include +#include #include -#include namespace chip { namespace app { diff --git a/src/app/clusters/thread-network-diagnostics-server/thread-network-diagnostics-provider.h b/src/app/clusters/thread-network-diagnostics-server/thread-network-diagnostics-provider.h index 8b1a2a5640ce38..ab0548faa36961 100644 --- a/src/app/clusters/thread-network-diagnostics-server/thread-network-diagnostics-provider.h +++ b/src/app/clusters/thread-network-diagnostics-server/thread-network-diagnostics-provider.h @@ -19,7 +19,7 @@ #include #include -#include +#include #include namespace chip { diff --git a/src/app/clusters/wake-on-lan-server/wake-on-lan-delegate.h b/src/app/clusters/wake-on-lan-server/wake-on-lan-delegate.h index 1f4bed9177733a..cc1069fe745263 100644 --- a/src/app/clusters/wake-on-lan-server/wake-on-lan-delegate.h +++ b/src/app/clusters/wake-on-lan-server/wake-on-lan-delegate.h @@ -19,7 +19,7 @@ #pragma once #include -#include +#include namespace chip { namespace app { diff --git a/src/app/clusters/window-covering-server/window-covering-delegate.h b/src/app/clusters/window-covering-server/window-covering-delegate.h index 4b8b4e88401206..a91d74e8beb50d 100644 --- a/src/app/clusters/window-covering-server/window-covering-delegate.h +++ b/src/app/clusters/window-covering-server/window-covering-delegate.h @@ -19,7 +19,6 @@ #pragma once #include -#include #include namespace chip { diff --git a/src/app/data-model/BUILD.gn b/src/app/data-model/BUILD.gn index 3dee98119f6da6..6f38c056282e68 100644 --- a/src/app/data-model/BUILD.gn +++ b/src/app/data-model/BUILD.gn @@ -27,7 +27,6 @@ source_set("data-model") { "Nullable.h", "PreEncodedValue.cpp", "PreEncodedValue.h", - "TagBoundEncoder.h", "WrappedStructEncoder.h", ] diff --git a/src/app/data-model/TagBoundEncoder.h b/src/app/data-model/TagBoundEncoder.h deleted file mode 100644 index 464b8de6646002..00000000000000 --- a/src/app/data-model/TagBoundEncoder.h +++ /dev/null @@ -1,76 +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 // So we can encode lists -#include -#include - -/** - * Class that encapsulates a TLVWriter and tag that can be provided to a - * consumer so that the consumer can just call Encode and have the tagging - * handled for them. - */ -namespace chip { -namespace app { - -class TagBoundEncoder -{ -public: - // Initialization with a null TLVWriter is allowed, but attempts to Encode() - // will fail. - TagBoundEncoder(TLV::TLVWriter * aWriter, TLV::Tag aTag) : mWriter(aWriter), mTag(aTag) {} - - template - CHIP_ERROR Encode(Ts &&... aArgs) const - { - VerifyOrReturnError(mWriter != nullptr, CHIP_ERROR_INCORRECT_STATE); - return DataModel::Encode(*mWriter, mTag, std::forward(aArgs)...); - } - - /** - * aCallback is expected to take a const TagBoundEncoder& argument and - * Encode() on it as many times as needed to encode all the list elements - * one by one. If any of those Encode() calls returns failure, aCallback - * must stop encoding and return failure. When all items are encoded - * aCallback is expected to return success. - * - * aCallback may not be called. Consumers must not assume it will be - * called. - */ - template - CHIP_ERROR EncodeList(ListGenerator aCallback) - { - VerifyOrReturnError(mWriter != nullptr, CHIP_ERROR_INCORRECT_STATE); - TLV::TLVType outerType; - ReturnErrorOnFailure(mWriter->StartContainer(mTag, TLV::kTLVType_Array, outerType)); - ReturnErrorOnFailure(aCallback(TagBoundEncoder(mWriter, TLV::AnonymousTag()))); - return mWriter->EndContainer(outerType); - } - -protected: - TLV::TLVWriter * const mWriter; - -private: - const TLV::Tag mTag; -}; - -} // namespace app -} // namespace chip diff --git a/src/app/tests/TestAclAttribute.cpp b/src/app/tests/TestAclAttribute.cpp index 16766caf02bb8e..da11c40a28dedf 100644 --- a/src/app/tests/TestAclAttribute.cpp +++ b/src/app/tests/TestAclAttribute.cpp @@ -16,9 +16,7 @@ * limitations under the License. */ -#include "lib/support/CHIPMem.h" #include -#include #include #include #include diff --git a/src/app/tests/TestAclEvent.cpp b/src/app/tests/TestAclEvent.cpp index 6dea419dd29942..fda4a69217ccd6 100644 --- a/src/app/tests/TestAclEvent.cpp +++ b/src/app/tests/TestAclEvent.cpp @@ -16,9 +16,7 @@ * limitations under the License. */ -#include "lib/support/CHIPMem.h" #include -#include #include #include #include diff --git a/src/app/tests/TestAttributeValueDecoder.cpp b/src/app/tests/TestAttributeValueDecoder.cpp index 0f01d506752ba6..c25738588e6afa 100644 --- a/src/app/tests/TestAttributeValueDecoder.cpp +++ b/src/app/tests/TestAttributeValueDecoder.cpp @@ -23,7 +23,7 @@ */ #include -#include +#include #include #include #include diff --git a/src/app/tests/TestAttributeValueEncoder.cpp b/src/app/tests/TestAttributeValueEncoder.cpp index bd4a59ebec5463..25ea87736c84e8 100644 --- a/src/app/tests/TestAttributeValueEncoder.cpp +++ b/src/app/tests/TestAttributeValueEncoder.cpp @@ -23,7 +23,7 @@ */ #include -#include +#include #include #include #include diff --git a/src/app/tests/TestReadInteraction.cpp b/src/app/tests/TestReadInteraction.cpp index 13ae20862a4c35..eacd9a1d6f7762 100644 --- a/src/app/tests/TestReadInteraction.cpp +++ b/src/app/tests/TestReadInteraction.cpp @@ -24,7 +24,7 @@ #include "lib/support/CHIPMem.h" #include -#include +#include #include #include #include diff --git a/src/app/tests/integration/chip_im_responder.cpp b/src/app/tests/integration/chip_im_responder.cpp index 17d47a06ea803d..0250cd0fbc7e69 100644 --- a/src/app/tests/integration/chip_im_responder.cpp +++ b/src/app/tests/integration/chip_im_responder.cpp @@ -25,7 +25,7 @@ */ #include "MockEvents.h" -#include +#include #include #include #include diff --git a/src/app/util/attribute-storage.h b/src/app/util/attribute-storage.h index b25f106d4fcecd..005f109181360d 100644 --- a/src/app/util/attribute-storage.h +++ b/src/app/util/attribute-storage.h @@ -17,7 +17,6 @@ #pragma once -#include #include #include #include diff --git a/src/app/util/ember-compatibility-functions.cpp b/src/app/util/ember-compatibility-functions.cpp index 16db0badc38030..3c98863aa50fb1 100644 --- a/src/app/util/ember-compatibility-functions.cpp +++ b/src/app/util/ember-compatibility-functions.cpp @@ -17,6 +17,7 @@ #include #include +#include #include #include #include diff --git a/src/app/util/ember-compatibility-functions.h b/src/app/util/ember-compatibility-functions.h index 1a81e543967482..72d4379bce69f0 100644 --- a/src/app/util/ember-compatibility-functions.h +++ b/src/app/util/ember-compatibility-functions.h @@ -16,8 +16,7 @@ #pragma once #include -#include -#include +#include #include #include #include diff --git a/src/app/util/mock/Functions.h b/src/app/util/mock/Functions.h index 16fe45d9045b9e..2304d54c589787 100644 --- a/src/app/util/mock/Functions.h +++ b/src/app/util/mock/Functions.h @@ -23,7 +23,7 @@ #pragma once -#include +#include #include #include #include diff --git a/src/app/util/mock/attribute-storage.cpp b/src/app/util/mock/attribute-storage.cpp index cc1e19230dc33e..7326886851ff37 100644 --- a/src/app/util/mock/attribute-storage.cpp +++ b/src/app/util/mock/attribute-storage.cpp @@ -39,7 +39,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/controller/tests/TestEventCaching.cpp b/src/controller/tests/TestEventCaching.cpp index f9c744f9092ad2..dab191cd69ae65 100644 --- a/src/controller/tests/TestEventCaching.cpp +++ b/src/controller/tests/TestEventCaching.cpp @@ -23,7 +23,6 @@ #include "protocols/interaction_model/Constants.h" #include #include -#include #include #include #include diff --git a/src/controller/tests/TestEventNumberCaching.cpp b/src/controller/tests/TestEventNumberCaching.cpp index ee94d2800f591f..a0d93290253117 100644 --- a/src/controller/tests/TestEventNumberCaching.cpp +++ b/src/controller/tests/TestEventNumberCaching.cpp @@ -16,14 +16,10 @@ * limitations under the License. */ -#include "app-common/zap-generated/ids/Attributes.h" #include "app-common/zap-generated/ids/Clusters.h" #include "app/ClusterStateCache.h" -#include "app/ConcreteAttributePath.h" -#include "protocols/interaction_model/Constants.h" #include #include -#include #include #include #include diff --git a/src/controller/tests/data_model/TestWrite.cpp b/src/controller/tests/data_model/TestWrite.cpp index e904ae91ed9d1b..077c9770852447 100644 --- a/src/controller/tests/data_model/TestWrite.cpp +++ b/src/controller/tests/data_model/TestWrite.cpp @@ -18,6 +18,7 @@ #include "app-common/zap-generated/ids/Clusters.h" #include +#include #include #include #include From bdf3e6e183cba3d13bc5103bf014b47841a14de1 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Mon, 15 Apr 2024 17:18:53 -0400 Subject: [PATCH 072/468] Use RAII for group session iteration (#32970) * Use RAII for iterator management * Restyle * Fix typo * Fix naming a bit now that I made this a template * Make it clear that class member is initialized --- src/transport/SessionManager.cpp | 35 ++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) diff --git a/src/transport/SessionManager.cpp b/src/transport/SessionManager.cpp index b821820a120492..7f7691ef00dbb7 100644 --- a/src/transport/SessionManager.cpp +++ b/src/transport/SessionManager.cpp @@ -58,6 +58,31 @@ using Transport::SecureSession; namespace { Global gGroupPeerTable; +/// RAII class for iterators that guarantees that Release() will be called +/// on the underlying type +template +class AutoRelease +{ +public: + AutoRelease(Releasable * iter) : mIter(iter) {} + ~AutoRelease() { Release(); } + + Releasable * operator->() { return mIter; } + const Releasable * operator->() const { return mIter; } + + bool IsNull() const { return mIter == nullptr; } + + void Release() + { + VerifyOrReturn(mIter != nullptr); + mIter->Release(); + mIter = nullptr; + } + +private: + Releasable * mIter = nullptr; +}; + // Helper function that strips off the interface ID from a peer address that is // not an IPv6 link-local address. For any other address type we should rely on // the device's routing table to route messages sent. Forcing messages down a @@ -892,8 +917,11 @@ void SessionManager::SecureGroupMessageDispatch(const PacketHeader & partialPack // Trial decryption with GroupDataProvider Credentials::GroupDataProvider::GroupSession groupContext; - auto iter = groups->IterateGroupSessions(partialPacketHeader.GetSessionId()); - if (iter == nullptr) + + AutoRelease iter( + groups->IterateGroupSessions(partialPacketHeader.GetSessionId())); + + if (iter.IsNull()) { ChipLogError(Inet, "Failed to retrieve Groups iterator. Discarding everything"); return; @@ -940,7 +968,7 @@ void SessionManager::SecureGroupMessageDispatch(const PacketHeader & partialPack } #endif // CHIP_CONFIG_PRIVACY_ACCEPT_NONSPEC_SVE2 } - iter->Release(); + iter.Release(); if (!decrypted) { @@ -978,7 +1006,6 @@ void SessionManager::SecureGroupMessageDispatch(const PacketHeader & partialPack gGroupPeerTable->FindOrAddPeer(groupContext.fabric_index, packetHeaderCopy.GetSourceNodeId().Value(), packetHeaderCopy.IsSecureSessionControlMsg(), counter)) { - if (Credentials::GroupDataProvider::SecurityPolicy::kTrustFirst == groupContext.security_policy) { err = counter->VerifyOrTrustFirstGroup(packetHeaderCopy.GetMessageCounter()); From cb0751334e7ae5a7ad716c4f9bbc479e704d5369 Mon Sep 17 00:00:00 2001 From: adabreuti <76965454+adabreuti@users.noreply.github.com> Date: Mon, 15 Apr 2024 16:36:59 -0500 Subject: [PATCH 073/468] Add initial framework to build TI Matter applications against prebuilt OT Libs (#32857) * Add initial framework to build matter applications against prebuild Openthread library * Fix Comment * Restyled by whitespace * Restyled by clang-format * Restyled by gn * Restyled by autopep8 * Restyled by isort * Reference checked in libraries in lieu of wget/unzip * Update library reference --------- Co-authored-by: Restyled.io --- docs/guides/ti/ti_openthread_library_usage.md | 100 ++++++++++++++++++ docs/guides/ti/ti_platform_overview.md | 27 +++++ .../all-clusters-app/cc13x4_26x4/BUILD.gn | 25 +---- .../all-clusters-app/cc13x4_26x4/args.gni | 7 +- .../main/include/OpenThreadConfig.h | 29 ----- examples/lighting-app/cc13x4_26x4/BUILD.gn | 21 +--- examples/lighting-app/cc13x4_26x4/args.gni | 9 +- examples/lock-app/cc13x4_26x4/BUILD.gn | 17 +-- examples/lock-app/cc13x4_26x4/args.gni | 5 +- .../project_include/OpenThreadConfig.h | 86 ++++----------- examples/pump-app/cc13x4_26x4/BUILD.gn | 21 +--- examples/pump-app/cc13x4_26x4/args.gni | 6 +- .../main/include/OpenThreadConfig.h | 29 ----- .../pump-controller-app/cc13x4_26x4/BUILD.gn | 21 +--- .../pump-controller-app/cc13x4_26x4/args.gni | 6 +- .../main/include/OpenThreadConfig.h | 29 ----- examples/shell/cc13x4_26x4/BUILD.gn | 21 +--- examples/shell/cc13x4_26x4/args.gni | 4 +- .../cc13x4_26x4/include/OpenThreadConfig.h | 28 ----- src/platform/cc13xx_26xx/cc13x4_26x4/BUILD.gn | 14 +-- src/platform/cc13xx_26xx/cc13x4_26x4/args.gni | 5 +- .../cc13x4_26x4/crypto/sha256_alt.c | 11 ++ ...openthread-core-cc13x4_26x4-config-check.h | 33 ------ .../openthread-core-cc13x4_26x4-config.h | 73 ------------- .../openthread/platforms/cc13x4_26x4/BUILD.gn | 74 ------------- .../platforms/{cc13x2_26x2 => ti}/BUILD.gn | 38 +++++-- .../ti_simplelink_sdk/ti_simplelink_sdk.gni | 13 +-- 27 files changed, 228 insertions(+), 524 deletions(-) create mode 100644 docs/guides/ti/ti_openthread_library_usage.md delete mode 100644 examples/all-clusters-app/cc13x4_26x4/main/include/OpenThreadConfig.h delete mode 100644 examples/pump-app/cc13x4_26x4/main/include/OpenThreadConfig.h delete mode 100644 examples/pump-controller-app/cc13x4_26x4/main/include/OpenThreadConfig.h delete mode 100644 examples/shell/cc13x4_26x4/include/OpenThreadConfig.h delete mode 100644 src/platform/cc13xx_26xx/cc13x4_26x4/openthread-core-cc13x4_26x4-config-check.h delete mode 100644 src/platform/cc13xx_26xx/cc13x4_26x4/openthread-core-cc13x4_26x4-config.h delete mode 100644 third_party/openthread/platforms/cc13x4_26x4/BUILD.gn rename third_party/openthread/platforms/{cc13x2_26x2 => ti}/BUILD.gn (79%) diff --git a/docs/guides/ti/ti_openthread_library_usage.md b/docs/guides/ti/ti_openthread_library_usage.md new file mode 100644 index 00000000000000..2b209fca44e744 --- /dev/null +++ b/docs/guides/ti/ti_openthread_library_usage.md @@ -0,0 +1,100 @@ +# Configuring Openthread libraries on TI CC13x4 Platforms + +## Overview + +TI Matter example applications provide configuration option for how Thread code +is included in the build. Thread code can be included in as (1) full source or +(2) as optimized for matter thread certified library. The library builds have +been optimized for matter to disable features such as Thread Joiner capability +in order to save on Flash/RAM usage. + +Build arguments have been added to enable Matter applications to link against +certified Openthread FTD/MTD libraries or custom user libraries. + +## Platform Code Changes + +To configure a TI example to utilize either an Openthread source or library +build, open up the `args.gni` file of the example: + +To configure the device as an FTD or MTD, set following parameter to either true +or false respectively. + +``` +chip_openthread_ftd = true +``` + +- **Openthread Library From Source**: + + 1. `ot_ti_lib_dir` Is set to an empty string + + ``` + ot_ti_lib_dir="" + ``` + + 2. `chip_openthread_target` Is set to an empty string + + ``` + chip_openthread_target = "" + ``` + + 3. `openthread_external_platform` Points to the Openthread build dependency + ``` + openthread_external_platform="${chip_root}/third_party/openthread/platforms/ti:libopenthread-ti" + ``` + +- **TI Certified Openthread Library**: + + 1. `ot_ti_lib_dir` Is set to an empty string + + ``` + ot_ti_lib_dir="" + ``` + + 2. `chip_openthread_target` Points to the TI certified library dependency + + ``` + chip_openthread_target = "${chip_root}/third_party/openthread/platforms/ti:ot-ti-cert" + ``` + + 3. `openthread_external_platform` Points to the Openthread build dependency + ``` + `openthread_external_platform="${chip_root}/third_party/openthread/platforms/ti:libopenthread-ti"` + ``` + +- **Custom Openthread Library**: + + 1. `ot_ti_lib_dir` Points to a library directory containing a custom + `libopenthread-ftd/mtd` variant + + ``` + ot_ti_lib_dir="${chip_root}/CUSTOM_LIB_DIR_PATH/" + ``` + + 2. `chip_openthread_target` Is set to an empty string + + ``` + chip_openthread_target = "" + ``` + + 3. `openthread_external_platform` Points to the Openthread build dependency + + ``` + openthread_external_platform="${chip_root}/third_party/openthread/platforms/ti:libopenthread-ti" + ``` + +The TI Openthread certified library for the MTD/FTD configurations is based on +the following header file: + +- `third_party/openthread/ot-ti/src/openthread-core-cc13xx_cc26xx-config-matter.h` + +In order to update the Openthread configuration when building from source or a +custom library, users may adjust features via the following configuration header +file: + +- `${chip_root}/examples/platform/cc13x4_26x4/project_include/OpenThreadConfig.h` + +Please refer to TI's standalone Openthread Application build process for +instructions on acquiring FTD/MTD libraries as they are automatically built when +generating the standalone applications. + +- `third_party/openthread/ot-ti/README.md` diff --git a/docs/guides/ti/ti_platform_overview.md b/docs/guides/ti/ti_platform_overview.md index a26ade4d224b0a..bae464ac107224 100644 --- a/docs/guides/ti/ti_platform_overview.md +++ b/docs/guides/ti/ti_platform_overview.md @@ -126,6 +126,33 @@ CC2674P10 or the CC2674R10, please refer to the guide linked below.


+## Factory Data Programming Tool + +For instructions on how to program custom factory data on TI devices, please +refer to the guide linked below. + +- [TI Factory Data User Guide](./ti_factory_data_user_guide.md) + +
+ +## Intermittently Connected Devices + +For instructions on how to use Matters' ICD feature on TI devices, please refer +to the guide linked below. + +- [Enabling ICD On TI Devices](./enabling_icd_on_ti_devices.md) + +
+ +## Matter Openthread Library Configuration + +For instructions on how to configure the Openthread build configuration for a +Matter application, please refer to the guide linked below. + +- [Openthread Library Configuration](./ti_openthread_library_usage.md) + +
+ ### TI Support For technical support, please consider creating a post on TI's [E2E forum][e2e]. diff --git a/examples/all-clusters-app/cc13x4_26x4/BUILD.gn b/examples/all-clusters-app/cc13x4_26x4/BUILD.gn index a20b07b6441f1d..4a60c7992b197e 100644 --- a/examples/all-clusters-app/cc13x4_26x4/BUILD.gn +++ b/examples/all-clusters-app/cc13x4_26x4/BUILD.gn @@ -45,22 +45,6 @@ ti_sysconfig("sysconfig") { "ti_ble_config.h", "ti_dmm_application_policy.c", "ti_dmm_application_policy.h", - - # CCFG generation disabled for OTA-able application - #"ti_devices_config.c", - #"ti_devices_config.h", - - # disabled until upstream generation is aligned - #"tiop_config.h", - #"tiop_config.c", - - # not traditional source files - #"ti_utils_build_linker.cmd.genlibs", - #"syscfg_c.rov.xs", - #"ti_utils_runtime_model.gv", - #"ti_utils_runtime_Makefile", - #"ti_ble_app_config.opt", - #"ti_build_config.opt", ] public_configs = [ ":sdk_cc13x4_26x4_dmm_config" ] @@ -107,16 +91,9 @@ ti_simplelink_executable("all-clusters-app") { "${chip_root}/examples/all-clusters-app/all-clusters-common", "${chip_root}/examples/platform/cc13x4_26x4:cc13x4_26x4-attestation-credentials", "${chip_root}/src/lib", + "${chip_root}/third_party/openthread:openthread", ] - - if (chip_openthread_ftd) { - deps += [ "${chip_root}/third_party/openthread/repo:libopenthread-ftd" ] - } else { - deps += [ "${chip_root}/third_party/openthread/repo:libopenthread-mtd" ] - } - defines = [] - if (custom_factory_data) { defines += [ "CC13XX_26XX_FACTORY_DATA" ] } diff --git a/examples/all-clusters-app/cc13x4_26x4/args.gni b/examples/all-clusters-app/cc13x4_26x4/args.gni index f6d58510052473..bebfb47fa12665 100644 --- a/examples/all-clusters-app/cc13x4_26x4/args.gni +++ b/examples/all-clusters-app/cc13x4_26x4/args.gni @@ -30,13 +30,14 @@ lwip_debug = false chip_enable_ota_requestor = true -openthread_external_platform = "${chip_root}/third_party/openthread/platforms/cc13x4_26x4:libopenthread-cc13x4_cc26x4" +openthread_external_platform = + "${chip_root}/third_party/openthread/platforms/ti:libopenthread-ti" +chip_openthread_target = "" + chip_openthread_ftd = true # Disable CHIP Logging #chip_progress_logging = false - -# Disable verbose logs for all-clusters app to save Flash #chip_detail_logging = false #chip_automation_logging = false diff --git a/examples/all-clusters-app/cc13x4_26x4/main/include/OpenThreadConfig.h b/examples/all-clusters-app/cc13x4_26x4/main/include/OpenThreadConfig.h deleted file mode 100644 index 7d227258b1eaae..00000000000000 --- a/examples/all-clusters-app/cc13x4_26x4/main/include/OpenThreadConfig.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * - * Copyright (c) 2020 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 - * Overrides to default OpenThread configuration. - * - */ - -#pragma once - -// Use the TI-supplied default platform configuration for remainder -#include "openthread-core-cc13x4_26x4-config.h" diff --git a/examples/lighting-app/cc13x4_26x4/BUILD.gn b/examples/lighting-app/cc13x4_26x4/BUILD.gn index 6434af621259d4..55d78f140fb2d4 100644 --- a/examples/lighting-app/cc13x4_26x4/BUILD.gn +++ b/examples/lighting-app/cc13x4_26x4/BUILD.gn @@ -49,18 +49,6 @@ ti_sysconfig("sysconfig") { # CCFG generation disabled for OTA-able application #"ti_devices_config.c", #"ti_devices_config.h", - - # disabled until upstream generation is aligned - #"tiop_config.h", - #"tiop_config.c", - - # not traditional source files - #"ti_utils_build_linker.cmd.genlibs", - #"syscfg_c.rov.xs", - #"ti_utils_runtime_model.gv", - #"ti_utils_runtime_Makefile", - #"ti_ble_app_config.opt", - #"ti_build_config.opt", ] public_configs = [ ":sdk_cc13x4_26x4_dmm_config" ] @@ -89,16 +77,9 @@ ti_simplelink_executable("lighting_app") { "${chip_root}/examples/lighting-app/lighting-common", "${chip_root}/examples/platform/cc13x4_26x4:cc13x4_26x4-attestation-credentials", "${chip_root}/src/lib", + "${chip_root}/third_party/openthread:openthread", ] - - if (chip_openthread_ftd) { - deps += [ "${chip_root}/third_party/openthread/repo:libopenthread-ftd" ] - } else { - deps += [ "${chip_root}/third_party/openthread/repo:libopenthread-mtd" ] - } - defines = [] - if (custom_factory_data) { defines += [ "CC13XX_26XX_FACTORY_DATA" ] } diff --git a/examples/lighting-app/cc13x4_26x4/args.gni b/examples/lighting-app/cc13x4_26x4/args.gni index 640bf6ee57003e..823c0385aeb643 100644 --- a/examples/lighting-app/cc13x4_26x4/args.gni +++ b/examples/lighting-app/cc13x4_26x4/args.gni @@ -30,8 +30,13 @@ lwip_debug = false chip_enable_ota_requestor = true -chip_openthread_ftd = false -openthread_external_platform = "${chip_root}/third_party/openthread/platforms/cc13x4_26x4:libopenthread-cc13x4_cc26x4" +chip_openthread_ftd = true + +ot_ti_lib_dir = "" +openthread_external_platform = + "${chip_root}/third_party/openthread/platforms/ti:libopenthread-ti" + +chip_openthread_target = "" # Disable CHIP Logging chip_progress_logging = true diff --git a/examples/lock-app/cc13x4_26x4/BUILD.gn b/examples/lock-app/cc13x4_26x4/BUILD.gn index ab32881a6f15eb..12baedb9ead35e 100644 --- a/examples/lock-app/cc13x4_26x4/BUILD.gn +++ b/examples/lock-app/cc13x4_26x4/BUILD.gn @@ -49,14 +49,6 @@ ti_sysconfig("sysconfig") { # CCFG generation disabled for OTA-able application #"ti_devices_config.c", #"ti_devices_config.h", - - # not traditional source files - #"ti_utils_build_linker.cmd.genlibs", - #"syscfg_c.rov.xs", - #"ti_utils_runtime_model.gv", - #"ti_utils_runtime_Makefile", - #"ti_ble_app_config.opt", - #"ti_build_config.opt", ] public_configs = [ ":sdk_cc13x4_26x4_dmm_config" ] @@ -93,16 +85,9 @@ ti_simplelink_executable("lock_app") { "${chip_root}/examples/lock-app/lock-common", "${chip_root}/examples/platform/cc13x4_26x4:cc13x4_26x4-attestation-credentials", "${chip_root}/src/lib", + "${chip_root}/third_party/openthread:openthread", ] - - if (chip_openthread_ftd) { - deps += [ "${chip_root}/third_party/openthread/repo:libopenthread-ftd" ] - } else { - deps += [ "${chip_root}/third_party/openthread/repo:libopenthread-mtd" ] - } - defines = [] - if (custom_factory_data) { defines += [ "CC13XX_26XX_FACTORY_DATA" ] } diff --git a/examples/lock-app/cc13x4_26x4/args.gni b/examples/lock-app/cc13x4_26x4/args.gni index 1e92a24dab0c3f..ca53f6e3bbc603 100644 --- a/examples/lock-app/cc13x4_26x4/args.gni +++ b/examples/lock-app/cc13x4_26x4/args.gni @@ -31,7 +31,10 @@ lwip_debug = false chip_enable_ota_requestor = true chip_openthread_ftd = true -openthread_external_platform = "${chip_root}/third_party/openthread/platforms/cc13x4_26x4:libopenthread-cc13x4_cc26x4" +ot_ti_lib_dir = "" +openthread_external_platform = + "${chip_root}/third_party/openthread/platforms/ti:libopenthread-ti" +chip_openthread_target = "" # Disable CHIP Logging chip_progress_logging = true diff --git a/examples/platform/cc13x4_26x4/project_include/OpenThreadConfig.h b/examples/platform/cc13x4_26x4/project_include/OpenThreadConfig.h index 65a1dbd30aa457..795d77b646769c 100644 --- a/examples/platform/cc13x4_26x4/project_include/OpenThreadConfig.h +++ b/examples/platform/cc13x4_26x4/project_include/OpenThreadConfig.h @@ -1,7 +1,5 @@ /* - * * Copyright (c) 2020 Project CHIP Authors - * Copyright (c) 2019 Google LLC. * All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -25,75 +23,31 @@ #pragma once -#ifdef DeviceFamily_CC13X4_CC26X4 - -/* Number of message buffers reduced to fit into CC26x2x3 RAM */ -#define OPENTHREAD_CONFIG_NUM_MESSAGE_BUFFERS 22 - -#endif // DeviceFamily_CC13X4_CC26X4 - -#define OPENTHREAD_CONFIG_LOG_OUTPUT OPENTHREAD_CONFIG_LOG_OUTPUT_APP - -// When operating in a less than ideal RF environment, having a more forgiving configuration -// of OpenThread makes thread a great deal more reliable. -#define OPENTHREAD_CONFIG_TMF_ADDRESS_QUERY_MAX_RETRY_DELAY 120 // default is 28800 -#define OPENTHREAD_CONFIG_MAC_DEFAULT_MAX_FRAME_RETRIES_DIRECT 15 // default is 3 -#define OPENTHREAD_CONFIG_MAC_DEFAULT_MAX_FRAME_RETRIES_INDIRECT 1 // default is 0 -#define OPENTHREAD_CONFIG_MAC_MAX_TX_ATTEMPTS_INDIRECT_POLLS 16 // default is 4 - -// Enable periodic parent search to speed up finding a better parent. -#define OPENTHREAD_CONFIG_PARENT_SEARCH_ENABLE 1 // default is 0 -#define OPENTHREAD_CONFIG_PARENT_SEARCH_RSS_THRESHOLD -45 // default is -65 -#define OPENTHREAD_CONFIG_MLE_INFORM_PREVIOUS_PARENT_ON_REATTACH 1 // default is 0 - -// Use smaller maximum interval to speed up reattaching. -#define OPENTHREAD_CONFIG_MLE_ATTACH_BACKOFF_MAXIMUM_INTERVAL (60 * 10 * 1000) // default 1200000 ms - -#define OPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE 1 -// #define OPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE 0 -#define UART_AS_SERIAL_TRANSPORT 1 -#define OPENTHREAD_CONFIG_PLATFORM_USEC_TIMER_ENABLE 1 - -#define OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE 1 -#define OPENTHREAD_CONFIG_ECDSA_ENABLE 1 -#define OPENTHREAD_CONFIG_SRP_CLIENT_ENABLE 1 -#define OPENTHREAD_CONFIG_DNS_CLIENT_ENABLE 1 -#define OPENTHREAD_CONFIG_DNS_CLIENT_SERVICE_DISCOVERY_ENABLE 1 - -#define OPENTHREAD_CONFIG_COAP_SECURE_API_ENABLE 0 -#define OPENTHREAD_CONFIG_BORDER_AGENT_ENABLE 0 -#define OPENTHREAD_CONFIG_COMMISSIONER_ENABLE 0 -#define OPENTHREAD_CONFIG_JOINER_ENABLE 0 - -#define OPENTHREAD_CONFIG_ENABLE_BUILTIN_MBEDTLS 0 -// TCP disabled until OpenThread has a GN/Ninja build for the tcplp library -#define OPENTHREAD_CONFIG_TCP_ENABLE 0 - -#define OPENTHREAD_CONFIG_THREAD_VERSION OT_THREAD_VERSION_1_3 - -// #define OPENTHREAD_CONFIG_BORDER_ROUTER_ENABLE 1 -// #define OPENTHREAD_CONFIG_COAP_API_ENABLE 1 -#define OPENTHREAD_CONFIG_BORDER_ROUTER_ENABLE 0 -#define OPENTHREAD_CONFIG_COAP_API_ENABLE 0 -#define OPENTHREAD_CONFIG_DHCP6_CLIENT_ENABLE 0 #define OPENTHREAD_CONFIG_DHCP6_SERVER_ENABLE 0 +#define OPENTHREAD_CONFIG_BORDER_ROUTER_ENABLE 0 #define OPENTHREAD_CONFIG_DIAG_ENABLE 0 #define OPENTHREAD_CONFIG_DNSSD_SERVER_ENABLE 0 -#define OPENTHREAD_CONFIG_DUA_ENABLE 1 -#define OPENTHREAD_CONFIG_LINK_RAW_ENABLE 1 +#define OPENTHREAD_CONFIG_DNS_CLIENT_ENABLE 1 #define OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE 1 #define OPENTHREAD_CONFIG_MAC_CSL_TRANSMITTER_ENABLE 1 #define OPENTHREAD_CONFIG_MAC_FILTER_ENABLE 0 -#define OPENTHREAD_CONFIG_MAC_SOFTWARE_ACK_TIMEOUT_ENABLE 1 -#define OPENTHREAD_CONFIG_MAC_SOFTWARE_CSMA_BACKOFF_ENABLE 1 -#define OPENTHREAD_CONFIG_MAC_SOFTWARE_RETRANSMIT_ENABLE 1 -#define OPENTHREAD_CONFIG_MLE_LINK_METRICS_INITIATOR_ENABLE 1 -#define OPENTHREAD_CONFIG_MLE_LINK_METRICS_SUBJECT_ENABLE 1 -#define OPENTHREAD_CONFIG_MLR_ENABLE 1 -#define OPENTHREAD_CONFIG_NETDATA_PUBLISHER_ENABLE 1 -#define OPENTHREAD_CONFIG_SRP_CLIENT_AUTO_START_DEFAULT_MODE 1 -#define OPENTHREAD_CONFIG_SRP_SERVER_ENABLE 0 -#define OPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE 1 +#define OPENTHREAD_CONFIG_MLE_IP_ADDRS_PER_CHILD 6 + +// TCP disabled until OpenThread has a GN/Ninja build for the tcplp library +#define OPENTHREAD_CONFIG_TCP_ENABLE 0 +#define OPENTHREAD_CONFIG_ENABLE_BUILTIN_MBEDTLS 0 +#define OPENTHREAD_CONFIG_COAP_SECURE_API_ENABLE 0 +#define OPENTHREAD_CONFIG_BORDER_AGENT_ENABLE 0 +#define OPENTHREAD_CONFIG_COMMISSIONER_ENABLE 0 +#define OPENTHREAD_CONFIG_JOINER_ENABLE 0 +#define UART_AS_SERIAL_TRANSPORT 1 +#ifdef OPENTHREAD_CONFIG_MAC_SOFTWARE_ACK_TIMEOUT_ENABLE +#undef OPENTHREAD_CONFIG_MAC_SOFTWARE_ACK_TIMEOUT_ENABLE +#define OPENTHREAD_CONFIG_MAC_SOFTWARE_ACK_TIMEOUT_ENABLE 0 +#endif +#define OPENTHREAD_CONFIG_LOG_OUTPUT OPENTHREAD_CONFIG_LOG_OUTPUT_APP // Use the TI-supplied default platform configuration for remainder -#include "openthread-core-cc13xx_cc26xx-config-matter.h" +#ifdef OPENTHREAD_PROJECT_CORE_CONFIG_FILE +#include OPENTHREAD_PROJECT_CORE_CONFIG_FILE +#endif diff --git a/examples/pump-app/cc13x4_26x4/BUILD.gn b/examples/pump-app/cc13x4_26x4/BUILD.gn index d20d2d8a392c64..8770c4e8f34a59 100644 --- a/examples/pump-app/cc13x4_26x4/BUILD.gn +++ b/examples/pump-app/cc13x4_26x4/BUILD.gn @@ -48,18 +48,6 @@ ti_sysconfig("sysconfig") { # CCFG generation disabled for OTA-able application #"ti_devices_config.c", #"ti_devices_config.h", - - # disabled until upstream generation is aligned - #"tiop_config.h", - #"tiop_config.c", - - # not traditional source files - #"ti_utils_build_linker.cmd.genlibs", - #"syscfg_c.rov.xs", - #"ti_utils_runtime_model.gv", - #"ti_utils_runtime_Makefile", - #"ti_ble_app_config.opt", - #"ti_build_config.opt", ] public_configs = [ ":sdk_cc13x4_26x4_dmm_config" ] @@ -89,16 +77,9 @@ ti_simplelink_executable("pump_app") { "${chip_root}/examples/platform/cc13x4_26x4:cc13x4_26x4-attestation-credentials", "${chip_root}/examples/pump-app/pump-common", "${chip_root}/src/lib", + "${chip_root}/third_party/openthread:openthread", ] - - if (chip_openthread_ftd) { - deps += [ "${chip_root}/third_party/openthread/repo:libopenthread-ftd" ] - } else { - deps += [ "${chip_root}/third_party/openthread/repo:libopenthread-mtd" ] - } - defines = [] - if (custom_factory_data) { defines += [ "CC13XX_26XX_FACTORY_DATA" ] } diff --git a/examples/pump-app/cc13x4_26x4/args.gni b/examples/pump-app/cc13x4_26x4/args.gni index 94b3913ed26045..a1018dafc1f370 100644 --- a/examples/pump-app/cc13x4_26x4/args.gni +++ b/examples/pump-app/cc13x4_26x4/args.gni @@ -30,7 +30,11 @@ lwip_debug = false chip_enable_ota_requestor = true -openthread_external_platform = "${chip_root}/third_party/openthread/platforms/cc13x4_26x4:libopenthread-cc13x4_cc26x4" +ot_ti_lib_dir = "" +openthread_external_platform = + "${chip_root}/third_party/openthread/platforms/ti:libopenthread-ti" +chip_openthread_target = "" + chip_openthread_ftd = true # Disable CHIP Logging diff --git a/examples/pump-app/cc13x4_26x4/main/include/OpenThreadConfig.h b/examples/pump-app/cc13x4_26x4/main/include/OpenThreadConfig.h deleted file mode 100644 index 7d227258b1eaae..00000000000000 --- a/examples/pump-app/cc13x4_26x4/main/include/OpenThreadConfig.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * - * Copyright (c) 2020 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 - * Overrides to default OpenThread configuration. - * - */ - -#pragma once - -// Use the TI-supplied default platform configuration for remainder -#include "openthread-core-cc13x4_26x4-config.h" diff --git a/examples/pump-controller-app/cc13x4_26x4/BUILD.gn b/examples/pump-controller-app/cc13x4_26x4/BUILD.gn index 61aa833752ed47..2d823d8bb129bc 100644 --- a/examples/pump-controller-app/cc13x4_26x4/BUILD.gn +++ b/examples/pump-controller-app/cc13x4_26x4/BUILD.gn @@ -49,18 +49,6 @@ ti_sysconfig("sysconfig") { # CCFG generation disabled for OTA-able application #"ti_devices_config.c", #"ti_devices_config.h", - - # disabled until upstream generation is aligned - #"tiop_config.h", - #"tiop_config.c", - - # not traditional source files - #"ti_utils_build_linker.cmd.genlibs", - #"syscfg_c.rov.xs", - #"ti_utils_runtime_model.gv", - #"ti_utils_runtime_Makefile", - #"ti_ble_app_config.opt", - #"ti_build_config.opt", ] public_configs = [ ":sdk_cc13x4_26x4_dmm_config" ] @@ -88,16 +76,9 @@ ti_simplelink_executable("pump_controller_app") { "${chip_root}/examples/platform/cc13x4_26x4:cc13x4_26x4-attestation-credentials", "${chip_root}/examples/pump-controller-app/pump-controller-common", "${chip_root}/src/lib", + "${chip_root}/third_party/openthread:openthread", ] - - if (chip_openthread_ftd) { - deps += [ "${chip_root}/third_party/openthread/repo:libopenthread-ftd" ] - } else { - deps += [ "${chip_root}/third_party/openthread/repo:libopenthread-mtd" ] - } - defines = [] - if (custom_factory_data) { defines += [ "CC13XX_26XX_FACTORY_DATA" ] } diff --git a/examples/pump-controller-app/cc13x4_26x4/args.gni b/examples/pump-controller-app/cc13x4_26x4/args.gni index 0aecbe27208f5e..dbbc3cd09f6b7e 100644 --- a/examples/pump-controller-app/cc13x4_26x4/args.gni +++ b/examples/pump-controller-app/cc13x4_26x4/args.gni @@ -30,7 +30,11 @@ lwip_debug = false chip_enable_ota_requestor = true -openthread_external_platform = "${chip_root}/third_party/openthread/platforms/cc13x4_26x4:libopenthread-cc13x4_cc26x4" +ot_ti_lib_dir = "" +openthread_external_platform = + "${chip_root}/third_party/openthread/platforms/ti:libopenthread-ti" +chip_openthread_target = "" + chip_openthread_ftd = true # Disable CHIP Logging diff --git a/examples/pump-controller-app/cc13x4_26x4/main/include/OpenThreadConfig.h b/examples/pump-controller-app/cc13x4_26x4/main/include/OpenThreadConfig.h deleted file mode 100644 index 7d227258b1eaae..00000000000000 --- a/examples/pump-controller-app/cc13x4_26x4/main/include/OpenThreadConfig.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * - * Copyright (c) 2020 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 - * Overrides to default OpenThread configuration. - * - */ - -#pragma once - -// Use the TI-supplied default platform configuration for remainder -#include "openthread-core-cc13x4_26x4-config.h" diff --git a/examples/shell/cc13x4_26x4/BUILD.gn b/examples/shell/cc13x4_26x4/BUILD.gn index 9a2e3f2f3263ce..d16b5b43984ab7 100644 --- a/examples/shell/cc13x4_26x4/BUILD.gn +++ b/examples/shell/cc13x4_26x4/BUILD.gn @@ -45,18 +45,6 @@ ti_sysconfig("sysconfig") { "ti_ble_config.h", "ti_dmm_application_policy.c", "ti_dmm_application_policy.h", - - # disabled until upstream generation is aligned - #"tiop_config.h", - #"tiop_config.c", - - # not traditional source files - #"ti_utils_build_linker.cmd.genlibs", - #"syscfg_c.rov.xs", - #"ti_utils_runtime_model.gv", - #"ti_utils_runtime_Makefile", - #"ti_ble_app_config.opt", - #"ti_build_config.opt", ] public_configs = [ ":sdk_cc13x4_26x4_dmm_config" ] @@ -88,16 +76,9 @@ ti_simplelink_executable("shell_app") { "${chip_root}/src/lib", "${chip_root}/src/lib/shell:shell", "${chip_root}/src/setup_payload", + "${chip_root}/third_party/openthread:openthread", ] - - if (chip_openthread_ftd) { - deps += [ "${chip_root}/third_party/openthread/repo:libopenthread-ftd" ] - } else { - deps += [ "${chip_root}/third_party/openthread/repo:libopenthread-mtd" ] - } - defines = [] - if (custom_factory_data) { defines += [ "CC13XX_26XX_FACTORY_DATA" ] } diff --git a/examples/shell/cc13x4_26x4/args.gni b/examples/shell/cc13x4_26x4/args.gni index 21f752427ef41a..631165271a0399 100644 --- a/examples/shell/cc13x4_26x4/args.gni +++ b/examples/shell/cc13x4_26x4/args.gni @@ -30,7 +30,9 @@ chip_enable_ota_requestor = true # Disable FTD Build for all-clusters app to save Flash chip_openthread_ftd = false -openthread_external_platform = "${chip_root}/third_party/openthread/platforms/cc13x4_26x4:libopenthread-cc13x4_cc26x4" +openthread_external_platform = + "${chip_root}/third_party/openthread/platforms/ti:libopenthread-ti" +chip_openthread_target = "" # Disable CHIP Logging chip_progress_logging = false diff --git a/examples/shell/cc13x4_26x4/include/OpenThreadConfig.h b/examples/shell/cc13x4_26x4/include/OpenThreadConfig.h deleted file mode 100644 index 415c1e3d45e646..00000000000000 --- a/examples/shell/cc13x4_26x4/include/OpenThreadConfig.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * - * Copyright (c) 2022 Texas Instruments Incorporated - * 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 - * Overrides to default OpenThread configuration. - * - */ - -#pragma once - -// Use the TI-supplied default platform configuration for remainder -#include "openthread-core-cc13x4_26x4-config.h" diff --git a/src/platform/cc13xx_26xx/cc13x4_26x4/BUILD.gn b/src/platform/cc13xx_26xx/cc13x4_26x4/BUILD.gn index 0c62b3855ad353..4ad1b10fdf9c60 100644 --- a/src/platform/cc13xx_26xx/cc13x4_26x4/BUILD.gn +++ b/src/platform/cc13xx_26xx/cc13x4_26x4/BUILD.gn @@ -80,24 +80,14 @@ static_library("cc13x4_26x4") { } if (chip_enable_openthread) { - # needed for MTD/FTD - import("//build_overrides/ti_simplelink_sdk.gni") - import("${ti_simplelink_sdk_build_root}/ti_simplelink_board.gni") public_deps += [ - "${chip_root}/third_party/openthread/platforms/cc13x4_26x4:libopenthread-cc13x4_cc26x4", + "${chip_root}/third_party/openthread:openthread", + "${chip_root}/third_party/openthread/platforms/ti:libopenthread-ti", "${chip_root}/third_party/ti_simplelink_sdk:mbedtls", "${chip_root}/third_party/ti_simplelink_sdk:ti_simplelink_sdk", "${chip_root}/third_party/ti_simplelink_sdk:ti_simplelink_sysconfig", ] - if (chip_openthread_ftd) { - public_deps += - [ "${chip_root}/third_party/openthread/repo:libopenthread-ftd" ] - } else { - public_deps += - [ "${chip_root}/third_party/openthread/repo:libopenthread-mtd" ] - } - sources += [ "../../OpenThread/OpenThreadUtils.cpp", "../ThreadStackManagerImpl.cpp", diff --git a/src/platform/cc13xx_26xx/cc13x4_26x4/args.gni b/src/platform/cc13xx_26xx/cc13x4_26x4/args.gni index 35c5499e2b02f1..5d9207f926db81 100644 --- a/src/platform/cc13xx_26xx/cc13x4_26x4/args.gni +++ b/src/platform/cc13xx_26xx/cc13x4_26x4/args.gni @@ -32,6 +32,7 @@ chip_inet_config_enable_ipv4 = false chip_build_tests = false -openthread_project_core_config_file = "openthread-core-cc13x4_26x4-config.h" +openthread_project_core_config_file = + "openthread-core-cc13xx_cc26xx-config-matter.h" openthread_core_config_platform_check_file = - "openthread-core-cc13x4_26x4-config-check.h" + "openthread-core-cc13xx_cc26xx-config-check.h" diff --git a/src/platform/cc13xx_26xx/cc13x4_26x4/crypto/sha256_alt.c b/src/platform/cc13xx_26xx/cc13x4_26x4/crypto/sha256_alt.c index 5adc0c8f3da9fa..60cbbc8bfb4b83 100644 --- a/src/platform/cc13xx_26xx/cc13x4_26x4/crypto/sha256_alt.c +++ b/src/platform/cc13xx_26xx/cc13x4_26x4/crypto/sha256_alt.c @@ -28,6 +28,7 @@ #include #include +#include #include /*! @@ -142,8 +143,11 @@ void mbedtls_sha256_clone(mbedtls_sha256_context * dst, const mbedtls_sha256_con int mbedtls_sha256_finish_ret(mbedtls_sha256_context * ctx, unsigned char output[32]) { int_fast16_t result; + uint32_t key; + key = HwiP_disable(); result = SHA2_finalize(ctx->hndl, output); + HwiP_restore(key); if (SHA2_STATUS_SUCCESS != result) { @@ -158,9 +162,12 @@ int mbedtls_sha256_finish_ret(mbedtls_sha256_context * ctx, unsigned char output int mbedtls_sha256_update_ret(mbedtls_sha256_context * ctx, const unsigned char * input, size_t ilen) { int_fast16_t result; + uint32_t key; + key = HwiP_disable(); // Process data in chunks. The driver buffers incomplete blocks internally. result = SHA2_addData(ctx->hndl, input, ilen); + HwiP_restore(key); if (SHA2_STATUS_SUCCESS != result) { @@ -175,9 +182,13 @@ int mbedtls_sha256_update_ret(mbedtls_sha256_context * ctx, const unsigned char int mbedtls_internal_sha256_process(mbedtls_sha256_context * ctx, const unsigned char data[64]) { int_fast16_t result; + uint32_t key; + + key = HwiP_disable(); // Process data in chunks. The driver buffers incomplete blocks internally. result = SHA2_addData(ctx->hndl, data, SHA2_BLOCK_SIZE_BYTES_256); + HwiP_restore(key); if (SHA2_STATUS_SUCCESS != result) { diff --git a/src/platform/cc13xx_26xx/cc13x4_26x4/openthread-core-cc13x4_26x4-config-check.h b/src/platform/cc13xx_26xx/cc13x4_26x4/openthread-core-cc13x4_26x4-config-check.h deleted file mode 100644 index a5fcac9459b6c4..00000000000000 --- a/src/platform/cc13xx_26xx/cc13x4_26x4/openthread-core-cc13x4_26x4-config-check.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2019, The OpenThread Authors. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the copyright holder nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#pragma once - -#if OPENTHREAD_CONFIG_RADIO_915MHZ_OQPSK_SUPPORT -#error "Platform cc1352 doesn't support configuration option: OPENTHREAD_CONFIG_RADIO_915MHZ_OQPSK_SUPPORT" -#endif diff --git a/src/platform/cc13xx_26xx/cc13x4_26x4/openthread-core-cc13x4_26x4-config.h b/src/platform/cc13xx_26xx/cc13x4_26x4/openthread-core-cc13x4_26x4-config.h deleted file mode 100644 index f1c575c1a82e11..00000000000000 --- a/src/platform/cc13xx_26xx/cc13x4_26x4/openthread-core-cc13x4_26x4-config.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (c) 2018, The OpenThread Authors. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the copyright holder nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#pragma once - -#ifdef DeviceFamily_CC13X4 - -/* Number of message buffers reduced to fit into CC26x2x3 RAM */ -#define OPENTHREAD_CONFIG_NUM_MESSAGE_BUFFERS 22 - -#endif // DeviceFamily_CC13X4 - -#define OPENTHREAD_CONFIG_LOG_OUTPUT OPENTHREAD_CONFIG_LOG_OUTPUT_APP - -// When operating in a less than ideal RF environment, having a more forgiving configuration -// of OpenThread makes thread a great deal more reliable. -#define OPENTHREAD_CONFIG_TMF_ADDRESS_QUERY_MAX_RETRY_DELAY 120 // default is 28800 -#define OPENTHREAD_CONFIG_MAC_DEFAULT_MAX_FRAME_RETRIES_DIRECT 15 // default is 3 -#define OPENTHREAD_CONFIG_MAC_DEFAULT_MAX_FRAME_RETRIES_INDIRECT 1 // default is 0 -#define OPENTHREAD_CONFIG_MAC_MAX_TX_ATTEMPTS_INDIRECT_POLLS 16 // default is 4 - -// Enable periodic parent search to speed up finding a better parent. -#define OPENTHREAD_CONFIG_PARENT_SEARCH_ENABLE 1 // default is 0 -#define OPENTHREAD_CONFIG_PARENT_SEARCH_RSS_THRESHOLD -45 // default is -65 -#define OPENTHREAD_CONFIG_MLE_INFORM_PREVIOUS_PARENT_ON_REATTACH 1 // default is 0 - -// Use smaller maximum interval to speed up reattaching. -#define OPENTHREAD_CONFIG_MLE_ATTACH_BACKOFF_MAXIMUM_INTERVAL (60 * 10 * 1000) // default 1200000 ms - -#define OPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE 1 -// #define OPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE 0 -#define UART_AS_SERIAL_TRANSPORT 1 -#define OPENTHREAD_CONFIG_PLATFORM_USEC_TIMER_ENABLE 1 - -#define OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE 1 -#define OPENTHREAD_CONFIG_ECDSA_ENABLE 1 -#define OPENTHREAD_CONFIG_SRP_CLIENT_ENABLE 1 -#define OPENTHREAD_CONFIG_DNS_CLIENT_ENABLE 1 -#define OPENTHREAD_CONFIG_DNS_CLIENT_SERVICE_DISCOVERY_ENABLE 1 - -#define OPENTHREAD_CONFIG_COAP_SECURE_API_ENABLE 0 -#define OPENTHREAD_CONFIG_BORDER_AGENT_ENABLE 0 -#define OPENTHREAD_CONFIG_COMMISSIONER_ENABLE 0 -#define OPENTHREAD_CONFIG_JOINER_ENABLE 0 - -#define OPENTHREAD_CONFIG_ENABLE_BUILTIN_MBEDTLS 0 -// TCP disabled until OpenThread has a GN/Ninja build for the tcplp library -#define OPENTHREAD_CONFIG_TCP_ENABLE 0 diff --git a/third_party/openthread/platforms/cc13x4_26x4/BUILD.gn b/third_party/openthread/platforms/cc13x4_26x4/BUILD.gn deleted file mode 100644 index 64b0a813935f0e..00000000000000 --- a/third_party/openthread/platforms/cc13x4_26x4/BUILD.gn +++ /dev/null @@ -1,74 +0,0 @@ -# Copyright (c) 2020 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/openthread.gni") -import("//build_overrides/ti_simplelink_sdk.gni") - -import("${ti_simplelink_sdk_build_root}/ti_simplelink_board.gni") -import("${ti_simplelink_sdk_build_root}/ti_simplelink_sdk.gni") - -openthread_ti_root = "${chip_root}/third_party/openthread/ot-ti" - -config("openthread_cc13x4_cc26x4_config") { - include_dirs = [ - "${openthread_root}/examples/platforms", - "${openthread_root}/src/core", - "${openthread_ti_root}/src", - ] -} - -source_set("libopenthread-cc13x4_cc26x4") { - cflags = [ - "-Wno-address-of-packed-member", - "-Wno-implicit-fallthrough", - "-Wno-unused-label", - ] - public_deps = [ - "${openthread_root}/src/core:libopenthread_core_headers", - "${ti_simplelink_sdk_build_root}:ti_simplelink_sdk", - "${ti_simplelink_sdk_build_root}:ti_simplelink_sysconfig", - ] - - configs -= [ "${build_root}/config/compiler:std_default" ] - configs += [ "${ti_simplelink_sdk_build_root}:ti_simplelink_posix_config" ] - - #configs += [ ":${sdk_target_name}_posix_config" ] - #configs += [ "${ti_simplelink_sdk_build_root}:ti_simplelink_sdk_posix_config" ] - sources = [ - #"${openthread_ti_root}/src/system.c", - "${openthread_root}/examples/platforms/utils/code_utils.h", - "${openthread_root}/examples/platforms/utils/link_metrics.cpp", - "${openthread_root}/examples/platforms/utils/link_metrics.h", - "${openthread_root}/examples/platforms/utils/mac_frame.cpp", - "${openthread_root}/examples/platforms/utils/mac_frame.h", - "${openthread_ti_root}/src/alarm.c", - "${openthread_ti_root}/src/alarm_micro.c", - "${openthread_ti_root}/src/diag.c", - "${openthread_ti_root}/src/entropy.c", - "${openthread_ti_root}/src/misc.c", - "${openthread_ti_root}/src/radio.c", - "${openthread_ti_root}/src/settings.c", - ] - - public_configs = [ - ":openthread_cc13x4_cc26x4_config", - "${openthread_root}:openthread_config", - ] - if (chip_openthread_ftd) { - public_configs += [ "${openthread_root}:openthread_ftd_config" ] - } else { - public_configs += [ "${openthread_root}:openthread_mtd_config" ] - } -} diff --git a/third_party/openthread/platforms/cc13x2_26x2/BUILD.gn b/third_party/openthread/platforms/ti/BUILD.gn similarity index 79% rename from third_party/openthread/platforms/cc13x2_26x2/BUILD.gn rename to third_party/openthread/platforms/ti/BUILD.gn index 476d0232fdf358..66a99a9d88df30 100644 --- a/third_party/openthread/platforms/cc13x2_26x2/BUILD.gn +++ b/third_party/openthread/platforms/ti/BUILD.gn @@ -19,17 +19,28 @@ import("//build_overrides/ti_simplelink_sdk.gni") import("${ti_simplelink_sdk_build_root}/ti_simplelink_board.gni") import("${ti_simplelink_sdk_build_root}/ti_simplelink_sdk.gni") +declare_args() { + ot_ti_lib_dir = "" +} + openthread_ti_root = "${chip_root}/third_party/openthread/ot-ti" -config("openthread_cc13x2_cc26x2_config") { +config("openthread_ti_config") { include_dirs = [ "${openthread_root}/examples/platforms", "${openthread_root}/src/core", "${openthread_ti_root}/src", ] + + public_configs = [ "${openthread_root}:openthread_config" ] + if (chip_openthread_ftd) { + public_configs += [ "${openthread_root}:openthread_ftd_config" ] + } else { + public_configs += [ "${openthread_root}:openthread_mtd_config" ] + } } -source_set("libopenthread-cc13x2_cc26x2") { +source_set("libopenthread-ti") { cflags = [ "-Wno-address-of-packed-member", "-Wno-implicit-fallthrough", @@ -44,10 +55,7 @@ source_set("libopenthread-cc13x2_cc26x2") { configs -= [ "${build_root}/config/compiler:std_default" ] configs += [ "${ti_simplelink_sdk_build_root}:ti_simplelink_posix_config" ] - #configs += [ ":${sdk_target_name}_posix_config" ] - #configs += [ "${ti_simplelink_sdk_build_root}:ti_simplelink_sdk_posix_config" ] sources = [ - #"${openthread_ti_root}/src/system.c", "${openthread_root}/examples/platforms/utils/code_utils.h", "${openthread_root}/examples/platforms/utils/link_metrics.cpp", "${openthread_root}/examples/platforms/utils/link_metrics.h", @@ -61,14 +69,26 @@ source_set("libopenthread-cc13x2_cc26x2") { "${openthread_ti_root}/src/radio.c", "${openthread_ti_root}/src/settings.c", ] - public_configs = [ - ":openthread_cc13x2_cc26x2_config", + ":openthread_ti_config", "${openthread_root}:openthread_config", ] +} + +source_set("ot-ti-cert") { + sources = [] + public_configs = [ ":openthread_ti_config" ] + deps = [ ":libopenthread-ti" ] + + if ("" != ot_ti_lib_dir) { + library_dir = ot_ti_lib_dir + } else { + library_dir = "${openthread_ti_root}/libs/${ti_simplelink_device_family}" + } + if (chip_openthread_ftd) { - public_configs += [ "${openthread_root}:openthread_ftd_config" ] + libs = [ "${library_dir}/libopenthread-ftd.a" ] } else { - public_configs += [ "${openthread_root}:openthread_mtd_config" ] + libs = [ "${library_dir}/libopenthread-mtd.a" ] } } diff --git a/third_party/ti_simplelink_sdk/ti_simplelink_sdk.gni b/third_party/ti_simplelink_sdk/ti_simplelink_sdk.gni index fe77dfc0033039..0698af16536e51 100644 --- a/third_party/ti_simplelink_sdk/ti_simplelink_sdk.gni +++ b/third_party/ti_simplelink_sdk/ti_simplelink_sdk.gni @@ -17,7 +17,6 @@ import("//build_overrides/chip.gni") import("//build_overrides/freertos.gni") import("//build_overrides/mbedtls.gni") -import("//build_overrides/openthread.gni") import("//build_overrides/pigweed.gni") import("//build_overrides/ti_simplelink_sdk.gni") import("${chip_root}/src/app/icd/icd.gni") @@ -353,14 +352,6 @@ template("ti_simplelink_sdk") { ] public_configs = [ ":${sdk_target_name}_config" ] - - if (chip_openthread_ftd) { - public_configs += - [ "${chip_root}/third_party/openthread/repo:openthread_ftd_config" ] - } else { - public_configs += - [ "${chip_root}/third_party/openthread/repo:openthread_mtd_config" ] - } } } @@ -517,13 +508,12 @@ template("ti_simplelink_sdk") { if (ti_simplelink_device_family == "cc13x4_26x4") { defines = [] include_dirs = [ - "${chip_root}/third_party/openthread/repo/include/", "${chip_root}/src/", + "${chip_root}/third_party/openthread/repo/include", ] configs -= [ "${build_root}/config/compiler:warnings_default" ] # removed for # -Wshadow - cflags = [ "-Wno-sign-compare", "-Wno-unused-variable", @@ -569,6 +559,7 @@ template("ti_simplelink_sdk") { public_configs = [ ":${sdk_target_name}_config", ":${sdk_target_name}_${ti_simplelink_device_family}_dmm_config", + "${chip_root}/third_party/openthread/platforms/ti:openthread_ti_config", ] } } From a0c4d57c32be2a91e4211ee3ce029ff6f1612a02 Mon Sep 17 00:00:00 2001 From: Jean-Francois Penven <67962328+jepenven-silabs@users.noreply.github.com> Date: Mon, 15 Apr 2024 18:02:43 -0400 Subject: [PATCH 074/468] Add silabs specific CLI (#32733) --- examples/platform/silabs/matter_shell.cpp | 57 +++++++++++++++++++ .../silabs/platformAbstraction/GsdkSpam.cpp | 8 +++ 2 files changed, 65 insertions(+) diff --git a/examples/platform/silabs/matter_shell.cpp b/examples/platform/silabs/matter_shell.cpp index 03a50ea7f708cf..a6a8c9f6d6e1ae 100644 --- a/examples/platform/silabs/matter_shell.cpp +++ b/examples/platform/silabs/matter_shell.cpp @@ -16,11 +16,17 @@ */ #include "matter_shell.h" +#include "sl_component_catalog.h" #include #include #include #include #include +#ifdef SL_CATALOG_CLI_PRESENT +#include "sl_cli.h" +#include "sl_cli_config.h" +#include "sli_cli_io.h" +#endif using namespace ::chip; using chip::Shell::Engine; @@ -60,6 +66,51 @@ void WaitForShellActivity() osThreadFlagsWait(kShellProcessFlag, osFlagsWaitAny, osWaitForever); } +#ifdef SL_CATALOG_CLI_PRESENT + +CHIP_ERROR CmdSilabsDispatch(int argc, char ** argv) +{ + CHIP_ERROR error = CHIP_NO_ERROR; + + char buff[SL_CLI_INPUT_BUFFER_SIZE] = { 0 }; + char * buff_ptr = buff; + int i = 0; + + VerifyOrExit(argc > 0, error = CHIP_ERROR_INVALID_ARGUMENT); + + for (i = 0; i < argc; i++) + { + size_t arg_len = strlen(argv[i]); + + /* Make sure that the next argument won't overflow the buffer */ + VerifyOrExit(buff_ptr + arg_len < buff + kMaxLineLength, error = CHIP_ERROR_BUFFER_TOO_SMALL); + + strncpy(buff_ptr, argv[i], arg_len); + buff_ptr += arg_len; + + /* Make sure that there is enough buffer for a space char */ + if (buff_ptr + sizeof(char) < buff + kMaxLineLength) + { + strncpy(buff_ptr, " ", sizeof(char)); + buff_ptr++; + } + } + buff_ptr = 0; + sl_cli_handle_input(sl_cli_default_handle, buff); +exit: + return error; +} + +static const Shell::shell_command_t cmds_silabs_root = { &CmdSilabsDispatch, "silabs", "Dispatch Silicon Labs CLI command" }; + +void cmdSilabsInit() +{ + // Register the root otcli command with the top-level shell. + Engine::Root().RegisterCommands(&cmds_silabs_root, 1); +} + +#endif // SL_CATALOG_CLI_PRESENT + void startShellTask() { int status = chip::Shell::Engine::Root().Init(); @@ -68,7 +119,13 @@ void startShellTask() // For now also register commands from shell_common (shell app). // TODO move at least OTCLI to default commands in lib/shell/commands cmd_misc_init(); +#ifndef SL_WIFI cmd_otcli_init(); +#endif + +#ifdef SL_CATALOG_CLI_PRESENT + cmdSilabsInit(); +#endif shellTaskHandle = osThreadNew(MatterShellTask, nullptr, &kShellTaskAttr); VerifyOrDie(shellTaskHandle); diff --git a/src/platform/silabs/platformAbstraction/GsdkSpam.cpp b/src/platform/silabs/platformAbstraction/GsdkSpam.cpp index 89c56cb6f067cd..76673b001a9c6b 100644 --- a/src/platform/silabs/platformAbstraction/GsdkSpam.cpp +++ b/src/platform/silabs/platformAbstraction/GsdkSpam.cpp @@ -45,6 +45,10 @@ extern "C" { #include "sl_component_catalog.h" #include "sl_mbedtls.h" #if SILABS_LOG_OUT_UART || ENABLE_CHIP_SHELL || CHIP_DEVICE_CONFIG_THREAD_ENABLE_CLI +#ifdef SL_CATALOG_CLI_PRESENT +#include "sl_iostream.h" +#include "sl_iostream_stdio.h" +#endif // #include "uart.h" #endif @@ -71,6 +75,10 @@ CHIP_ERROR SilabsPlatform::Init(void) // Clear register so it does accumualate the causes of each reset RMU_ResetCauseClear(); +#if SILABS_LOG_OUT_UART && defined(SL_CATALOG_CLI_PRESENT) + sl_iostream_set_default(sl_iostream_stdio_handle); +#endif + #if CHIP_ENABLE_OPENTHREAD sl_ot_sys_init(); #endif From f28a8a270a53807d4a5a842cc14d0c71bdfe7807 Mon Sep 17 00:00:00 2001 From: mkardous-silabs <84793247+mkardous-silabs@users.noreply.github.com> Date: Mon, 15 Apr 2024 18:14:00 -0500 Subject: [PATCH 075/468] Add contact sensor device type to endpoint 1 (#32992) --- .../lit-icd-common/lit-icd-server-app.matter | 58 +++ .../lit-icd-common/lit-icd-server-app.zap | 485 ++++++++++++++++++ 2 files changed, 543 insertions(+) diff --git a/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.matter b/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.matter index d71d3094e133c3..cf3d0710089d2c 100644 --- a/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.matter +++ b/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.matter @@ -1392,6 +1392,23 @@ cluster UserLabel = 65 { readonly attribute int16u clusterRevision = 65533; } +/** This cluster provides an interface to a boolean state called StateValue. */ +cluster BooleanState = 69 { + revision 1; + + info event StateChange = 0 { + boolean stateValue = 0; + } + + readonly attribute boolean stateValue = 0; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + /** Allows servers to ensure that listed clients are notified when a server is available for communication. */ cluster IcdManagement = 70 { revision 2; @@ -1783,5 +1800,46 @@ endpoint 0 { handle command StayActiveResponse; } } +endpoint 1 { + device type ma_contactsensor = 21, version 1; + + + server cluster Identify { + ram attribute identifyTime default = 0x0; + ram attribute identifyType default = 0x00; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 4; + + handle command Identify; + handle command TriggerEffect; + } + + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + callback attribute featureMap; + callback attribute clusterRevision; + } + + server cluster BooleanState { + ram attribute stateValue; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } +} diff --git a/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.zap b/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.zap index 154758eb686549..7780cccbac0c77 100644 --- a/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.zap +++ b/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.zap @@ -3634,6 +3634,483 @@ ] } ] + }, + { + "id": 2, + "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "code": 21, + "profileId": 259, + "label": "MA-contactsensor", + "name": "MA-contactsensor" + }, + "deviceTypes": [ + { + "code": 21, + "profileId": 259, + "label": "MA-contactsensor", + "name": "MA-contactsensor" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 21 + ], + "deviceTypeName": "MA-contactsensor", + "deviceTypeCode": 21, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "Identify", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "TriggerEffect", + "code": 64, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "IdentifyTime", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "IdentifyType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "IdentifyTypeEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DeviceTypeList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ServerList", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientList", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PartsList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Boolean State", + "code": 69, + "mfgCode": null, + "define": "BOOLEAN_STATE_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "StateValue", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + } + ] } ], "endpoints": [ @@ -3644,6 +4121,14 @@ "endpointId": 0, "networkId": 0, "parentEndpointIdentifier": null + }, + { + "endpointTypeName": "Anonymous Endpoint Type", + "endpointTypeIndex": 1, + "profileId": 259, + "endpointId": 1, + "networkId": 0, + "parentEndpointIdentifier": null } ] } \ No newline at end of file From 8b867993a722a11f8db999a84d5b300490c03296 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Mon, 15 Apr 2024 20:16:11 -0400 Subject: [PATCH 076/468] Implement write coalescing in MTRDevice. (#32994) This uses the existing batching infrastructure to replace a write immediately followed by another write to the same attribute with just a single write with the second value. --- src/darwin/Framework/CHIP/MTRDevice.mm | 77 +++++++++++++++++-- .../Framework/CHIPTests/MTRDeviceTests.m | 65 ++++++++++++++++ .../TestHelpers/MTRDeviceTestDelegate.h | 1 + .../TestHelpers/MTRDeviceTestDelegate.m | 4 + 4 files changed, 141 insertions(+), 6 deletions(-) diff --git a/src/darwin/Framework/CHIP/MTRDevice.mm b/src/darwin/Framework/CHIP/MTRDevice.mm index ee72c4cc815ad1..55d2b660e979a5 100644 --- a/src/darwin/Framework/CHIP/MTRDevice.mm +++ b/src/darwin/Framework/CHIP/MTRDevice.mm @@ -165,8 +165,16 @@ typedef NS_ENUM(NSUInteger, MTRDeviceReadRequestFieldIndex) { MTRDeviceReadRequestFieldParamsIndex = 1 }; +typedef NS_ENUM(NSUInteger, MTRDeviceWriteRequestFieldIndex) { + MTRDeviceWriteRequestFieldPathIndex = 0, + MTRDeviceWriteRequestFieldValueIndex = 1, + MTRDeviceWriteRequestFieldTimeoutIndex = 2, + MTRDeviceWriteRequestFieldExpectedValueIDIndex = 3, +}; + typedef NS_ENUM(NSUInteger, MTRDeviceWorkItemBatchingID) { MTRDeviceWorkItemBatchingReadID = 1, + MTRDeviceWorkItemBatchingWriteID = 2, }; typedef NS_ENUM(NSUInteger, MTRDeviceWorkItemDuplicateTypeID) { @@ -1658,6 +1666,50 @@ - (void)writeAttributeWithEndpointID:(NSNumber *)endpointID MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.queue]; uint64_t workItemID = workItem.uniqueID; // capture only the ID, not the work item + NSNumber * nodeID = _nodeID; + + // Write request data is an array of items (for now always length 1). Each + // item is an array containing: + // + // [ attribute path, value, timedWriteTimeout, expectedValueID ] + // + // where expectedValueID is stored as NSNumber and NSNull represents nil timeouts + auto * writeData = @[ attributePath, [value copy], timeout ?: [NSNull null], @(expectedValueID) ]; + + NSMutableArray * writeRequests = [NSMutableArray arrayWithObject:writeData]; + + [workItem setBatchingID:MTRDeviceWorkItemBatchingWriteID data:writeRequests handler:^(id opaqueDataCurrent, id opaqueDataNext) { + mtr_hide(self); // don't capture self accidentally + NSMutableArray * writeRequestsCurrent = opaqueDataCurrent; + NSMutableArray * writeRequestsNext = opaqueDataNext; + + if (writeRequestsCurrent.count != 1) { + // Very unexpected! + MTR_LOG_ERROR("Batching write attribute work item [%llu]: Unexpected write request count %tu", workItemID, writeRequestsCurrent.count); + return MTRNotBatched; + } + + MTRBatchingOutcome outcome = MTRNotBatched; + while (writeRequestsNext.count) { + // If paths don't match, we cannot replace the earlier write + // with the later one. + if (![writeRequestsNext[0][MTRDeviceWriteRequestFieldPathIndex] + isEqual:writeRequestsCurrent[0][MTRDeviceWriteRequestFieldPathIndex]]) { + MTR_LOG_INFO("Batching write attribute work item [%llu]: cannot replace with next work item due to path mismatch", workItemID); + return outcome; + } + + // Replace our one request with the first one from the next item. + auto writeItem = writeRequestsNext.firstObject; + [writeRequestsNext removeObjectAtIndex:0]; + [writeRequestsCurrent replaceObjectAtIndex:0 withObject:writeItem]; + MTR_LOG_INFO("Batching write attribute work item [%llu]: replaced with new write value %@ [0x%016llX]", + workItemID, writeItem, nodeID.unsignedLongLongValue); + outcome = MTRBatchedPartially; + } + NSCAssert(writeRequestsNext.count == 0, @"should have batched everything or returned early"); + return MTRBatchedFully; + }]; // The write operation will install a duplicate check handler, to return NO for "isDuplicate". Since a write operation may // change values, only read requests after this should be considered for duplicate requests. [workItem setDuplicateTypeID:MTRDeviceWorkItemDuplicateReadTypeID handler:^(id opaqueItemData, BOOL * isDuplicate, BOOL * stop) { @@ -1666,18 +1718,31 @@ - (void)writeAttributeWithEndpointID:(NSNumber *)endpointID }]; [workItem setReadyHandler:^(MTRDevice * self, NSInteger retryCount, MTRAsyncWorkCompletionBlock completion) { MTRBaseDevice * baseDevice = [self newBaseDevice]; + // Make sure to use writeRequests here, because that's what our batching + // handler will modify as needed. + NSCAssert(writeRequests.count == 1, @"Incorrect number of write requests: %tu", writeRequests.count); + + auto * request = writeRequests[0]; + MTRAttributePath * path = request[MTRDeviceWriteRequestFieldPathIndex]; + + id timedWriteTimeout = request[MTRDeviceWriteRequestFieldTimeoutIndex]; + if (timedWriteTimeout == [NSNull null]) { + timedWriteTimeout = nil; + } + [baseDevice - writeAttributeWithEndpointID:endpointID - clusterID:clusterID - attributeID:attributeID - value:value - timedWriteTimeout:timeout + writeAttributeWithEndpointID:path.endpoint + clusterID:path.cluster + attributeID:path.attribute + value:request[MTRDeviceWriteRequestFieldValueIndex] + timedWriteTimeout:timedWriteTimeout queue:self.queue completion:^(NSArray *> * _Nullable values, NSError * _Nullable error) { if (error) { MTR_LOG_ERROR("Write attribute work item [%llu] failed: %@", workItemID, error); if (useValueAsExpectedValue) { - [self removeExpectedValueForAttributePath:attributePath expectedValueID:expectedValueID]; + NSNumber * expectedValueID = request[MTRDeviceWriteRequestFieldExpectedValueIDIndex]; + [self removeExpectedValueForAttributePath:attributePath expectedValueID:expectedValueID.unsignedLongLongValue]; } } completion(MTRAsyncWorkComplete); diff --git a/src/darwin/Framework/CHIPTests/MTRDeviceTests.m b/src/darwin/Framework/CHIPTests/MTRDeviceTests.m index 777fb584d24419..06d06404ffeaad 100644 --- a/src/darwin/Framework/CHIPTests/MTRDeviceTests.m +++ b/src/darwin/Framework/CHIPTests/MTRDeviceTests.m @@ -2563,6 +2563,71 @@ - (void)test028_TimeZoneAndDST #endif // MTR_ENABLE_PROVISIONAL } +- (void)test029_MTRDeviceWriteCoalescing +{ + // Ensure the test starts with clean slate, even with MTRDeviceControllerLocalTestStorage enabled + [sController.controllerDataStore clearAllStoredAttributes]; + NSArray * storedAttributesAfterClear = [sController.controllerDataStore getStoredAttributesForNodeID:@(kDeviceId)]; + XCTAssertEqual(storedAttributesAfterClear.count, 0); + + __auto_type * device = [MTRDevice deviceWithNodeID:kDeviceId deviceController:sController]; + dispatch_queue_t queue = dispatch_get_main_queue(); + + // Given reachable state becomes true before underlying OnSubscriptionEstablished callback, this expectation is necessary but + // not sufficient as a mark to the end of reports + XCTestExpectation * gotReportsExpectation = [self expectationWithDescription:@"Attribute and Event reports have been received"]; + + __auto_type * delegate = [[MTRDeviceTestDelegate alloc] init]; + delegate.onReportEnd = ^() { + [gotReportsExpectation fulfill]; + }; + // Skip reports for expected values so we actually have some idea of what + // the server is reporting. + delegate.skipExpectedValuesForWrite = YES; + + [device setDelegate:delegate queue:queue]; + + [self waitForExpectations:@[ gotReportsExpectation ] timeout:60]; + + delegate.onReportEnd = nil; + + uint16_t testOnTimeValue = 10; + XCTestExpectation * onTimeWriteSuccess = [self expectationWithDescription:@"OnTime write success"]; + delegate.onAttributeDataReceived = ^(NSArray *> * data) { + for (NSDictionary * attributeReponseValue in data) { + MTRAttributePath * path = attributeReponseValue[MTRAttributePathKey]; + if (path.cluster.unsignedIntValue == MTRClusterIDTypeOnOffID && path.attribute.unsignedLongValue == MTRAttributeIDTypeClusterOnOffAttributeOnTimeID) { + NSDictionary * dataValue = attributeReponseValue[MTRDataKey]; + NSNumber * onTimeValue = dataValue[MTRValueKey]; + if ([onTimeValue isEqual:@(testOnTimeValue + 4)]) { + [onTimeWriteSuccess fulfill]; + } else { + // The first write we did might get reported, but none of + // the other ones should be. + XCTAssertEqualObjects(onTimeValue, @(testOnTimeValue + 1)); + } + } + } + }; + + __auto_type writeOnTimeValue = ^(uint16_t value) { + NSDictionary * writeValue = @{ MTRTypeKey : MTRUnsignedIntegerValueType, MTRValueKey : @(value) }; + [device writeAttributeWithEndpointID:@(1) + clusterID:@(MTRClusterIDTypeOnOffID) + attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeOnTimeID) + value:writeValue + expectedValueInterval:@(0) + timedWriteTimeout:nil]; + }; + + writeOnTimeValue(testOnTimeValue + 1); + writeOnTimeValue(testOnTimeValue + 2); + writeOnTimeValue(testOnTimeValue + 3); + writeOnTimeValue(testOnTimeValue + 4); + + [self waitForExpectations:@[ onTimeWriteSuccess ] timeout:10]; +} + - (void)test900_SubscribeAllAttributes { MTRBaseDevice * device = GetConnectedDevice(); diff --git a/src/darwin/Framework/CHIPTests/TestHelpers/MTRDeviceTestDelegate.h b/src/darwin/Framework/CHIPTests/TestHelpers/MTRDeviceTestDelegate.h index e8fd8f969b2aeb..27596bcafeae7f 100644 --- a/src/darwin/Framework/CHIPTests/TestHelpers/MTRDeviceTestDelegate.h +++ b/src/darwin/Framework/CHIPTests/TestHelpers/MTRDeviceTestDelegate.h @@ -28,6 +28,7 @@ typedef void (^MTRDeviceTestDelegateDataHandler)(NSArray Date: Mon, 15 Apr 2024 21:38:59 -0400 Subject: [PATCH 077/468] TC-RR-1.1: Fix for pre-existing fabric removal (#32921) * TC-RR-1.1: Fix for pre-existing fabric removal This test assumed that the client ordering matched to the ordering of the fabric table, but this is not the case if there is a fabric on the device before the test starts. In this case, the initial fabric is in table slot 1 with index 1, the test starts in table slot 2, with fabric index 2. Then the initial fabric is removed from table slot 1, and the test adds a new fabric. The new fabric is allocated fabric index 3, but appears in slot 1 in the table, and the order between the controllers and the fabric table as read off the device is now out of sync. Instead, name the controllers based on the fabric index rather than the index in the fabric table. TEST: commissioned all-clusters using chip-tool then ran RR-1.1. Test now passes, whereas before there was a failure. * Update src/python_testing/TC_RR_1_1.py Co-authored-by: Andrei Litvin * Update src/python_testing/TC_RR_1_1.py * Address review comments, fix --------- Co-authored-by: Andrei Litvin --- src/python_testing/TC_RR_1_1.py | 50 +++++++++++++++------------------ 1 file changed, 23 insertions(+), 27 deletions(-) diff --git a/src/python_testing/TC_RR_1_1.py b/src/python_testing/TC_RR_1_1.py index 004022b108e6e0..b66234990e7db2 100644 --- a/src/python_testing/TC_RR_1_1.py +++ b/src/python_testing/TC_RR_1_1.py @@ -20,6 +20,7 @@ import math import queue import random +import string import time from typing import Any, Dict, List, Set @@ -36,6 +37,10 @@ # +def generate_controller_name(fabric_index: int, controller_index: int): + return f"RD{fabric_index}{string.ascii_uppercase[controller_index]}" + + class TC_RR_1_1(MatterBaseTest): def setup_class(self): self._pseudo_random_generator = random.Random(1234) @@ -96,11 +101,6 @@ async def test_TC_RR_1_1(self): logging.info("--> User label cluster not present on any endpoitns") # Generate list of all clients names - all_names = [] - for fabric_idx in range(num_fabrics_to_commission): - for controller_idx in range(num_controllers_per_fabric): - all_names.append("RD%d%s" % (fabric_idx, chr(ord('A') + controller_idx))) - logging.info(f"Client names that will be used: {all_names}") client_list = [] # TODO: Shall we also verify SupportedFabrics attribute, and the CapabilityMinima attribute? @@ -119,7 +119,8 @@ async def test_TC_RR_1_1(self): node_ids = [200 + (i * 100) for i in range(num_controllers_per_fabric - 1)] # Prepare clients for first fabric, that includes the default controller - dev_ctrl.name = all_names.pop(0) + fabric_index = await self.read_single_attribute_check_success(cluster=Clusters.OperationalCredentials, attribute=Clusters.OperationalCredentials.Attributes.CurrentFabricIndex, dev_ctrl=dev_ctrl) + dev_ctrl.name = generate_controller_name(fabric_index, 0) client_list.append(dev_ctrl) if num_controllers_per_fabric > 1: @@ -130,8 +131,8 @@ async def test_TC_RR_1_1(self): privilege=Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum.kAdminister, targetNodeId=self.dut_node_id, catTags=[0x0001_0001] ) - for controller in new_controllers: - controller.name = all_names.pop(0) + for idx, controller in enumerate(new_controllers): + controller.name = generate_controller_name(fabric_index, idx+1) client_list.extend(new_controllers) # Step 1c - Ensure there are no leftover fabrics from another process. @@ -163,11 +164,11 @@ async def test_TC_RR_1_1(self): fabrics: List[Clusters.OperationalCredentials.Structs.FabricDescriptorStruct] = await self.read_single_attribute( dev_ctrl, node_id=self.dut_node_id, endpoint=0, attribute=Clusters.OperationalCredentials.Attributes.Fabrics, fabricFiltered=False) + current_fabric_index = await self.read_single_attribute_check_success(cluster=Clusters.OperationalCredentials, attribute=Clusters.OperationalCredentials.Attributes.CurrentFabricIndex) for fabric in fabrics: - if fabric.fabricID == dev_ctrl.fabricId: + if fabric.fabricIndex == current_fabric_index: continue - - # This is not the initial client's fabric, so remove it. + # This is not the test client's fabric, so remove it. await dev_ctrl.SendCommand( self.dut_node_id, 0, Clusters.OperationalCredentials.Commands.RemoveFabric(fabricIndex=fabric.fabricIndex)) @@ -184,13 +185,13 @@ async def test_TC_RR_1_1(self): new_fabric_admin = new_certificate_authority.NewFabricAdmin(vendorId=0xFFF1, fabricId=admin_index) new_admin_ctrl = new_fabric_admin.NewController(nodeId=dev_ctrl.nodeId, catTags=[0x0001_0001]) - new_admin_ctrl.name = all_names.pop(0) - client_list.append(new_admin_ctrl) await CommissioningBuildingBlocks.AddNOCForNewFabricFromExisting(commissionerDevCtrl=dev_ctrl, newFabricDevCtrl=new_admin_ctrl, existingNodeId=self.dut_node_id, newNodeId=self.dut_node_id) - + fabric_index = await self.read_single_attribute_check_success(cluster=Clusters.OperationalCredentials, attribute=Clusters.OperationalCredentials.Attributes.CurrentFabricIndex, dev_ctrl=new_admin_ctrl) + new_admin_ctrl.name = generate_controller_name(fabric_index, 0) + client_list.append(new_admin_ctrl) if num_controllers_per_fabric > 1: new_controllers = await CommissioningBuildingBlocks.CreateControllersOnFabric( fabricAdmin=new_fabric_admin, @@ -200,8 +201,8 @@ async def test_TC_RR_1_1(self): targetNodeId=self.dut_node_id, catTags=[0x0001_0001] ) - for controller in new_controllers: - controller.name = all_names.pop(0) + for idx, controller in enumerate(new_controllers): + controller.name = generate_controller_name(fabric_index, idx+1) client_list.extend(new_controllers) @@ -224,10 +225,8 @@ async def test_TC_RR_1_1(self): # Step 2: Set the Label field for each fabric and BasicInformation.NodeLabel to 32 characters logging.info("Step 2: Setting the Label field for each fabric and BasicInformation.NodeLabel to 32 characters") - for table_idx in range(len(fabric_table)): - # Client is client A for each fabric to set the Label field - fabric = fabric_table[table_idx] - client_name = "RD%dA" % table_idx + for fabric in fabric_table: + client_name = generate_controller_name(fabric.fabricIndex, 0) client = client_by_name[client_name] # Send the UpdateLabel command @@ -451,10 +450,8 @@ async def test_TC_RR_1_1(self): # Create a list of per-fabric clients to use for filling group resources accross all fabrics. fabric_unique_clients: List[Any] = [] - for table_idx in range(len(fabric_table)): - # Client is client A for each fabric - fabric = fabric_table[table_idx] - client_name = "RD%dA" % table_idx + for fabric in fabric_table: + client_name = generate_controller_name(fabric.fabricIndex, 0) fabric_unique_clients.append(client_by_name[client_name]) # Step 13: Write and verify indicated_max_group_keys_per_fabric group keys to all fabrics. @@ -696,9 +693,8 @@ async def send_acl(self, enable_access_to_group_cluster: bool, fabric_table: List[ Clusters.OperationalCredentials.Structs.FabricDescriptorStruct]): - for table_idx, fabric in enumerate(fabric_table): - # Client is client A for each fabric - client_name = "RD%dA" % table_idx + for fabric in fabric_table: + client_name = generate_controller_name(fabric.fabricIndex, 0) client = client_by_name[client_name] acl = self.build_acl(enable_access_to_group_cluster) From 0c1707234b30972d8c1ce87bb541af24ff4156fa Mon Sep 17 00:00:00 2001 From: Karsten Sperling <113487422+ksperling-apple@users.noreply.github.com> Date: Tue, 16 Apr 2024 14:41:25 +1200 Subject: [PATCH 078/468] Darwin: MTRDeviceControllerFactory cleanup (#32960) * Darwin: MTRDeviceControllerFactory cleanup Internal methods don't need a named category Use ivars directly (most internal properties were never used as properties) Use MTR_DIRECT_MEMBERS for internals / implementation No need to pre-declare internal methods used only with the same file * Darwin: MTRDeviceControllerFactory cleanup (cont) Reorder ivars a little to group related things * Darwin: MTRDeviceControllerFactory cleanup (cont) Allocate C++ objects that are created at init time directly as ivars instead of as pointers. This avoids the need for manual cleanup code. * Fix darwin-framework-tool link issue * restyle --- .../Framework/CHIP/MTRDeviceController.mm | 2 +- .../CHIP/MTRDeviceControllerFactory.mm | 263 ++++++------------ .../MTRDeviceControllerFactory_Internal.h | 35 ++- 3 files changed, 113 insertions(+), 187 deletions(-) diff --git a/src/darwin/Framework/CHIP/MTRDeviceController.mm b/src/darwin/Framework/CHIP/MTRDeviceController.mm index ab2bba520b2675..87490eecf6e7a6 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceController.mm @@ -551,7 +551,7 @@ - (BOOL)startup:(MTRDeviceControllerStartupParamsInternal *)startupParams } errorCode = chip::Credentials::SetSingleIpkEpochKey( - _factory.groupData, fabricIdx, _operationalCredentialsDelegate->GetIPK(), compressedId); + _factory.groupDataProvider, fabricIdx, _operationalCredentialsDelegate->GetIPK(), compressedId); if ([self checkForStartError:errorCode logMsg:kErrorIPKInit]) { return; } diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm index 016f1c1d630d72..4b5ccc7d9477d4 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm @@ -69,13 +69,9 @@ static NSString * const kErrorPersistentStorageInit = @"Init failure while creating a persistent storage delegate"; static NSString * const kErrorSessionResumptionStorageInit = @"Init failure while creating a session resumption storage delegate"; -static NSString * const kErrorGroupProviderInit = @"Init failure while initializing group data provider"; -static NSString * const kErrorControllersInit = @"Init controllers array failure"; -static NSString * const kErrorCertificateValidityPolicyInit = @"Init certificate validity policy failure"; static NSString * const kErrorControllerFactoryInit = @"Init failure while initializing controller factory"; static NSString * const kErrorKeystoreInit = @"Init failure while initializing persistent storage keystore"; static NSString * const kErrorCertStoreInit = @"Init failure while initializing persistent storage operational certificate store"; -static NSString * const kErrorSessionKeystoreInit = @"Init failure while initializing session keystore"; static bool sExitHandlerRegistered = false; static void ShutdownOnExit() @@ -84,76 +80,6 @@ static void ShutdownOnExit() [[MTRDeviceControllerFactory sharedInstance] stopControllerFactory]; } -@interface MTRDeviceControllerFactory () { - MTRServerEndpoint * _otaProviderEndpoint; - std::unique_ptr _otaProviderDelegateBridge; -} - -@property (atomic, readonly) dispatch_queue_t chipWorkQueue; -@property (readonly) DeviceControllerFactory * controllerFactory; -@property (readonly) PersistentStorageDelegate * persistentStorageDelegate; -@property (readonly) Crypto::RawKeySessionKeystore * sessionKeystore; -// We use TestPersistentStorageDelegate just to get an in-memory store to back -// our group data provider impl. We initialize this store correctly on every -// controller startup, so don't need to actually persist it. -@property (readonly) TestPersistentStorageDelegate * groupStorageDelegate; -@property (readonly) Credentials::GroupDataProviderImpl * groupDataProvider; -@property (readonly) NSMutableArray * controllers; -@property (readonly) PersistentStorageOperationalKeystore * keystore; -@property (readonly) Credentials::PersistentStorageOpCertStore * opCertStore; -@property (readonly) MTROperationalBrowser * operationalBrowser; - -// productAttestationAuthorityCertificates and certificationDeclarationCertificates are just copied -// from MTRDeviceControllerFactoryParams. -@property (readonly, nullable) NSArray * productAttestationAuthorityCertificates; -@property (readonly, nullable) NSArray * certificationDeclarationCertificates; - -@property (readonly) BOOL advertiseOperational; -@property (nonatomic, readonly) Credentials::IgnoreCertificateValidityPeriodPolicy * certificateValidityPolicy; -@property (readonly) MTRSessionResumptionStorageBridge * sessionResumptionStorage; -// Lock used to serialize access to the "controllers" array and the -// "_controllerBeingStarted" and "_controllerBeingShutDown" ivars, since those -// need to be touched from both whatever queue is starting controllers and from -// the Matter queue. The way this lock is used assumes that: -// -// 1) The only mutating accesses to the controllers array and the ivars happen -// when the current queue is not the Matter queue or in a block that was -// sync-dispatched to the Matter queue. This is a good assumption, because -// the implementations of the functions that mutate these do sync dispatch to -// the Matter queue, which would deadlock if they were called when that queue -// was the current queue. -// -// 2) It's our API consumer's responsibility to serialize access to us from -// outside. -// -// These assumptions mean that if we are in a block that was sync-dispatched to -// the Matter queue, that block cannot race with either the Matter queue nor the -// non-Matter queue. Similarly, if we are in a situation where the Matter queue -// has been shut down, any accesses to the variables cannot race anything else. -// -// This means that: -// -// A. In a sync-dispatched block, or if the Matter queue has been shut down, we -// do not need to lock and can do read or write access. -// B. Apart from item A, mutations of the array and ivars must happen outside the -// Matter queue and must lock. -// C. Apart from item A, accesses on the Matter queue must be reads only and -// must lock. -// D. Locking around reads not from the Matter queue is OK but not required. -@property (nonatomic, readonly) os_unfair_lock controllersLock; - -@property (nonatomic, readonly, nullable) id otaProviderDelegate; -@property (nonatomic, readonly, nullable) dispatch_queue_t otaProviderDelegateQueue; - -@property (nonatomic, readonly) MTRDiagnosticLogsDownloader * diagnosticLogsDownloader; - -- (BOOL)findMatchingFabric:(FabricTable &)fabricTable - params:(MTRDeviceControllerStartupParams *)params - fabric:(const FabricInfo * _Nullable * _Nonnull)fabric; - -- (MTRDeviceController * _Nullable)maybeInitializeOTAProvider:(MTRDeviceController * _Nonnull)controller; -@end - @interface MTRDeviceControllerFactoryParams () // Flag to keep track of whether our .storage is real consumer-provided storage @@ -162,18 +88,68 @@ @interface MTRDeviceControllerFactoryParams () @end +MTR_DIRECT_MEMBERS @implementation MTRDeviceControllerFactory { + dispatch_queue_t _chipWorkQueue; + DeviceControllerFactory * _controllerFactory; + + Credentials::IgnoreCertificateValidityPeriodPolicy _certificateValidityPolicy; + Crypto::RawKeySessionKeystore _sessionKeystore; + // We use TestPersistentStorageDelegate just to get an in-memory store to back + // our group data provider impl. We initialize this store correctly on every + // controller startup, so don't need to actually persist it. + TestPersistentStorageDelegate _groupStorageDelegate; + Credentials::GroupDataProviderImpl _groupDataProvider; + // _usingPerControllerStorage is only written once, during controller // factory start. After that it is only read, and can be read from // arbitrary threads. BOOL _usingPerControllerStorage; - - // See documentation for controllersLock above for the rules for accessing - // _controllerBeingStarted. + PersistentStorageDelegate * _persistentStorageDelegate; + MTRSessionResumptionStorageBridge * _sessionResumptionStorage; + PersistentStorageOperationalKeystore * _keystore; + Credentials::PersistentStorageOpCertStore * _opCertStore; + MTROperationalBrowser * _operationalBrowser; + + // productAttestationAuthorityCertificates and certificationDeclarationCertificates are just copied + // from MTRDeviceControllerFactoryParams. + NSArray * _Nullable _productAttestationAuthorityCertificates; + NSArray * _Nullable _certificationDeclarationCertificates; + + BOOL _advertiseOperational; + + // Lock used to serialize access to the "controllers" array and the + // "_controllerBeingStarted" and "_controllerBeingShutDown" ivars, since those + // need to be touched from both whatever queue is starting controllers and from + // the Matter queue. The way this lock is used assumes that: + // + // 1) The only mutating accesses to the controllers array and the ivars happen + // when the current queue is not the Matter queue or in a block that was + // sync-dispatched to the Matter queue. This is a good assumption, because + // the implementations of the functions that mutate these do sync dispatch to + // the Matter queue, which would deadlock if they were called when that queue + // was the current queue. + // + // 2) It's our API consumer's responsibility to serialize access to us from + // outside. + // + // These assumptions mean that if we are in a block that was sync-dispatched to + // the Matter queue, that block cannot race with either the Matter queue nor the + // non-Matter queue. Similarly, if we are in a situation where the Matter queue + // has been shut down, any accesses to the variables cannot race anything else. + // + // This means that: + // + // A. In a sync-dispatched block, or if the Matter queue has been shut down, we + // do not need to lock and can do read or write access. + // B. Apart from item A, mutations of the array and ivars must happen outside the + // Matter queue and must lock. + // C. Apart from item A, accesses on the Matter queue must be reads only and + // must lock. + // D. Locking around reads not from the Matter queue is OK but not required. + os_unfair_lock _controllersLock; + NSMutableArray * _controllers; MTRDeviceController * _controllerBeingStarted; - - // See documentation for controllersLock above for the rules for access - // _controllerBeingShutDown. MTRDeviceController * _controllerBeingShutDown; // Next available fabric index. Only valid when _controllerBeingStarted is @@ -182,6 +158,13 @@ @implementation MTRDeviceControllerFactory { // down. FabricIndex _nextAvailableFabricIndex; + id _Nullable _otaProviderDelegate; + dispatch_queue_t _Nullable _otaProviderDelegateQueue; + MTRServerEndpoint * _otaProviderEndpoint; + std::unique_ptr _otaProviderDelegateBridge; + + MTRDiagnosticLogsDownloader * _Nullable _diagnosticLogsDownloader; + // Array of all server endpoints across all controllers, used to ensure // in an atomic way that endpoint IDs are unique. NSMutableArray * _serverEndpoints; @@ -214,46 +197,22 @@ - (instancetype)init // cost to having an idle dispatch queue, and it simplifies our logic. DeviceLayer::PlatformMgrImpl().StartEventLoopTask(); - _running = NO; _chipWorkQueue = DeviceLayer::PlatformMgrImpl().GetWorkQueue(); _controllerFactory = &DeviceControllerFactory::GetInstance(); - _controllersLock = OS_UNFAIR_LOCK_INIT; - - _sessionKeystore = new chip::Crypto::RawKeySessionKeystore(); - if ([self checkForInitError:(_sessionKeystore != nullptr) logMsg:kErrorSessionKeystoreInit]) { - return nil; - } - - _groupStorageDelegate = new chip::TestPersistentStorageDelegate(); - if ([self checkForInitError:(_groupStorageDelegate != nullptr) logMsg:kErrorGroupProviderInit]) { - return nil; - } + // Initialize our default-constructed GroupDataProviderImpl. // For now default args are fine, since we are just using this for the IPK. - _groupDataProvider = new chip::Credentials::GroupDataProviderImpl(); - if ([self checkForInitError:(_groupDataProvider != nullptr) logMsg:kErrorGroupProviderInit]) { - return nil; - } - - _groupDataProvider->SetStorageDelegate(_groupStorageDelegate); - _groupDataProvider->SetSessionKeystore(_sessionKeystore); - CHIP_ERROR errorCode = _groupDataProvider->Init(); - if ([self checkForInitError:(CHIP_NO_ERROR == errorCode) logMsg:kErrorGroupProviderInit]) { - return nil; - } + _groupDataProvider.SetStorageDelegate(&_groupStorageDelegate); + _groupDataProvider.SetSessionKeystore(&_sessionKeystore); + CHIP_ERROR err = _groupDataProvider.Init(); + VerifyOrDieWithMsg(err == CHIP_NO_ERROR, NotSpecified, + "GroupDataProviderImpl::Init() failed: %" CHIP_ERROR_FORMAT, err.Format()); + _controllersLock = OS_UNFAIR_LOCK_INIT; _controllers = [[NSMutableArray alloc] init]; - if ([self checkForInitError:(_controllers != nil) logMsg:kErrorControllersInit]) { - return nil; - } - _certificateValidityPolicy = new Credentials::IgnoreCertificateValidityPeriodPolicy(); - if ([self checkForInitError:(_certificateValidityPolicy != nil) logMsg:kErrorCertificateValidityPolicyInit]) { - return nil; - } - - _serverEndpoints = [[NSMutableArray alloc] init]; _serverEndpointsLock = OS_UNFAIR_LOCK_INIT; + _serverEndpoints = [[NSMutableArray alloc] init]; return self; } @@ -261,7 +220,7 @@ - (instancetype)init - (void)dealloc { [self stopControllerFactory]; - [self cleanupInitObjects]; + _groupDataProvider.Finish(); } - (void)_assertCurrentQueueIsNotMatterQueue @@ -284,45 +243,6 @@ - (BOOL)checkIsRunning:(NSError * __autoreleasing *)error return NO; } -- (BOOL)checkForInitError:(BOOL)condition logMsg:(NSString *)logMsg -{ - if (condition) { - return NO; - } - - MTR_LOG_ERROR("Error: %@", logMsg); - - [self cleanupInitObjects]; - - return YES; -} - -- (void)cleanupInitObjects -{ - _controllers = nil; - - if (_groupDataProvider) { - _groupDataProvider->Finish(); - delete _groupDataProvider; - _groupDataProvider = nullptr; - } - - if (_groupStorageDelegate) { - delete _groupStorageDelegate; - _groupStorageDelegate = nullptr; - } - - if (_sessionKeystore) { - delete _sessionKeystore; - _sessionKeystore = nullptr; - } - - if (_certificateValidityPolicy) { - delete _certificateValidityPolicy; - _certificateValidityPolicy = nullptr; - } -} - - (void)cleanupStartupObjects { assertChipStackLockedByCurrentThread(); @@ -498,12 +418,12 @@ - (BOOL)_startControllerFactory:(MTRDeviceControllerFactoryParams *)startupParam } params.enableServerInteractions = startupParams.shouldStartServer; - params.groupDataProvider = _groupDataProvider; - params.sessionKeystore = _sessionKeystore; + params.groupDataProvider = &_groupDataProvider; + params.sessionKeystore = &_sessionKeystore; params.fabricIndependentStorage = _persistentStorageDelegate; params.operationalKeystore = _keystore; params.opCertStore = _opCertStore; - params.certificateValidityPolicy = _certificateValidityPolicy; + params.certificateValidityPolicy = &_certificateValidityPolicy; params.sessionResumptionStorage = _sessionResumptionStorage; errorCode = _controllerFactory->Init(params); if (errorCode != CHIP_NO_ERROR) { @@ -655,8 +575,8 @@ - (MTRDeviceController * _Nullable)_startDeviceController:(MTRDeviceController * // Fall back to the factory-wide OTA provider delegate if one is not // provided in the startup params. if (otaProviderDelegate == nil) { - otaProviderDelegate = self.otaProviderDelegate; - otaProviderDelegateQueue = self.otaProviderDelegateQueue; + otaProviderDelegate = _otaProviderDelegate; + otaProviderDelegateQueue = _otaProviderDelegateQueue; } controller = [controller initWithFactory:self @@ -822,13 +742,13 @@ - (MTRDeviceController * _Nullable)createControllerOnExistingFabric:(MTRDeviceCo [[MTRDeviceControllerStartupParamsInternal alloc] initForExistingFabric:fabricTable fabricIndex:fabric->GetFabricIndex() keystore:self->_keystore - advertiseOperational:self.advertiseOperational + advertiseOperational:self->_advertiseOperational params:startupParams]; if (params == nil) { fabricError = CHIP_ERROR_NO_MEMORY; } else { - params.productAttestationAuthorityCertificates = self.productAttestationAuthorityCertificates; - params.certificationDeclarationCertificates = self.certificationDeclarationCertificates; + params.productAttestationAuthorityCertificates = self->_productAttestationAuthorityCertificates; + params.certificationDeclarationCertificates = self->_certificationDeclarationCertificates; } return params; @@ -878,13 +798,13 @@ - (MTRDeviceController * _Nullable)createControllerOnNewFabric:(MTRDeviceControl auto * params = [[MTRDeviceControllerStartupParamsInternal alloc] initForNewFabric:fabricTable keystore:self->_keystore - advertiseOperational:self.advertiseOperational + advertiseOperational:self->_advertiseOperational params:startupParams]; if (params == nil) { fabricError = CHIP_ERROR_NO_MEMORY; } else { - params.productAttestationAuthorityCertificates = self.productAttestationAuthorityCertificates; - params.certificationDeclarationCertificates = self.certificationDeclarationCertificates; + params.productAttestationAuthorityCertificates = self->_productAttestationAuthorityCertificates; + params.certificationDeclarationCertificates = self->_certificationDeclarationCertificates; } return params; } @@ -993,7 +913,7 @@ - (void)resetOperationalAdvertising return; } - if (!self.advertiseOperational) { + if (!_advertiseOperational) { // No need to reset anything; we are not advertising the things that // would need to get reset. return; @@ -1012,9 +932,6 @@ - (void)resetOperationalAdvertising }); } } -@end - -@implementation MTRDeviceControllerFactory (InternalMethods) - (void)controllerShuttingDown:(MTRDeviceController *)controller { @@ -1041,7 +958,7 @@ - (void)controllerShuttingDown:(MTRDeviceController *)controller // Clear out out group keys for this fabric index, in case fabric // indices get reused later. If a new controller is started on the // same fabric it will be handed the IPK at that point. - self->_groupDataProvider->RemoveGroupKeys(fabricIndex); + self->_groupDataProvider.RemoveGroupKeys(fabricIndex); } // If there are no other controllers left, we can shut down some things. @@ -1259,7 +1176,7 @@ - (MTRDeviceController * _Nullable)initializeController:(MTRDeviceController *)c startupParams:parameters fabricChecker:^MTRDeviceControllerStartupParamsInternal *( FabricTable * fabricTable, MTRDeviceController * controller, CHIP_ERROR & fabricError) { - auto advertiseOperational = self.advertiseOperational && parameters.shouldAdvertiseOperational; + auto advertiseOperational = self->_advertiseOperational && parameters.shouldAdvertiseOperational; auto * params = [[MTRDeviceControllerStartupParamsInternal alloc] initForNewController:controller fabricTable:fabricTable @@ -1269,10 +1186,10 @@ - (MTRDeviceController * _Nullable)initializeController:(MTRDeviceController *)c error:fabricError]; if (params != nil) { if (params.productAttestationAuthorityCertificates == nil) { - params.productAttestationAuthorityCertificates = self.productAttestationAuthorityCertificates; + params.productAttestationAuthorityCertificates = self->_productAttestationAuthorityCertificates; } if (params.certificationDeclarationCertificates == nil) { - params.certificationDeclarationCertificates = self.certificationDeclarationCertificates; + params.certificationDeclarationCertificates = self->_certificationDeclarationCertificates; } } return params; @@ -1285,9 +1202,9 @@ - (PersistentStorageDelegate *)storageDelegate return _persistentStorageDelegate; } -- (Credentials::GroupDataProvider *)groupData +- (Credentials::GroupDataProvider *)groupDataProvider { - return _groupDataProvider; + return &_groupDataProvider; } @end diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory_Internal.h b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory_Internal.h index 0f157b8f89092f..c35a0b4a1692f0 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory_Internal.h +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory_Internal.h @@ -28,6 +28,7 @@ #import #import +#import "MTRDefines_Internal.h" #import "MTRDeviceControllerFactory.h" #include @@ -44,7 +45,8 @@ namespace Credentials { NS_ASSUME_NONNULL_BEGIN -@interface MTRDeviceControllerFactory (InternalMethods) +MTR_DIRECT_MEMBERS +@interface MTRDeviceControllerFactory () - (void)controllerShuttingDown:(MTRDeviceController *)controller; @@ -104,6 +106,25 @@ NS_ASSUME_NONNULL_BEGIN */ - (void)removeServerEndpoint:(MTRServerEndpoint *)endpoint; +@property (readonly) chip::PersistentStorageDelegate * storageDelegate; +@property (readonly) chip::Credentials::GroupDataProvider * groupDataProvider; + +@end + +MTR_DIRECT_MEMBERS +@interface MTRDeviceControllerFactoryParams () +/* + * Initialize the device controller factory without storage. In this mode, + * device controllers will need to have per-controller storage provided to allow + * storing controller-specific information. + */ +- (instancetype)initWithoutStorage; +@end + +// Methods accessed from MTRServerAccessControl linked into darwin-framework-tool +// TODO: https://github.com/project-chip/connectedhomeip/issues/32991 +@interface MTRDeviceControllerFactory () + /** * Get the access grants that apply for the given fabric index and cluster path. * @@ -123,18 +144,6 @@ NS_ASSUME_NONNULL_BEGIN */ - (nullable NSNumber *)neededReadPrivilegeForClusterID:(NSNumber *)clusterID attributeID:(NSNumber *)attributeID; -@property (readonly) chip::PersistentStorageDelegate * storageDelegate; -@property (readonly) chip::Credentials::GroupDataProvider * groupData; - -@end - -@interface MTRDeviceControllerFactoryParams () -/* - * Initialize the device controller factory without storage. In this mode, - * device controllers will need to have per-controller storage provided to allow - * storing controller-specific information. - */ -- (instancetype)initWithoutStorage; @end NS_ASSUME_NONNULL_END From 4aadee7ed2139320cc942d34d849c883fd7efd72 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Mon, 15 Apr 2024 23:37:51 -0400 Subject: [PATCH 079/468] Stop doing read-throughs on MTRDevice when subscription is being established. (#32990) * Stop doing read-throughs on MTRDevice when subscription is being established. The key goal is to stop doing read-throughs when we expect to start getting data soon: between sending the Sigma1 for our initial subscribe and getting the first priming read data packets. Any reads dispatched during that time "because we don't have a subscription yet" are just wasted network traffic, because chances are we're about to have a subscription and get that data as part of the priming read anyway. The main fix is just to stop doing read-throughs altogether for any attributes known to not be C and if we have a subscription delegate. In that state we should be subscribed and should be getting updates for attribute values, and there's no reason to read through. The rest of the changes are related to a side-effect of the stopping of read-throughs: if we had a subscription drop and have backed off quite a bit, a read-through that succeeded could prod us to retry subscribing. We don't want to do a read just to (maybe) trigger that behavior, though. Instead, treat a skipped read-through as a direct signal to retry our subscription attempt. But not too often. This "try to resubscribe" heuristic can probably use some tweaking. * Fix XPC test failure. --- src/darwin/Framework/CHIP/MTRDevice.mm | 130 +++++++++++++++++++++++-- 1 file changed, 120 insertions(+), 10 deletions(-) diff --git a/src/darwin/Framework/CHIP/MTRDevice.mm b/src/darwin/Framework/CHIP/MTRDevice.mm index 55d2b660e979a5..7c73524c963635 100644 --- a/src/darwin/Framework/CHIP/MTRDevice.mm +++ b/src/darwin/Framework/CHIP/MTRDevice.mm @@ -28,6 +28,7 @@ #import "MTRCommandTimedCheck.h" #import "MTRConversion.h" #import "MTRDefines_Internal.h" +#import "MTRDeviceControllerOverXPC.h" #import "MTRDeviceController_Internal.h" #import "MTRDevice_Internal.h" #import "MTRError_Internal.h" @@ -45,6 +46,7 @@ #include #include #include +#include #include typedef void (^MTRDeviceAttributeReportHandler)(NSArray * _Nonnull); @@ -260,6 +262,13 @@ - (BOOL)isEqual:(id)object @end +// Minimal time to wait since our last resubscribe failure before we will allow +// a read attempt to prod our subscription. +// +// TODO: Figure out a better value for this, but for now don't allow this to +// happen more often than once every 10 minutes. +#define MTRDEVICE_MIN_RESUBSCRIBE_DUE_TO_READ_INTERVAL_SECONDS (10 * 60) + @interface MTRDevice () @property (nonatomic, readonly) os_unfair_lock lock; // protects the caches and device state // protects against concurrent time updates by guarding timeUpdateScheduled flag which manages time updates scheduling, @@ -340,6 +349,11 @@ @implementation MTRDevice { // as the read cache, should testing prove attribute storage by cluster is the better solution. NSMutableDictionary * _clusterData; NSMutableSet * _clustersToPersist; + + // When we last failed to subscribe to the device (either via + // _setupSubscription or via the auto-resubscribe behavior of the + // ReadClient). Nil if we have had no such failures. + NSDate * _Nullable _lastSubscriptionFailureTime; } - (instancetype)initWithNodeID:(NSNumber *)nodeID controller:(MTRDeviceController *)controller @@ -659,13 +673,26 @@ - (void)invalidate - (void)nodeMayBeAdvertisingOperational { + assertChipStackLockedByCurrentThread(); + MTR_LOG_DEFAULT("%@ saw new operational advertisement", self); + [self _triggerResubscribeWithReason:"operational advertisement seen" + nodeLikelyReachable:YES]; +} + +// Trigger a resubscribe as needed. nodeLikelyReachable should be YES if we +// have reason to suspect the node is now reachable, NO if we have no idea +// whether it might be. +- (void)_triggerResubscribeWithReason:(const char *)reason nodeLikelyReachable:(BOOL)nodeLikelyReachable +{ + assertChipStackLockedByCurrentThread(); + // We might want to trigger a resubscribe on our existing ReadClient. Do // that outside the scope of our lock, so we're not calling arbitrary code - // we don't control with the lock held. This is safe, because when - // nodeMayBeAdvertisingOperational is called we are running on the Matter - // queue, and the ReadClient can't get destroyed while we are on that queue. + // we don't control with the lock held. This is safe, because we are + // running on he Matter queue and the ReadClient can't get destroyed while + // we are on that queue. ReadClient * readClientToResubscribe = nullptr; SubscriptionCallback * subscriptionCallback = nullptr; @@ -684,17 +711,85 @@ - (void)nodeMayBeAdvertisingOperational os_unfair_lock_unlock(&self->_lock); if (readClientToResubscribe) { - subscriptionCallback->ResetResubscriptionBackoff(); - readClientToResubscribe->TriggerResubscribeIfScheduled("operational advertisement seen"); + if (nodeLikelyReachable) { + // If we have reason to suspect the node is now reachable, reset the + // backoff timer, so that if this attempt fails we'll try again + // quickly; it's possible we'll just catch the node at a bad time + // here (e.g. still booting up), but should try again reasonably quickly. + subscriptionCallback->ResetResubscriptionBackoff(); + } + readClientToResubscribe->TriggerResubscribeIfScheduled(reason); } } -// Return YES if there's a valid delegate AND subscription is expected to report value +// Return YES if we are in a state where, apart from communication issues with +// the device, we will be able to get reports via our subscription. - (BOOL)_subscriptionAbleToReport { std::lock_guard lock(_lock); id delegate = _weakDelegate.strongObject; - return (delegate != nil) && (_state == MTRDeviceStateReachable); + if (delegate == nil) { + // No delegate definitely means no subscription. + return NO; + } + + // For unit testing only, matching logic in setDelegate +#ifdef DEBUG + id testDelegate = delegate; + if ([testDelegate respondsToSelector:@selector(unitTestShouldSetUpSubscriptionForDevice:)]) { + if (![testDelegate unitTestShouldSetUpSubscriptionForDevice:self]) { + return NO; + } + } +#endif + + // Unfortunately, we currently have no subscriptions over our hacked-up XPC + // setup. Try to detect that situation. + if ([_deviceController.class respondsToSelector:@selector(sharedControllerWithID:xpcConnectBlock:)]) { + return NO; + } + + return YES; +} + +// Notification that read-through was skipped for an attribute read. +- (void)_readThroughSkipped +{ + std::lock_guard lock(_lock); + if (_state == MTRDeviceStateReachable) { + // We're getting reports from the device, so there's nothing else to be + // done here. We could skip this check, because our "try to + // resubscribe" code would be a no-op in this case, but then we'd have + // an extra dispatch in the common case of read-while-subscribed, which + // is not great for peformance. + return; + } + + if (_lastSubscriptionFailureTime == nil) { + // No need to try to do anything here, because we have never failed a + // subscription attempt (so we might be in the middle of one now, and no + // need to prod things along). + return; + } + + if ([[NSDate now] timeIntervalSinceDate:_lastSubscriptionFailureTime] < MTRDEVICE_MIN_RESUBSCRIBE_DUE_TO_READ_INTERVAL_SECONDS) { + // Not enough time has passed since we last tried. Don't create extra + // network traffic. + // + // TODO: Do we need to worry about this being too spammy in the log if + // we keep getting reads while not subscribed? We could add another + // backoff timer or counter for the log line... + MTR_LOG_DEBUG("%@ skipping resubscribe from skipped read-through: not enough time has passed since %@", self, _lastSubscriptionFailureTime); + return; + } + + // Do the remaining work on the Matter queue, because we may want to touch + // ReadClient in there. If the dispatch fails, that's fine; it means our + // controller has shut down, so nothing to be done. + [_deviceController asyncDispatchToMatterQueue:^{ + [self _triggerResubscribeWithReason:"read-through skipped while not subscribed" nodeLikelyReachable:NO]; + } + errorHandler:nil]; } - (BOOL)_callDelegateWithBlock:(void (^)(id))block @@ -791,15 +886,29 @@ - (void)_handleResubscriptionNeeded std::lock_guard lock(_lock); [self _changeState:MTRDeviceStateUnknown]; + + // If we are here, then the ReadClient either just detected a subscription + // drop or just tried again and failed. Either way, count it as "tried and + // failed to subscribe": in the latter case it's actually true, and in the + // former case we recently had a subscription and do not want to be forcing + // retries immediately. + _lastSubscriptionFailureTime = [NSDate now]; } - (void)_handleSubscriptionReset:(NSNumber * _Nullable)retryDelay { std::lock_guard lock(_lock); + + // If we are here, then either we failed to establish initil CASE, or we + // failed to send the initial SubscribeRequest message, or our ReadClient + // has given up completely. Those all count as "we have tried and failed to + // subscribe". + _lastSubscriptionFailureTime = [NSDate now]; + // if there is no delegate then also do not retry id delegate = _weakDelegate.strongObject; if (!delegate) { - // NOTE: Do not log anythig here: we have been invalidated, and the + // NOTE: Do not log anything here: we have been invalidated, and the // Matter stack might already be torn down. return; } @@ -1222,7 +1331,7 @@ - (void)_setupSubscription // Drop our pointer to the ReadClient immediately, since // it's about to be destroyed and we don't want to be // holding a dangling pointer. - os_unfair_lock_lock(&self->_lock); + std::lock_guard lock(self->_lock); self->_currentReadClient = nullptr; self->_currentSubscriptionCallback = nullptr; @@ -1230,7 +1339,6 @@ - (void)_setupSubscription // OnDone [self _handleSubscriptionReset:nil]; }); - os_unfair_lock_unlock(&self->_lock); }, ^(void) { MTR_LOG_DEFAULT("%@ got unsolicited message from publisher", self); @@ -1624,6 +1732,8 @@ static BOOL AttributeHasChangesOmittedQuality(MTRAttributePath * attributePath) }]; }]; [_asyncWorkQueue enqueueWorkItem:workItem descriptionWithFormat:@"read %@ 0x%llx 0x%llx", endpointID, clusterID.unsignedLongLongValue, attributeID.unsignedLongLongValue]; + } else { + [self _readThroughSkipped]; } return attributeValueToReturn; From ced12be514713e5a3e6778686ef525aa1492e931 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Tue, 16 Apr 2024 04:12:28 -0400 Subject: [PATCH 080/468] Enable chunking on writes via MTRBaseDevice's writeAttributeWithEndpointID:. (#32999) We used to just encode the list a single TLV item, which did not allow the write to chunk it. To fix that, create a DataModel::List with the individual list items, and encode that. --- src/darwin/Framework/CHIP/MTRBaseDevice.mm | 51 +++++- .../Framework/CHIPTests/MTROTAProviderTests.m | 167 ++++++++++++++++++ 2 files changed, 215 insertions(+), 3 deletions(-) diff --git a/src/darwin/Framework/CHIP/MTRBaseDevice.mm b/src/darwin/Framework/CHIP/MTRBaseDevice.mm index ccefbb18497414..45113db6a18d25 100644 --- a/src/darwin/Framework/CHIP/MTRBaseDevice.mm +++ b/src/darwin/Framework/CHIP/MTRBaseDevice.mm @@ -47,6 +47,7 @@ #include #include #include +#include #include #include #include @@ -633,10 +634,11 @@ static CHIP_ERROR MTREncodeTLVFromDataValueDictionary(id object, chip::TLV::TLVW } NSString * typeName = ((NSDictionary *) object)[MTRTypeKey]; id value = ((NSDictionary *) object)[MTRValueKey]; - if (!typeName) { + if (![typeName isKindOfClass:[NSString class]]) { MTR_LOG_ERROR("Error: Object to encode is corrupt"); return CHIP_ERROR_INVALID_ARGUMENT; } + if ([typeName isEqualToString:MTRSignedIntegerValueType]) { if (![value isKindOfClass:[NSNumber class]]) { MTR_LOG_ERROR("Error: Object to encode has corrupt signed integer type: %@", [value class]); @@ -1219,10 +1221,53 @@ - (void)writeAttributeWithEndpointID:(NSNumber *)endpointID auto onFailureCb = [failureCb, bridge]( const app::ConcreteAttributePath * attribPath, CHIP_ERROR aError) { failureCb(bridge, aError); }; - return chip::Controller::WriteAttribute(session, + // To handle list chunking properly, we have to convert lists into + // DataModel::List here, because that's special-cased in + // WriteClient. + if (![value isKindOfClass:NSDictionary.class]) { + MTR_LOG_ERROR("Error: Unsupported object to write as attribute value: %@", value); + return CHIP_ERROR_INVALID_ARGUMENT; + } + + NSDictionary * dataValue = value; + NSString * typeName = dataValue[MTRTypeKey]; + if (![typeName isKindOfClass:NSString.class]) { + MTR_LOG_ERROR("Error: Object to encode is corrupt: %@", dataValue); + return CHIP_ERROR_INVALID_ARGUMENT; + } + + if (![typeName isEqualToString:MTRArrayValueType]) { + return chip::Controller::WriteAttribute(session, + static_cast([endpointID unsignedShortValue]), + static_cast([clusterID unsignedLongValue]), + static_cast([attributeID unsignedLongValue]), MTRDataValueDictionaryDecodableType(value), + onSuccessCb, onFailureCb, (timeoutMs == nil) ? NullOptional : Optional([timeoutMs unsignedShortValue])); + } + + // Now we are dealing with a list. + NSArray *> * arrayValue = value[MTRValueKey]; + if (![arrayValue isKindOfClass:NSArray.class]) { + MTR_LOG_ERROR("Error: Object to encode claims to be a list but isn't: %@", arrayValue); + return CHIP_ERROR_INVALID_ARGUMENT; + } + + std::vector encodableVector; + encodableVector.reserve(arrayValue.count); + + for (NSDictionary * arrayItem in arrayValue) { + if (![arrayItem isKindOfClass:NSDictionary.class]) { + MTR_LOG_ERROR("Error: Can't encode corrupt list: %@", arrayValue); + return CHIP_ERROR_INVALID_ARGUMENT; + } + + encodableVector.push_back(MTRDataValueDictionaryDecodableType(arrayItem[MTRDataKey])); + } + + DataModel::List encodableList(encodableVector.data(), encodableVector.size()); + return chip::Controller::WriteAttribute>(session, static_cast([endpointID unsignedShortValue]), static_cast([clusterID unsignedLongValue]), - static_cast([attributeID unsignedLongValue]), MTRDataValueDictionaryDecodableType(value), + static_cast([attributeID unsignedLongValue]), encodableList, onSuccessCb, onFailureCb, (timeoutMs == nil) ? NullOptional : Optional([timeoutMs unsignedShortValue])); }); std::move(*bridge).DispatchAction(self); diff --git a/src/darwin/Framework/CHIPTests/MTROTAProviderTests.m b/src/darwin/Framework/CHIPTests/MTROTAProviderTests.m index 2383341afa4d55..2874e6cfff509e 100644 --- a/src/darwin/Framework/CHIPTests/MTROTAProviderTests.m +++ b/src/darwin/Framework/CHIPTests/MTROTAProviderTests.m @@ -18,6 +18,7 @@ // module headers #import +#import "MTRDeviceTestDelegate.h" #import "MTRErrorTestUtils.h" #import "MTRTestKeys.h" #import "MTRTestResetCommissioneeHelper.h" @@ -1564,6 +1565,172 @@ - (void)test007_DoBDXTransferIncrementalOtaUpdate } #endif // ENABLE_REAL_OTA_UPDATE_TESTS +- (void)test008_TestWriteDefaultOTAProviders +{ + __auto_type * runner = [[MTROTARequestorAppRunner alloc] initWithPayload:kOnboardingPayload1 testcase:self]; + MTRDevice * device = [runner commissionWithNodeID:@(kDeviceId1)]; + + dispatch_queue_t queue = dispatch_get_main_queue(); + + __auto_type dataValue = ^(uint16_t endpoint) { + return @{ + MTRTypeKey : MTRArrayValueType, + MTRValueKey : @[ + @{ + MTRDataKey : @ { + MTRTypeKey : MTRStructureValueType, + MTRValueKey : @[ + @{ + MTRContextTagKey : @(1), + MTRDataKey : @ { + MTRTypeKey : MTRUnsignedIntegerValueType, + MTRValueKey : @(kDeviceId1), + }, + }, + @{ + MTRContextTagKey : @(2), + MTRDataKey : @ { + MTRTypeKey : MTRUnsignedIntegerValueType, + MTRValueKey : @(endpoint), + }, + }, + ], + }, + }, + ], + }; + }; + + { + // Test with MTRBaseDevice first. + MTRBaseDevice * baseDevice = [MTRBaseDevice deviceWithNodeID:device.nodeID + controller:device.deviceController]; + + __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:baseDevice + endpointID:@(0) + queue:queue]; + __auto_type * providerLocation = [[MTROTASoftwareUpdateRequestorClusterProviderLocation alloc] init]; + providerLocation.providerNodeID = @(kDeviceId1); + providerLocation.endpoint = @(0); + __auto_type * value = @[ providerLocation ]; + + __auto_type * writeBaseClusterExpectation = [self expectationWithDescription:@"Write succeeded via MTRBaseCluster"]; + [cluster writeAttributeDefaultOTAProvidersWithValue:value + completion:^(NSError * _Nullable error) { + XCTAssertNil(error); + [writeBaseClusterExpectation fulfill]; + }]; + [self waitForExpectations:@[ writeBaseClusterExpectation ] timeout:kTimeoutInSeconds]; + + __auto_type * writeBaseDeviceExpectation = [self expectationWithDescription:@"Write succeeded via MTRBaseDevice"]; + [baseDevice writeAttributeWithEndpointID:@(0) + clusterID:@(MTRClusterIDTypeOTASoftwareUpdateRequestorID) + attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeDefaultOTAProvidersID) + value:dataValue(0) + timedWriteTimeout:nil + queue:queue + completion:^(NSArray *> * _Nullable values, NSError * _Nullable error) { + XCTAssertNil(error); + XCTAssertNotNil(values); + XCTAssertEqual(values.count, 1); + + for (NSDictionary * value in values) { + XCTAssertNil(value[MTRErrorKey]); + } + [writeBaseDeviceExpectation fulfill]; + }]; + [self waitForExpectations:@[ writeBaseDeviceExpectation ] timeout:kTimeoutInSeconds]; + } + + { + // Now test with MTRDevice + __auto_type * delegate = [[MTRDeviceTestDelegate alloc] init]; + // Make sure we don't have expected value notifications confusing our + // attribute reports. + delegate.skipExpectedValuesForWrite = YES; + + XCTestExpectation * gotReportsExpectation = [self expectationWithDescription:@"Subscription established"]; + delegate.onReportEnd = ^() { + [gotReportsExpectation fulfill]; + }; + + [device setDelegate:delegate queue:queue]; + + [self waitForExpectations:@[ gotReportsExpectation ] timeout:60]; + + delegate.onReportEnd = nil; + + __auto_type * expectedAttributePath = [MTRAttributePath attributePathWithEndpointID:@(0) + clusterID:@(MTRClusterIDTypeOTASoftwareUpdateRequestorID) + attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeDefaultOTAProvidersID)]; + + __block __auto_type * expectedValue = dataValue(1); + + __block __auto_type * writeExpectation = [self expectationWithDescription:@"Write succeeded via MTRCluster"]; + delegate.onAttributeDataReceived = ^(NSArray *> * data) { + XCTAssertNotNil(data); + XCTAssertEqual(data.count, 1); + NSDictionary * item = data[0]; + + XCTAssertNil(item[MTRErrorKey]); + + MTRAttributePath * path = item[MTRAttributePathKey]; + XCTAssertNotNil(path); + + XCTAssertEqualObjects(path, expectedAttributePath); + + NSDictionary * receivedValue = item[MTRDataKey]; + + // We can't use XCTAssertEqualObjects to compare receivedValue to + // expectedValue here, because receivedValue has a DataVersion + // that's missing from expectedValue, and the struct in it has an + // extra FabricIndex field. + XCTAssertEqualObjects(receivedValue[MTRTypeKey], MTRArrayValueType); + + NSArray * receivedArray = receivedValue[MTRValueKey]; + NSArray * expectedArray = expectedValue[MTRValueKey]; + + XCTAssertEqual(receivedArray.count, expectedArray.count); + + for (NSUInteger i = 0; i < receivedArray.count; ++i) { + NSDictionary * receivedItem = receivedArray[i][MTRDataKey]; + NSDictionary * expectedItem = expectedArray[i][MTRDataKey]; + + XCTAssertEqual(receivedItem[MTRTypeKey], MTRStructureValueType); + XCTAssertEqual(expectedItem[MTRTypeKey], MTRStructureValueType); + + NSArray * receivedFields = receivedItem[MTRValueKey]; + NSArray * expectedFields = expectedItem[MTRValueKey]; + + // Account for the extra FabricIndex. + XCTAssertEqual(receivedFields.count, expectedFields.count + 1); + for (NSUInteger j = 0; j < expectedFields.count; ++j) { + XCTAssertEqualObjects(receivedFields[j], expectedFields[j]); + } + } + + [writeExpectation fulfill]; + }; + + __auto_type * cluster = [[MTRClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device + endpointID:@(0) + queue:queue]; + [cluster writeAttributeDefaultOTAProvidersWithValue:expectedValue + expectedValueInterval:@(0)]; + [self waitForExpectations:@[ writeExpectation ] timeout:kTimeoutInSeconds]; + + expectedValue = dataValue(2); + writeExpectation = [self expectationWithDescription:@"Write succeeded via MTRDevice"]; + [device writeAttributeWithEndpointID:@(0) + clusterID:@(MTRClusterIDTypeOTASoftwareUpdateRequestorID) + attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeDefaultOTAProvidersID) + value:expectedValue + expectedValueInterval:@(0) + timedWriteTimeout:nil]; + [self waitForExpectations:@[ writeExpectation ] timeout:kTimeoutInSeconds]; + } +} + - (void)test999_TearDown { [[self class] shutdownStack]; From 7b7af2f755bffffd96272ebd90547b04f66bd636 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Tue, 16 Apr 2024 04:27:01 -0400 Subject: [PATCH 081/468] Fix OTA Requestor implementation of write to DefaultOTAProviders. (#33000) Our implementation only handled chunked lists and failed if a non-chunked list was sent. This is bad, because typically this list is short, and chunking it wastes bytes on the wire. --- .../ota-requestor/ota-requestor-server.cpp | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/src/app/clusters/ota-requestor/ota-requestor-server.cpp b/src/app/clusters/ota-requestor/ota-requestor-server.cpp index b95a6d9ba24742..7bfbde1fa54ac5 100644 --- a/src/app/clusters/ota-requestor/ota-requestor-server.cpp +++ b/src/app/clusters/ota-requestor/ota-requestor-server.cpp @@ -115,20 +115,24 @@ CHIP_ERROR OtaSoftwareUpdateRequestorAttrAccess::WriteDefaultOtaProviders(const return CHIP_ERROR_NOT_FOUND; } - switch (aPath.mListOp) + if (!aPath.IsListOperation() || aPath.mListOp == ConcreteDataAttributePath::ListOperation::ReplaceAll) { - case ConcreteDataAttributePath::ListOperation::ReplaceAll: { DataModel::DecodableList list; ReturnErrorOnFailure(aDecoder.Decode(list)); - // With chunking, a single large list is converted to a list of AttributeDataIBs. The first AttributeDataIB contains an - // empty list (to signal this is a replace so clear out contents) followed by a succession of single AttributeDataIBs for - // each entry to be added. - size_t count = 0; - ReturnErrorOnFailure(list.ComputeSize(&count)); - VerifyOrReturnError(count == 0, CHIP_ERROR_INVALID_ARGUMENT); - return requestor->ClearDefaultOtaProviderList(aDecoder.AccessingFabricIndex()); + ReturnErrorOnFailure(requestor->ClearDefaultOtaProviderList(aDecoder.AccessingFabricIndex())); + + auto iter = list.begin(); + while (iter.Next()) + { + ReturnErrorOnFailure(requestor->AddDefaultOtaProvider(iter.GetValue())); + } + + return iter.GetStatus(); } + + switch (aPath.mListOp) + { case ConcreteDataAttributePath::ListOperation::ReplaceItem: return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; case ConcreteDataAttributePath::ListOperation::DeleteItem: From 9a81bed5b738b6e8dfdea8aa204641704a8dd790 Mon Sep 17 00:00:00 2001 From: Kamil Kasperczyk <66371704+kkasperczyk-no@users.noreply.github.com> Date: Tue, 16 Apr 2024 13:04:56 +0200 Subject: [PATCH 082/468] [nrfconnect] Implemented WiFiNetworkDiagnostics events generation (#32962) * Added generation of optional events from WiFiNetworkDiagnostics cluster. * Improved handler methods to validate the input data size --- src/platform/nrfconnect/wifi/WiFiManager.cpp | 109 ++++++++++++++++++- src/platform/nrfconnect/wifi/WiFiManager.h | 13 ++- 2 files changed, 111 insertions(+), 11 deletions(-) diff --git a/src/platform/nrfconnect/wifi/WiFiManager.cpp b/src/platform/nrfconnect/wifi/WiFiManager.cpp index 6e3ff8e473ea13..d5783fa060c558 100644 --- a/src/platform/nrfconnect/wifi/WiFiManager.cpp +++ b/src/platform/nrfconnect/wifi/WiFiManager.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include #include @@ -151,7 +152,7 @@ void WiFiManager::WifiMgmtEventHandler(net_mgmt_event_callback * cb, uint32_t mg Platform::UniquePtr eventData(new uint8_t[cb->info_length]); VerifyOrReturn(eventData); memcpy(eventData.get(), cb->info, cb->info_length); - sEventHandlerMap[mgmtEvent](std::move(eventData)); + sEventHandlerMap[mgmtEvent](std::move(eventData), cb->info_length); } } @@ -292,8 +293,11 @@ CHIP_ERROR WiFiManager::GetNetworkStatistics(NetworkStatistics & stats) const return CHIP_NO_ERROR; } -void WiFiManager::ScanResultHandler(Platform::UniquePtr data) +void WiFiManager::ScanResultHandler(Platform::UniquePtr data, size_t length) { + // Validate that input data size matches the expected one. + VerifyOrReturn(length == sizeof(wifi_scan_result)); + // Contrary to other handlers, offload accumulating of the scan results from the CHIP thread to the caller's thread const wifi_scan_result * scanResult = reinterpret_cast(data.get()); @@ -337,8 +341,11 @@ void WiFiManager::ScanResultHandler(Platform::UniquePtr data) } } -void WiFiManager::ScanDoneHandler(Platform::UniquePtr data) +void WiFiManager::ScanDoneHandler(Platform::UniquePtr data, size_t length) { + // Validate that input data size matches the expected one. + VerifyOrReturn(length == sizeof(wifi_status)); + CHIP_ERROR err = SystemLayer().ScheduleLambda([capturedData = data.get()] { Platform::UniquePtr safePtr(capturedData); uint8_t * rawData = safePtr.get(); @@ -416,8 +423,13 @@ void WiFiManager::SendRouterSolicitation(System::Layer * layer, void * param) } } -void WiFiManager::ConnectHandler(Platform::UniquePtr data) +void WiFiManager::ConnectHandler(Platform::UniquePtr data, size_t length) { + using app::Clusters::WiFiNetworkDiagnostics::AssociationFailureCauseEnum; + + // Validate that input data size matches the expected one. + VerifyOrReturn(length == sizeof(wifi_status)); + CHIP_ERROR err = SystemLayer().ScheduleLambda([capturedData = data.get()] { Platform::UniquePtr safePtr(capturedData); uint8_t * rawData = safePtr.get(); @@ -432,6 +444,32 @@ void WiFiManager::ConnectHandler(Platform::UniquePtr data) { Instance().mHandling.mOnConnectionDone(connStatus); } + + WiFiDiagnosticsDelegate * delegate = GetDiagnosticDataProvider().GetWiFiDiagnosticsDelegate(); + if (delegate) + { + uint16_t reason = Instance().GetLastDisconnectReason(); + uint8_t associationFailureCause; + + switch (connStatus) + { + case WIFI_STATUS_CONN_WRONG_PASSWORD: + associationFailureCause = to_underlying(AssociationFailureCauseEnum::kAuthenticationFailed); + break; + case WIFI_STATUS_CONN_FAIL: + case WIFI_STATUS_CONN_TIMEOUT: + associationFailureCause = to_underlying(AssociationFailureCauseEnum::kAssociationFailed); + break; + case WIFI_STATUS_CONN_AP_NOT_FOUND: + associationFailureCause = to_underlying(AssociationFailureCauseEnum::kSsidNotFound); + break; + default: + associationFailureCause = to_underlying(AssociationFailureCauseEnum::kUnknown); + break; + } + + delegate->OnAssociationFailureDetected(associationFailureCause, reason); + } } else // The connection has been established successfully. { @@ -457,6 +495,13 @@ void WiFiManager::ConnectHandler(Platform::UniquePtr data) { ChipLogError(DeviceLayer, "Cannot post event [error: %s]", ErrorStr(error)); } + + WiFiDiagnosticsDelegate * delegate = GetDiagnosticDataProvider().GetWiFiDiagnosticsDelegate(); + if (delegate) + { + delegate->OnConnectionStatusChanged( + to_underlying(app::Clusters::WiFiNetworkDiagnostics::ConnectionStatusEnum::kConnected)); + } } // cleanup the provisioning data as it is configured per each connect request Instance().ClearStationProvisioningData(); @@ -469,13 +514,55 @@ void WiFiManager::ConnectHandler(Platform::UniquePtr data) } } -void WiFiManager::DisconnectHandler(Platform::UniquePtr) +void WiFiManager::DisconnectHandler(Platform::UniquePtr data, size_t length) { - SystemLayer().ScheduleLambda([] { + // Validate that input data size matches the expected one. + VerifyOrReturn(length == sizeof(wifi_status)); + + CHIP_ERROR err = SystemLayer().ScheduleLambda([capturedData = data.get()] { + Platform::UniquePtr safePtr(capturedData); + uint8_t * rawData = safePtr.get(); + const wifi_status * status = reinterpret_cast(rawData); + uint16_t reason; + + switch (status->disconn_reason) + { + case WIFI_REASON_DISCONN_UNSPECIFIED: + reason = WLAN_REASON_UNSPECIFIED; + break; + case WIFI_REASON_DISCONN_USER_REQUEST: + reason = WLAN_REASON_DEAUTH_LEAVING; + break; + case WIFI_REASON_DISCONN_AP_LEAVING: + reason = WLAN_REASON_DEAUTH_LEAVING; + break; + case WIFI_REASON_DISCONN_INACTIVITY: + reason = WLAN_REASON_DISASSOC_DUE_TO_INACTIVITY; + break; + default: + reason = WLAN_REASON_UNSPECIFIED; + break; + } + Instance().SetLastDisconnectReason(reason); + ChipLogProgress(DeviceLayer, "WiFi station disconnected"); Instance().mWiFiState = WIFI_STATE_DISCONNECTED; Instance().PostConnectivityStatusChange(kConnectivity_Lost); + + WiFiDiagnosticsDelegate * delegate = GetDiagnosticDataProvider().GetWiFiDiagnosticsDelegate(); + if (delegate) + { + delegate->OnConnectionStatusChanged( + to_underlying(app::Clusters::WiFiNetworkDiagnostics::ConnectionStatusEnum::kNotConnected)); + delegate->OnDisconnectionDetected(reason); + } }); + + if (CHIP_NO_ERROR == err) + { + // the ownership has been transferred to the worker thread - release the buffer + data.release(); + } } void WiFiManager::IPv6AddressChangeHandler(const void * data) @@ -586,5 +673,15 @@ CHIP_ERROR WiFiManager::SetLowPowerMode(bool onoff) return CHIP_NO_ERROR; } +void WiFiManager::SetLastDisconnectReason(uint16_t reason) +{ + mLastDisconnectedReason = reason; +} + +uint16_t WiFiManager::GetLastDisconnectReason() +{ + return mLastDisconnectedReason; +} + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/nrfconnect/wifi/WiFiManager.h b/src/platform/nrfconnect/wifi/WiFiManager.h index 2694b050cec4ac..a4e3a8afb39256 100644 --- a/src/platform/nrfconnect/wifi/WiFiManager.h +++ b/src/platform/nrfconnect/wifi/WiFiManager.h @@ -179,9 +179,11 @@ class WiFiManager CHIP_ERROR GetNetworkStatistics(NetworkStatistics & stats) const; void AbortConnectionRecovery(); CHIP_ERROR SetLowPowerMode(bool onoff); + void SetLastDisconnectReason(uint16_t reason); + uint16_t GetLastDisconnectReason(); private: - using NetEventHandler = void (*)(Platform::UniquePtr); + using NetEventHandler = void (*)(Platform::UniquePtr, size_t); struct ConnectionParams { @@ -197,10 +199,10 @@ class WiFiManager // Event handling static void WifiMgmtEventHandler(net_mgmt_event_callback * cb, uint32_t mgmtEvent, net_if * iface); static void IPv6MgmtEventHandler(net_mgmt_event_callback * cb, uint32_t mgmtEvent, net_if * iface); - static void ScanResultHandler(Platform::UniquePtr data); - static void ScanDoneHandler(Platform::UniquePtr data); - static void ConnectHandler(Platform::UniquePtr data); - static void DisconnectHandler(Platform::UniquePtr data); + static void ScanResultHandler(Platform::UniquePtr data, size_t length); + static void ScanDoneHandler(Platform::UniquePtr data, size_t length); + static void ConnectHandler(Platform::UniquePtr data, size_t length); + static void DisconnectHandler(Platform::UniquePtr data, size_t length); static void PostConnectivityStatusChange(ConnectivityChange changeType); static void SendRouterSolicitation(System::Layer * layer, void * param); static void IPv6AddressChangeHandler(const void * data); @@ -234,6 +236,7 @@ class WiFiManager uint32_t mConnectionRecoveryCounter{ 0 }; uint32_t mConnectionRecoveryTimeMs{ kConnectionRecoveryMinIntervalMs }; bool mApplicationDisconnectRequested{ false }; + uint16_t mLastDisconnectedReason = WLAN_REASON_UNSPECIFIED; static const Map sStatusMap; static const Map sEventHandlerMap; From 5a8aa621d88c472a98bcd02b5c6f39768b2ad5f6 Mon Sep 17 00:00:00 2001 From: Arkadiusz Bokowy Date: Tue, 16 Apr 2024 14:59:27 +0200 Subject: [PATCH 083/468] Do not use CONFIG_NETWORK_LAYER_BLE for runtime checks (#33003) --- .../air-purifier-app/ameba/main/CHIPDeviceManager.cpp | 7 +++---- .../all-clusters-app/ameba/main/CHIPDeviceManager.cpp | 7 +++---- .../ameba/main/CHIPDeviceManager.cpp | 7 +++---- examples/chef/ameba/main/CHIPDeviceManager.cpp | 7 +++---- .../light-switch-app/ameba/main/CHIPDeviceManager.cpp | 7 +++---- examples/lighting-app/ameba/main/CHIPDeviceManager.cpp | 7 +++---- .../ota-requestor-app/ameba/main/CHIPDeviceManager.cpp | 7 +++---- examples/platform/asr/init_Matter.cpp | 8 ++++---- examples/platform/beken/common/CHIPDeviceManager.cpp | 7 +++---- 9 files changed, 28 insertions(+), 36 deletions(-) diff --git a/examples/air-purifier-app/ameba/main/CHIPDeviceManager.cpp b/examples/air-purifier-app/ameba/main/CHIPDeviceManager.cpp index 0c73b5506f0849..ff8b0b0166939e 100644 --- a/examples/air-purifier-app/ameba/main/CHIPDeviceManager.cpp +++ b/examples/air-purifier-app/ameba/main/CHIPDeviceManager.cpp @@ -84,10 +84,9 @@ CHIP_ERROR CHIPDeviceManager::Init(CHIPDeviceManagerCallbacks * cb) SetDeviceAttestationCredentialsProvider(&mFactoryDataProvider); SetDeviceInstanceInfoProvider(&mFactoryDataProvider); - if (CONFIG_NETWORK_LAYER_BLE) - { - ConnectivityMgr().SetBLEAdvertisingEnabled(true); - } +#if CONFIG_NETWORK_LAYER_BLE + ConnectivityMgr().SetBLEAdvertisingEnabled(true); +#endif PlatformMgr().AddEventHandler(CHIPDeviceManager::CommonDeviceEventHandler, reinterpret_cast(cb)); diff --git a/examples/all-clusters-app/ameba/main/CHIPDeviceManager.cpp b/examples/all-clusters-app/ameba/main/CHIPDeviceManager.cpp index 7b178060a6fff2..4ae50eaac1b2f6 100644 --- a/examples/all-clusters-app/ameba/main/CHIPDeviceManager.cpp +++ b/examples/all-clusters-app/ameba/main/CHIPDeviceManager.cpp @@ -77,10 +77,9 @@ CHIP_ERROR CHIPDeviceManager::Init(CHIPDeviceManagerCallbacks * cb) SetDeviceAttestationCredentialsProvider(&mFactoryDataProvider); SetDeviceInstanceInfoProvider(&mFactoryDataProvider); - if (CONFIG_NETWORK_LAYER_BLE) - { - ConnectivityMgr().SetBLEAdvertisingEnabled(true); - } +#if CONFIG_NETWORK_LAYER_BLE + ConnectivityMgr().SetBLEAdvertisingEnabled(true); +#endif // Register a function to receive events from the CHIP device layer. Note that calls to // this function will happen on the CHIP event loop thread, not the app_main thread. diff --git a/examples/all-clusters-minimal-app/ameba/main/CHIPDeviceManager.cpp b/examples/all-clusters-minimal-app/ameba/main/CHIPDeviceManager.cpp index ed88297b6bb515..6d83f6886182a6 100644 --- a/examples/all-clusters-minimal-app/ameba/main/CHIPDeviceManager.cpp +++ b/examples/all-clusters-minimal-app/ameba/main/CHIPDeviceManager.cpp @@ -61,10 +61,9 @@ CHIP_ERROR CHIPDeviceManager::Init(CHIPDeviceManagerCallbacks * cb) err = PlatformMgr().InitChipStack(); SuccessOrExit(err); - if (CONFIG_NETWORK_LAYER_BLE) - { - ConnectivityMgr().SetBLEAdvertisingEnabled(true); - } +#if CONFIG_NETWORK_LAYER_BLE + ConnectivityMgr().SetBLEAdvertisingEnabled(true); +#endif // Register a function to receive events from the CHIP device layer. Note that calls to // this function will happen on the CHIP event loop thread, not the app_main thread. diff --git a/examples/chef/ameba/main/CHIPDeviceManager.cpp b/examples/chef/ameba/main/CHIPDeviceManager.cpp index ed88297b6bb515..6d83f6886182a6 100644 --- a/examples/chef/ameba/main/CHIPDeviceManager.cpp +++ b/examples/chef/ameba/main/CHIPDeviceManager.cpp @@ -61,10 +61,9 @@ CHIP_ERROR CHIPDeviceManager::Init(CHIPDeviceManagerCallbacks * cb) err = PlatformMgr().InitChipStack(); SuccessOrExit(err); - if (CONFIG_NETWORK_LAYER_BLE) - { - ConnectivityMgr().SetBLEAdvertisingEnabled(true); - } +#if CONFIG_NETWORK_LAYER_BLE + ConnectivityMgr().SetBLEAdvertisingEnabled(true); +#endif // Register a function to receive events from the CHIP device layer. Note that calls to // this function will happen on the CHIP event loop thread, not the app_main thread. diff --git a/examples/light-switch-app/ameba/main/CHIPDeviceManager.cpp b/examples/light-switch-app/ameba/main/CHIPDeviceManager.cpp index 50e6d11db53c25..1a48d5dbfd2f27 100644 --- a/examples/light-switch-app/ameba/main/CHIPDeviceManager.cpp +++ b/examples/light-switch-app/ameba/main/CHIPDeviceManager.cpp @@ -77,10 +77,9 @@ CHIP_ERROR CHIPDeviceManager::Init(CHIPDeviceManagerCallbacks * cb) SetDeviceAttestationCredentialsProvider(&mFactoryDataProvider); SetDeviceInstanceInfoProvider(&mFactoryDataProvider); - if (CONFIG_NETWORK_LAYER_BLE) - { - ConnectivityMgr().SetBLEAdvertisingEnabled(true); - } +#if CONFIG_NETWORK_LAYER_BLE + ConnectivityMgr().SetBLEAdvertisingEnabled(true); +#endif // Register a function to receive events from the CHIP device layer. Note that calls to // this function will happen on the CHIP event loop thread, not the app_main thread. diff --git a/examples/lighting-app/ameba/main/CHIPDeviceManager.cpp b/examples/lighting-app/ameba/main/CHIPDeviceManager.cpp index c2d9d13d9a91a7..82a670e9648b40 100644 --- a/examples/lighting-app/ameba/main/CHIPDeviceManager.cpp +++ b/examples/lighting-app/ameba/main/CHIPDeviceManager.cpp @@ -84,10 +84,9 @@ CHIP_ERROR CHIPDeviceManager::Init(CHIPDeviceManagerCallbacks * cb) SetDeviceAttestationCredentialsProvider(&mFactoryDataProvider); SetDeviceInstanceInfoProvider(&mFactoryDataProvider); - if (CONFIG_NETWORK_LAYER_BLE) - { - ConnectivityMgr().SetBLEAdvertisingEnabled(true); - } +#if CONFIG_NETWORK_LAYER_BLE + ConnectivityMgr().SetBLEAdvertisingEnabled(true); +#endif PlatformMgr().AddEventHandler(CHIPDeviceManager::CommonDeviceEventHandler, reinterpret_cast(cb)); diff --git a/examples/ota-requestor-app/ameba/main/CHIPDeviceManager.cpp b/examples/ota-requestor-app/ameba/main/CHIPDeviceManager.cpp index 50e6d11db53c25..1a48d5dbfd2f27 100644 --- a/examples/ota-requestor-app/ameba/main/CHIPDeviceManager.cpp +++ b/examples/ota-requestor-app/ameba/main/CHIPDeviceManager.cpp @@ -77,10 +77,9 @@ CHIP_ERROR CHIPDeviceManager::Init(CHIPDeviceManagerCallbacks * cb) SetDeviceAttestationCredentialsProvider(&mFactoryDataProvider); SetDeviceInstanceInfoProvider(&mFactoryDataProvider); - if (CONFIG_NETWORK_LAYER_BLE) - { - ConnectivityMgr().SetBLEAdvertisingEnabled(true); - } +#if CONFIG_NETWORK_LAYER_BLE + ConnectivityMgr().SetBLEAdvertisingEnabled(true); +#endif // Register a function to receive events from the CHIP device layer. Note that calls to // this function will happen on the CHIP event loop thread, not the app_main thread. diff --git a/examples/platform/asr/init_Matter.cpp b/examples/platform/asr/init_Matter.cpp index 130d01479de4f9..a80fea5b4ea1bc 100644 --- a/examples/platform/asr/init_Matter.cpp +++ b/examples/platform/asr/init_Matter.cpp @@ -85,10 +85,10 @@ CHIP_ERROR MatterInitializer::Init_Matter_Stack(const char * appName) chip::DeviceLayer::ConnectivityMgr().SetBLEDeviceName(appName); - if (CONFIG_NETWORK_LAYER_BLE) - { - ConnectivityMgr().SetBLEAdvertisingEnabled(true); - } +#if CONFIG_NETWORK_LAYER_BLE + ConnectivityMgr().SetBLEAdvertisingEnabled(true); +#endif + return CHIP_NO_ERROR; } diff --git a/examples/platform/beken/common/CHIPDeviceManager.cpp b/examples/platform/beken/common/CHIPDeviceManager.cpp index 5ee110ed372c7e..38cffaa5b1d9d4 100644 --- a/examples/platform/beken/common/CHIPDeviceManager.cpp +++ b/examples/platform/beken/common/CHIPDeviceManager.cpp @@ -60,10 +60,9 @@ CHIP_ERROR CHIPDeviceManager::Init(CHIPDeviceManagerCallbacks * cb) err = PlatformMgr().InitChipStack(); SuccessOrExit(err); - if (CONFIG_NETWORK_LAYER_BLE) - { - ConnectivityMgr().SetBLEAdvertisingEnabled(true); - } +#if CONFIG_NETWORK_LAYER_BLE + ConnectivityMgr().SetBLEAdvertisingEnabled(true); +#endif err = Platform::MemoryInit(); SuccessOrExit(err); From d8245cb9cbb932c31f54759b1aaec2805587261c Mon Sep 17 00:00:00 2001 From: Super Chiba <25316415+Chapoly1305@users.noreply.github.com> Date: Tue, 16 Apr 2024 09:00:19 -0400 Subject: [PATCH 084/468] Update rpc_config.gni (#32980) * Update rpc_config.gni The "pw_rpc" is not a valid .h file can be found from upstream, neither any file starting with this name. * Update rpc_config.gni pw_rpc was an alias of default_addresses that was removed * Update rpc_config.gni pw_rpc was an alias of default_addresses that was removed. Fix for #32979. * Update examples/common/pigweed/rpc_config.gni Co-authored-by: Terence Hampson --------- Co-authored-by: Terence Hampson --- examples/common/pigweed/rpc_config.gni | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/common/pigweed/rpc_config.gni b/examples/common/pigweed/rpc_config.gni index ddd6b0863ebf70..29ad79120c6ec3 100644 --- a/examples/common/pigweed/rpc_config.gni +++ b/examples/common/pigweed/rpc_config.gni @@ -31,7 +31,7 @@ rpc_sources = [ ] rpc_deps = [ - "$dir_pw_hdlc:pw_rpc", + "$dir_pw_hdlc:default_addresses", "$dir_pw_hdlc:rpc_channel_output", "$dir_pw_log", "$dir_pw_rpc:server", From fdcf07a725e04cce9cd9c07cefcbe8af36c129df Mon Sep 17 00:00:00 2001 From: Kamil Kasperczyk <66371704+kkasperczyk-no@users.noreply.github.com> Date: Tue, 16 Apr 2024 16:51:44 +0200 Subject: [PATCH 085/468] [zephyr] Fix CHIPDevicePlatformEvent.h include dependency (#33004) Currently the CHIPDevicePlatformEvent depends on the SystemPacketBuffer which is included in the CHIPDeviceEvent.h too late. The problem is silently worked around in the application when the include is preceded by other headers that pull in SystemPacketBuffer.h, but we need a proper fix. Signed-off-by: Marcin Kajor --- src/platform/Zephyr/CHIPDevicePlatformEvent.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platform/Zephyr/CHIPDevicePlatformEvent.h b/src/platform/Zephyr/CHIPDevicePlatformEvent.h index ff329ec7590ea0..8291c5d3a3a355 100644 --- a/src/platform/Zephyr/CHIPDevicePlatformEvent.h +++ b/src/platform/Zephyr/CHIPDevicePlatformEvent.h @@ -23,7 +23,7 @@ #pragma once -#include +#include #include From 90732b256ee1b405d7461f69eb8e25abe700c805 Mon Sep 17 00:00:00 2001 From: Shubham Patil Date: Tue, 16 Apr 2024 21:35:50 +0530 Subject: [PATCH 086/468] Remove unused variable from scenes-server (#33006) --- src/app/clusters/scenes-server/SceneTableImpl.h | 1 - 1 file changed, 1 deletion(-) diff --git a/src/app/clusters/scenes-server/SceneTableImpl.h b/src/app/clusters/scenes-server/SceneTableImpl.h index 62317732eca0b9..d77e957f5c32d2 100644 --- a/src/app/clusters/scenes-server/SceneTableImpl.h +++ b/src/app/clusters/scenes-server/SceneTableImpl.h @@ -40,7 +40,6 @@ static_assert(kMaxScenesPerEndpoint <= CHIP_CONFIG_MAX_SCENES_TABLE_SIZE, "CHIP_CONFIG_MAX_SCENES_TABLE_SIZE in CHIPConfig.h if you really need more scenes"); static_assert(kMaxScenesPerEndpoint >= 16, "Per spec, kMaxScenesPerEndpoint must be at least 16"); static constexpr uint16_t kMaxScenesPerFabric = (kMaxScenesPerEndpoint - 1) / 2; -static constexpr uint8_t kMaxFabrics = CHIP_CONFIG_MAX_FABRICS; /** * @brief Implementation of a storage in nonvolatile storage of the scene table. From c065cc79a166efa4ff1110ef4815b96c33d664ca Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Tue, 16 Apr 2024 15:41:44 -0400 Subject: [PATCH 087/468] Clarify some documentation for Matter.framework. (#33012) People were being confused about when the MRP parameter overrides took effect. --- src/darwin/Framework/CHIP/MTRDeviceControllerFactory.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.h b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.h index b5ef1ffaa6cf32..62080b305ee635 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.h +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.h @@ -180,8 +180,13 @@ MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @end /** - * Set the Message Reliability Protocol parameters for all controllers. This - * allows control over retransmit delays to account for high-latency networks. + * Set the Message Reliability Protocol parameters for all controllers, + * including already-running ones. This allows control over retransmit delays + * to account for high-latency networks. + * + * Since MRP parameters are communicated to peers during session setup, existing + * sessions will not be affected when this function is called, but all sessions + * established after the call will be. * * Setting all arguments to nil will reset to the MRP parameters to their * default values. From bfdb5da2c4227f2f7cce13796106188941938988 Mon Sep 17 00:00:00 2001 From: Vatsal Ghelani <152916324+vatsalghelani-csa@users.noreply.github.com> Date: Tue, 16 Apr 2024 15:51:54 -0400 Subject: [PATCH 088/468] Update test_metadata.py to use temporary files for test cases, for easier extensibility (#33008) * Modified the test script with the changes recommended * Removed unwanted import os * Removed path_under_test as it is using TempFile * Restyled by autopep8 * Restyled by isort --------- Co-authored-by: Restyled.io --- scripts/tests/py/test_metadata.py | 40 +++++++++++++++---------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/scripts/tests/py/test_metadata.py b/scripts/tests/py/test_metadata.py index 7c2594d08134c2..8707d483026bfb 100644 --- a/scripts/tests/py/test_metadata.py +++ b/scripts/tests/py/test_metadata.py @@ -1,4 +1,3 @@ -#!/usr/bin/python3 # Copyright (c) 2024 Project CHIP Authors # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -13,38 +12,39 @@ # See the License for the specific language governing permissions and # limitations under the License. -import os +import tempfile import unittest from os import path +from typing import List from metadata import Metadata, MetadataReader class TestMetadataReader(unittest.TestCase): - path_under_test = path_under_test = path.join(path.dirname(__file__), "simple_run_args.txt") def setUp(self): - # build the reader object self.reader = MetadataReader(path.join(path.dirname(__file__), "env_test.yaml")) - with open(self.path_under_test, 'w', encoding='utf8') as test_file: - test_file.writelines(''' - # test-runner-runs: run1 - # test-runner-run/run1: app/all-clusters discriminator KVS storage-path commissioning-method discriminator passcode - ''') - - def test_parse_single_run(self): - expected_runs_metadata = [] + def assertMetadataParse(self, file_content: str, expected: List[Metadata]): + with tempfile.NamedTemporaryFile(mode='w', delete=False) as fp: + fp.write(file_content) + fp.close() + for e in expected: + e.py_script_path = fp.name + actual = self.reader.parse_script(fp.name) + self.assertEqual(actual, expected) - expected_runs_metadata.append(Metadata(app="out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app", - discriminator=1234, py_script_path=self.path_under_test, run="run1", passcode=20202021)) - - self.assertEqual(self.reader.parse_script(self.path_under_test), expected_runs_metadata) - - def tearDown(self): - if os.path.exists(self.path_under_test): - os.remove(self.path_under_test) + def test_parse_single_run(self): + self.assertMetadataParse(''' + # test-runner-runs: run1 + # test-runner-run/run1: app/all-clusters discriminator passcode + ''', + [ + Metadata(app="out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app", + discriminator=1234, run="run1", passcode=20202021) + ] + ) if __name__ == "__main__": From 6ba907e3b072824aa8b92fd97e3a08230fc0207d Mon Sep 17 00:00:00 2001 From: Philip Gregor <147669098+pgregorr-amazon@users.noreply.github.com> Date: Tue, 16 Apr 2024 13:12:15 -0700 Subject: [PATCH 089/468] Addressed comments by yunhanw-google related to error checking and logging and also fixed a tv-casting-app connection bug (#33010) --- .../casting/DiscoveryExampleFragment.java | 1 - .../cpp/core/CastingPlayerDiscovery-JNI.cpp | 2 +- src/platform/android/DnssdImpl.cpp | 19 +++++++++++++++++-- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/examples/tv-casting-app/android/App/app/src/main/java/com/matter/casting/DiscoveryExampleFragment.java b/examples/tv-casting-app/android/App/app/src/main/java/com/matter/casting/DiscoveryExampleFragment.java index 46401af8909cd2..49076867a9cc75 100644 --- a/examples/tv-casting-app/android/App/app/src/main/java/com/matter/casting/DiscoveryExampleFragment.java +++ b/examples/tv-casting-app/android/App/app/src/main/java/com/matter/casting/DiscoveryExampleFragment.java @@ -216,7 +216,6 @@ public void onResume() { public void onPause() { super.onPause(); Log.i(TAG, "onPause() called"); - stopDiscovery(); } /** Interface for notifying the host. */ diff --git a/examples/tv-casting-app/android/App/app/src/main/jni/cpp/core/CastingPlayerDiscovery-JNI.cpp b/examples/tv-casting-app/android/App/app/src/main/jni/cpp/core/CastingPlayerDiscovery-JNI.cpp index df79e60bc96cf2..26526dfdac8f07 100644 --- a/examples/tv-casting-app/android/App/app/src/main/jni/cpp/core/CastingPlayerDiscovery-JNI.cpp +++ b/examples/tv-casting-app/android/App/app/src/main/jni/cpp/core/CastingPlayerDiscovery-JNI.cpp @@ -246,7 +246,7 @@ JNI_METHOD(jobject, removeCastingPlayerChangeListener)(JNIEnv * env, jobject, jo return support::convertMatterErrorFromCppToJava(CHIP_NO_ERROR); } - else if (DiscoveryDelegateImpl::GetInstance()->castingPlayerChangeListenerJavaObject.ObjectRef() == nullptr) + else if (!DiscoveryDelegateImpl::GetInstance()->castingPlayerChangeListenerJavaObject.HasValidObjectRef()) { ChipLogError( AppServer, diff --git a/src/platform/android/DnssdImpl.cpp b/src/platform/android/DnssdImpl.cpp index b272ed5a712414..290b3497ea11d4 100644 --- a/src/platform/android/DnssdImpl.cpp +++ b/src/platform/android/DnssdImpl.cpp @@ -191,6 +191,8 @@ CHIP_ERROR ChipDnssdBrowse(const char * type, DnssdServiceProtocol protocol, Ine std::string serviceType = GetFullTypeWithSubTypes(type, protocol); JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + VerifyOrReturnError(env != nullptr, CHIP_JNI_ERROR_NO_ENV, + ChipLogError(Discovery, "Failed to GetEnvForCurrentThread for ChipDnssdBrowse")); UtfString jniServiceType(env, serviceType.c_str()); env->CallVoidMethod(sBrowserObject.ObjectRef(), sBrowseMethod, jniServiceType.jniValue(), reinterpret_cast(callback), @@ -204,7 +206,9 @@ CHIP_ERROR ChipDnssdBrowse(const char * type, DnssdServiceProtocol protocol, Ine return CHIP_JNI_ERROR_EXCEPTION_THROWN; } - auto sdCtx = chip::Platform::New(callback); + auto sdCtx = chip::Platform::New(callback); + VerifyOrReturnError(nullptr != sdCtx, CHIP_ERROR_NO_MEMORY, + ChipLogError(Discovery, "Failed allocate memory for BrowseContext in ChipDnssdBrowse")); *browseIdentifier = reinterpret_cast(sdCtx); return CHIP_NO_ERROR; @@ -212,14 +216,19 @@ CHIP_ERROR ChipDnssdBrowse(const char * type, DnssdServiceProtocol protocol, Ine CHIP_ERROR ChipDnssdStopBrowse(intptr_t browseIdentifier) { + VerifyOrReturnError(browseIdentifier != 0, CHIP_ERROR_INVALID_ARGUMENT, + ChipLogError(Discovery, "ChipDnssdStopBrowse Invalid argument browseIdentifier = 0")); VerifyOrReturnError(sBrowserObject.HasValidObjectRef() && sStopBrowseMethod != nullptr, CHIP_ERROR_INVALID_ARGUMENT); JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - auto ctx = reinterpret_cast(browseIdentifier); + VerifyOrReturnError(env != nullptr, CHIP_JNI_ERROR_NO_ENV, + ChipLogError(Discovery, "Failed to GetEnvForCurrentThread for ChipDnssdStopBrowse")); + auto ctx = reinterpret_cast(browseIdentifier); env->CallVoidMethod(sBrowserObject.ObjectRef(), sStopBrowseMethod, reinterpret_cast(ctx->callback)); chip::Platform::Delete(ctx); + ctx = nullptr; if (env->ExceptionCheck()) { ChipLogError(Discovery, "Java exception in ChipDnssdStopBrowse"); @@ -339,6 +348,12 @@ void InitializeWithObjects(jobject resolverObject, jobject browserObject, jobjec env->ExceptionClear(); } + if (sStopBrowseMethod == nullptr) + { + ChipLogError(Discovery, "Failed to access Discover 'stopDiscover' method"); + env->ExceptionClear(); + } + if (sGetTextEntryKeysMethod == nullptr) { ChipLogError(Discovery, "Failed to access MdnsCallback 'getTextEntryKeys' method"); From 2002c0c3d6879057d1f14391f881172d11fa36a5 Mon Sep 17 00:00:00 2001 From: lpbeliveau-silabs <112982107+lpbeliveau-silabs@users.noreply.github.com> Date: Tue, 16 Apr 2024 16:31:45 -0400 Subject: [PATCH 090/468] Add missing [[maybe_unused]] annotations in unit tests (#33007) * Added [[maybe_unused]] to allow building unit test and Silabs apps without loggs * Added gating of SILABS_LOG_ENABLED on chip_logging --- .../platform/silabs/SoftwareFaultReports.cpp | 24 +++++++++---------- src/crypto/tests/TestChipCryptoPAL.cpp | 8 +++---- third_party/silabs/SiWx917_sdk.gni | 7 +++++- third_party/silabs/efr32_sdk.gni | 7 +++++- 4 files changed, 28 insertions(+), 18 deletions(-) diff --git a/examples/platform/silabs/SoftwareFaultReports.cpp b/examples/platform/silabs/SoftwareFaultReports.cpp index 813a66037fbe84..fc7b6a9c5e3d76 100644 --- a/examples/platform/silabs/SoftwareFaultReports.cpp +++ b/examples/platform/silabs/SoftwareFaultReports.cpp @@ -89,18 +89,18 @@ void OnSoftwareFaultEventHandler(const char * faultRecordString) extern "C" __attribute__((used)) void debugHardfault(uint32_t * sp) { #if SILABS_LOG_ENABLED - uint32_t cfsr = SCB->CFSR; - uint32_t hfsr = SCB->HFSR; - uint32_t mmfar = SCB->MMFAR; - uint32_t bfar = SCB->BFAR; - uint32_t r0 = sp[0]; - uint32_t r1 = sp[1]; - uint32_t r2 = sp[2]; - uint32_t r3 = sp[3]; - uint32_t r12 = sp[4]; - uint32_t lr = sp[5]; - uint32_t pc = sp[6]; - uint32_t psr = sp[7]; + [[maybe_unused]] uint32_t cfsr = SCB->CFSR; + [[maybe_unused]] uint32_t hfsr = SCB->HFSR; + [[maybe_unused]] uint32_t mmfar = SCB->MMFAR; + [[maybe_unused]] uint32_t bfar = SCB->BFAR; + [[maybe_unused]] uint32_t r0 = sp[0]; + [[maybe_unused]] uint32_t r1 = sp[1]; + [[maybe_unused]] uint32_t r2 = sp[2]; + [[maybe_unused]] uint32_t r3 = sp[3]; + [[maybe_unused]] uint32_t r12 = sp[4]; + [[maybe_unused]] uint32_t lr = sp[5]; + [[maybe_unused]] uint32_t pc = sp[6]; + [[maybe_unused]] uint32_t psr = sp[7]; ChipLogError(NotSpecified, "HardFault:"); ChipLogError(NotSpecified, "SCB->CFSR 0x%08lx", cfsr); diff --git a/src/crypto/tests/TestChipCryptoPAL.cpp b/src/crypto/tests/TestChipCryptoPAL.cpp index 239d951910c80e..0cf3a877fcf828 100644 --- a/src/crypto/tests/TestChipCryptoPAL.cpp +++ b/src/crypto/tests/TestChipCryptoPAL.cpp @@ -640,7 +640,7 @@ static void TestRawIntegerToDerInvalidCases(nlTestSuite * inSuite, void * inCont { .input = bad_buffer_empty, .output = good_out_buffer, .expected_status = CHIP_ERROR_INVALID_ARGUMENT } }; - int case_idx = 0; + [[maybe_unused]] int case_idx = 0; for (const ErrorCase & v : error_cases) { CHIP_ERROR status = ConvertIntegerRawToDerWithoutTag(v.input, v.output); @@ -704,7 +704,7 @@ static void TestReadDerLengthValidCases(nlTestSuite * inSuite, void * inContext) { .input_buf = max_byte_length_large_buf, .expected_length = SIZE_MAX }, }; - int case_idx = 0; + [[maybe_unused]] int case_idx = 0; for (const SuccessCase & v : cases) { size_t output_length = SIZE_MAX - 1; @@ -768,7 +768,7 @@ static void TestReadDerLengthInvalidCases(nlTestSuite * inSuite, void * inContex { .input_buf = max_byte_length_large_insufficient_bytes_buf, .expected_status = CHIP_ERROR_BUFFER_TOO_SMALL }, }; - int case_idx = 0; + [[maybe_unused]] int case_idx = 0; for (const ErrorCase & v : error_cases) { size_t output_length = SIZE_MAX; @@ -2135,7 +2135,7 @@ static void TestX509_VerifyAttestationCertificateFormat(nlTestSuite * inSuite, v }; // clang-format on - int case_idx = 0; + [[maybe_unused]] int case_idx = 0; for (auto & testCase : sValidationTestCases) { ByteSpan cert = testCase.cert; diff --git a/third_party/silabs/SiWx917_sdk.gni b/third_party/silabs/SiWx917_sdk.gni index edcce8b50b5198..00e077d41da221 100644 --- a/third_party/silabs/SiWx917_sdk.gni +++ b/third_party/silabs/SiWx917_sdk.gni @@ -166,7 +166,6 @@ template("siwx917_sdk") { "MBEDTLS_CONFIG_FILE=\"siwx917-chip-mbedtls-config.h\"", "__STARTUP_CLEAR_BSS", "HARD_FAULT_LOG_ENABLE", - "SILABS_LOG_ENABLED=${silabs_log_enabled}", "SL_HEAP_SIZE=32768", "SL_WIFI=1", "CCP_SI917_BRINGUP=1", @@ -224,6 +223,12 @@ template("siwx917_sdk") { "configUSE_POSIX_ERRNO=1", ] + if (silabs_log_enabled && chip_logging) { + defines += [ "SILABS_LOG_ENABLED=1" ] + } else { + defines += [ "SILABS_LOG_ENABLED=0" ] + } + if (chip_build_libshell) { defines += [ "ENABLE_CHIP_SHELL" ] } diff --git a/third_party/silabs/efr32_sdk.gni b/third_party/silabs/efr32_sdk.gni index ce0b55b7ec803f..5bb2ff3079fcc5 100644 --- a/third_party/silabs/efr32_sdk.gni +++ b/third_party/silabs/efr32_sdk.gni @@ -283,7 +283,6 @@ template("efr32_sdk") { "__STARTUP_CLEAR_BSS", "HARD_FAULT_LOG_ENABLE", "CORTEXM3_EFM32_MICRO", - "SILABS_LOG_ENABLED=${silabs_log_enabled}", "NVM3_DEFAULT_NVM_SIZE=40960", "NVM3_DEFAULT_MAX_OBJECT_SIZE=4092", "KVS_MAX_ENTRIES=${kvs_max_entries}", @@ -308,6 +307,12 @@ template("efr32_sdk") { #"__STACK_SIZE=0", ] + if (silabs_log_enabled && chip_logging) { + defines += [ "SILABS_LOG_ENABLED=1" ] + } else { + defines += [ "SILABS_LOG_ENABLED=0" ] + } + # Temporary configuration to enable COAP specific configurations if (use_thread_coap_lib) { defines += [ "SL_USE_COAP_CONFIG=1" ] From 0a87dca5555b7b91840162c14dd9360bf1487045 Mon Sep 17 00:00:00 2001 From: Rob Bultman Date: Tue, 16 Apr 2024 17:06:39 -0400 Subject: [PATCH 091/468] Move add new device howto to docs (#32950) * Move add new device howto * Add words * Update docs/cluster_and_device_type_dev/how_to_add_new_dts_and_clusters.md Co-authored-by: Andrei Litvin * Remove word * Update docs/cluster_and_device_type_dev/how_to_add_new_dts_and_clusters.md Co-authored-by: Andrei Litvin * Update docs/cluster_and_device_type_dev/how_to_add_new_dts_and_clusters.md * Update docs/cluster_and_device_type_dev/how_to_add_new_dts_and_clusters.md * Remove word from wordlist --------- Co-authored-by: Andrei Litvin --- .github/.wordlist.txt | 2 + .../cluster_and_device_type_dev.md | 8 +- .../how_to_add_new_dts_and_clusters.md | 248 ++++++++++++++++++ docs/cluster_and_device_type_dev/index.md | 1 + 4 files changed, 254 insertions(+), 5 deletions(-) create mode 100644 docs/cluster_and_device_type_dev/how_to_add_new_dts_and_clusters.md diff --git a/.github/.wordlist.txt b/.github/.wordlist.txt index b891546f940e53..f62685f566c407 100644 --- a/.github/.wordlist.txt +++ b/.github/.wordlist.txt @@ -369,6 +369,7 @@ DelayedActionTime delayedApplyActionTimeSec delayedQueryActionTimeSec delayQuery +deliverables demangle deployable depottools @@ -729,6 +730,7 @@ JLink JLinkExe JLinkRTTClient JN +jni jpg jre js diff --git a/docs/cluster_and_device_type_dev/cluster_and_device_type_dev.md b/docs/cluster_and_device_type_dev/cluster_and_device_type_dev.md index f4c1c5eb890e71..e016ea78b7b7bf 100644 --- a/docs/cluster_and_device_type_dev/cluster_and_device_type_dev.md +++ b/docs/cluster_and_device_type_dev/cluster_and_device_type_dev.md @@ -36,11 +36,9 @@ types in the SDK. - XML defines conformance - [src/app/zap-templates/zcl/data-model/chip/matter-devices.xml](https://github.com/project-chip/connectedhomeip/blob/master/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml) -The following wiki page has a detailed description of how and where to add -cluster and device type definitions so they are picked up properly by ZAP/ember -and the SDK. - -[https://groups.csa-iot.org/wg/matter-tsg/wiki/howto-add-a-new-device-type](https://groups.csa-iot.org/wg/matter-tsg/wiki/howto-add-a-new-device-type) +See [How To Add New Device Types & Clusters](how_to_add_new_dts_and_clusters.md) +for a detailed description of how and where to add cluster and device type +definitions so they are picked up properly by ZAP/ember and the SDK. Note that the output should also be verified against the spec using the [.matter parser tools](https://project-chip.github.io/connectedhomeip-doc/guides/matter_idl_tooling.html). diff --git a/docs/cluster_and_device_type_dev/how_to_add_new_dts_and_clusters.md b/docs/cluster_and_device_type_dev/how_to_add_new_dts_and_clusters.md new file mode 100644 index 00000000000000..8d73a257c28996 --- /dev/null +++ b/docs/cluster_and_device_type_dev/how_to_add_new_dts_and_clusters.md @@ -0,0 +1,248 @@ +# How to Add New Device Types & Clusters + +This document outlines the process needed to add a new Matter device type and +related clusters. Obviously, the steps below assume that the related Matter +specifications were properly reviewed and approved. + +## Add the cluster definitions to the SDK + +The following steps should be followed to add new cluster definitions to the +SDK. + +**Add your new cluster definition to an appropriately-name file in this +directory:** +[src/app/zap-templates/zcl/data-model/chip](https://github.com/project-chip/connectedhomeip/tree/master/src/app/zap-templates/zcl/data-model/chip) + +**Add references to each new cluster definition to these files:** + +1. [.github/workflows/tests.yaml](https://github.com/project-chip/connectedhomeip/tree/master/.github/workflows/tests.yaml) +2. [scripts/rules.matterlint](https://github.com/project-chip/connectedhomeip/tree/master/scripts/rules.matterlint) +3. [src/app/zap-templates/zcl/data-model/all.xml](https://github.com/project-chip/connectedhomeip/tree/master/src/app/zap-templates/zcl/data-model/all.xml) +4. [src/app/zap-templates/zcl/zcl-with-test-extensions.json](https://github.com/project-chip/connectedhomeip/tree/master/src/app/zap-templates/zcl/zcl-with-test-extensions.json) +5. [src/app/zap-templates/zcl/zcl.json](https://github.com/project-chip/connectedhomeip/tree/master/src/app/zap-templates/zcl/zcl.json) +6. If it is a derived cluster, add a reference to the base cluster definition. + (e.g. in mode-base-cluster.xml you may need to add cluster codes - otherwise + you may get strange exceptions which aren't clear when running regen_all.py) + + > ``` + > + > + > + > + > ``` + +7. [src/controller/python/chip/clusters/\_\_init\_\_.py](https://github.com/project-chip/connectedhomeip/tree/master/src/controller/python/chip/clusters/__init__.py) + +**Enable your new cluster in the Python and Android clients** in +[src/controller/data_model/controller-clusters.zap](https://github.com/project-chip/connectedhomeip/blob/master/src/controller/data_model/controller-clusters.zap) + +You will need the ZAP tool to edit the ZAP file. + +- Unless you already have the tool installed, you can use one of the + [nightly builds](https://github.com/project-chip/zap/releases) +- [ZAP tool info](https://developers.home.google.com/matter/tools/zap) +- [ZAP tool repo](https://github.com/project-chip/zap) + +Use the ZAP GUI tool to edit the file above: + +1. From the command line, navigate to the directory containing + [controller-clusters.zap](https://github.com/project-chip/connectedhomeip/blob/master/src/controller/data_model) +2. Run zap: `../../../scripts/tools/zap/run_zaptool.sh controller-clusters.zap`. + Alternatively, run the zap tool and navigate to the zap file that you wish to + open, or run as + `./scripts/tools/zap/run_zaptool.sh src/controller/data_model/controller-clusters.zap`. +3. In the gui, select `Endpoint-1` from the left pane. +4. Open the cluster group, for example, `Appliances`. +5. Find the cluster to be enabled, e.g. `Dishwasher Control`. +6. In the Enable column, select "Client" from the drop-down box. +7. Click `File->Save` to save the configuration. +8. Close the GUI. + +**Add entries for your new cluster to +[BUILD.gn](c/src/controller/data_model/BUILD.gn)** in the outputs section of the +java-jni-generate bits. The entries should look like +"jni/YourClusterNameClient-InvokeSubscribeImpl.cpp" and +"jni/YourClusterNameClient-ReadImpl.cpp". + +**Add an entry to the ClientDirectories** section of +[src/app/zap_cluster_list.json](https://github.com/project-chip/connectedhomeip/blob/master/src/app/zap_cluster_list.json). + +**Update `chip-tool`** + +1. Regenerate all zap generated code using `./scripts/tools/zap_regen_all.py` +2. Rebuild chip-tool and it will have new cluster support: + `./scripts/examples/gn_build_example.sh examples/chip-tool SOME-PATH/` + +## Add the device type definition to the SDK + +1. Add the XML definition of the device to + [matter-devices.xml](https://github.com/project-chip/connectedhomeip/blob/master/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml) +2. Implement the incoming command behaviors common to all applications. The + parsing of the payload from TLV to a C++ struct is done by code + auto-generated from the XML (see + [zap-generated](https://github.com/project-chip/connectedhomeip/blob/master/zzz_generated/app-common/app-common/zap-generated)) + The rest of the functionality must be manually implemented. Note: for the + auto-generated code run one of the following: + 1. for everything: `./scripts/tools/zap_regen_all.py` + 2. just for the app-common part: + `./scripts/tools/zap/generate.py -t src/app/common/templates/templates.json -o zzz_generated/app-common/app-common/zap-generated src/controller/data_model/controller-clusters.zap` +3. Implement the read/write/storage operations for the attributes of any type, + list, or struct which are not the global attributes present in all clusters. + For example, there's no need to implement CommandList, AttributeList etc. For + the attributes which are not list of struct type, the handling code is + implemented generically so most likely no work is needed for them. +4. Implement any attribute spec requirements that are common to all + applications. For example: code to enforce specific ranges, code for handling + the interactions between attributes etc. + +## Implement Code and Tests + +Implement the clusters, the example cluster server application and add the +related SDK tests. + +1. Implement new clusters here: + [src/app/clusters](https://github.com/project-chip/connectedhomeip/tree/master/src/app/clusters) +2. Implement tests here: + [src/app/tests/suites](https://github.com/project-chip/connectedhomeip/tree/master/src/app/tests/suites) +3. Implement the example cluster server application: + 1. The YAML tests will run against this server + 2. Depending on the clusters, there are two options: + 1. Enable them in the all-clusters-app and use that as the example + cluster server app. If choosing this option, consider adding an + example application that has just the relevant clusters enabled; this + part is a nice to have. + 2. If the clusters have complicated global application requirements + consider using a separate example app. see the door lock, bridge, TV, + OTA clusters. + 3. NOTES: If adding a new cluster derived from `mode-base` into + [examples/all-clusters-app/](https://github.com/project-chip/connectedhomeip/tree/master/examples/all-clusters-app/) + (Assume your new cluster is called `XZYMode`): + 1. Create your new `xyz-mode-cluster.xml` in + [src/app/zap-templates/zcl/data-model/chip](https://github.com/project-chip/connectedhomeip/tree/master/src/app/zap-templates/zcl/data-model/chip) + (as above). Note that this is a much cut down cluster definition + compared to normal clusters, since it derives from + [mode-base-cluster.xml](https://github.com/project-chip/connectedhomeip/tree/master/src/app/zap-templates/zcl/data-model/chip/mode-base-cluster.xml). + See + [dishwasher-mode-cluster.xml](https://github.com/project-chip/connectedhomeip/tree/master/src/app/zap-templates/zcl/data-model/chip/dishwasher-mode-cluster.xml) + as an example. Note you should review if you need the `StartUpMode` + and `OnMode` attributes based on the spec. + 2. Check that you have added your cluster code into + [mode-base-cluster.xml](https://github.com/project-chip/connectedhomeip/tree/master/src/app/zap-templates/zcl/data-model/chip/mode-base-cluster.xml) + 1. ` ` - replace + `XXXX` with your cluster ID + 2. ` ` - + replace `XXXX` with your cluster ID + 3. ` ` - + replace `XXXX` with your cluster ID + 3. Add your new Mode definitions in `xyz-mode.h`. In this header you + define the modes / labels and tags. See + [dishwasher-mode.h](https://github.com/project-chip/connectedhomeip/tree/master/examples/all-clusters-app/all-clusters-common/include/dishwasher-mode.h) + as an example. + 4. Add your new stub to instantiate the mode. See + [dishwasher-mode.cpp](https://github.com/project-chip/connectedhomeip/tree/master/examples/all-clusters-app/all-clusters-common/src/dishwasher-mode.cpp) + as an example. + 5. In + [examples/all-clusters-app/linux/main-common.cpp](https://github.com/project-chip/connectedhomeip/tree/master/examples/all-clusters-app/linux/main-common.cpp): + 1. Add `#include "xyz-mode.h"` + 2. In `ApplicationShutdown()`, add a call to your + `Clusters::XYZMode::Shutdown();`. + 6. In + [examples/all-clusters-app/linux/BUILD.gn](https://github.com/project-chip/connectedhomeip/tree/master/examples/all-clusters-app/linux/BUILD.gn), + add the `xyz-mode.cpp` file to the `sources` section. + 7. In + [src/app/common/templates/config-data.yaml](https://github.com/project-chip/connectedhomeip/blob/master/src/app/common/templates/config-data.yaml): + 1. Add a `::ModeTag` to the `EnumsNotUsedAsTypeInXML` + section. + 2. Add an `XYZ Mode` entry to the + `CommandHandlerInterfaceOnlyClusters` section. + 8. In + [src/app/util/util.cpp](https://github.com/project-chip/connectedhomeip/blob/master/src/app/util/util.cpp), + in the `// Cluster Init Functions...` section, add a void + `MatterXYZModePluginServerInitCallback() {}` definition. + 9. In + [src/app/zap-templates/zcl/zcl-with-test-extensions.json](https://github.com/project-chip/connectedhomeip/blob/master/src/app/zap-templates/zcl/zcl-with-test-extensions.json): + 1. Add the `xyz-mode-cluster.xml` to the `xmlFile` list + 2. In the `attributeAccessInterfaceAttributes` entry, add your new + entry + `"XYZ Mode": [ "SupportedModes", "CurrentMode", "FeatureMap" ]` - + this will mean ZAP won't generate code to handle these attributes + 10. In + [src/app/zap_cluster_list.json](https://github.com/project-chip/connectedhomeip/blob/master/src/app/zap_cluster_list.json): + 1. Add your `XYZ_MODE_CLUSTER: []` to `ClientDirectories: { }` + object + 2. Add your `"XYZ_MODE_CLUSTER": ["mode-base-server"]` to + `"ServerDirectories": { }` + 4. The code under + [src/app/tests/suites/certification](https://github.com/project-chip/connectedhomeip/blob/master/src/app/tests/suites/certification) + for YAML or + [src/python_testing](https://github.com/project-chip/connectedhomeip/tree/master/src/python_testing) + for Python should ideally implement the test plan (section 4 below). + 5. A test under + [src/app/tests/suites](https://github.com/project-chip/connectedhomeip/blob/master/src/app/tests/suites) + (not certification) can test anything, in addition to, or preceding the + official YAML representing the official test plan. +4. Add the test plan, using the templates below: + + 1. [cluster_test_plan_template.adoc](https://github.com/CHIP-Specifications/chip-test-plans/blob/master/src/template/cluster_test_plan_template.adoc) + 2. [test_plan_template.adoc](https://github.com/CHIP-Specifications/chip-test-plans/blob/master/src/template/test_plan_template.adoc) + + Also, ask to be added to the private `csg-tt-test-plans` Slack channel. + +5. Note: the CHIP-Tool reference client is generated from XML +6. If applicable, add tests: + 1. For relatively simple tests, add YAML tests here: + [src/app/tests/suites/certification](https://github.com/project-chip/connectedhomeip/blob/master/src/app/tests/suites/certification). + Remember to update this file: + [src/app/tests/suites/certification/PICS.yaml](https://github.com/project-chip/connectedhomeip/blob/master/src/app/tests/suites/certification/PICS.yaml) + 2. For more complex tests, add Python tests here: + [src/python_testing](https://github.com/project-chip/connectedhomeip/tree/master/src/python_testing) + 3. To add tests to CI, if applicable: + 1. Add the Python tests here: + [.github/workflows/tests.yaml](https://github.com/project-chip/connectedhomeip/tree/master/.github/workflows/tests.yaml). + Remember to provide all arguments required for each Python script, + such as the endpoint PIXIT. + 2. Add the YAML tests by editing this file: + [src/app/tests/suites/ciTests.json](https://github.com/project-chip/connectedhomeip/tree/master/src/app/tests/suites/ciTests.json) + 1. Create a section ("MyDevice") which lists all YAML tests for your + device + 2. Add the section's name to the list of items named "collection" + 3. Do a ZAP code regen: `./scripts/tools/zap_regen_all.py`. +7. Add the device type spec to the test plan tools: + + 1. [tools/device_type_requirements](https://github.com/CHIP-Specifications/chip-test-plans/tree/master/tools/device_type_requirements) + 2. The file above is used by + [src/app/tests/suites/certification/Test_TC_DESC_2_1.yaml](https://github.com/project-chip/connectedhomeip/blob/master/src/app/tests/suites/certification/Test_TC_DESC_2_1.yaml) + + Note: the plan is to make the DM tools generate the device type requirements + data based on the spec, so the above will become obsolete. + +8. Add the device type to Chef: + [examples/chef/devices](https://github.com/project-chip/connectedhomeip/tree/master/examples/chef/devices) + +## Q & A + +**Q1**: What kind of devices can be used for the test events? Can one of them be +the example cluster server app running on a RasPI? Do the independent +realizations need to run on vendor hardware or can they also run on generic +hardware, such as ESP32 or RasPI? + +**A1**: one realization can be the test harness + the all clusters example app + +RasPI. the two independent realizations need to run on target hardware, which +may be mock-ups, prototypes etc + +**Q2**: How can the Chef tool be used for any of the deliverables above? + +**A2**: TBD + +**Q3**: What is the process for using the Zap tool in order to auto-generate +code and to commit the results to the git repo? + +**A3**: Search for zap_regen above. Add all the changed files to the repo after. + +**Q4**: Where can the older cluster definitions be found? + +**A4**: src/app/zap-templates/zcl/data-model/silabs/general.xml + +**Q5**: Where can I find ZAP documentation? + +**A5**: https://github.com/project-chip/zap/blob/master/README.md diff --git a/docs/cluster_and_device_type_dev/index.md b/docs/cluster_and_device_type_dev/index.md index 6d5cf71edfef1c..9159cdb3e511d5 100644 --- a/docs/cluster_and_device_type_dev/index.md +++ b/docs/cluster_and_device_type_dev/index.md @@ -13,3 +13,4 @@ types in the SDK. ``` - [Cluster and device type development](./cluster_and_device_type_dev.md) +- [How To Add New Device Types & Clusters](how_to_add_new_dts_and_clusters.md) From b0d2b8717a77714c0272ac97324fe8d4f1d76ecb Mon Sep 17 00:00:00 2001 From: Nivi Sarkar <55898241+nivi-apple@users.noreply.github.com> Date: Tue, 16 Apr 2024 16:13:50 -0700 Subject: [PATCH 092/468] =?UTF-8?q?Remove=20expected=20value=20check=20fro?= =?UTF-8?q?m=20the=20=5FgetAttributesToReportWithReport=E2=80=A6=20(#33014?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Remove expected value check from the _getAttributesToReportWithReportedValues - Report the attribute only when the value has changed from the read cache. - Fix logging for use cases where we didn't report since there was an expected value or the attribute value didn't change from the read cache value. * Fix the comment for when expected value exists * readCacheValueChanged and expectedValue are not mutually exclusive. Fix the check * Apply suggestions from code review Co-authored-by: Boris Zbarsky * Restyled by clang-format --------- Co-authored-by: Boris Zbarsky Co-authored-by: Restyled.io --- src/darwin/Framework/CHIP/MTRDevice.mm | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/darwin/Framework/CHIP/MTRDevice.mm b/src/darwin/Framework/CHIP/MTRDevice.mm index 7c73524c963635..aa63efe1033633 100644 --- a/src/darwin/Framework/CHIP/MTRDevice.mm +++ b/src/darwin/Framework/CHIP/MTRDevice.mm @@ -2342,25 +2342,26 @@ - (NSArray *)_getAttributesToReportWithReportedValues:(NSArray Date: Tue, 16 Apr 2024 19:39:18 -0400 Subject: [PATCH 093/468] change pdTrue(FreeRTOS) to osOS (CMSISOS) (#33017) --- examples/platform/silabs/efr32/uart.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/platform/silabs/efr32/uart.cpp b/examples/platform/silabs/efr32/uart.cpp index 2b29cca0db0a92..9a626e10a2159d 100644 --- a/examples/platform/silabs/efr32/uart.cpp +++ b/examples/platform/silabs/efr32/uart.cpp @@ -442,7 +442,7 @@ void uartMainLoop(void * args) { osStatus_t eventReceived = osMessageQueueGet(sUartTxQueue, &workBuffer, nullptr, osWaitForever); - while (eventReceived == pdTRUE) + while (eventReceived == osOK) { uartSendBytes(workBuffer.data, workBuffer.length); eventReceived = osMessageQueueGet(sUartTxQueue, &workBuffer, nullptr, 0); From 35ced57c3828238d2d125cd3116a7b0e0410e286 Mon Sep 17 00:00:00 2001 From: mkardous-silabs <84793247+mkardous-silabs@users.noreply.github.com> Date: Tue, 16 Apr 2024 19:09:33 -0500 Subject: [PATCH 094/468] Add test event trigger to ICD apps (#33018) --- examples/light-switch-app/silabs/openthread.gni | 2 ++ examples/lock-app/silabs/build_for_wifi_args.gni | 2 ++ examples/lock-app/silabs/openthread.gni | 2 ++ scripts/examples/gn_silabs_example.sh | 2 +- 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/examples/light-switch-app/silabs/openthread.gni b/examples/light-switch-app/silabs/openthread.gni index 30c7efbde3d623..8dd097480220b0 100644 --- a/examples/light-switch-app/silabs/openthread.gni +++ b/examples/light-switch-app/silabs/openthread.gni @@ -25,6 +25,8 @@ chip_enable_openthread = true openthread_external_platform = "${chip_root}/third_party/openthread/platforms/efr32:libopenthread-efr32" +sl_enable_test_event_trigger = true + # ICD Default configurations chip_enable_icd_server = true chip_subscription_timeout_resumption = false diff --git a/examples/lock-app/silabs/build_for_wifi_args.gni b/examples/lock-app/silabs/build_for_wifi_args.gni index 84596e9258fbcc..3947f885b21f4f 100644 --- a/examples/lock-app/silabs/build_for_wifi_args.gni +++ b/examples/lock-app/silabs/build_for_wifi_args.gni @@ -21,6 +21,8 @@ import("${chip_root}/src/platform/silabs/wifi_args.gni") chip_enable_ota_requestor = true app_data_model = "${chip_root}/examples/lock-app/lock-common" +sl_enable_test_event_trigger = true + # ICD Default configurations chip_enable_icd_server = true chip_subscription_timeout_resumption = false diff --git a/examples/lock-app/silabs/openthread.gni b/examples/lock-app/silabs/openthread.gni index 8d1c75d267238c..3423049a9a8f79 100644 --- a/examples/lock-app/silabs/openthread.gni +++ b/examples/lock-app/silabs/openthread.gni @@ -25,6 +25,8 @@ chip_enable_openthread = true openthread_external_platform = "${chip_root}/third_party/openthread/platforms/efr32:libopenthread-efr32" +sl_enable_test_event_trigger = true + # ICD Default configurations chip_enable_icd_server = true chip_subscription_timeout_resumption = false diff --git a/scripts/examples/gn_silabs_example.sh b/scripts/examples/gn_silabs_example.sh index 951fdf5bb97370..3877b5c98ad40a 100755 --- a/scripts/examples/gn_silabs_example.sh +++ b/scripts/examples/gn_silabs_example.sh @@ -193,7 +193,7 @@ else shift ;; --icd) - optArgs+="chip_enable_icd_server=true chip_openthread_ftd=false " + optArgs+="chip_enable_icd_server=true chip_openthread_ftd=false sl_enable_test_event_trigger=true" shift ;; --low-power) From 0b0d1162c0e1311186bac61bc0c184a9cb0371fb Mon Sep 17 00:00:00 2001 From: Kamil Kasperczyk <66371704+kkasperczyk-no@users.noreply.github.com> Date: Wed, 17 Apr 2024 08:09:30 +0200 Subject: [PATCH 095/468] [zephyr] Added Bluetooth LE Extended Advertisement option (#33005) This commit implements platform solution for a Bluetooth LE extended advertising. Additionally, for the CommissioningWindowManager types were changed from Seconds16 to Seconds32, because the current implementation overflows for 48h duration. Co-authored-by: Patryk Lipinski --- config/zephyr/Kconfig | 18 +++++ src/app/server/CommissioningWindowManager.cpp | 8 +-- src/app/server/CommissioningWindowManager.h | 22 +++--- src/app/tests/TestCommissionManager.cpp | 2 +- src/include/platform/ConnectivityManager.h | 5 +- src/platform/Zephyr/BLEManagerImpl.cpp | 72 +++++++++++++++---- src/platform/Zephyr/BLEManagerImpl.h | 4 +- .../Zephyr/CHIPDevicePlatformConfig.h | 6 ++ .../nrfconnect/CHIPDevicePlatformConfig.h | 6 ++ 9 files changed, 112 insertions(+), 31 deletions(-) diff --git a/config/zephyr/Kconfig b/config/zephyr/Kconfig index ad36a663b5fd1f..bdfa709592adff 100644 --- a/config/zephyr/Kconfig +++ b/config/zephyr/Kconfig @@ -533,4 +533,22 @@ config CHIP_OTA_IMAGE_EXTRA_ARGS endif +config CHIP_BLE_EXT_ADVERTISING + bool "Bluetooth LE extended advertising" + help + Enable Bluetooth LE extended advertising, which allows the device to advertise + Matter service over Bluetooth LE for a period of time longer than 15 minutes. + If this config is true, + CHIP_DEVICE_CONFIG_DISCOVERY_TIMEOUT_SECS define can be set up to 172800 seconds (48h). + +config CHIP_BLE_ADVERTISING_DURATION + int "Bluetooth LE advertising duration in minutes" + range 15 2880 if CHIP_BLE_EXT_ADVERTISING + range 0 15 + default 15 + help + Specify how long the device will advertise Matter service over Bluetooth LE in minutes. + If CHIP_BLE_EXT_ADVERTISING is set to false, the maximum duration time is 15 minutes, + else the maximum duration time can be extended to 2880 minutes (48h). + endif diff --git a/src/app/server/CommissioningWindowManager.cpp b/src/app/server/CommissioningWindowManager.cpp index a205d093c27d00..f11261ad9c444d 100644 --- a/src/app/server/CommissioningWindowManager.cpp +++ b/src/app/server/CommissioningWindowManager.cpp @@ -228,7 +228,7 @@ void CommissioningWindowManager::OnSessionEstablished(const SessionHandle & sess } } -CHIP_ERROR CommissioningWindowManager::OpenCommissioningWindow(Seconds16 commissioningTimeout) +CHIP_ERROR CommissioningWindowManager::OpenCommissioningWindow(Seconds32 commissioningTimeout) { VerifyOrReturnError(commissioningTimeout <= MaxCommissioningTimeout() && commissioningTimeout >= MinCommissioningTimeout(), CHIP_ERROR_INVALID_ARGUMENT); @@ -288,7 +288,7 @@ CHIP_ERROR CommissioningWindowManager::AdvertiseAndListenForPASE() return CHIP_NO_ERROR; } -CHIP_ERROR CommissioningWindowManager::OpenBasicCommissioningWindow(Seconds16 commissioningTimeout, +CHIP_ERROR CommissioningWindowManager::OpenBasicCommissioningWindow(Seconds32 commissioningTimeout, CommissioningWindowAdvertisement advertisementMode) { RestoreDiscriminator(); @@ -316,7 +316,7 @@ CHIP_ERROR CommissioningWindowManager::OpenBasicCommissioningWindow(Seconds16 co CHIP_ERROR CommissioningWindowManager::OpenBasicCommissioningWindowForAdministratorCommissioningCluster( - System::Clock::Seconds16 commissioningTimeout, FabricIndex fabricIndex, VendorId vendorId) + System::Clock::Seconds32 commissioningTimeout, FabricIndex fabricIndex, VendorId vendorId) { ReturnErrorOnFailure(OpenBasicCommissioningWindow(commissioningTimeout, CommissioningWindowAdvertisement::kDnssdOnly)); @@ -326,7 +326,7 @@ CommissioningWindowManager::OpenBasicCommissioningWindowForAdministratorCommissi return CHIP_NO_ERROR; } -CHIP_ERROR CommissioningWindowManager::OpenEnhancedCommissioningWindow(Seconds16 commissioningTimeout, uint16_t discriminator, +CHIP_ERROR CommissioningWindowManager::OpenEnhancedCommissioningWindow(Seconds32 commissioningTimeout, uint16_t discriminator, Spake2pVerifier & verifier, uint32_t iterations, ByteSpan salt, FabricIndex fabricIndex, VendorId vendorId) { diff --git a/src/app/server/CommissioningWindowManager.h b/src/app/server/CommissioningWindowManager.h index 6b4e1efded76f4..51efb44b19376e 100644 --- a/src/app/server/CommissioningWindowManager.h +++ b/src/app/server/CommissioningWindowManager.h @@ -58,21 +58,21 @@ class CommissioningWindowManager : public Messaging::UnsolicitedMessageHandler, return CHIP_NO_ERROR; } - static constexpr System::Clock::Seconds16 MaxCommissioningTimeout() + static constexpr System::Clock::Seconds32 MaxCommissioningTimeout() { #if CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING // Specification section 2.3.1 - Extended Announcement Duration up to 48h - return System::Clock::Seconds16(60 * 60 * 48); + return System::Clock::Seconds32(60 * 60 * 48); #else // Specification section 5.4.2.3. Announcement Duration says 15 minutes. - return System::Clock::Seconds16(15 * 60); + return System::Clock::Seconds32(15 * 60); #endif } - System::Clock::Seconds16 MinCommissioningTimeout() const + System::Clock::Seconds32 MinCommissioningTimeout() const { // Specification section 5.4.2.3. Announcement Duration says 3 minutes. - return mMinCommissioningTimeoutOverride.ValueOr(System::Clock::Seconds16(3 * 60)); + return mMinCommissioningTimeoutOverride.ValueOr(System::Clock::Seconds32(3 * 60)); } void SetAppDelegate(AppDelegate * delegate) { mAppDelegate = delegate; } @@ -82,7 +82,7 @@ class CommissioningWindowManager : public Messaging::UnsolicitedMessageHandler, */ CHIP_ERROR OpenBasicCommissioningWindow( - System::Clock::Seconds16 commissioningTimeout = System::Clock::Seconds16(CHIP_DEVICE_CONFIG_DISCOVERY_TIMEOUT_SECS), + System::Clock::Seconds32 commissioningTimeout = System::Clock::Seconds32(CHIP_DEVICE_CONFIG_DISCOVERY_TIMEOUT_SECS), CommissioningWindowAdvertisement advertisementMode = chip::CommissioningWindowAdvertisement::kAllSupported); /** @@ -90,10 +90,10 @@ class CommissioningWindowManager : public Messaging::UnsolicitedMessageHandler, * the Administrator Commmissioning cluster implementation. */ CHIP_ERROR - OpenBasicCommissioningWindowForAdministratorCommissioningCluster(System::Clock::Seconds16 commissioningTimeout, + OpenBasicCommissioningWindowForAdministratorCommissioningCluster(System::Clock::Seconds32 commissioningTimeout, FabricIndex fabricIndex, VendorId vendorId); - CHIP_ERROR OpenEnhancedCommissioningWindow(System::Clock::Seconds16 commissioningTimeout, uint16_t discriminator, + CHIP_ERROR OpenEnhancedCommissioningWindow(System::Clock::Seconds32 commissioningTimeout, uint16_t discriminator, Crypto::Spake2pVerifier & verifier, uint32_t iterations, chip::ByteSpan salt, FabricIndex fabricIndex, VendorId vendorId); @@ -128,7 +128,7 @@ class CommissioningWindowManager : public Messaging::UnsolicitedMessageHandler, // For tests only, allow overriding the spec-defined minimum value of the // commissioning window timeout. - void OverrideMinCommissioningTimeout(System::Clock::Seconds16 timeout) { mMinCommissioningTimeoutOverride.SetValue(timeout); } + void OverrideMinCommissioningTimeout(System::Clock::Seconds32 timeout) { mMinCommissioningTimeoutOverride.SetValue(timeout); } private: //////////// SessionDelegate Implementation /////////////// @@ -146,7 +146,7 @@ class CommissioningWindowManager : public Messaging::UnsolicitedMessageHandler, // Start a timer that will call HandleCommissioningWindowTimeout, and then // start advertising and listen for PASE. - CHIP_ERROR OpenCommissioningWindow(System::Clock::Seconds16 commissioningTimeout); + CHIP_ERROR OpenCommissioningWindow(System::Clock::Seconds32 commissioningTimeout); // Start advertising and listening for PASE connections. Should only be // called when a commissioning window timeout timer is running. @@ -219,7 +219,7 @@ class CommissioningWindowManager : public Messaging::UnsolicitedMessageHandler, // For tests only, so that we can test the commissioning window timeout // without having to wait 3 minutes. - Optional mMinCommissioningTimeoutOverride; + Optional mMinCommissioningTimeoutOverride; // The PASE session we are using, so we can handle CloseSession properly. SessionHolderWithDelegate mPASESession; diff --git a/src/app/tests/TestCommissionManager.cpp b/src/app/tests/TestCommissionManager.cpp index c314421d4e3a9a..0076fd6a55718f 100644 --- a/src/app/tests/TestCommissionManager.cpp +++ b/src/app/tests/TestCommissionManager.cpp @@ -239,7 +239,7 @@ void CheckCommissioningWindowManagerWindowTimeoutTask(intptr_t context) NL_TEST_ASSERT(suite, !sAdminVendorIdDirty); CommissioningWindowManager & commissionMgr = Server::GetInstance().GetCommissioningWindowManager(); - constexpr auto kTimeoutSeconds = chip::System::Clock::Seconds16(1); + constexpr auto kTimeoutSeconds = chip::System::Clock::Seconds32(1); constexpr uint16_t kTimeoutMs = 1000; constexpr unsigned kSleepPadding = 100; commissionMgr.OverrideMinCommissioningTimeout(kTimeoutSeconds); diff --git a/src/include/platform/ConnectivityManager.h b/src/include/platform/ConnectivityManager.h index 90bab2a5ba5e76..5699caf1a1ef5b 100644 --- a/src/include/platform/ConnectivityManager.h +++ b/src/include/platform/ConnectivityManager.h @@ -138,8 +138,9 @@ class ConnectivityManager enum BLEAdvertisingMode { - kFastAdvertising = 0, - kSlowAdvertising = 1, + kFastAdvertising = 0, + kSlowAdvertising = 1, + kExtendedAdvertising = 2, }; enum class SEDIntervalMode diff --git a/src/platform/Zephyr/BLEManagerImpl.cpp b/src/platform/Zephyr/BLEManagerImpl.cpp index 54cf69dc5e50fc..d4e83332452a06 100644 --- a/src/platform/Zephyr/BLEManagerImpl.cpp +++ b/src/platform/Zephyr/BLEManagerImpl.cpp @@ -252,18 +252,39 @@ inline CHIP_ERROR BLEManagerImpl::PrepareAdvertisingRequest() Encoding::LittleEndian::Put16(serviceData.uuid, UUID16_CHIPoBLEService.val); ReturnErrorOnFailure(ConfigurationMgr().GetBLEDeviceIdentificationInfo(serviceData.deviceIdInfo)); +#if CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING + if (mFlags.Has(Flags::kExtendedAdvertisingEnabled)) + { + serviceData.deviceIdInfo.SetVendorId(DEVICE_HANDLE_NULL); + serviceData.deviceIdInfo.SetProductId(DEVICE_HANDLE_NULL); + serviceData.deviceIdInfo.SetExtendedAnnouncementFlag(true); + } +#endif + advertisingData[0] = BT_DATA(BT_DATA_FLAGS, &kAdvertisingFlags, sizeof(kAdvertisingFlags)); advertisingData[1] = BT_DATA(BT_DATA_SVC_DATA16, &serviceData, sizeof(serviceData)); scanResponseData[0] = BT_DATA(BT_DATA_NAME_COMPLETE, name, nameSize); - mAdvertisingRequest.priority = CHIP_DEVICE_BLE_ADVERTISING_PRIORITY; - mAdvertisingRequest.options = kAdvertisingOptions; - mAdvertisingRequest.minInterval = mFlags.Has(Flags::kFastAdvertisingEnabled) - ? CHIP_DEVICE_CONFIG_BLE_FAST_ADVERTISING_INTERVAL_MIN - : CHIP_DEVICE_CONFIG_BLE_SLOW_ADVERTISING_INTERVAL_MIN; - mAdvertisingRequest.maxInterval = mFlags.Has(Flags::kFastAdvertisingEnabled) - ? CHIP_DEVICE_CONFIG_BLE_FAST_ADVERTISING_INTERVAL_MAX - : CHIP_DEVICE_CONFIG_BLE_SLOW_ADVERTISING_INTERVAL_MAX; + mAdvertisingRequest.priority = CHIP_DEVICE_BLE_ADVERTISING_PRIORITY; + mAdvertisingRequest.options = kAdvertisingOptions; + + if (mFlags.Has(Flags::kFastAdvertisingEnabled)) + { + mAdvertisingRequest.minInterval = CHIP_DEVICE_CONFIG_BLE_FAST_ADVERTISING_INTERVAL_MIN; + mAdvertisingRequest.maxInterval = CHIP_DEVICE_CONFIG_BLE_FAST_ADVERTISING_INTERVAL_MAX; + } +#if CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING + else if (mFlags.Has(Flags::kExtendedAdvertisingEnabled)) + { + mAdvertisingRequest.minInterval = CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING_INTERVAL_MIN; + mAdvertisingRequest.maxInterval = CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING_INTERVAL_MAX; + } +#endif + else + { + mAdvertisingRequest.minInterval = CHIP_DEVICE_CONFIG_BLE_SLOW_ADVERTISING_INTERVAL_MIN; + mAdvertisingRequest.maxInterval = CHIP_DEVICE_CONFIG_BLE_SLOW_ADVERTISING_INTERVAL_MAX; + } mAdvertisingRequest.advertisingData = Span(advertisingData); mAdvertisingRequest.scanResponseData = nameSize ? Span(scanResponseData) : Span{}; @@ -322,10 +343,17 @@ CHIP_ERROR BLEManagerImpl::StartAdvertising() if (mFlags.Has(Flags::kFastAdvertisingEnabled)) { - // Start timer to change advertising interval. + // Start timer to change advertising interval from fast to slow. DeviceLayer::SystemLayer().StartTimer( System::Clock::Milliseconds32(CHIP_DEVICE_CONFIG_BLE_ADVERTISING_INTERVAL_CHANGE_TIME), - HandleBLEAdvertisementIntervalChange, this); + HandleSlowBLEAdvertisementInterval, this); + +#if CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING + // Start timer to schedule start of the extended advertising + DeviceLayer::SystemLayer().StartTimer( + System::Clock::Milliseconds32(CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING_INTERVAL_CHANGE_TIME_MS), + HandleExtendedBLEAdvertisementInterval, this); +#endif } } @@ -342,6 +370,10 @@ CHIP_ERROR BLEManagerImpl::StopAdvertising() mFlags.Clear(Flags::kAdvertising); mFlags.Set(Flags::kFastAdvertisingEnabled, true); +#if CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING + mFlags.Clear(Flags::kExtendedAdvertisingEnabled); +#endif + ChipLogProgress(DeviceLayer, "CHIPoBLE advertising stopped"); // Post a CHIPoBLEAdvertisingChange(Stopped) event. @@ -353,7 +385,8 @@ CHIP_ERROR BLEManagerImpl::StopAdvertising() } // Cancel timer event changing CHIPoBLE advertisement interval - DeviceLayer::SystemLayer().CancelTimer(HandleBLEAdvertisementIntervalChange, this); + DeviceLayer::SystemLayer().CancelTimer(HandleSlowBLEAdvertisementInterval, this); + DeviceLayer::SystemLayer().CancelTimer(HandleExtendedBLEAdvertisementInterval, this); } return CHIP_NO_ERROR; @@ -366,6 +399,9 @@ CHIP_ERROR BLEManagerImpl::_SetAdvertisingEnabled(bool val) ChipLogDetail(DeviceLayer, "CHIPoBLE advertising set to %s", val ? "on" : "off"); mFlags.Set(Flags::kAdvertisingEnabled, val); + // Ensure that each enabling/disabling of the standard advertising clears + // the extended mode flag. + mFlags.Set(Flags::kExtendedAdvertisingEnabled, false); PlatformMgr().ScheduleWork(DriveBLEState, 0); } @@ -378,8 +414,14 @@ CHIP_ERROR BLEManagerImpl::_SetAdvertisingMode(BLEAdvertisingMode mode) { case BLEAdvertisingMode::kFastAdvertising: mFlags.Set(Flags::kFastAdvertisingEnabled, true); + mFlags.Set(Flags::kExtendedAdvertisingEnabled, false); break; case BLEAdvertisingMode::kSlowAdvertising: + mFlags.Set(Flags::kFastAdvertisingEnabled, false); + mFlags.Set(Flags::kExtendedAdvertisingEnabled, false); + break; + case BLEAdvertisingMode::kExtendedAdvertising: + mFlags.Set(Flags::kExtendedAdvertisingEnabled, true); mFlags.Set(Flags::kFastAdvertisingEnabled, false); break; default: @@ -570,12 +612,18 @@ CHIP_ERROR BLEManagerImpl::PrepareC3CharData() } #endif -void BLEManagerImpl::HandleBLEAdvertisementIntervalChange(System::Layer * layer, void * param) +void BLEManagerImpl::HandleSlowBLEAdvertisementInterval(System::Layer * layer, void * param) { BLEMgr().SetAdvertisingMode(BLEAdvertisingMode::kSlowAdvertising); ChipLogProgress(DeviceLayer, "CHIPoBLE advertising mode changed to slow"); } +void BLEManagerImpl::HandleExtendedBLEAdvertisementInterval(System::Layer * layer, void * param) +{ + BLEMgr().SetAdvertisingMode(BLEAdvertisingMode::kExtendedAdvertising); + ChipLogProgress(DeviceLayer, "CHIPoBLE advertising mode changed to extended"); +} + void BLEManagerImpl::_OnPlatformEvent(const ChipDeviceEvent * event) { CHIP_ERROR err = CHIP_NO_ERROR; diff --git a/src/platform/Zephyr/BLEManagerImpl.h b/src/platform/Zephyr/BLEManagerImpl.h index 7db469f4a5df93..4fb3352a01ee2b 100644 --- a/src/platform/Zephyr/BLEManagerImpl.h +++ b/src/platform/Zephyr/BLEManagerImpl.h @@ -91,6 +91,7 @@ class BLEManagerImpl final : public BLEManager, private BleLayer, private BlePla kAdvertisingRefreshNeeded = 0x0010, /**< The advertising state/configuration has changed, but the SoftDevice has yet to be updated. */ kChipoBleGattServiceRegister = 0x0020, /**< The system has currently CHIPoBLE GATT service registered. */ + kExtendedAdvertisingEnabled = 0x0040, /**< The application has enabled extended advertising. */ }; struct ServiceData; @@ -129,7 +130,8 @@ class BLEManagerImpl final : public BLEManager, private BleLayer, private BlePla static void HandleTXIndicated(bt_conn * conn, bt_gatt_indicate_params * attr, uint8_t err); static void HandleConnect(bt_conn * conn, uint8_t err); static void HandleDisconnect(bt_conn * conn, uint8_t reason); - static void HandleBLEAdvertisementIntervalChange(System::Layer * layer, void * param); + static void HandleSlowBLEAdvertisementInterval(System::Layer * layer, void * param); + static void HandleExtendedBLEAdvertisementInterval(System::Layer * layer, void * param); // ===== Members for internal use by the following friends. diff --git a/src/platform/Zephyr/CHIPDevicePlatformConfig.h b/src/platform/Zephyr/CHIPDevicePlatformConfig.h index 3296f3aa8f1c55..e7622f60ddf9fc 100644 --- a/src/platform/Zephyr/CHIPDevicePlatformConfig.h +++ b/src/platform/Zephyr/CHIPDevicePlatformConfig.h @@ -130,3 +130,9 @@ #ifdef CONFIG_CHIP_EXTENDED_DISCOVERY #define CHIP_DEVICE_CONFIG_ENABLE_EXTENDED_DISCOVERY 1 #endif // CONFIG_CHIP_EXTENDED_DISCOVERY + +#ifdef CONFIG_CHIP_BLE_EXT_ADVERTISING +#define CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING 1 +#endif // CONFIG_CHIP_BLE_EXT_ADVERTISING + +#define CHIP_DEVICE_CONFIG_DISCOVERY_TIMEOUT_SECS (CONFIG_CHIP_BLE_ADVERTISING_DURATION * 60) diff --git a/src/platform/nrfconnect/CHIPDevicePlatformConfig.h b/src/platform/nrfconnect/CHIPDevicePlatformConfig.h index 7461d3650d86a6..f9e445f35fb3d4 100644 --- a/src/platform/nrfconnect/CHIPDevicePlatformConfig.h +++ b/src/platform/nrfconnect/CHIPDevicePlatformConfig.h @@ -212,6 +212,12 @@ #define CHIP_DEVICE_CONFIG_ENABLE_EXTENDED_DISCOVERY 1 #endif // CONFIG_CHIP_EXTENDED_DISCOVERY +#ifdef CONFIG_CHIP_BLE_EXT_ADVERTISING +#define CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING 1 +#endif // CONFIG_CHIP_BLE_EXT_ADVERTISING + +#define CHIP_DEVICE_CONFIG_DISCOVERY_TIMEOUT_SECS (CONFIG_CHIP_BLE_ADVERTISING_DURATION * 60) + #ifndef CHIP_DEVICE_CONFIG_ROTATING_DEVICE_ID_UNIQUE_ID_LENGTH #ifdef CONFIG_CHIP_FACTORY_DATA // UID will be copied from the externally programmed factory data, so we don't know the actual length and we need to assume some max From 47c6d468de49bb648ba95a90648a7973468c03ec Mon Sep 17 00:00:00 2001 From: C Freeman Date: Wed, 17 Apr 2024 03:10:39 -0400 Subject: [PATCH 096/468] TC-DA-1.2: cover PAI incorrect PID encoding (#32717) * TC-DA-1.2: add test to tests.yaml This wasn't here before. I want to see this fail before adding the fix. * actually set exit value Also, apparently the formatting rules changed. OK... * Add check for incorrectly formatted fallback PID on PAI --- .github/workflows/tests.yaml | 1 + src/python_testing/TC_DA_1_2.py | 6 +++- .../test_testing/test_TC_DA_1_2.py | 30 ++++++++++++------- 3 files changed, 26 insertions(+), 11 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 281ac5c76a2ab1..b495b5f01309f4 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -559,6 +559,7 @@ jobs: scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-rvc-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-rvc-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace_file json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_RVCOPSTATE_2_1.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS examples/rvc-app/rvc-common/pics/rvc-app-pics-values --endpoint 1 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-rvc-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-rvc-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace_file json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_RVCOPSTATE_2_3.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS examples/rvc-app/rvc-common/pics/rvc-app-pics-values --endpoint 1 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-rvc-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-rvc-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace_file json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_RVCOPSTATE_2_4.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS examples/rvc-app/rvc-common/pics/rvc-app-pics-values --endpoint 1 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' + scripts/run_in_python_env.sh out/venv './src/python_testing/test_testing/test_TC_DA_1_2.py' - name: Uploading core files uses: actions/upload-artifact@v4 if: ${{ failure() && !env.ACT }} diff --git a/src/python_testing/TC_DA_1_2.py b/src/python_testing/TC_DA_1_2.py index 930fa6de5dda4e..100f5813778966 100644 --- a/src/python_testing/TC_DA_1_2.py +++ b/src/python_testing/TC_DA_1_2.py @@ -57,6 +57,7 @@ def parse_single_vidpid_from_common_name(commonName: str, tag_str: str) -> str: s = sp[1][:4] if not s.isupper() or len(s) != 4: + asserts.fail(f"Improperly encoded PID or VID when using fallback encoding {tag_str}:{s}") return None return s @@ -132,6 +133,8 @@ def steps_TC_DA_1_2(self): TestStep("6.7", "Verify CD security_information", "security_information = 0"), TestStep("6.8", "Verify CD version_number", "version_number is an integer in range 0..65535"), TestStep("6.9", "Verify CD certification_type", "certification_type has a value between 1..2"), + TestStep("7.0", "Extract the Vendor ID (VID) and Product ID (PID) from the DAC. Extract the VID from the PAI. Extract the PID from the PAI, if present", + "VID and PID are present and properly encoded in the DAC. VID is present and properly encoded in the PAI. If the PID is present in the PAI, it is properly encoded"), TestStep("7.1", "", "If the dac_origin_vendor_id is present in the CD, confirm the dac_origin_product_id is also present. If the dac_origin_vendor_id is not present in the CD, confirm the dac_origin_product_id is also not present."), TestStep("7.2", "If the Certification Declaration has both the dac_origin_vendor_id and the dac_origin_product_id fields, verify dac_origin fields", ("* The Vendor ID (VID) in the DAC subject and PAI subject are the same as the dac_origin_vendor_id field in the Certification Declaration.\n" @@ -309,9 +312,10 @@ async def test_TC_DA_1_2(self): else: asserts.assert_in(certification_type, [1, 2], "Certification type is out of range") - self.step("7.1") + self.step("7.0") dac_vid, dac_pid, pai_vid, pai_pid = parse_ids_from_certs(parsed_dac, parsed_pai) + self.step("7.1") has_origin_vid = 9 in cd.keys() has_origin_pid = 10 in cd.keys() if has_origin_pid != has_origin_vid: diff --git a/src/python_testing/test_testing/test_TC_DA_1_2.py b/src/python_testing/test_testing/test_TC_DA_1_2.py index 52a45407ba4aa6..99acdea072694a 100755 --- a/src/python_testing/test_testing/test_TC_DA_1_2.py +++ b/src/python_testing/test_testing/test_TC_DA_1_2.py @@ -19,8 +19,10 @@ import json import os import subprocess +import sys -CHIP_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), '../../..')) +CHIP_ROOT = os.path.abspath(os.path.join( + os.path.dirname(__file__), '../../..')) RUNNER_SCRIPT_DIR = os.path.join(CHIP_ROOT, 'scripts/tests') @@ -30,13 +32,15 @@ def run_single_test(dac_provider: str, product_id: int, factory_reset: bool = Fa if factory_reset: reset = ' --factoryreset' - app = os.path.join(CHIP_ROOT, 'out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app') + app = os.path.join( + CHIP_ROOT, 'out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app') # Certs in the commissioner_dut directory use 0x8000 as the PID app_args = '--discriminator 1234 --KVS kvs1 --product-id ' + \ str(product_id) + ' --vendor-id 65521 --dac_provider ' + dac_provider - ci_pics_values = os.path.abspath(os.path.join(CHIP_ROOT, 'src/app/tests/suites/certification/ci-pics-values')) + ci_pics_values = os.path.abspath(os.path.join( + CHIP_ROOT, 'src/app/tests/suites/certification/ci-pics-values')) script_args = '--storage-path admin_storage.json --discriminator 1234 --passcode 20202021 --dut-node-id 1 --PICS ' + \ str(ci_pics_values) @@ -45,28 +49,34 @@ def run_single_test(dac_provider: str, product_id: int, factory_reset: bool = Fa if factory_reset: script_args = script_args + ' --commissioning-method on-network' - script = os.path.abspath(os.path.join(CHIP_ROOT, 'src/python_testing/TC_DA_1_2.py')) + script = os.path.abspath(os.path.join( + CHIP_ROOT, 'src/python_testing/TC_DA_1_2.py')) # run_python_test uses click so call as a command - run_python_test = os.path.abspath(os.path.join(RUNNER_SCRIPT_DIR, 'run_python_test.py')) + run_python_test = os.path.abspath(os.path.join( + RUNNER_SCRIPT_DIR, 'run_python_test.py')) cmd = str(run_python_test) + reset + ' --app ' + str(app) + ' --app-args "' + \ - app_args + '" --script ' + str(script) + ' --script-args "' + script_args + '"' + app_args + '" --script ' + \ + str(script) + ' --script-args "' + script_args + '"' return subprocess.call(cmd, shell=True) def main(): - cert_path = os.path.abspath(os.path.join(CHIP_ROOT, 'credentials/development/commissioner_dut')) + cert_path = os.path.abspath(os.path.join( + CHIP_ROOT, 'credentials/development/commissioner_dut')) # Commission first using a known good set, then run the rest of the tests without recommissioning - path = str(os.path.join(cert_path, "struct_cd_authorized_paa_list_count1_valid/test_case_vector.json")) + path = str(os.path.join( + cert_path, "struct_cd_authorized_paa_list_count1_valid/test_case_vector.json")) run_single_test(path, 32768, factory_reset=True) test_cases = {'struct_cd': 32768, 'fallback_encoding': 177} # struct_cd_version_number_wrong - excluded because this is a DCL test not covered by cert # struct_cd_cert_id_mismatch - excluded because this is a DCL test not covered by cert - exclude_cases = ['struct_cd_version_number_wrong', 'struct_cd_cert_id_mismatch'] + exclude_cases = ['struct_cd_version_number_wrong', + 'struct_cd_cert_id_mismatch'] passes = [] for p in os.listdir(cert_path): @@ -92,7 +102,7 @@ def main(): print('INCORRECT: ' + p[0]) retval = 1 - return retval + sys.exit(retval) if __name__ == '__main__': From ae508020dba5d18c0a412a2d1dccca41a4830171 Mon Sep 17 00:00:00 2001 From: Shubham Patil Date: Wed, 17 Apr 2024 18:24:19 +0530 Subject: [PATCH 097/468] Fix typo in device-graph README.md (#33022) --- src/tools/device-graph/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/device-graph/README.md b/src/tools/device-graph/README.md index db8c10f96b1c7f..2e484add9a5742 100644 --- a/src/tools/device-graph/README.md +++ b/src/tools/device-graph/README.md @@ -55,7 +55,7 @@ added. --paa-trust-store-path credentials/production/paa-root-certs ``` -Once a commissioning is completed for the device, is is possible to rerun the +Once a commissioning is completed for the device, it is possible to rerun the tool again for an already commissioned devices, this is an example of how to do so: From 264cc7cd03c729c4f23ce103422613d7ed1d2987 Mon Sep 17 00:00:00 2001 From: Jakub Latusek Date: Wed, 17 Apr 2024 15:25:25 +0200 Subject: [PATCH 098/468] Ble-WiFi commissioning test in CI - dockerfile (#32890) * Add docker img for qemu testing * Update version file * Compress qemu image and sort dependencies * Use stages during docker build * Remove unused script from docker img, add missing qemu pkg --- .../docker/images/base/chip-build/version | 2 +- .../stage-2/chip-build-linux-qemu/Dockerfile | 216 ++++++++++++++++++ .../stage-2/chip-build-linux-qemu/build.sh | 1 + .../files/bluetooth/main.conf | 2 + ...ynchronize-scan-start-and-LE-Meta-ev.patch | 136 +++++++++++ .../files/wifi/dnsmasq.conf | 5 + .../files/wifi/hostapd.conf | 13 ++ .../files/wifi/wpa_supplicant.conf | 3 + .../stage-2/chip-build-linux-qemu/run-img.sh | 30 +++ .../stage-2/chip-build-linux-qemu/run.sh | 1 + .../stage-2/chip-build-linux-qemu/version | 1 + 11 files changed, 409 insertions(+), 1 deletion(-) create mode 100644 integrations/docker/images/stage-2/chip-build-linux-qemu/Dockerfile create mode 120000 integrations/docker/images/stage-2/chip-build-linux-qemu/build.sh create mode 100644 integrations/docker/images/stage-2/chip-build-linux-qemu/files/bluetooth/main.conf create mode 100644 integrations/docker/images/stage-2/chip-build-linux-qemu/files/linux/0001-Bluetooth-MGMT-Synchronize-scan-start-and-LE-Meta-ev.patch create mode 100644 integrations/docker/images/stage-2/chip-build-linux-qemu/files/wifi/dnsmasq.conf create mode 100644 integrations/docker/images/stage-2/chip-build-linux-qemu/files/wifi/hostapd.conf create mode 100644 integrations/docker/images/stage-2/chip-build-linux-qemu/files/wifi/wpa_supplicant.conf create mode 100755 integrations/docker/images/stage-2/chip-build-linux-qemu/run-img.sh create mode 120000 integrations/docker/images/stage-2/chip-build-linux-qemu/run.sh create mode 120000 integrations/docker/images/stage-2/chip-build-linux-qemu/version diff --git a/integrations/docker/images/base/chip-build/version b/integrations/docker/images/base/chip-build/version index 20e7ff0d5a702b..d5830b41578b40 100644 --- a/integrations/docker/images/base/chip-build/version +++ b/integrations/docker/images/base/chip-build/version @@ -1 +1 @@ -47 : [Telink] Update Docker image (Zephyr update) +48 : [QEMU] Add QEMU Dockerfile for ble-wifi testing on Linux diff --git a/integrations/docker/images/stage-2/chip-build-linux-qemu/Dockerfile b/integrations/docker/images/stage-2/chip-build-linux-qemu/Dockerfile new file mode 100644 index 00000000000000..b14a00c2ec9710 --- /dev/null +++ b/integrations/docker/images/stage-2/chip-build-linux-qemu/Dockerfile @@ -0,0 +1,216 @@ +ARG VERSION=latest +ARG UBUNTU_QEMU_DIR_DEFAULT="/opt/ubuntu-qemu" +ARG UBUNTU_QEMU_IMG_DEFAULT="${UBUNTU_QEMU_DIR_DEFAULT}/ubuntu-20.04.img" + +FROM ghcr.io/project-chip/chip-build:${VERSION} as build-env +LABEL org.opencontainers.image.source https://github.com/project-chip/connectedhomeip + +ARG BLUEZ_VERSION=5.72 +ARG ELL_VERSION=0.62 +ARG KERNEL_VERSION=6.7.3 +ARG UBUNTU_QEMU_DIR_DEFAULT +ARG UBUNTU_QEMU_IMG_DEFAULT + +ENV UBUNTU_QEMU_DIR=${UBUNTU_QEMU_DIR_DEFAULT} +ENV UBUNTU_QEMU_IMG=${UBUNTU_QEMU_IMG_DEFAULT} + +RUN mkdir -p /tmp/workdir/linux +COPY files/linux/0001-Bluetooth-MGMT-Synchronize-scan-start-and-LE-Meta-ev.patch /tmp/workdir/linux/0001-Bluetooth-MGMT-Synchronize-scan-start-and-LE-Meta-ev.patch +COPY files/bluetooth/main.conf /tmp/workdir/main.conf +RUN set -x \ + && apt-get update \ + && DEBIAN_FRONTEND=noninteractive apt-get install -fy \ + bc \ + cpio \ + dwarves \ + elfutils \ + fakeroot \ + libdw-dev \ + libelf-dev \ + libell-dev \ + libell0 \ + libguestfs-tools \ + linux-image-generic \ + ncurses-dev \ + qemu \ + xz-utils \ + zstd \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* \ + && rm -rf /var/cache/apt/* \ + && : # last line + +# Download Linux kernel source +RUN mkdir -p /tmp/workdir/linux \ + && export MAKEFLAGS=-j$(nproc) \ + && cd /tmp/workdir \ + && curl https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-${KERNEL_VERSION}.tar.xz -o /tmp/workdir/linux-${KERNEL_VERSION}.tar.xz \ + && tar -xJf linux-${KERNEL_VERSION}.tar.xz -C /tmp/workdir/linux --strip-components=1 \ + && rm /tmp/workdir/linux-${KERNEL_VERSION}.tar.xz \ + # Set configuration for btvirt + && cd /tmp/workdir/linux \ + && patch -p1 < /tmp/workdir/linux/0001-Bluetooth-MGMT-Synchronize-scan-start-and-LE-Meta-ev.patch \ + && make x86_64_defconfig \ + && ./scripts/config -e BT \ + && ./scripts/config -e BT_BREDR \ + && ./scripts/config -e BT_HCIVHCI \ + && ./scripts/config -e CONFIG_BRIDGE \ + && ./scripts/config -e CONFIG_CRYPTO_AES \ + && ./scripts/config -e CONFIG_CRYPTO_CMAC \ + && ./scripts/config -e CONFIG_CRYPTO_ECB \ + && ./scripts/config -e CONFIG_CRYPTO_USER \ + && ./scripts/config -e CONFIG_CRYPTO_USER_API_HASH \ + && ./scripts/config -e CONFIG_CRYPTO_USER_API_SKCIPHER \ + && ./scripts/config -e CONFIG_VETH \ + && ./scripts/config -e MAC80211 \ + && ./scripts/config -e MAC80211_HWSIM \ + # Compile + && make olddefconfig \ + && make \ + && mkdir -p /opt/ubuntu-qemu/rootfs \ + && make modules_install INSTALL_MOD_PATH=/opt/ubuntu-qemu/rootfs \ + && cp /tmp/workdir/linux/arch/x86/boot/bzImage /opt/ubuntu-qemu/bzImage \ + # Build bluez + && git clone git://git.kernel.org/pub/scm/libs/ell/ell.git /tmp/workdir/ell --depth 1 --branch ${ELL_VERSION} \ + && git clone https://github.com/bluez/bluez.git /tmp/workdir/bluez --depth 1 --branch ${BLUEZ_VERSION} \ + && cd /tmp/workdir/bluez \ + && ./bootstrap \ + && ./configure \ + --enable-backtrace \ + --enable-debug \ + --enable-deprecated \ + --enable-experimental \ + --enable-library \ + --enable-monitor \ + --enable-pie \ + --enable-test \ + --enable-testing \ + --enable-tools \ + --enable-tools \ + --enable-udev \ + --disable-a2dp \ + --disable-avrcp \ + --disable-bap \ + --disable-bass \ + --disable-csip \ + --disable-cups \ + --disable-cups \ + --disable-health \ + --disable-hid \ + --disable-hid2hci \ + --disable-hog \ + --disable-manpages \ + --disable-mcp \ + --disable-mesh \ + --disable-micp \ + --disable-midi \ + --disable-network \ + --disable-obex \ + --disable-optimization \ + --disable-sap \ + --disable-silent-rules \ + --disable-vcp \ + --prefix=/usr \ + --mandir=/usr/share/man \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --with-systemdsystemunitdir=/lib/systemd/system \ + --with-systemduserunitdir=/usr/lib/systemd \ + && make \ + && make install DESTDIR=/opt/ubuntu-qemu/rootfs && mkdir -p /opt/ubuntu-qemu/rootfs/usr/bin && cp /tmp/workdir/bluez/emulator/btvirt /opt/ubuntu-qemu/rootfs/usr/bin \ + # Download Ubuntu image for QEMU + && curl https://cloud-images.ubuntu.com/minimal/releases/focal/release/ubuntu-20.04-minimal-cloudimg-amd64.img \ + -o /tmp/workdir/ubuntu-20.04-minimal-cloudimg-amd64.img \ + # Prepare ubuntu image + && qemu-img create -f qcow2 -o preallocation=off $UBUNTU_QEMU_IMG 10G \ + && virt-resize --expand /dev/sda1 /tmp/workdir/ubuntu-20.04-minimal-cloudimg-amd64.img $UBUNTU_QEMU_IMG \ + && guestfish -a $UBUNTU_QEMU_IMG \ + --mount /dev/sda3:/ \ + --network \ + copy-in /opt/ubuntu-qemu/rootfs/lib /usr : \ + copy-in /opt/ubuntu-qemu/rootfs/usr / : \ + sh 'apt-get remove -y snapd' : \ + sh 'apt-get update' : \ + sh 'DEBIAN_FRONTEND=noninteractive apt-get install -y dnsmasq hostapd wpasupplicant iw libdw1 rfkill' : \ + sh '/usr/bin/systemctl enable bluetooth.service' : \ + sh '/usr/bin/systemctl disable cloud-init.service' : \ + sh '/usr/bin/systemctl disable dbus-fi.w1.wpa_supplicant1.service' : \ + sh '/usr/bin/systemctl disable dnsmasq.service' : \ + sh '/usr/bin/systemctl disable hostapd.service' : \ + sh '/usr/bin/systemctl disable lxd-agent.service' : \ + sh '/usr/bin/systemctl disable systemd-networkd-wait-online.service' : \ + sh '/usr/bin/systemctl disable systemd-timesyncd.service' : \ + sh '/usr/bin/systemctl disable wpa_supplicant.service' : \ + sh '/usr/bin/systemctl mask cloud-init.service' : \ + sh '/usr/bin/systemctl mask dbus-fi.w1.wpa_supplicant1.service' : \ + sh '/usr/bin/systemctl mask dnsmasq.service' : \ + sh '/usr/bin/systemctl mask hostapd.service' : \ + sh '/usr/bin/systemctl mask lxd-agent.service' : \ + sh '/usr/bin/systemctl mask systemd-networkd-wait-online.service' : \ + sh '/usr/bin/systemctl mask systemd-timesyncd.service' : \ + sh '/usr/bin/systemctl mask wpa_supplicant.service' : \ + sh 'passwd -d root' : \ + sh 'ssh-keygen -A' : \ + sh '/bin/echo -e "PermitRootLogin yes\nPasswordAuthentication yes\nPermitEmptyPasswords yes" > /etc/ssh/sshd_config' : \ + mkdir-p "/etc/netplan" : \ + sh '/bin/echo -e "network:\n version: 2\n renderer: networkd\n ethernets:\n enp0s4:\n dhcp4: true\n" > /etc/netplan/01-netcfg.yaml' : \ + sh 'chmod -R 700 /etc/netplan' : \ + sh 'sed -i "s#^ExecStart=.*#ExecStart=-/sbin/agetty -o \"-p -- \\\\\\\\u\" -a root --keep-baud 115200,38400,9600 %I \$TERM#" "/usr/lib/systemd/system/serial-getty@.service"' : \ + mkdir-p "/etc/bluetooth" : \ + copy-in /tmp/workdir/main.conf /etc/bluetooth : \ + sh 'sed -i "s#^ExecStart=.*#ExecStart=-/usr/libexec/bluetooth/bluetoothd -E#" /lib/systemd/system/bluetooth.service' : \ + sh 'rm -f /etc/resolv.conf && /bin/echo -e "nameserver 8.8.8.8" > /etc/resolv.conf' : \ + sh '/bin/echo -e "host0 /chip 9p trans=virtio,version=9p2000.L 0 0" >> /etc/fstab' : \ + sh '/bin/echo -e "export PW_ENVIRONMENT_ROOT=/root/pw_root\n[ -x /launcher.sh ] && /launcher.sh\n" >> /root/.profile' : \ + sh 'DEBIAN_FRONTEND=noninteractive apt-get -y install git gcc g++ pkg-config libssl-dev libdbus-1-dev libglib2.0-dev libavahi-client-dev ninja-build python3 python3-venv python3-dev python3-pip unzip libgirepository1.0-dev libcairo2-dev libreadline-dev' : \ + sh 'git config --file /root/.gitconfig --add safe.directory "*"' : \ + sh 'apt-get clean' : \ + sh 'rm -rf /var/lib/apt/lists/*' : \ + sh 'rm -rf /var/cache/apt/*' : \ + sh 'echo Configuration completed.' \ + && mkdir -p /chip \ + && rm -rf /opt/ubuntu-qemu/rootfs \ + && echo -n \ + "#!/bin/bash\n" \ + "grep -q 'rootshell' /proc/cmdline && exit\n" \ + "if [[ -x /chip/runner.sh ]]; then\n" \ + " echo '### RUNNER START ###'\n" \ + " cd /chip\n" \ + " bash /chip/runner.sh\n" \ + " status=\$?\n" \ + " echo \"### RUNNER STOP, RETURN: \$status\"\n" \ + " echo \$status > /chip/runner_status\n" \ + "else\n" \ + " read -r -t 5 -p 'Press ENTER to access root shell...' && exit || echo ' timeout.'\n" \ + "fi\n" \ + "echo 'Shutting down emulated system...'\n" \ + "echo o > /proc/sysrq-trigger\n" \ + | guestfish --rw -a $UBUNTU_QEMU_IMG -m /dev/sda3:/ upload - /launcher.sh : chmod 0755 /launcher.sh \ + && virt-sparsify --compress ${UBUNTU_QEMU_IMG} ${UBUNTU_QEMU_IMG}.compressed \ + && mv ${UBUNTU_QEMU_IMG}.compressed ${UBUNTU_QEMU_IMG} \ + && rm -rf /var/tmp/.guestfs-0/* \ + && rm -rf /tmp/* \ + && : # last line + +FROM ghcr.io/project-chip/chip-build:${VERSION} + +ARG UBUNTU_QEMU_DIR_DEFAULT +ARG UBUNTU_QEMU_IMG_DEFAULT + +ENV UBUNTU_QEMU_DIR=${UBUNTU_QEMU_DIR_DEFAULT} +ENV UBUNTU_QEMU_IMG=${UBUNTU_QEMU_IMG_DEFAULT} +ENV PW_ENVIRONMENT_ROOT="/root/pw_root" + +RUN set -x \ + && apt-get update \ + && DEBIAN_FRONTEND=noninteractive apt-get install -fy \ + cpu-checker \ + qemu \ + qemu-system-x86 \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* \ + && rm -rf /var/cache/apt/* \ + && : # last line +COPY --from=build-env ${UBUNTU_QEMU_DIR} ${UBUNTU_QEMU_DIR} + +WORKDIR /chip diff --git a/integrations/docker/images/stage-2/chip-build-linux-qemu/build.sh b/integrations/docker/images/stage-2/chip-build-linux-qemu/build.sh new file mode 120000 index 00000000000000..46b20313461454 --- /dev/null +++ b/integrations/docker/images/stage-2/chip-build-linux-qemu/build.sh @@ -0,0 +1 @@ +../../../build.sh \ No newline at end of file diff --git a/integrations/docker/images/stage-2/chip-build-linux-qemu/files/bluetooth/main.conf b/integrations/docker/images/stage-2/chip-build-linux-qemu/files/bluetooth/main.conf new file mode 100644 index 00000000000000..1d29f696077c7d --- /dev/null +++ b/integrations/docker/images/stage-2/chip-build-linux-qemu/files/bluetooth/main.conf @@ -0,0 +1,2 @@ +[GATT] +Cache=no diff --git a/integrations/docker/images/stage-2/chip-build-linux-qemu/files/linux/0001-Bluetooth-MGMT-Synchronize-scan-start-and-LE-Meta-ev.patch b/integrations/docker/images/stage-2/chip-build-linux-qemu/files/linux/0001-Bluetooth-MGMT-Synchronize-scan-start-and-LE-Meta-ev.patch new file mode 100644 index 00000000000000..4f2383caa93b87 --- /dev/null +++ b/integrations/docker/images/stage-2/chip-build-linux-qemu/files/linux/0001-Bluetooth-MGMT-Synchronize-scan-start-and-LE-Meta-ev.patch @@ -0,0 +1,136 @@ +From 4dc80d22bd964c0c3fcd0840b6728b3884d2ff1b Mon Sep 17 00:00:00 2001 +From: Arkadiusz Bokowy +Date: Thu, 28 Sep 2023 13:38:17 +0200 +Subject: [PATCH] Bluetooth: MGMT: Synchronize scan start and LE Meta events + +It is possible that the Bluetooth management will receive scan enabled +signal and LE meta events one by another without any delay. Since the +start discovery procedure is performed in an asynchronous manner, it is +possible that these HCI events will be processed concurrently by two +different worker threads. In such case, it is possible that the LE meta +event, which reports new device, will be discarded, because discovering +is still in the starting state. + +The problem is most prominent with the btvirt userspace tool, which +sends LE Meta events just after reporting scan as enabled. Testing +scenario: + + 1. Create two HCI interfaces: + > btvirt -l2 + + 2. Setup BLE advertisement on hci1: + > bluetoothctl + >> select 00:AA:01:00:00:00 + >> menu advertise + >> uuids 03B80E5A-EDE8-4B33-A751-6CE34EC4C700 + >> discoverable on + >> back + >> advertise peripheral + + 3. Start scanning on hci2: + > bluetoothctl + >> select 00:AA:01:01:00:01 + >> scan le + // From time to time, new device is not reported + +This patch adds synchronization for start discovery procedure and device +found reporting by the Bluetooth management. In case of discovering +being in the starting state, the worker which processes LE Meta event +will wait for the cmd_sync_work on which the start discovery procedure +is queued. + +Signed-off-by: Arkadiusz Bokowy +--- + include/net/bluetooth/hci_core.h | 5 +++++ + include/net/bluetooth/hci_sync.h | 1 + + net/bluetooth/hci_sync.c | 7 +++++++ + net/bluetooth/mgmt.c | 17 +++++++++++++++-- + 4 files changed, 28 insertions(+), 2 deletions(-) + +diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h +index f36c1fd5d64e..456bbdf56246 100644 +--- a/include/net/bluetooth/hci_core.h ++++ b/include/net/bluetooth/hci_core.h +@@ -916,6 +916,11 @@ static inline void hci_discovery_filter_clear(struct hci_dev *hdev) + + bool hci_discovery_active(struct hci_dev *hdev); + ++static inline bool hci_discovery_starting(struct hci_dev *hdev) ++{ ++ return hdev->discovery.state == DISCOVERY_STARTING; ++} ++ + void hci_discovery_set_state(struct hci_dev *hdev, int state); + + static inline int inquiry_cache_empty(struct hci_dev *hdev) +diff --git a/include/net/bluetooth/hci_sync.h b/include/net/bluetooth/hci_sync.h +index 6efbc2152146..67cf6689a692 100644 +--- a/include/net/bluetooth/hci_sync.h ++++ b/include/net/bluetooth/hci_sync.h +@@ -43,6 +43,7 @@ void hci_cmd_sync_init(struct hci_dev *hdev); + void hci_cmd_sync_clear(struct hci_dev *hdev); + void hci_cmd_sync_cancel(struct hci_dev *hdev, int err); + void __hci_cmd_sync_cancel(struct hci_dev *hdev, int err); ++void hci_cmd_sync_flush(struct hci_dev *hdev); + + int hci_cmd_sync_submit(struct hci_dev *hdev, hci_cmd_sync_work_func_t func, + void *data, hci_cmd_sync_work_destroy_t destroy); +diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c +index 3640d73f9595..58905a5b7b1e 100644 +--- a/net/bluetooth/hci_sync.c ++++ b/net/bluetooth/hci_sync.c +@@ -681,6 +681,13 @@ void hci_cmd_sync_cancel(struct hci_dev *hdev, int err) + } + EXPORT_SYMBOL(hci_cmd_sync_cancel); + ++/* Wait for all pending HCI commands to complete. ++ */ ++void hci_cmd_sync_flush(struct hci_dev *hdev) ++{ ++ flush_work(&hdev->cmd_sync_work); ++} ++ + /* Submit HCI command to be run in as cmd_sync_work: + * + * - hdev must _not_ be unregistered +diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c +index ba2e00646e8e..fc494348f2f7 100644 +--- a/net/bluetooth/mgmt.c ++++ b/net/bluetooth/mgmt.c +@@ -10374,18 +10374,31 @@ void mgmt_device_found(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type, + { + struct sk_buff *skb; + struct mgmt_ev_device_found *ev; +- bool report_device = hci_discovery_active(hdev); ++ bool report_device; + + if (hci_dev_test_flag(hdev, HCI_MESH) && link_type == LE_LINK) + mesh_device_found(hdev, bdaddr, addr_type, rssi, flags, + eir, eir_len, scan_rsp, scan_rsp_len, + instant); + ++ /* Discovery start procedure is perfomed on a workqueue in an ++ * asynchronous manner. This procedure is finished when the scan ++ * enabled signal is received from the controller. Just after ++ * this signal, the controller might send another event (e.g. LE ++ * Meta). In such case, we need to make sure that the discovery ++ * procedure is finished, because otherwise we might omit some ++ * scan results. ++ */ ++ if (hci_discovery_starting(hdev)) ++ hci_cmd_sync_flush(hdev); ++ ++ report_device = hci_discovery_active(hdev); ++ + /* Don't send events for a non-kernel initiated discovery. With + * LE one exception is if we have pend_le_reports > 0 in which + * case we're doing passive scanning and want these events. + */ +- if (!hci_discovery_active(hdev)) { ++ if (!report_device) { + if (link_type == ACL_LINK) + return; + if (link_type == LE_LINK && !list_empty(&hdev->pend_le_reports)) +-- +2.34.1 + diff --git a/integrations/docker/images/stage-2/chip-build-linux-qemu/files/wifi/dnsmasq.conf b/integrations/docker/images/stage-2/chip-build-linux-qemu/files/wifi/dnsmasq.conf new file mode 100644 index 00000000000000..a8ea3c69ce29ed --- /dev/null +++ b/integrations/docker/images/stage-2/chip-build-linux-qemu/files/wifi/dnsmasq.conf @@ -0,0 +1,5 @@ +port=0 +interface=wlan1 +listen-address=192.168.200.1 +dhcp-range=192.168.200.10,192.168.200.200 + diff --git a/integrations/docker/images/stage-2/chip-build-linux-qemu/files/wifi/hostapd.conf b/integrations/docker/images/stage-2/chip-build-linux-qemu/files/wifi/hostapd.conf new file mode 100644 index 00000000000000..cab96f219f9b53 --- /dev/null +++ b/integrations/docker/images/stage-2/chip-build-linux-qemu/files/wifi/hostapd.conf @@ -0,0 +1,13 @@ +interface=wlan1 +driver=nl80211 +country_code=DE +ssid=Virtual_Wifi +channel=1 +hw_mode=g +wpa=3 +wpa_key_mgmt=WPA-PSK +wpa_pairwise=TKIP CCMP +wpa_passphrase=ExamplePassword +auth_algs=3 +beacon_int=100 + diff --git a/integrations/docker/images/stage-2/chip-build-linux-qemu/files/wifi/wpa_supplicant.conf b/integrations/docker/images/stage-2/chip-build-linux-qemu/files/wifi/wpa_supplicant.conf new file mode 100644 index 00000000000000..38673fea93fc06 --- /dev/null +++ b/integrations/docker/images/stage-2/chip-build-linux-qemu/files/wifi/wpa_supplicant.conf @@ -0,0 +1,3 @@ +ctrl_interface=DIR=/run/wpa_supplicant +ctrl_interface_group=root +update_config=1 diff --git a/integrations/docker/images/stage-2/chip-build-linux-qemu/run-img.sh b/integrations/docker/images/stage-2/chip-build-linux-qemu/run-img.sh new file mode 100755 index 00000000000000..43cc4f80a9effa --- /dev/null +++ b/integrations/docker/images/stage-2/chip-build-linux-qemu/run-img.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +KERNEL="/opt/ubuntu-qemu/bzImage" +IMG="/opt/ubuntu-qemu/ubuntu-20.04.img" +ADDITIONAL_ARGS=() +PROJECT_PATH="$(realpath "$(dirname "$0")/../../../../..")" + +if kvm-ok; then + echo "KVM is available, running with it." + ADDITIONAL_ARGS+=("-enable-kvm" "-cpu" "host") +else + echo "KVM is not available, running without it." +fi + +/usr/bin/qemu-system-x86_64 \ + -machine ubuntu \ + -smp 4 \ + -m 2048 \ + -nographic \ + -monitor null \ + -serial stdio \ + -display none \ + -device virtio-blk-pci,drive=virtio-blk1 \ + -drive file="$IMG",id=virtio-blk1,if=none,format=qcow2,readonly=off \ + -kernel "$KERNEL" \ + -append 'console=ttyS0 mac80211_hwsim.radios=2 root=/dev/vda3' \ + -netdev user,id=network0,hostfwd=tcp::2222-:22 \ + -device e1000,netdev=network0,mac=52:54:00:12:34:56 \ + -virtfs "local,path=$PROJECT_PATH,mount_tag=host0,security_model=passthrough,id=host0" \ + "${ADDITIONAL_ARGS[@]}" diff --git a/integrations/docker/images/stage-2/chip-build-linux-qemu/run.sh b/integrations/docker/images/stage-2/chip-build-linux-qemu/run.sh new file mode 120000 index 00000000000000..9bbfad86d46e50 --- /dev/null +++ b/integrations/docker/images/stage-2/chip-build-linux-qemu/run.sh @@ -0,0 +1 @@ +../../../run.sh \ No newline at end of file diff --git a/integrations/docker/images/stage-2/chip-build-linux-qemu/version b/integrations/docker/images/stage-2/chip-build-linux-qemu/version new file mode 120000 index 00000000000000..a40ba48b0188a8 --- /dev/null +++ b/integrations/docker/images/stage-2/chip-build-linux-qemu/version @@ -0,0 +1 @@ +../../base/chip-build/version \ No newline at end of file From 692e9e126592b57b84049ddb3ae2d9cfc1cf9de0 Mon Sep 17 00:00:00 2001 From: SAYON DEEP Date: Wed, 17 Apr 2024 19:21:08 +0530 Subject: [PATCH 099/468] [ESP32] Enable extended ble announcement for esp32 platform (#32389) * enable extended ble advertisement for esp32 platform * changed extended advertisement to extended announcement * restlyed * made discoverty timeout range and default dependent on extended announcement. * help section for extended ble announcement * fixed eliding of extended data during extended announcement. * fixed setting of Additional data flag --- config/esp32/components/chip/Kconfig | 16 ++- src/platform/ESP32/BLEManagerImpl.h | 11 +- src/platform/ESP32/CHIPDevicePlatformConfig.h | 1 + src/platform/ESP32/nimble/BLEManagerImpl.cpp | 100 +++++++++++++++--- 4 files changed, 104 insertions(+), 24 deletions(-) diff --git a/config/esp32/components/chip/Kconfig b/config/esp32/components/chip/Kconfig index 1c0b5afe2bcb61..d176d6571ef205 100644 --- a/config/esp32/components/chip/Kconfig +++ b/config/esp32/components/chip/Kconfig @@ -1192,8 +1192,11 @@ menu "CHIP Device Layer" menu "Commissioning Window Options" config CHIP_DISCOVERY_TIMEOUT_SECS int "Commissioning Window Timeout in seconds" - range 180 900 - default 900 + range 180 900 if !ENABLE_BLE_EXT_ANNOUNCEMENT + range 901 172800 if ENABLE_BLE_EXT_ANNOUNCEMENT + default 900 if !ENABLE_BLE_EXT_ANNOUNCEMENT + default 172800 if ENABLE_BLE_EXT_ANNOUNCEMENT + help The amount of time (in seconds) after which the CHIP platform will close the Commissioning Window endmenu @@ -1216,4 +1219,13 @@ menu "CHIP Device Layer" endmenu + menu "Enable BLE Extended Announcement" + config ENABLE_BLE_EXT_ANNOUNCEMENT + bool "Enable BLE Extended Announcement" + default n + help + Enable BLE Extended Announcement.To be used with CHIP_DISCOVERY_TIMEOUT_SECS for extended announcement duration. + + endmenu + endmenu diff --git a/src/platform/ESP32/BLEManagerImpl.h b/src/platform/ESP32/BLEManagerImpl.h index fc946c9aae3359..aa740295d03eed 100644 --- a/src/platform/ESP32/BLEManagerImpl.h +++ b/src/platform/ESP32/BLEManagerImpl.h @@ -234,6 +234,7 @@ class BLEManagerImpl final : public BLEManager, kFastAdvertisingEnabled = 0x0200, /**< The application has enabled fast advertising. */ kUseCustomDeviceName = 0x0400, /**< The application has configured a custom BLE device name. */ kAdvertisingRefreshNeeded = 0x0800, /**< The advertising configuration/state in ESP BLE layer needs to be updated. */ + kExtAdvertisingEnabled = 0x1000, /**< The application has enabled Extended BLE announcement. */ }; enum @@ -300,13 +301,9 @@ class BLEManagerImpl final : public BLEManager, CHIP_ERROR InitESPBleLayer(void); CHIP_ERROR ConfigureAdvertisingData(void); CHIP_ERROR StartAdvertising(void); - - static constexpr System::Clock::Timeout kFastAdvertiseTimeout = - System::Clock::Milliseconds32(CHIP_DEVICE_CONFIG_BLE_ADVERTISING_INTERVAL_CHANGE_TIME); - System::Clock::Timestamp mAdvertiseStartTime; - - static void HandleFastAdvertisementTimer(System::Layer * systemLayer, void * context); - void HandleFastAdvertisementTimer(); + void StartBleAdvTimeoutTimer(uint32_t aTimeoutInMs); + void CancelBleAdvTimeoutTimer(void); + static void BleAdvTimeoutHandler(TimerHandle_t xTimer); #if CONFIG_BT_BLUEDROID_ENABLED void HandleGATTControlEvent(esp_gatts_cb_event_t event, esp_gatt_if_t gatts_if, esp_ble_gatts_cb_param_t * param); diff --git a/src/platform/ESP32/CHIPDevicePlatformConfig.h b/src/platform/ESP32/CHIPDevicePlatformConfig.h index ef6f850b36fb14..273fd562d60883 100644 --- a/src/platform/ESP32/CHIPDevicePlatformConfig.h +++ b/src/platform/ESP32/CHIPDevicePlatformConfig.h @@ -105,6 +105,7 @@ #define CHIP_DEVICE_CONFIG_DISCOVERY_TIMEOUT_SECS CONFIG_CHIP_DISCOVERY_TIMEOUT_SECS #define CHIP_DEVICE_CONFIG_ENABLE_BOTH_COMMISSIONER_AND_COMMISSIONEE CONFIG_ENABLE_ESP32_BLE_CONTROLLER #define CHIP_DEVICE_CONFIG_ENABLE_PAIRING_AUTOSTART CONFIG_CHIP_ENABLE_PAIRING_AUTOSTART +#define CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING CONFIG_ENABLE_BLE_EXT_ANNOUNCEMENT // Options for background chip task #define CHIP_DEVICE_CONFIG_ENABLE_BG_EVENT_PROCESSING CONFIG_ENABLE_BG_EVENT_PROCESSING diff --git a/src/platform/ESP32/nimble/BLEManagerImpl.cpp b/src/platform/ESP32/nimble/BLEManagerImpl.cpp index 5092828d750f66..5407e9969b50e3 100644 --- a/src/platform/ESP32/nimble/BLEManagerImpl.cpp +++ b/src/platform/ESP32/nimble/BLEManagerImpl.cpp @@ -76,6 +76,7 @@ namespace Internal { namespace { +TimerHandle_t sbleAdvTimeoutTimer; // FreeRTOS sw timer. #if CONFIG_ENABLE_ESP32_BLE_CONTROLLER static constexpr uint16_t kNewConnectionScanTimeout = 60; static constexpr uint16_t kConnectTimeout = 20; @@ -123,8 +124,6 @@ uint8_t own_addr_type = BLE_OWN_ADDR_RANDOM; ChipDeviceScanner & mDeviceScanner = Internal::ChipDeviceScanner::GetInstance(); #endif BLEManagerImpl BLEManagerImpl::sInstance; -constexpr System::Clock::Timeout BLEManagerImpl::kFastAdvertiseTimeout; - const struct ble_gatt_svc_def BLEManagerImpl::CHIPoBLEGATTAttrs[] = { { .type = BLE_GATT_SVC_TYPE_PRIMARY, .uuid = (ble_uuid_t *) (&ShortUUID_CHIPoBLEService), @@ -221,6 +220,14 @@ CHIP_ERROR BLEManagerImpl::_Init() #endif SuccessOrExit(err); + // Create FreeRTOS sw timer for BLE timeouts and interval change. + sbleAdvTimeoutTimer = xTimerCreate("BleAdvTimer", // Just a text name, not used by the RTOS kernel + 1, // == default timer period + false, // no timer reload (==one-shot) + (void *) this, // init timer id = ble obj context + BleAdvTimeoutHandler // timer callback handler + ); + mRXCharAttrHandle = 0; #if CHIP_ENABLE_ADDITIONAL_DATA_ADVERTISING mC3CharAttrHandle = 0; @@ -254,8 +261,7 @@ CHIP_ERROR BLEManagerImpl::_SetAdvertisingEnabled(bool val) if (val) { - mAdvertiseStartTime = System::SystemClock().GetMonotonicTimestamp(); - ReturnErrorOnFailure(DeviceLayer::SystemLayer().StartTimer(kFastAdvertiseTimeout, HandleFastAdvertisementTimer, this)); + StartBleAdvTimeoutTimer(CHIP_DEVICE_CONFIG_BLE_ADVERTISING_INTERVAL_CHANGE_TIME); } mFlags.Set(Flags::kFastAdvertisingEnabled, val); @@ -267,21 +273,31 @@ CHIP_ERROR BLEManagerImpl::_SetAdvertisingEnabled(bool val) return err; } -void BLEManagerImpl::HandleFastAdvertisementTimer(System::Layer * systemLayer, void * context) -{ - static_cast(context)->HandleFastAdvertisementTimer(); -} - -void BLEManagerImpl::HandleFastAdvertisementTimer() +void BLEManagerImpl::BleAdvTimeoutHandler(TimerHandle_t xTimer) { - System::Clock::Timestamp currentTimestamp = System::SystemClock().GetMonotonicTimestamp(); + if (BLEMgrImpl().mFlags.Has(Flags::kFastAdvertisingEnabled)) + { + ChipLogProgress(DeviceLayer, "bleAdv Timeout : Start slow advertisement"); + BLEMgrImpl().mFlags.Set(Flags::kFastAdvertisingEnabled, 0); + BLEMgrImpl().mFlags.Set(Flags::kAdvertisingRefreshNeeded, 1); - if (currentTimestamp - mAdvertiseStartTime >= kFastAdvertiseTimeout) +#if CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING + BLEMgrImpl().mFlags.Clear(Flags::kExtAdvertisingEnabled); + BLEMgrImpl().StartBleAdvTimeoutTimer(CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING_INTERVAL_CHANGE_TIME_MS); +#endif + PlatformMgr().ScheduleWork(DriveBLEState, 0); + } +#if CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING + else { - mFlags.Set(Flags::kFastAdvertisingEnabled, 0); - mFlags.Set(Flags::kAdvertisingRefreshNeeded, 1); + ChipLogProgress(DeviceLayer, "bleAdv Timeout : Start extended advertisement"); + BLEMgrImpl().mFlags.Set(Flags::kAdvertising); + BLEMgrImpl().mFlags.Set(Flags::kExtAdvertisingEnabled); + BLEMgr().SetAdvertisingMode(BLEAdvertisingMode::kSlowAdvertising); + BLEMgrImpl().mFlags.Set(Flags::kAdvertisingRefreshNeeded, 1); PlatformMgr().ScheduleWork(DriveBLEState, 0); } +#endif } CHIP_ERROR BLEManagerImpl::_SetAdvertisingMode(BLEAdvertisingMode mode) @@ -690,6 +706,28 @@ CHIP_ERROR BLEManagerImpl::MapBLEError(int bleErr) return CHIP_ERROR(ChipError::Range::kPlatform, CHIP_DEVICE_CONFIG_ESP32_BLE_ERROR_MIN + bleErr); } } +void BLEManagerImpl::CancelBleAdvTimeoutTimer(void) +{ + if (xTimerStop(sbleAdvTimeoutTimer, pdMS_TO_TICKS(0)) == pdFAIL) + { + ChipLogError(DeviceLayer, "Failed to stop BledAdv timeout timer"); + } +} +void BLEManagerImpl::StartBleAdvTimeoutTimer(uint32_t aTimeoutInMs) +{ + if (xTimerIsTimerActive(sbleAdvTimeoutTimer)) + { + CancelBleAdvTimeoutTimer(); + } + + // 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(sbleAdvTimeoutTimer, pdMS_TO_TICKS(aTimeoutInMs), pdMS_TO_TICKS(100)) != pdPASS) + { + ChipLogError(DeviceLayer, "Failed to start BledAdv timeout timer"); + } +} void BLEManagerImpl::DriveBLEState(void) { CHIP_ERROR err = CHIP_NO_ERROR; @@ -977,8 +1015,25 @@ CHIP_ERROR BLEManagerImpl::ConfigureAdvertisingData(void) ExitNow(); } +#if CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING + // Check for extended advertisement interval and redact VID/PID if past the initial period. + if (mFlags.Has(Flags::kExtAdvertisingEnabled)) + { + deviceIdInfo.SetVendorId(0); + deviceIdInfo.SetProductId(0); + deviceIdInfo.SetExtendedAnnouncementFlag(true); + } +#endif + #if CHIP_ENABLE_ADDITIONAL_DATA_ADVERTISING - deviceIdInfo.SetAdditionalDataFlag(true); + if (!mFlags.Has(Flags::kExtAdvertisingEnabled)) + { + deviceIdInfo.SetAdditionalDataFlag(true); + } + else + { + deviceIdInfo.SetAdditionalDataFlag(false); + } #endif VerifyOrExit(index + sizeof(deviceIdInfo) <= sizeof(advData), err = CHIP_ERROR_OUTBOUND_MESSAGE_TOO_BIG); @@ -1565,8 +1620,23 @@ CHIP_ERROR BLEManagerImpl::StartAdvertising(void) } else { +#if CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING + if (!mFlags.Has(Flags::kExtAdvertisingEnabled)) + { + adv_params.itvl_min = CHIP_DEVICE_CONFIG_BLE_SLOW_ADVERTISING_INTERVAL_MIN; + adv_params.itvl_max = CHIP_DEVICE_CONFIG_BLE_SLOW_ADVERTISING_INTERVAL_MAX; + } + else + { + adv_params.itvl_min = CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING_INTERVAL_MIN; + adv_params.itvl_max = CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING_INTERVAL_MAX; + } +#else + adv_params.itvl_min = CHIP_DEVICE_CONFIG_BLE_SLOW_ADVERTISING_INTERVAL_MIN; adv_params.itvl_max = CHIP_DEVICE_CONFIG_BLE_SLOW_ADVERTISING_INTERVAL_MAX; + +#endif } ChipLogProgress(DeviceLayer, "Configuring CHIPoBLE advertising (interval %" PRIu32 " ms, %sconnectable)", From b4a62135a0eee4061c427512d64951b554835420 Mon Sep 17 00:00:00 2001 From: "tianfeng.yang" <130436698+tianfeng-yang@users.noreply.github.com> Date: Wed, 17 Apr 2024 21:53:13 +0800 Subject: [PATCH 100/468] [Python] Create pairingDelegate for each DeviceController (#32369) * Create pairingDelegate for each DeviceController * restore the original pairingcomplete callback logic --- .../ChipDeviceController-ScriptBinding.cpp | 97 +++++++++++-------- src/controller/python/OpCredsBinding.cpp | 40 +++++--- src/controller/python/chip/ChipDeviceCtrl.py | 69 ++++++++----- 3 files changed, 128 insertions(+), 78 deletions(-) diff --git a/src/controller/python/ChipDeviceController-ScriptBinding.cpp b/src/controller/python/ChipDeviceController-ScriptBinding.cpp index d78c9da8ed74d3..a55d3865bdccae 100644 --- a/src/controller/python/ChipDeviceController-ScriptBinding.cpp +++ b/src/controller/python/ChipDeviceController-ScriptBinding.cpp @@ -105,7 +105,6 @@ chip::Controller::CommissioningParameters sCommissioningParameters; } // namespace -chip::Controller::ScriptDevicePairingDelegate sPairingDelegate; chip::Controller::ScriptPairingDeviceDiscoveryDelegate sPairingDeviceDiscoveryDelegate; chip::Credentials::GroupDataProviderImpl sGroupDataProvider; chip::Credentials::PersistentStorageOpCertStore sPersistentStorageOpCertStore; @@ -121,9 +120,8 @@ extern "C" { PyChipError pychip_DeviceController_StackInit(Controller::Python::StorageAdapter * storageAdapter, bool enableServerInteractions); PyChipError pychip_DeviceController_StackShutdown(); -PyChipError pychip_DeviceController_NewDeviceController(chip::Controller::DeviceCommissioner ** outDevCtrl, - chip::NodeId localDeviceId, bool useTestCommissioner); -PyChipError pychip_DeviceController_DeleteDeviceController(chip::Controller::DeviceCommissioner * devCtrl); +PyChipError pychip_DeviceController_DeleteDeviceController(chip::Controller::DeviceCommissioner * devCtrl, + chip::Controller::ScriptDevicePairingDelegate * pairingDelegate); PyChipError pychip_DeviceController_GetAddressAndPort(chip::Controller::DeviceCommissioner * devCtrl, chip::NodeId nodeId, char * outAddress, uint64_t maxAddressLen, uint16_t * outPort); PyChipError pychip_DeviceController_GetCompressedFabricId(chip::Controller::DeviceCommissioner * devCtrl, uint64_t * outFabricId); @@ -168,15 +166,17 @@ PyChipError pychip_DeviceController_DiscoverCommissionableNodesDeviceType(chip:: uint16_t device_type); PyChipError pychip_DeviceController_DiscoverCommissionableNodesCommissioningEnabled(chip::Controller::DeviceCommissioner * devCtrl); -PyChipError pychip_DeviceController_OnNetworkCommission(chip::Controller::DeviceCommissioner * devCtrl, uint64_t nodeId, - uint32_t setupPasscode, const uint8_t filterType, const char * filterParam, - uint32_t discoveryTimeoutMsec); +PyChipError pychip_DeviceController_OnNetworkCommission(chip::Controller::DeviceCommissioner * devCtrl, + chip::Controller::ScriptDevicePairingDelegate * pairingDelegate, + uint64_t nodeId, uint32_t setupPasscode, const uint8_t filterType, + const char * filterParam, uint32_t discoveryTimeoutMsec); PyChipError pychip_DeviceController_PostTaskOnChipThread(ChipThreadTaskRunnerFunct callback, void * pythonContext); -PyChipError pychip_DeviceController_OpenCommissioningWindow(chip::Controller::DeviceCommissioner * devCtrl, chip::NodeId nodeid, - uint16_t timeout, uint32_t iteration, uint16_t discriminator, - uint8_t optionInt); +PyChipError pychip_DeviceController_OpenCommissioningWindow(chip::Controller::DeviceCommissioner * devCtrl, + chip::Controller::ScriptDevicePairingDelegate * pairingDelegate, + chip::NodeId nodeid, uint16_t timeout, uint32_t iteration, + uint16_t discriminator, uint8_t optionInt); void pychip_DeviceController_PrintDiscoveredDevices(chip::Controller::DeviceCommissioner * devCtrl); bool pychip_DeviceController_GetIPForDiscoveredDevice(chip::Controller::DeviceCommissioner * devCtrl, int idx, char * addrStr, @@ -184,19 +184,28 @@ bool pychip_DeviceController_GetIPForDiscoveredDevice(chip::Controller::DeviceCo // Pairing Delegate PyChipError -pychip_ScriptDevicePairingDelegate_SetKeyExchangeCallback(chip::Controller::DeviceCommissioner * devCtrl, +pychip_ScriptDevicePairingDelegate_SetKeyExchangeCallback(chip::Controller::ScriptDevicePairingDelegate * pairingDelegate, chip::Controller::DevicePairingDelegate_OnPairingCompleteFunct callback); PyChipError pychip_ScriptDevicePairingDelegate_SetCommissioningCompleteCallback( - chip::Controller::DeviceCommissioner * devCtrl, chip::Controller::DevicePairingDelegate_OnCommissioningCompleteFunct callback); + chip::Controller::ScriptDevicePairingDelegate * pairingDelegate, + chip::Controller::DevicePairingDelegate_OnCommissioningCompleteFunct callback); PyChipError pychip_ScriptDevicePairingDelegate_SetCommissioningStatusUpdateCallback( - chip::Controller::DeviceCommissioner * devCtrl, + chip::Controller::ScriptDevicePairingDelegate * pairingDelegate, chip::Controller::DevicePairingDelegate_OnCommissioningStatusUpdateFunct callback); + PyChipError -pychip_ScriptDevicePairingDelegate_SetFabricCheckCallback(chip::Controller::DevicePairingDelegate_OnFabricCheckFunct callback); +pychip_ScriptDevicePairingDelegate_SetFabricCheckCallback(chip::Controller::ScriptDevicePairingDelegate * pairingDelegate, + chip::Controller::DevicePairingDelegate_OnFabricCheckFunct callback); + PyChipError pychip_ScriptDevicePairingDelegate_SetOpenWindowCompleteCallback( - chip::Controller::DeviceCommissioner * devCtrl, chip::Controller::DevicePairingDelegate_OnWindowOpenCompleteFunct callback); + chip::Controller::ScriptDevicePairingDelegate * pairingDelegate, + chip::Controller::DevicePairingDelegate_OnWindowOpenCompleteFunct callback); + +PyChipError +pychip_ScriptDevicePairingDelegate_SetExpectingPairingComplete(chip::Controller::ScriptDevicePairingDelegate * pairingDelegate, + bool value); // BLE PyChipError pychip_DeviceCommissioner_CloseBleConnection(chip::Controller::DeviceCommissioner * devCtrl); @@ -354,7 +363,6 @@ const char * pychip_DeviceController_StatusReportToString(uint32_t profileId, ui PyChipError pychip_DeviceController_ConnectBLE(chip::Controller::DeviceCommissioner * devCtrl, uint16_t discriminator, uint32_t setupPINCode, chip::NodeId nodeid) { - sPairingDelegate.SetExpectingPairingComplete(true); return ToPyChipError(devCtrl->PairDevice(nodeid, chip::RendezvousParameters() .SetPeerAddress(Transport::PeerAddress(Transport::Type::kBle)) @@ -378,14 +386,12 @@ PyChipError pychip_DeviceController_ConnectIP(chip::Controller::DeviceCommission addr.SetTransportType(chip::Transport::Type::kUdp).SetIPAddress(peerAddr).SetInterface(ifaceOutput); params.SetPeerAddress(addr).SetDiscriminator(0); - sPairingDelegate.SetExpectingPairingComplete(true); return ToPyChipError(devCtrl->PairDevice(nodeid, params, sCommissioningParameters)); } PyChipError pychip_DeviceController_ConnectWithCode(chip::Controller::DeviceCommissioner * devCtrl, const char * onboardingPayload, chip::NodeId nodeid, uint8_t discoveryType) { - sPairingDelegate.SetExpectingPairingComplete(true); return ToPyChipError(devCtrl->PairDevice(nodeid, onboardingPayload, sCommissioningParameters, static_cast(discoveryType))); } @@ -430,9 +436,10 @@ PyChipError pychip_DeviceController_UnpairDevice(chip::Controller::DeviceCommiss return ToPyChipError(err); } -PyChipError pychip_DeviceController_OnNetworkCommission(chip::Controller::DeviceCommissioner * devCtrl, uint64_t nodeId, - uint32_t setupPasscode, const uint8_t filterType, const char * filterParam, - uint32_t discoveryTimeoutMsec) +PyChipError pychip_DeviceController_OnNetworkCommission(chip::Controller::DeviceCommissioner * devCtrl, + chip::Controller::ScriptDevicePairingDelegate * pairingDelegate, + uint64_t nodeId, uint32_t setupPasscode, const uint8_t filterType, + const char * filterParam, uint32_t discoveryTimeoutMsec) { Dnssd::DiscoveryFilter filter(static_cast(filterType)); switch (static_cast(filterType)) @@ -467,9 +474,8 @@ PyChipError pychip_DeviceController_OnNetworkCommission(chip::Controller::Device return ToPyChipError(CHIP_ERROR_INVALID_ARGUMENT); } - sPairingDelegate.SetExpectingPairingComplete(true); - CHIP_ERROR err = sPairingDeviceDiscoveryDelegate.Init(nodeId, setupPasscode, sCommissioningParameters, &sPairingDelegate, - devCtrl, discoveryTimeoutMsec); + CHIP_ERROR err = sPairingDeviceDiscoveryDelegate.Init(nodeId, setupPasscode, sCommissioningParameters, pairingDelegate, devCtrl, + discoveryTimeoutMsec); VerifyOrReturnError(err == CHIP_NO_ERROR, ToPyChipError(err)); return ToPyChipError(devCtrl->DiscoverCommissionableNodes(filter)); } @@ -587,7 +593,6 @@ PyChipError pychip_DeviceController_EstablishPASESessionIP(chip::Controller::Dev addr.SetPort(port); } params.SetPeerAddress(addr).SetDiscriminator(0); - sPairingDelegate.SetExpectingPairingComplete(true); return ToPyChipError(devCtrl->EstablishPASEConnection(nodeid, params)); } @@ -598,14 +603,12 @@ PyChipError pychip_DeviceController_EstablishPASESessionBLE(chip::Controller::De RendezvousParameters params = chip::RendezvousParameters().SetSetupPINCode(setupPINCode); addr.SetTransportType(chip::Transport::Type::kBle); params.SetPeerAddress(addr).SetDiscriminator(discriminator); - sPairingDelegate.SetExpectingPairingComplete(true); return ToPyChipError(devCtrl->EstablishPASEConnection(nodeid, params)); } PyChipError pychip_DeviceController_EstablishPASESession(chip::Controller::DeviceCommissioner * devCtrl, const char * setUpCode, chip::NodeId nodeid) { - sPairingDelegate.SetExpectingPairingComplete(true); return ToPyChipError(devCtrl->EstablishPASEConnection(nodeid, setUpCode)); } @@ -656,15 +659,17 @@ PyChipError pychip_DeviceController_DiscoverCommissionableNodesCommissioningEnab } PyChipError pychip_ScriptDevicePairingDelegate_SetOpenWindowCompleteCallback( - chip::Controller::DeviceCommissioner * devCtrl, chip::Controller::DevicePairingDelegate_OnWindowOpenCompleteFunct callback) + chip::Controller::ScriptDevicePairingDelegate * pairingDelegate, + chip::Controller::DevicePairingDelegate_OnWindowOpenCompleteFunct callback) { - sPairingDelegate.SetCommissioningWindowOpenCallback(callback); + pairingDelegate->SetCommissioningWindowOpenCallback(callback); return ToPyChipError(CHIP_NO_ERROR); } -PyChipError pychip_DeviceController_OpenCommissioningWindow(chip::Controller::DeviceCommissioner * devCtrl, chip::NodeId nodeid, - uint16_t timeout, uint32_t iteration, uint16_t discriminator, - uint8_t optionInt) +PyChipError pychip_DeviceController_OpenCommissioningWindow(chip::Controller::DeviceCommissioner * devCtrl, + chip::Controller::ScriptDevicePairingDelegate * pairingDelegate, + chip::NodeId nodeid, uint16_t timeout, uint32_t iteration, + uint16_t discriminator, uint8_t optionInt) { const auto option = static_cast(optionInt); if (option == Controller::CommissioningWindowOpener::CommissioningWindowOption::kOriginalSetupCode) @@ -680,7 +685,7 @@ PyChipError pychip_DeviceController_OpenCommissioningWindow(chip::Controller::De Platform::New(static_cast(devCtrl)); PyChipError err = ToPyChipError(opener->OpenCommissioningWindow(nodeid, System::Clock::Seconds16(timeout), iteration, discriminator, NullOptional, NullOptional, - sPairingDelegate.GetOpenWindowCallback(opener), payload)); + pairingDelegate->GetOpenWindowCallback(opener), payload)); return err; } @@ -688,32 +693,42 @@ PyChipError pychip_DeviceController_OpenCommissioningWindow(chip::Controller::De } PyChipError -pychip_ScriptDevicePairingDelegate_SetKeyExchangeCallback(chip::Controller::DeviceCommissioner * devCtrl, +pychip_ScriptDevicePairingDelegate_SetKeyExchangeCallback(chip::Controller::ScriptDevicePairingDelegate * pairingDelegate, chip::Controller::DevicePairingDelegate_OnPairingCompleteFunct callback) { - sPairingDelegate.SetKeyExchangeCallback(callback); + pairingDelegate->SetKeyExchangeCallback(callback); return ToPyChipError(CHIP_NO_ERROR); } PyChipError pychip_ScriptDevicePairingDelegate_SetCommissioningCompleteCallback( - chip::Controller::DeviceCommissioner * devCtrl, chip::Controller::DevicePairingDelegate_OnCommissioningCompleteFunct callback) + chip::Controller::ScriptDevicePairingDelegate * pairingDelegate, + chip::Controller::DevicePairingDelegate_OnCommissioningCompleteFunct callback) { - sPairingDelegate.SetCommissioningCompleteCallback(callback); + pairingDelegate->SetCommissioningCompleteCallback(callback); return ToPyChipError(CHIP_NO_ERROR); } PyChipError pychip_ScriptDevicePairingDelegate_SetCommissioningStatusUpdateCallback( - chip::Controller::DeviceCommissioner * devCtrl, + chip::Controller::ScriptDevicePairingDelegate * pairingDelegate, chip::Controller::DevicePairingDelegate_OnCommissioningStatusUpdateFunct callback) { - sPairingDelegate.SetCommissioningStatusUpdateCallback(callback); + pairingDelegate->SetCommissioningStatusUpdateCallback(callback); + return ToPyChipError(CHIP_NO_ERROR); +} + +PyChipError +pychip_ScriptDevicePairingDelegate_SetFabricCheckCallback(chip::Controller::ScriptDevicePairingDelegate * pairingDelegate, + chip::Controller::DevicePairingDelegate_OnFabricCheckFunct callback) +{ + pairingDelegate->SetFabricCheckCallback(callback); return ToPyChipError(CHIP_NO_ERROR); } PyChipError -pychip_ScriptDevicePairingDelegate_SetFabricCheckCallback(chip::Controller::DevicePairingDelegate_OnFabricCheckFunct callback) +pychip_ScriptDevicePairingDelegate_SetExpectingPairingComplete(chip::Controller::ScriptDevicePairingDelegate * pairingDelegate, + bool value) { - sPairingDelegate.SetFabricCheckCallback(callback); + pairingDelegate->SetExpectingPairingComplete(value); return ToPyChipError(CHIP_NO_ERROR); } diff --git a/src/controller/python/OpCredsBinding.cpp b/src/controller/python/OpCredsBinding.cpp index 79995d133b45e0..66a6c841843cde 100644 --- a/src/controller/python/OpCredsBinding.cpp +++ b/src/controller/python/OpCredsBinding.cpp @@ -402,12 +402,11 @@ void pychip_OnCommissioningStatusUpdate(chip::PeerId peerId, chip::Controller::C * TODO(#25214): Need clean up API * */ -PyChipError pychip_OpCreds_AllocateControllerForPythonCommissioningFLow(chip::Controller::DeviceCommissioner ** outDevCtrl, - chip::python::pychip_P256Keypair * operationalKey, - uint8_t * noc, uint32_t nocLen, uint8_t * icac, - uint32_t icacLen, uint8_t * rcac, uint32_t rcacLen, - const uint8_t * ipk, uint32_t ipkLen, - chip::VendorId adminVendorId, bool enableServerInteractions) +PyChipError pychip_OpCreds_AllocateControllerForPythonCommissioningFLow( + chip::Controller::DeviceCommissioner ** outDevCtrl, chip::Controller::ScriptDevicePairingDelegate ** outPairingDelegate, + chip::python::pychip_P256Keypair * operationalKey, uint8_t * noc, uint32_t nocLen, uint8_t * icac, uint32_t icacLen, + uint8_t * rcac, uint32_t rcacLen, const uint8_t * ipk, uint32_t ipkLen, chip::VendorId adminVendorId, + bool enableServerInteractions) { ReturnErrorCodeIf(nocLen > Controller::kMaxCHIPDERCertLength, ToPyChipError(CHIP_ERROR_NO_MEMORY)); ReturnErrorCodeIf(icacLen > Controller::kMaxCHIPDERCertLength, ToPyChipError(CHIP_ERROR_NO_MEMORY)); @@ -415,11 +414,13 @@ PyChipError pychip_OpCreds_AllocateControllerForPythonCommissioningFLow(chip::Co ChipLogDetail(Controller, "Creating New Device Controller"); + auto pairingDelegate = std::make_unique(); + VerifyOrReturnError(pairingDelegate != nullptr, ToPyChipError(CHIP_ERROR_NO_MEMORY)); auto devCtrl = std::make_unique(); VerifyOrReturnError(devCtrl != nullptr, ToPyChipError(CHIP_ERROR_NO_MEMORY)); Controller::SetupParams initParams; - initParams.pairingDelegate = &sPairingDelegate; + initParams.pairingDelegate = pairingDelegate.get(); initParams.operationalCredentialsDelegate = &sPlaceholderOperationalCredentialsIssuer; initParams.operationalKeypair = operationalKey; initParams.controllerRCAC = ByteSpan(rcac, rcacLen); @@ -450,13 +451,15 @@ PyChipError pychip_OpCreds_AllocateControllerForPythonCommissioningFLow(chip::Co chip::Credentials::SetSingleIpkEpochKey(&sGroupDataProvider, devCtrl->GetFabricIndex(), fabricIpk, compressedFabricIdSpan); VerifyOrReturnError(err == CHIP_NO_ERROR, ToPyChipError(err)); - *outDevCtrl = devCtrl.release(); + *outDevCtrl = devCtrl.release(); + *outPairingDelegate = pairingDelegate.release(); return ToPyChipError(CHIP_NO_ERROR); } // TODO(#25214): Need clean up API PyChipError pychip_OpCreds_AllocateController(OpCredsContext * context, chip::Controller::DeviceCommissioner ** outDevCtrl, + chip::Controller::ScriptDevicePairingDelegate ** outPairingDelegate, FabricId fabricId, chip::NodeId nodeId, chip::VendorId adminVendorId, const char * paaTrustStorePath, bool useTestCommissioner, bool enableServerInteractions, CASEAuthTag * caseAuthTags, uint32_t caseAuthTagLen, @@ -468,6 +471,8 @@ PyChipError pychip_OpCreds_AllocateController(OpCredsContext * context, chip::Co VerifyOrReturnError(context != nullptr, ToPyChipError(CHIP_ERROR_INVALID_ARGUMENT)); + auto pairingDelegate = std::make_unique(); + VerifyOrReturnError(pairingDelegate != nullptr, ToPyChipError(CHIP_ERROR_NO_MEMORY)); auto devCtrl = std::make_unique(); VerifyOrReturnError(devCtrl != nullptr, ToPyChipError(CHIP_ERROR_NO_MEMORY)); @@ -524,7 +529,7 @@ PyChipError pychip_OpCreds_AllocateController(OpCredsContext * context, chip::Co VerifyOrReturnError(err == CHIP_NO_ERROR, ToPyChipError(err)); Controller::SetupParams initParams; - initParams.pairingDelegate = &sPairingDelegate; + initParams.pairingDelegate = pairingDelegate.get(); initParams.operationalCredentialsDelegate = context->mAdapter.get(); initParams.operationalKeypair = controllerKeyPair; initParams.controllerRCAC = rcacSpan; @@ -538,9 +543,9 @@ PyChipError pychip_OpCreds_AllocateController(OpCredsContext * context, chip::Co if (useTestCommissioner) { initParams.defaultCommissioner = &sTestCommissioner; - sPairingDelegate.SetCommissioningSuccessCallback(pychip_OnCommissioningSuccess); - sPairingDelegate.SetCommissioningFailureCallback(pychip_OnCommissioningFailure); - sPairingDelegate.SetCommissioningStatusUpdateCallback(pychip_OnCommissioningStatusUpdate); + pairingDelegate->SetCommissioningSuccessCallback(pychip_OnCommissioningSuccess); + pairingDelegate->SetCommissioningFailureCallback(pychip_OnCommissioningFailure); + pairingDelegate->SetCommissioningStatusUpdateCallback(pychip_OnCommissioningStatusUpdate); } err = Controller::DeviceControllerFactory::GetInstance().SetupCommissioner(initParams, *devCtrl); @@ -562,7 +567,8 @@ PyChipError pychip_OpCreds_AllocateController(OpCredsContext * context, chip::Co chip::Credentials::SetSingleIpkEpochKey(&sGroupDataProvider, devCtrl->GetFabricIndex(), defaultIpk, compressedFabricIdSpan); VerifyOrReturnError(err == CHIP_NO_ERROR, ToPyChipError(err)); - *outDevCtrl = devCtrl.release(); + *outDevCtrl = devCtrl.release(); + *outPairingDelegate = pairingDelegate.release(); return ToPyChipError(CHIP_NO_ERROR); } @@ -596,7 +602,8 @@ void pychip_OpCreds_FreeDelegate(OpCredsContext * context) Platform::Delete(context); } -PyChipError pychip_DeviceController_DeleteDeviceController(chip::Controller::DeviceCommissioner * devCtrl) +PyChipError pychip_DeviceController_DeleteDeviceController(chip::Controller::DeviceCommissioner * devCtrl, + chip::Controller::ScriptDevicePairingDelegate * pairingDelegate) { if (devCtrl != nullptr) { @@ -604,6 +611,11 @@ PyChipError pychip_DeviceController_DeleteDeviceController(chip::Controller::Dev delete devCtrl; } + if (pairingDelegate != nullptr) + { + delete pairingDelegate; + } + return ToPyChipError(CHIP_NO_ERROR); } diff --git a/src/controller/python/chip/ChipDeviceCtrl.py b/src/controller/python/chip/ChipDeviceCtrl.py index 369260787d9af8..b553b2f85b641e 100644 --- a/src/controller/python/chip/ChipDeviceCtrl.py +++ b/src/controller/python/chip/ChipDeviceCtrl.py @@ -253,8 +253,10 @@ def __init__(self, name: str = ''): self._InitLib() + pairingDelegate = c_void_p(None) devCtrl = c_void_p(None) + self.pairingDelegate = pairingDelegate self.devCtrl = devCtrl self.name = name self.fabricCheckNodeId = -1 @@ -263,7 +265,7 @@ def __init__(self, name: str = ''): self._Cluster = ChipClusters(builtins.chipStack) self._Cluster.InitLib(self._dmLib) - def _set_dev_ctrl(self, devCtrl): + def _set_dev_ctrl(self, devCtrl, pairingDelegate): def HandleCommissioningComplete(nodeid, err): if err.is_success: logging.info("Commissioning complete") @@ -321,25 +323,26 @@ def HandlePASEEstablishmentComplete(err: PyChipError): if not err.is_success: HandleCommissioningComplete(0, err) + self.pairingDelegate = pairingDelegate self.devCtrl = devCtrl self.cbHandlePASEEstablishmentCompleteFunct = _DevicePairingDelegate_OnPairingCompleteFunct( HandlePASEEstablishmentComplete) self._dmLib.pychip_ScriptDevicePairingDelegate_SetKeyExchangeCallback( - self.devCtrl, self.cbHandlePASEEstablishmentCompleteFunct) + self.pairingDelegate, self.cbHandlePASEEstablishmentCompleteFunct) self.cbHandleCommissioningCompleteFunct = _DevicePairingDelegate_OnCommissioningCompleteFunct( HandleCommissioningComplete) self._dmLib.pychip_ScriptDevicePairingDelegate_SetCommissioningCompleteCallback( - self.devCtrl, self.cbHandleCommissioningCompleteFunct) + self.pairingDelegate, self.cbHandleCommissioningCompleteFunct) self.cbHandleFabricCheckFunct = _DevicePairingDelegate_OnFabricCheckFunct(HandleFabricCheck) - self._dmLib.pychip_ScriptDevicePairingDelegate_SetFabricCheckCallback(self.cbHandleFabricCheckFunct) + self._dmLib.pychip_ScriptDevicePairingDelegate_SetFabricCheckCallback(self.pairingDelegate, self.cbHandleFabricCheckFunct) self.cbHandleOpenWindowCompleteFunct = _DevicePairingDelegate_OnOpenWindowCompleteFunct( HandleOpenWindowComplete) self._dmLib.pychip_ScriptDevicePairingDelegate_SetOpenWindowCompleteCallback( - self.devCtrl, self.cbHandleOpenWindowCompleteFunct) + self.pairingDelegate, self.cbHandleOpenWindowCompleteFunct) self.cbHandleDeviceUnpairCompleteFunct = _DeviceUnpairingCompleteFunct(HandleUnpairDeviceComplete) @@ -355,6 +358,11 @@ def _finish_init(self): ChipDeviceController.activeList.add(self) + def _enablePairingCompeleteCallback(self, value: bool): + self._ChipStack.Call( + lambda: self._dmLib.pychip_ScriptDevicePairingDelegate_SetExpectingPairingComplete(self.pairingDelegate, value) + ).raise_on_error() + @property def fabricAdmin(self) -> FabricAdmin.FabricAdmin: return self._fabricAdmin @@ -389,8 +397,9 @@ def Shutdown(self): if self.devCtrl is not None: self._ChipStack.Call( lambda: self._dmLib.pychip_DeviceController_DeleteDeviceController( - self.devCtrl) + self.devCtrl, self.pairingDelegate) ).raise_on_error() + self.pairingDelegate = None self.devCtrl = None ChipDeviceController.activeList.remove(self) @@ -437,6 +446,7 @@ def ConnectBLE(self, discriminator, setupPinCode, nodeid) -> PyChipError: self._ChipStack.commissioningCompleteEvent.clear() self.state = DCState.COMMISSIONING + self._enablePairingCompeleteCallback(True) self._ChipStack.CallAsync( lambda: self._dmLib.pychip_DeviceController_ConnectBLE( self.devCtrl, discriminator, setupPinCode, nodeid) @@ -487,6 +497,7 @@ def EstablishPASESessionBLE(self, setupPinCode: int, discriminator: int, nodeid: self.CheckIsActive() self.state = DCState.RENDEZVOUS_ONGOING + self._enablePairingCompeleteCallback(True) return self._ChipStack.CallAsync( lambda: self._dmLib.pychip_DeviceController_EstablishPASESessionBLE( self.devCtrl, setupPinCode, discriminator, nodeid) @@ -496,6 +507,7 @@ def EstablishPASESessionIP(self, ipaddr: str, setupPinCode: int, nodeid: int, po self.CheckIsActive() self.state = DCState.RENDEZVOUS_ONGOING + self._enablePairingCompeleteCallback(True) return self._ChipStack.CallAsync( lambda: self._dmLib.pychip_DeviceController_EstablishPASESessionIP( self.devCtrl, ipaddr.encode("utf-8"), setupPinCode, nodeid, port) @@ -505,6 +517,7 @@ def EstablishPASESession(self, setUpCode: str, nodeid: int): self.CheckIsActive() self.state = DCState.RENDEZVOUS_ONGOING + self._enablePairingCompeleteCallback(True) return self._ChipStack.CallAsync( lambda: self._dmLib.pychip_DeviceController_EstablishPASESession( self.devCtrl, setUpCode.encode("utf-8"), nodeid) @@ -726,7 +739,7 @@ def OpenCommissioningWindow(self, nodeid: int, timeout: int, iteration: int, self.CheckIsActive() self._ChipStack.CallAsync( lambda: self._dmLib.pychip_DeviceController_OpenCommissioningWindow( - self.devCtrl, nodeid, timeout, iteration, discriminator, option) + self.devCtrl, self.pairingDelegate, nodeid, timeout, iteration, discriminator, option) ).raise_on_error() self._ChipStack.callbackRes.raise_on_error() return self._ChipStack.openCommissioningWindowPincode[nodeid] @@ -1515,16 +1528,13 @@ def _InitLib(self): self._dmLib = CDLL(self._ChipStack.LocateChipDLL()) self._dmLib.pychip_DeviceController_DeleteDeviceController.argtypes = [ - c_void_p] + c_void_p, c_void_p] self._dmLib.pychip_DeviceController_DeleteDeviceController.restype = PyChipError self._dmLib.pychip_DeviceController_ConnectBLE.argtypes = [ c_void_p, c_uint16, c_uint32, c_uint64] self._dmLib.pychip_DeviceController_ConnectBLE.restype = PyChipError - self._dmLib.pychip_DeviceController_ConnectIP.argtypes = [ - c_void_p, c_char_p, c_uint32, c_uint64] - self._dmLib.pychip_DeviceController_SetThreadOperationalDataset.argtypes = [ c_char_p, c_uint32] self._dmLib.pychip_DeviceController_SetThreadOperationalDataset.restype = PyChipError @@ -1560,7 +1570,7 @@ def _InitLib(self): self._dmLib.pychip_DeviceController_Commission.restype = PyChipError self._dmLib.pychip_DeviceController_OnNetworkCommission.argtypes = [ - c_void_p, c_uint64, c_uint32, c_uint8, c_char_p, c_uint32] + c_void_p, c_void_p, c_uint64, c_uint32, c_uint8, c_char_p, c_uint32] self._dmLib.pychip_DeviceController_OnNetworkCommission.restype = PyChipError self._dmLib.pychip_DeviceController_DiscoverCommissionableNodes.argtypes = [ @@ -1598,6 +1608,7 @@ def _InitLib(self): self._dmLib.pychip_DeviceController_EstablishPASESessionBLE.argtypes = [ c_void_p, c_uint32, c_uint16, c_uint64] self._dmLib.pychip_DeviceController_EstablishPASESessionBLE.restype = PyChipError + self._dmLib.pychip_DeviceController_EstablishPASESession.argtypes = [ c_void_p, c_char_p, c_uint64] self._dmLib.pychip_DeviceController_EstablishPASESession.restype = PyChipError @@ -1605,10 +1616,12 @@ def _InitLib(self): self._dmLib.pychip_DeviceController_DiscoverAllCommissionableNodes.argtypes = [ c_void_p] self._dmLib.pychip_DeviceController_DiscoverAllCommissionableNodes.restype = PyChipError + self._dmLib.pychip_DeviceController_PrintDiscoveredDevices.argtypes = [ c_void_p] self._dmLib.pychip_DeviceController_PrintDiscoveredDevices.argtypes = [ c_void_p, _ChipDeviceController_IterateDiscoveredCommissionableNodesFunct] + self._dmLib.pychip_DeviceController_HasDiscoveredCommissionableNode.argtypes = [c_void_p] self._dmLib.pychip_DeviceController_HasDiscoveredCommissionableNode.restype = c_bool @@ -1653,9 +1666,13 @@ def _InitLib(self): self._dmLib.pychip_ScriptDevicePairingDelegate_SetCommissioningStatusUpdateCallback.restype = PyChipError self._dmLib.pychip_ScriptDevicePairingDelegate_SetFabricCheckCallback.argtypes = [ - _DevicePairingDelegate_OnFabricCheckFunct] + c_void_p, _DevicePairingDelegate_OnFabricCheckFunct] self._dmLib.pychip_ScriptDevicePairingDelegate_SetFabricCheckCallback.restype = PyChipError + self._dmLib.pychip_ScriptDevicePairingDelegate_SetExpectingPairingComplete.argtypes = [ + c_void_p, c_bool] + self._dmLib.pychip_ScriptDevicePairingDelegate_SetExpectingPairingComplete.restype = PyChipError + self._dmLib.pychip_GetConnectedDeviceByNodeId.argtypes = [ c_void_p, c_uint64, py_object, _DeviceAvailableCallbackFunct] self._dmLib.pychip_GetConnectedDeviceByNodeId.restype = PyChipError @@ -1683,8 +1700,9 @@ def _InitLib(self): self._dmLib.pychip_DeviceController_GetCompressedFabricId.restype = PyChipError self._dmLib.pychip_DeviceController_OpenCommissioningWindow.argtypes = [ - c_void_p, c_uint64, c_uint16, c_uint32, c_uint16, c_uint8] + c_void_p, c_void_p, c_uint64, c_uint16, c_uint32, c_uint16, c_uint8] self._dmLib.pychip_DeviceController_OpenCommissioningWindow.restype = PyChipError + self._dmLib.pychip_TestCommissionerUsed.argtypes = [] self._dmLib.pychip_TestCommissionerUsed.restype = c_bool @@ -1700,6 +1718,7 @@ def _InitLib(self): self._dmLib.pychip_SetTestCommissionerSimulateFailureOnStage.argtypes = [ c_uint8] self._dmLib.pychip_SetTestCommissionerSimulateFailureOnStage.restype = c_bool + self._dmLib.pychip_SetTestCommissionerSimulateFailureOnReport.argtypes = [ c_uint8] self._dmLib.pychip_SetTestCommissionerSimulateFailureOnReport.restype = c_bool @@ -1712,8 +1731,7 @@ def _InitLib(self): self._dmLib.pychip_GetCompletionError.restype = PyChipError self._dmLib.pychip_DeviceController_IssueNOCChain.argtypes = [ - c_void_p, py_object, c_char_p, c_size_t, c_uint64 - ] + c_void_p, py_object, c_char_p, c_size_t, c_uint64] self._dmLib.pychip_DeviceController_IssueNOCChain.restype = PyChipError self._dmLib.pychip_OpCreds_InitGroupTestingData.argtypes = [ @@ -1734,11 +1752,11 @@ def _InitLib(self): self._dmLib.pychip_DeviceController_GetLogFilter = c_uint8 self._dmLib.pychip_OpCreds_AllocateController.argtypes = [c_void_p, POINTER( - c_void_p), c_uint64, c_uint64, c_uint16, c_char_p, c_bool, c_bool, POINTER(c_uint32), c_uint32, c_void_p] + c_void_p), POINTER(c_void_p), c_uint64, c_uint64, c_uint16, c_char_p, c_bool, c_bool, POINTER(c_uint32), c_uint32, c_void_p] self._dmLib.pychip_OpCreds_AllocateController.restype = PyChipError self._dmLib.pychip_OpCreds_AllocateControllerForPythonCommissioningFLow.argtypes = [ - POINTER(c_void_p), c_void_p, POINTER(c_char), c_uint32, POINTER(c_char), c_uint32, POINTER(c_char), c_uint32, POINTER(c_char), c_uint32, c_uint16, c_bool] + POINTER(c_void_p), POINTER(c_void_p), c_void_p, POINTER(c_char), c_uint32, POINTER(c_char), c_uint32, POINTER(c_char), c_uint32, POINTER(c_char), c_uint32, c_uint16, c_bool] self._dmLib.pychip_OpCreds_AllocateControllerForPythonCommissioningFLow.restype = PyChipError self._dmLib.pychip_DeviceController_SetIpk.argtypes = [c_void_p, POINTER(c_char), c_size_t] @@ -1760,6 +1778,7 @@ def __init__(self, opCredsContext: ctypes.c_void_p, fabricId: int, nodeId: int, self._dmLib.pychip_DeviceController_SetIssueNOCChainCallbackPythonCallback(_IssueNOCChainCallbackPythonCallback) + pairingDelegate = c_void_p(None) devCtrl = c_void_p(None) c_catTags = (c_uint32 * len(catTags))() @@ -1771,7 +1790,7 @@ def __init__(self, opCredsContext: ctypes.c_void_p, fabricId: int, nodeId: int, self._externalKeyPair = keypair self._ChipStack.Call( lambda: self._dmLib.pychip_OpCreds_AllocateController(c_void_p( - opCredsContext), pointer(devCtrl), fabricId, nodeId, adminVendorId, c_char_p(None if len(paaTrustStorePath) == 0 else str.encode(paaTrustStorePath)), useTestCommissioner, self._ChipStack.enableServerInteractions, c_catTags, len(catTags), None if keypair is None else keypair.native_object) + opCredsContext), pointer(devCtrl), pointer(pairingDelegate), fabricId, nodeId, adminVendorId, c_char_p(None if len(paaTrustStorePath) == 0 else str.encode(paaTrustStorePath)), useTestCommissioner, self._ChipStack.enableServerInteractions, c_catTags, len(catTags), None if keypair is None else keypair.native_object) ).raise_on_error() self._fabricAdmin = fabricAdmin @@ -1779,7 +1798,7 @@ def __init__(self, opCredsContext: ctypes.c_void_p, fabricId: int, nodeId: int, self._nodeId = nodeId self._caIndex = fabricAdmin.caIndex - self._set_dev_ctrl(devCtrl=devCtrl) + self._set_dev_ctrl(devCtrl=devCtrl, pairingDelegate=pairingDelegate) self._finish_init() @@ -1925,9 +1944,10 @@ def CommissionOnNetwork(self, nodeId: int, setupPinCode: int, self._ChipStack.commissioningCompleteEvent.clear() + self._enablePairingCompeleteCallback(True) self._ChipStack.CallAsync( lambda: self._dmLib.pychip_DeviceController_OnNetworkCommission( - self.devCtrl, nodeId, setupPinCode, int(filterType), str(filter).encode("utf-8") + b"\x00" if filter is not None else None, discoveryTimeoutMsec) + self.devCtrl, self.pairingDelegate, nodeId, setupPinCode, int(filterType), str(filter).encode("utf-8") + b"\x00" if filter is not None else None, discoveryTimeoutMsec) ) if not self._ChipStack.commissioningCompleteEvent.isSet(): # Error 50 is a timeout @@ -1948,6 +1968,7 @@ def CommissionWithCode(self, setupPayload: str, nodeid: int, discoveryType: Disc self._ChipStack.commissioningCompleteEvent.clear() + self._enablePairingCompeleteCallback(True) self._ChipStack.CallAsync( lambda: self._dmLib.pychip_DeviceController_ConnectWithCode( self.devCtrl, setupPayload, nodeid, discoveryType.value) @@ -1967,6 +1988,7 @@ def CommissionIP(self, ipaddr: str, setupPinCode: int, nodeid: int) -> PyChipErr self._ChipStack.commissioningCompleteEvent.clear() + self._enablePairingCompeleteCallback(True) self._ChipStack.CallAsync( lambda: self._dmLib.pychip_DeviceController_ConnectIP( self.devCtrl, ipaddr.encode("utf-8"), setupPinCode, nodeid) @@ -2011,6 +2033,7 @@ def __init__(self, operationalKey: p256keypair.P256Keypair, noc: bytes, ''' super().__init__(name or f"ctrl(v/{adminVendorId})") + pairingDelegate = c_void_p(None) devCtrl = c_void_p(None) # Device should hold a reference to the key to avoid it being GC-ed. @@ -2019,9 +2042,9 @@ def __init__(self, operationalKey: p256keypair.P256Keypair, noc: bytes, self._ChipStack.Call( lambda: self._dmLib.pychip_OpCreds_AllocateControllerForPythonCommissioningFLow( - c_void_p(devCtrl), nativeKey, noc, len(noc), icac, len(icac) if icac else 0, rcac, len(rcac), ipk, len(ipk) if ipk else 0, adminVendorId, self._ChipStack.enableServerInteractions) + c_void_p(devCtrl), c_void_p(pairingDelegate), nativeKey, noc, len(noc), icac, len(icac) if icac else 0, rcac, len(rcac), ipk, len(ipk) if ipk else 0, adminVendorId, self._ChipStack.enableServerInteractions) ).raise_on_error() - self._set_dev_ctrl(devCtrl) + self._set_dev_ctrl(devCtrl, pairingDelegate) self._finish_init() From 294f29e7c82d878893f7fc9a04359bd37084668c Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Wed, 17 Apr 2024 13:10:18 -0400 Subject: [PATCH 101/468] Stop assuming all unknown attributes have the C quality in MTRDevice. (#33009) * Stop assuming all unknown attributes have the C quality in MTRDevice. Assume things we don't know about don't have the C quality unless told to assume otherwise. Also fixes XPC detection check; non-XPC controllers also respond to the "sharedControllerWithID:xpcConnectBlock:" selector. * Address review comments and fix tests to work in the new setup. --- src/darwin/Framework/CHIP/MTRCluster.h | 11 + src/darwin/Framework/CHIP/MTRCluster.mm | 3 + src/darwin/Framework/CHIP/MTRDevice.mm | 38 +++- .../Framework/CHIPTests/MTRDeviceTests.m | 7 +- .../CHIPTests/MTRPerControllerStorageTests.m | 215 +++++++++++------- .../CHIPTests/MTRSwiftDeviceTests.swift | 6 +- .../TestHelpers/MTRDeviceTestDelegate.h | 1 + .../TestHelpers/MTRDeviceTestDelegate.m | 5 + 8 files changed, 199 insertions(+), 87 deletions(-) diff --git a/src/darwin/Framework/CHIP/MTRCluster.h b/src/darwin/Framework/CHIP/MTRCluster.h index f1863bbc05bc95..f1d876e493d73e 100644 --- a/src/darwin/Framework/CHIP/MTRCluster.h +++ b/src/darwin/Framework/CHIP/MTRCluster.h @@ -132,6 +132,17 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) */ @property (nonatomic, copy, nullable) NSNumber * minEventNumber MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +/** + * Controls whether attributes without known schema (e.g. vendor-specific + * attributes) should be assumed to be reportable normally via subscriptions. + * The default is YES. + * + * This setting is only relevant to some consumers of MTRReadParams. One of + * those consumers is readAttributeWithEndpointID:clusterID:attributeID:params: + * on MTRDevice. + */ +@property (nonatomic, assign, getter=shouldAssumeUnknownAttributesReportable) BOOL assumeUnknownAttributesReportable MTR_NEWLY_AVAILABLE; + @end /** diff --git a/src/darwin/Framework/CHIP/MTRCluster.mm b/src/darwin/Framework/CHIP/MTRCluster.mm index 96d4c4bb462e34..9bcb38e4cbac99 100644 --- a/src/darwin/Framework/CHIP/MTRCluster.mm +++ b/src/darwin/Framework/CHIP/MTRCluster.mm @@ -84,6 +84,7 @@ - (instancetype)init { if (self = [super init]) { _filterByFabric = YES; + _assumeUnknownAttributesReportable = YES; } return self; } @@ -93,6 +94,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone auto other = [[MTRReadParams alloc] init]; other.filterByFabric = self.filterByFabric; other.minEventNumber = self.minEventNumber; + other.assumeUnknownAttributesReportable = self.assumeUnknownAttributesReportable; return other; } @@ -124,6 +126,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone auto other = [[MTRSubscribeParams alloc] initWithMinInterval:self.minInterval maxInterval:self.maxInterval]; other.filterByFabric = self.filterByFabric; other.minEventNumber = self.minEventNumber; + other.assumeUnknownAttributesReportable = self.assumeUnknownAttributesReportable; other.replaceExistingSubscriptions = self.replaceExistingSubscriptions; other.reportEventsUrgently = self.reportEventsUrgently; other.resubscribeAutomatically = self.resubscribeAutomatically; diff --git a/src/darwin/Framework/CHIP/MTRDevice.mm b/src/darwin/Framework/CHIP/MTRDevice.mm index aa63efe1033633..5226759ebf4b51 100644 --- a/src/darwin/Framework/CHIP/MTRDevice.mm +++ b/src/darwin/Framework/CHIP/MTRDevice.mm @@ -336,6 +336,7 @@ - (void)unitTestReportEndForDevice:(MTRDevice *)device; - (BOOL)unitTestShouldSetUpSubscriptionForDevice:(MTRDevice *)device; - (BOOL)unitTestShouldSkipExpectedValuesForWrite:(MTRDevice *)device; - (NSNumber *)unitTestMaxIntervalOverrideForSubscription:(MTRDevice *)device; +- (BOOL)unitTestForceAttributeReportsIfMatchingCache:(MTRDevice *)device; @end #endif @@ -745,7 +746,7 @@ - (BOOL)_subscriptionAbleToReport // Unfortunately, we currently have no subscriptions over our hacked-up XPC // setup. Try to detect that situation. - if ([_deviceController.class respondsToSelector:@selector(sharedControllerWithID:xpcConnectBlock:)]) { + if ([_deviceController isKindOfClass:MTRDeviceControllerOverXPC.class]) { return NO; } @@ -1603,24 +1604,33 @@ static BOOL AttributeHasChangesOmittedQuality(MTRAttributePath * attributePath) - (NSDictionary * _Nullable)readAttributeWithEndpointID:(NSNumber *)endpointID clusterID:(NSNumber *)clusterID attributeID:(NSNumber *)attributeID - params:(MTRReadParams *)params + params:(MTRReadParams * _Nullable)params { MTRAttributePath * attributePath = [MTRAttributePath attributePathWithEndpointID:endpointID clusterID:clusterID attributeID:attributeID]; BOOL attributeIsSpecified = MTRAttributeIsSpecified(clusterID.unsignedIntValue, attributeID.unsignedIntValue); - BOOL hasChangesOmittedQuality = AttributeHasChangesOmittedQuality(attributePath); + BOOL hasChangesOmittedQuality; + if (attributeIsSpecified) { + hasChangesOmittedQuality = AttributeHasChangesOmittedQuality(attributePath); + } else { + if (params == nil) { + hasChangesOmittedQuality = NO; + } else { + hasChangesOmittedQuality = !params.assumeUnknownAttributesReportable; + } + } // Return current known / expected value right away NSDictionary * attributeValueToReturn = [self _attributeValueDictionaryForAttributePath:attributePath]; // Send read request to device if any of the following are true: - // 1. The attribute is not in the specification (so we don't know whether hasChangesOmittedQuality can be trusted). - // 2. Subscription not in a state we can expect reports - // 3. There is subscription but attribute has Changes Omitted quality - // TODO: add option for BaseSubscriptionCallback to report during priming, to reduce when case 4 is hit - if (!attributeIsSpecified || ![self _subscriptionAbleToReport] || hasChangesOmittedQuality) { + // 1. Subscription not in a state we can expect reports + // 2. The attribute has the Changes Omitted quality, so we won't get reports for it. + // 3. The attribute is not in the spec, and the read params asks to assume + // an unknown attribute has the Changes Omitted quality. + if (![self _subscriptionAbleToReport] || hasChangesOmittedQuality) { // Read requests container will be a mutable array of items, each being an array containing: // [attribute request path, params] // Batching handler should only coalesce when params are equal. @@ -2344,6 +2354,18 @@ - (NSArray *)_getAttributesToReportWithReportedValues:(NSArray *> * data) { for (NSDictionary * attributeReponseValue in data) { @@ -1526,8 +1530,9 @@ - (void)test017_TestMTRDeviceBasics } } }; + // use the nonexistent attribute and expect read error - [device readAttributeWithEndpointID:testEndpointID clusterID:testClusterID attributeID:testAttributeID params:nil]; + [device readAttributeWithEndpointID:testEndpointID clusterID:testClusterID attributeID:testAttributeID params:readThroughForUnknownAttributesParams]; [self waitForExpectations:@[ attributeReportErrorExpectation ] timeout:10]; // Resubscription test setup diff --git a/src/darwin/Framework/CHIPTests/MTRPerControllerStorageTests.m b/src/darwin/Framework/CHIPTests/MTRPerControllerStorageTests.m index e652d2f9fddc0e..df98530a81db18 100644 --- a/src/darwin/Framework/CHIPTests/MTRPerControllerStorageTests.m +++ b/src/darwin/Framework/CHIPTests/MTRPerControllerStorageTests.m @@ -1719,7 +1719,7 @@ - (void)testControllerServer // Should be able to add this one, though; it's unrelated to any existing endpoints. XCTAssertTrue([controllerClient addServerEndpoint:endpoint5]); - __auto_type * device = [MTRBaseDevice deviceWithNodeID:nodeIDServer controller:controllerClient]; + __auto_type * baseDevice = [MTRBaseDevice deviceWithNodeID:nodeIDServer controller:controllerClient]; __auto_type * requestPath = attribute1RequestPath; __block __auto_type * responsePath = attribute1ResponsePath; @@ -1762,14 +1762,14 @@ - (void)testControllerServer // First try a basic read. XCTestExpectation * readExpectation1 = [self expectationWithDescription:@"Read 1 of attribute complete"]; - [device readAttributePaths:@[ requestPath ] - eventPaths:nil - params:nil - queue:queue - completion:^(NSArray *> * _Nullable values, NSError * _Nullable error) { - checkSingleValue(values, error, unsignedIntValue1); - [readExpectation1 fulfill]; - }]; + [baseDevice readAttributePaths:@[ requestPath ] + eventPaths:nil + params:nil + queue:queue + completion:^(NSArray *> * _Nullable values, NSError * _Nullable error) { + checkSingleValue(values, error, unsignedIntValue1); + [readExpectation1 fulfill]; + }]; [self waitForExpectations:@[ readExpectation1 ] timeout:kTimeoutInSeconds]; // Now try a basic subscribe. @@ -1783,7 +1783,7 @@ - (void)testControllerServer XCTestExpectation * subscriptionEstablishedExpectation = [self expectationWithDescription:@"Basic subscription established"]; __auto_type * subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:@(0) maxInterval:@(10)]; - [device subscribeToAttributesWithEndpointID:requestPath.endpoint clusterID:requestPath.cluster attributeID:requestPath.attribute + [baseDevice subscribeToAttributesWithEndpointID:requestPath.endpoint clusterID:requestPath.cluster attributeID:requestPath.attribute params:subscribeParams queue:queue reportHandler:^(NSArray *> * _Nullable values, NSError * _Nullable error) { @@ -1809,14 +1809,14 @@ - (void)testControllerServer requestPath = attribute2RequestPath; responsePath = attribute2ResponsePath; XCTestExpectation * readNoPermissionsExpectation1 = [self expectationWithDescription:@"Read 1 of attribute with no permissions complete"]; - [device readAttributePaths:@[ requestPath ] - eventPaths:nil - params:nil - queue:queue - completion:^(NSArray *> * _Nullable values, NSError * _Nullable error) { - checkSinglePathError(values, error, MTRInteractionErrorCodeUnsupportedAccess); - [readNoPermissionsExpectation1 fulfill]; - }]; + [baseDevice readAttributePaths:@[ requestPath ] + eventPaths:nil + params:nil + queue:queue + completion:^(NSArray *> * _Nullable values, NSError * _Nullable error) { + checkSinglePathError(values, error, MTRInteractionErrorCodeUnsupportedAccess); + [readNoPermissionsExpectation1 fulfill]; + }]; [self waitForExpectations:@[ readNoPermissionsExpectation1 ] timeout:kTimeoutInSeconds]; // Change the permissions to give Manage access on the cluster to some @@ -1826,14 +1826,14 @@ - (void)testControllerServer [cluster2 addAccessGrant:unrelatedGrant]; XCTestExpectation * readNoPermissionsExpectation2 = [self expectationWithDescription:@"Read 2 of attribute with no permissions complete"]; - [device readAttributePaths:@[ requestPath ] - eventPaths:nil - params:nil - queue:queue - completion:^(NSArray *> * _Nullable values, NSError * _Nullable error) { - checkSinglePathError(values, error, MTRInteractionErrorCodeUnsupportedAccess); - [readNoPermissionsExpectation2 fulfill]; - }]; + [baseDevice readAttributePaths:@[ requestPath ] + eventPaths:nil + params:nil + queue:queue + completion:^(NSArray *> * _Nullable values, NSError * _Nullable error) { + checkSinglePathError(values, error, MTRInteractionErrorCodeUnsupportedAccess); + [readNoPermissionsExpectation2 fulfill]; + }]; [self waitForExpectations:@[ readNoPermissionsExpectation2 ] timeout:kTimeoutInSeconds]; // Change the permissions to give Manage access on the cluster to our client @@ -1843,14 +1843,14 @@ - (void)testControllerServer [cluster2 addAccessGrant:clientManageGrant]; XCTestExpectation * readExpectation2 = [self expectationWithDescription:@"Read 2 of attribute complete"]; - [device readAttributePaths:@[ requestPath ] - eventPaths:nil - params:nil - queue:queue - completion:^(NSArray *> * _Nullable values, NSError * _Nullable error) { - checkSingleValue(values, error, listOfStructsValue1); - [readExpectation2 fulfill]; - }]; + [baseDevice readAttributePaths:@[ requestPath ] + eventPaths:nil + params:nil + queue:queue + completion:^(NSArray *> * _Nullable values, NSError * _Nullable error) { + checkSingleValue(values, error, listOfStructsValue1); + [readExpectation2 fulfill]; + }]; [self waitForExpectations:@[ readExpectation2 ] timeout:kTimeoutInSeconds]; // Adding Manage permissions to one cluster should not affect another one. @@ -1858,14 +1858,14 @@ - (void)testControllerServer responsePath = attribute3ResponsePath; XCTestExpectation * readNoPermissionsExpectation3 = [self expectationWithDescription:@"Read 3 of attribute with no permissions complete"]; - [device readAttributePaths:@[ requestPath ] - eventPaths:nil - params:nil - queue:queue - completion:^(NSArray *> * _Nullable values, NSError * _Nullable error) { - checkSinglePathError(values, error, MTRInteractionErrorCodeUnsupportedAccess); - [readNoPermissionsExpectation3 fulfill]; - }]; + [baseDevice readAttributePaths:@[ requestPath ] + eventPaths:nil + params:nil + queue:queue + completion:^(NSArray *> * _Nullable values, NSError * _Nullable error) { + checkSinglePathError(values, error, MTRInteractionErrorCodeUnsupportedAccess); + [readNoPermissionsExpectation3 fulfill]; + }]; [self waitForExpectations:@[ readNoPermissionsExpectation3 ] timeout:kTimeoutInSeconds]; // But adding Manage permissions on the endpoint should grant Operate on @@ -1873,28 +1873,28 @@ - (void)testControllerServer [endpoint1 addAccessGrant:clientManageGrant]; XCTestExpectation * readExpectation3 = [self expectationWithDescription:@"Read 3 of attribute complete"]; - [device readAttributePaths:@[ requestPath ] - eventPaths:nil - params:nil - queue:queue - completion:^(NSArray *> * _Nullable values, NSError * _Nullable error) { - checkSingleValue(values, error, unsignedIntValue1); - [readExpectation3 fulfill]; - }]; + [baseDevice readAttributePaths:@[ requestPath ] + eventPaths:nil + params:nil + queue:queue + completion:^(NSArray *> * _Nullable values, NSError * _Nullable error) { + checkSingleValue(values, error, unsignedIntValue1); + [readExpectation3 fulfill]; + }]; [self waitForExpectations:@[ readExpectation3 ] timeout:kTimeoutInSeconds]; // And removing that grant should remove the permissions again. [endpoint1 removeAccessGrant:clientManageGrant]; XCTestExpectation * readNoPermissionsExpectation4 = [self expectationWithDescription:@"Read 4 of attribute with no permissions complete"]; - [device readAttributePaths:@[ requestPath ] - eventPaths:nil - params:nil - queue:queue - completion:^(NSArray *> * _Nullable values, NSError * _Nullable error) { - checkSinglePathError(values, error, MTRInteractionErrorCodeUnsupportedAccess); - [readNoPermissionsExpectation4 fulfill]; - }]; + [baseDevice readAttributePaths:@[ requestPath ] + eventPaths:nil + params:nil + queue:queue + completion:^(NSArray *> * _Nullable values, NSError * _Nullable error) { + checkSinglePathError(values, error, MTRInteractionErrorCodeUnsupportedAccess); + [readNoPermissionsExpectation4 fulfill]; + }]; [self waitForExpectations:@[ readNoPermissionsExpectation4 ] timeout:kTimeoutInSeconds]; // Now do a wildcard read on the endpoint and check that this does the right @@ -1926,23 +1926,23 @@ - (void)testControllerServer }; #endif XCTestExpectation * wildcardReadExpectation = [self expectationWithDescription:@"Wildcard read of our endpoint"]; - [device readAttributePaths:@[ [MTRAttributeRequestPath requestPathWithEndpointID:endpointId1 clusterID:nil attributeID:nil] ] - eventPaths:nil - params:nil - queue:queue - completion:^(NSArray *> * _Nullable values, NSError * _Nullable error) { - XCTAssertNil(error); - XCTAssertNotNil(values); - - // TODO: Figure out how to test that values is correct that's not - // too fragile if things get returned in different valid order. - // For now just check that every path we got has a value, not an - // error. - for (NSDictionary * value in values) { - XCTAssertNotNil(value[MTRAttributePathKey]); - XCTAssertNil(value[MTRErrorKey]); - XCTAssertNotNil(value[MTRDataKey]); - } + [baseDevice readAttributePaths:@[ [MTRAttributeRequestPath requestPathWithEndpointID:endpointId1 clusterID:nil attributeID:nil] ] + eventPaths:nil + params:nil + queue:queue + completion:^(NSArray *> * _Nullable values, NSError * _Nullable error) { + XCTAssertNil(error); + XCTAssertNotNil(values); + + // TODO: Figure out how to test that values is correct that's not + // too fragile if things get returned in different valid order. + // For now just check that every path we got has a value, not an + // error. + for (NSDictionary * value in values) { + XCTAssertNotNil(value[MTRAttributePathKey]); + XCTAssertNil(value[MTRErrorKey]); + XCTAssertNotNil(value[MTRDataKey]); + } #if 0 XCTAssertEqualObjects(values, @[ // cluster1 @@ -1960,10 +1960,71 @@ - (void)testControllerServer ]); #endif - [wildcardReadExpectation fulfill]; - }]; + [wildcardReadExpectation fulfill]; + }]; [self waitForExpectations:@[ wildcardReadExpectation ] timeout:kTimeoutInSeconds]; + // Do some MTRDevice testing against this convenient server we have that has + // vendor-specific attributes. + __auto_type * device = [MTRDevice deviceWithNodeID:nodeIDServer controller:controllerClient]; + __auto_type * delegate = [[MTRDeviceTestDelegate alloc] init]; + delegate.forceAttributeReportsIfMatchingCache = YES; + + XCTestExpectation * gotReportsExpectation = [self expectationWithDescription:@"MTRDevice subscription established"]; + delegate.onReportEnd = ^() { + [gotReportsExpectation fulfill]; + }; + + [device setDelegate:delegate queue:queue]; + + [self waitForExpectations:@[ gotReportsExpectation ] timeout:kTimeoutInSeconds]; + + delegate.onReportEnd = nil; + + // Test read-through behavior of non-standard (as in, not present in Matter XML) attributes. + XCTestExpectation * nonStandardReadThroughExpectation = [self expectationWithDescription:@"Read-throughs of non-standard attributes complete"]; + + delegate.onAttributeDataReceived = ^(NSArray *> * attributeReports) { + XCTAssertNotNil(attributeReports); + + for (NSDictionary * report in attributeReports) { + XCTAssertNil(report[MTRErrorKey]); + + XCTAssertNotNil(report[MTRDataKey]); + XCTAssertNotNil(report[MTRAttributePathKey]); + + // We only expect to get a report for the read that opted in to be + // treated as "C" + XCTAssertEqualObjects(report[MTRAttributePathKey], attribute2ResponsePath); + + // Strip out the DataVersion before comparing values, since our + // local value does not have that. + __auto_type * reportValue = [NSMutableDictionary dictionaryWithDictionary:report[MTRDataKey]]; + reportValue[MTRDataVersionKey] = nil; + XCTAssertEqualObjects(reportValue, listOfStructsValue1); + + [nonStandardReadThroughExpectation fulfill]; + } + }; + + __auto_type * attrValue = [device readAttributeWithEndpointID:attribute1ResponsePath.endpoint + clusterID:attribute1ResponsePath.cluster + attributeID:attribute1ResponsePath.attribute + params:nil]; + XCTAssertNotNil(attrValue); + XCTAssertEqualObjects(attrValue, unsignedIntValue2); + + __auto_type * params = [[MTRReadParams alloc] init]; + params.assumeUnknownAttributesReportable = NO; + attrValue = [device readAttributeWithEndpointID:attribute2ResponsePath.endpoint + clusterID:attribute2ResponsePath.cluster + attributeID:attribute2ResponsePath.attribute + params:params]; + XCTAssertNotNil(attrValue); + XCTAssertEqualObjects(attrValue, listOfStructsValue1); + + [self waitForExpectations:@[ nonStandardReadThroughExpectation ] timeout:kTimeoutInSeconds]; + [controllerClient shutdown]; [controllerServer shutdown]; } diff --git a/src/darwin/Framework/CHIPTests/MTRSwiftDeviceTests.swift b/src/darwin/Framework/CHIPTests/MTRSwiftDeviceTests.swift index 1276868a14c5fa..21d61cb0360ac1 100644 --- a/src/darwin/Framework/CHIPTests/MTRSwiftDeviceTests.swift +++ b/src/darwin/Framework/CHIPTests/MTRSwiftDeviceTests.swift @@ -287,6 +287,10 @@ class MTRSwiftDeviceTests : XCTestCase { wait(for: [ expectedValueReportedExpectation, expectedValueRemovedExpectation ], timeout: 5, enforceOrder: true) // Test if errors are properly received + // TODO: We might stop reporting these altogether from MTRDevice, and then + // this test will need updating. + let readThroughForUnknownAttributesParams = MTRReadParams() + readThroughForUnknownAttributesParams.shouldAssumeUnknownAttributesReportable = false; let attributeReportErrorExpectation = expectation(description: "Attribute read error") delegate.onAttributeDataReceived = { (data: [[ String: Any ]]) -> Void in for attributeReponseValue in data { @@ -296,7 +300,7 @@ class MTRSwiftDeviceTests : XCTestCase { } } // use the nonexistent attribute and expect read error - device.readAttribute(withEndpointID: testEndpointID, clusterID: testClusterID, attributeID: testAttributeID, params: nil) + device.readAttribute(withEndpointID: testEndpointID, clusterID: testClusterID, attributeID: testAttributeID, params: readThroughForUnknownAttributesParams) wait(for: [ attributeReportErrorExpectation ], timeout: 10) // Resubscription test setup diff --git a/src/darwin/Framework/CHIPTests/TestHelpers/MTRDeviceTestDelegate.h b/src/darwin/Framework/CHIPTests/TestHelpers/MTRDeviceTestDelegate.h index 27596bcafeae7f..5c42d2eb1022af 100644 --- a/src/darwin/Framework/CHIPTests/TestHelpers/MTRDeviceTestDelegate.h +++ b/src/darwin/Framework/CHIPTests/TestHelpers/MTRDeviceTestDelegate.h @@ -29,6 +29,7 @@ typedef void (^MTRDeviceTestDelegateDataHandler)(NSArray Date: Wed, 17 Apr 2024 11:31:31 -0700 Subject: [PATCH 102/468] android/tv-casting-app: Implemented commands and attributes using CHIPInteractionClient.jar (#33019) --- examples/tv-casting-app/APIs.md | 162 ++++++++++++++++-- .../com/chip/casting/app/MainActivity.java | 14 ++ .../casting/util/GlobalCastingConstants.java | 3 +- .../casting/ActionSelectorFragment.java | 24 +++ ...ationBasicReadVendorIDExampleFragment.java | 125 ++++++++++++++ ...ntentLauncherLaunchURLExampleFragment.java | 81 ++++++--- .../casting/EndpointSelectorExample.java | 34 ++++ ...ubscribeToCurrentStateExampleFragment.java | 148 ++++++++++++++++ .../jni/com/matter/casting/core/Endpoint.java | 6 + .../matter/casting/core/MatterEndpoint.java | 60 +++++++ .../main/jni/cpp/core/MatterEndpoint-JNI.cpp | 25 ++- .../main/jni/cpp/core/MatterEndpoint-JNI.h | 12 ++ .../main/jni/cpp/support/Converters-JNI.cpp | 24 +++ .../src/main/jni/cpp/support/Converters-JNI.h | 2 + .../main/jni/cpp/support/MatterCallback-JNI.h | 3 +- .../fragment_matter_action_selector.xml | 18 ++ ...atter_application_basic_read_vendor_id.xml | 48 ++++++ ...ent_matter_content_launcher_launch_url.xml | 6 +- ...media_playback_subscribe_current_state.xml | 57 ++++++ .../App/app/src/main/res/values/strings.xml | 8 + examples/tv-casting-app/android/README.md | 12 ++ 21 files changed, 830 insertions(+), 42 deletions(-) create mode 100644 examples/tv-casting-app/android/App/app/src/main/java/com/matter/casting/ApplicationBasicReadVendorIDExampleFragment.java create mode 100644 examples/tv-casting-app/android/App/app/src/main/java/com/matter/casting/EndpointSelectorExample.java create mode 100644 examples/tv-casting-app/android/App/app/src/main/java/com/matter/casting/MediaPlaybackSubscribeToCurrentStateExampleFragment.java create mode 100644 examples/tv-casting-app/android/App/app/src/main/res/layout/fragment_matter_application_basic_read_vendor_id.xml create mode 100644 examples/tv-casting-app/android/App/app/src/main/res/layout/fragment_matter_media_playback_subscribe_current_state.xml diff --git a/examples/tv-casting-app/APIs.md b/examples/tv-casting-app/APIs.md index 12f5fdf30ebc1b..1bbb189e7179d7 100644 --- a/examples/tv-casting-app/APIs.md +++ b/examples/tv-casting-app/APIs.md @@ -688,7 +688,7 @@ func startDiscovery() { } ``` -Note: You will need to connect with a Casting Player as described below to see +Note: You will need to connect with a Casting Player as described below to se the list of Endpoints that they support. Refer to the [Connection](#connect-to-a-casting-player) section for details on how to discover available endpoints supported by a Casting Player. @@ -696,7 +696,8 @@ discover available endpoints supported by a Casting Player. ### Connect to a Casting Player _{Complete Connection examples: [Linux](linux/simple-app-helper.cpp) | -[iOS](darwin/TvCasting/TvCasting/MCConnectionExampleViewModel.swift)}_ +[Android](android/App/app/src/main/java/com/matter/casting/ConnectionExampleFragment.java) +| [iOS](darwin/TvCasting/TvCasting/MCConnectionExampleViewModel.swift)}_ Each `CastingPlayer` object created during [Discovery](#discover-casting-players) contains information such as @@ -830,7 +831,7 @@ func connect(selectedCastingPlayer: MCCastingPlayer?) { ### Select an Endpoint on the Casting Player _{Complete Endpoint selection examples: [Linux](linux/simple-app-helper.cpp) | -[Android](android/App/app/src/main/java/com/matter/casting/ContentLauncherLaunchURLExampleFragment.java) +[Android](android/App/app/src/main/java/com/matter/casting/EndpointSelectorExample.java) | [iOS](darwin/TvCasting/TvCasting/MCContentLauncherLaunchURLExampleViewModel.swift)}_ @@ -863,7 +864,7 @@ On Android, it can select an `Endpoint` as shown below. ```java private static final Integer SAMPLE_ENDPOINT_VID = 65521; -private Endpoint selectEndpoint() +private Endpoint selectFirstEndpointByVID() { Endpoint endpoint = null; if(selectedCastingPlayer != null) @@ -905,18 +906,25 @@ Once the Casting Client has selected an `Endpoint`, it is ready to [issue commands](#issuing-commands) to it, [read](#read-operations) current playback state, and [subscribe](#subscriptions) to playback events. -On Linux refer to the following platform specific files: +Refer to the following platform specific files, to find the list of clusters, +commands and attributes, with their request/response types available for use +with the Matter TV Casting library. + +For Linux, refer to the following files: -1. For a list of clusters, commands and attributes supported by the Matter TV - Casting library: +1. For a list of supported clusters, commands and attributes: [tv-casting-common/clusters/Clusters.h](tv-casting-common/clusters/Clusters.h) 2. For the IDs and request / response types to use with these APIs: [/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h](/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h) -On iOS refer to the following platform specific files: +For Android, refer to the following files: + +1. For a list of supported clusters, commands and attributes: + [/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java](/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java) -1. For a list of clusters, commands and attributes supported by the Matter TV - Casting library: +On iOS, refer to the following files: + +1. For a list of supported clusters, commands and attribute: [darwin/MatterTvCastingBridge/MatterTvCastingBridge/zap-generated/MCClusterObjects.h](darwin/MatterTvCastingBridge/MatterTvCastingBridge/zap-generated/MCClusterObjects.h) 2. For the IDs and request / response types to use with the commands: [darwin/MatterTvCastingBridge/MatterTvCastingBridge/zap-generated/MCCommandObjects.h](darwin/MatterTvCastingBridge/MatterTvCastingBridge/zap-generated/MCCommandObjects.h) @@ -929,6 +937,8 @@ On iOS refer to the following platform specific files: ### Issuing Commands _{Complete Command invocation examples: [Linux](linux/simple-app-helper.cpp) | +[Android](android/App/app/src/main/java/com/matter/casting/ContentLauncherLaunchURLExampleFragment.java) +| [iOS](darwin/TvCasting/TvCasting/MCContentLauncherLaunchURLExampleViewModel.swift)}_ The Casting Client can get a reference to an `Endpoint` on a `CastingPlayer`, @@ -975,6 +985,51 @@ void InvokeContentLauncherLaunchURL(matter::casting::memory::Strong data) { + Log.d(TAG, "LaunchURL success. Status: " + status + ", Data: " + data); + new Handler(Looper.getMainLooper()) + .post( + () -> { + TextView launcherResult = getView().findViewById(R.id.launcherResult); + launcherResult.setText( + "LaunchURL result\nStatus: " + status + ", Data: " + data); + }); + } + + @Override + public void onError(Exception error) { + Log.e(TAG, "LaunchURL failure " + error); + new Handler(Looper.getMainLooper()) + .post( + () -> { + TextView launcherResult = getView().findViewById(R.id.launcherResult); + launcherResult.setText("LaunchURL result\nError: " + error); + }); + } + }, + contentUrl, + Optional.of(contentDisplayString), + Optional.empty()); +``` + On iOS, given an `MCEndpoint` endpoint, it can send a `LaunchURL` command (part of the Content Launcher cluster) by calling the `invoke` API on a `MCContentLauncherClusterLaunchURLCommand` @@ -1033,6 +1088,8 @@ timedInvokeTimeoutMs: 5000) // time out after 5000ms ### Read Operations _{Complete Attribute Read examples: [Linux](linux/simple-app-helper.cpp) | +[Android](android/App/app/src/main/java/com/matter/casting/ApplicationBasicReadVendorIDExampleFragment.java) +| [iOS](darwin/TvCasting/TvCasting/MCApplicationBasicReadVendorIDExampleViewModel.swift)}_ The `CastingClient` may read an Attribute from the `Endpoint` on the @@ -1080,6 +1137,45 @@ void ReadApplicationBasicVendorID(matter::casting::memory::Strong { + TextView vendorIdResult = getView().findViewById(R.id.vendorIdResult); + vendorIdResult.setText( + "Read VendorID result\nValue: " + value ); + }); + } + + @Override + public void onError(Exception error) { + Log.e(TAG, "ReadVendorID failure " + error); + new Handler(Looper.getMainLooper()) + .post( + () -> { + TextView vendorIdResult = getView().findViewById(R.id.vendorIdResult); + vendorIdResult.setText("Read VendorID result\nError: " + error); + }); + } +}); +``` + On iOS, given a `MCEndpoint`, the `VendorID` can be read similarly, by calling the `read` API on the `MCApplicationBasicClusterVendorIDAttribute` @@ -1138,6 +1234,9 @@ vendorIDAttribute!.read(nil) { context, before, after, err in ### Subscriptions _{Complete Attribute subscription examples: [Linux](linux/simple-app-helper.cpp) +| +[Android](android/App/app/src/main/java/com/matter/casting/MediaPlaybackSubscribeToCurrentStateExampleFragment.java) +| |[iOS](darwin/TvCasting/TvCasting/MCMediaPlaybackSubscribeToCurrentStateExampleViewModel.swift)}_ A Casting Client may subscribe to an attribute on an `Endpoint` of the @@ -1187,6 +1286,49 @@ void SubscribeToMediaPlaybackCurrentState(matter::casting::memory::Strong { + TextView currentStateResult = getView().findViewById(R.id.currentStateResult); + currentStateResult.setText( + "Current State result\nValue: " + value ); + }); + } + + @Override + public void onError(Exception error) { + Log.e(TAG, "Read failure on subscription: " + error); + new Handler(Looper.getMainLooper()) + .post( + () -> { + TextView currentStateResult = getView().findViewById(R.id.currentStateResult); + currentStateResult.setText("Current State result\nError: " + error); + }); + } + }, 0, 1); +``` + On iOS, given a `MCEndpoint`, `CurrentState` can be subscribed to by calling the `subscribe` API on the it can subscribe to the `CurrentState` (part of the Media Playback Basic cluster) by calling the `Subscribe` API on the diff --git a/examples/tv-casting-app/android/App/app/src/main/java/com/chip/casting/app/MainActivity.java b/examples/tv-casting-app/android/App/app/src/main/java/com/chip/casting/app/MainActivity.java index 6e54ff61b01c7e..cb04518f5c6259 100644 --- a/examples/tv-casting-app/android/App/app/src/main/java/com/chip/casting/app/MainActivity.java +++ b/examples/tv-casting-app/android/App/app/src/main/java/com/chip/casting/app/MainActivity.java @@ -11,10 +11,12 @@ import com.chip.casting.TvCastingApp; import com.chip.casting.util.GlobalCastingConstants; import com.matter.casting.ActionSelectorFragment; +import com.matter.casting.ApplicationBasicReadVendorIDExampleFragment; import com.matter.casting.ConnectionExampleFragment; import com.matter.casting.ContentLauncherLaunchURLExampleFragment; import com.matter.casting.DiscoveryExampleFragment; import com.matter.casting.InitializationExample; +import com.matter.casting.MediaPlaybackSubscribeToCurrentStateExampleFragment; import com.matter.casting.PreferencesConfigurationManager; import com.matter.casting.core.CastingPlayer; import java.util.Random; @@ -85,6 +87,18 @@ public void handleContentLauncherLaunchURLSelected(CastingPlayer selectedCasting showFragment(ContentLauncherLaunchURLExampleFragment.newInstance(selectedCastingPlayer)); } + @Override + public void handleApplicationBasicReadVendorIDSelected(CastingPlayer selectedCastingPlayer) { + showFragment(ApplicationBasicReadVendorIDExampleFragment.newInstance(selectedCastingPlayer)); + } + + @Override + public void handleMediaPlaybackSubscribeToCurrentStateSelected( + CastingPlayer selectedCastingPlayer) { + showFragment( + MediaPlaybackSubscribeToCurrentStateExampleFragment.newInstance(selectedCastingPlayer)); + } + @Override public void handleContentLauncherSelected() { showFragment(ContentLauncherFragment.newInstance(tvCastingApp)); diff --git a/examples/tv-casting-app/android/App/app/src/main/java/com/chip/casting/util/GlobalCastingConstants.java b/examples/tv-casting-app/android/App/app/src/main/java/com/chip/casting/util/GlobalCastingConstants.java index d063cc7e6f78c5..483f1efedb1b46 100644 --- a/examples/tv-casting-app/android/App/app/src/main/java/com/chip/casting/util/GlobalCastingConstants.java +++ b/examples/tv-casting-app/android/App/app/src/main/java/com/chip/casting/util/GlobalCastingConstants.java @@ -6,5 +6,6 @@ public class GlobalCastingConstants { public static final int SetupPasscode = 20202021; public static final int Discriminator = 0xF00; public static final boolean ChipCastingSimplified = - false; // set this flag to true to demo simplified casting APIs + true; // set to true, to demo the simplified casting APIs. Otherwise, the older deprecated + // APIs are invoked } diff --git a/examples/tv-casting-app/android/App/app/src/main/java/com/matter/casting/ActionSelectorFragment.java b/examples/tv-casting-app/android/App/app/src/main/java/com/matter/casting/ActionSelectorFragment.java index 2906ad186d6054..cb5d2170e96d6d 100644 --- a/examples/tv-casting-app/android/App/app/src/main/java/com/matter/casting/ActionSelectorFragment.java +++ b/examples/tv-casting-app/android/App/app/src/main/java/com/matter/casting/ActionSelectorFragment.java @@ -33,6 +33,8 @@ public class ActionSelectorFragment extends Fragment { private final CastingPlayer selectedCastingPlayer; private View.OnClickListener selectContentLauncherButtonClickListener; + private View.OnClickListener selectApplicationBasicButtonClickListener; + private View.OnClickListener selectMediaPlaybackButtonClickListener; private View.OnClickListener disconnectButtonClickListener; public ActionSelectorFragment(CastingPlayer selectedCastingPlayer) { @@ -64,6 +66,16 @@ public View onCreateView( Log.d(TAG, "handle() called on selectContentLauncherButtonClickListener"); callback.handleContentLauncherLaunchURLSelected(selectedCastingPlayer); }; + this.selectApplicationBasicButtonClickListener = + v -> { + Log.d(TAG, "handle() called on selectApplicationBasicButtonClickListener"); + callback.handleApplicationBasicReadVendorIDSelected(selectedCastingPlayer); + }; + this.selectMediaPlaybackButtonClickListener = + v -> { + Log.d(TAG, "handle() called on selectMediaPlaybackButtonClickListener"); + callback.handleMediaPlaybackSubscribeToCurrentStateSelected(selectedCastingPlayer); + }; this.disconnectButtonClickListener = v -> { @@ -82,6 +94,12 @@ public void onViewCreated(View view, @Nullable Bundle savedInstanceState) { getView() .findViewById(R.id.selectContentLauncherLaunchURLButton) .setOnClickListener(selectContentLauncherButtonClickListener); + getView() + .findViewById(R.id.selectApplicationBasicReadVendorIDButton) + .setOnClickListener(selectApplicationBasicButtonClickListener); + getView() + .findViewById(R.id.selectMediaPlaybackSubscribeToCurrentStateButton) + .setOnClickListener(selectMediaPlaybackButtonClickListener); getView().findViewById(R.id.disconnectButton).setOnClickListener(disconnectButtonClickListener); } @@ -91,6 +109,12 @@ public interface Callback { /** Notifies listener to trigger transition on selection of Content Launcher cluster */ void handleContentLauncherLaunchURLSelected(CastingPlayer selectedCastingPlayer); + /** Notifies listener to trigger transition on selection of Application Basic cluster */ + void handleApplicationBasicReadVendorIDSelected(CastingPlayer selectedCastingPlayer); + + /** Notifies listener to trigger transition on selection of Media PLayback cluster */ + void handleMediaPlaybackSubscribeToCurrentStateSelected(CastingPlayer selectedCastingPlayer); + /** Notifies listener to trigger transition on click of the Disconnect button */ void handleDisconnect(); } diff --git a/examples/tv-casting-app/android/App/app/src/main/java/com/matter/casting/ApplicationBasicReadVendorIDExampleFragment.java b/examples/tv-casting-app/android/App/app/src/main/java/com/matter/casting/ApplicationBasicReadVendorIDExampleFragment.java new file mode 100644 index 00000000000000..878c18019f4d09 --- /dev/null +++ b/examples/tv-casting-app/android/App/app/src/main/java/com/matter/casting/ApplicationBasicReadVendorIDExampleFragment.java @@ -0,0 +1,125 @@ +/* + * Copyright (c) 2024 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.matter.casting; + +import android.os.Bundle; +import android.os.Handler; +import android.os.Looper; +import android.util.Log; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.TextView; +import androidx.annotation.Nullable; +import androidx.fragment.app.Fragment; +import chip.devicecontroller.ChipClusters; +import com.R; +import com.matter.casting.core.CastingPlayer; +import com.matter.casting.core.Endpoint; + +/** + * A {@link Fragment} to read the VendorID (from ApplicationBasic cluster) using the TV Casting App. + */ +public class ApplicationBasicReadVendorIDExampleFragment extends Fragment { + private static final String TAG = + ApplicationBasicReadVendorIDExampleFragment.class.getSimpleName(); + + private final CastingPlayer selectedCastingPlayer; + + private View.OnClickListener readButtonClickListener; + + public ApplicationBasicReadVendorIDExampleFragment(CastingPlayer selectedCastingPlayer) { + this.selectedCastingPlayer = selectedCastingPlayer; + } + + /** + * Use this factory method to create a new instance of this fragment using the provided + * parameters. + * + * @param selectedCastingPlayer CastingPlayer that the casting app connected to + * @return A new instance of fragment ApplicationBasicReadVendorIDExampleFragment. + */ + public static ApplicationBasicReadVendorIDExampleFragment newInstance( + CastingPlayer selectedCastingPlayer) { + return new ApplicationBasicReadVendorIDExampleFragment(selectedCastingPlayer); + } + + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + } + + @Override + public View onCreateView( + LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { + this.readButtonClickListener = + v -> { + Endpoint endpoint = + EndpointSelectorExample.selectFirstEndpointByVID(selectedCastingPlayer); + if (endpoint == null) { + Log.e(TAG, "No Endpoint with sample vendorID found on CastingPlayer"); + return; + } + + // get ChipClusters.ApplicationBasic from the endpoint + ChipClusters.ApplicationBasicCluster cluster = + endpoint.getCluster(ChipClusters.ApplicationBasicCluster.class); + if (cluster == null) { + Log.e( + TAG, + "Could not get ApplicationBasicCluster for endpoint with ID: " + endpoint.getId()); + return; + } + + // call readVendorIDAttribute on the cluster object while passing in a + // ChipClusters.IntegerAttributeCallback + cluster.readVendorIDAttribute( + new ChipClusters.IntegerAttributeCallback() { + @Override + public void onSuccess(int value) { + Log.d(TAG, "ReadVendorID success. Value: " + value); + new Handler(Looper.getMainLooper()) + .post( + () -> { + TextView vendorIdResult = getView().findViewById(R.id.vendorIdResult); + vendorIdResult.setText("Read VendorID result\nValue: " + value); + }); + } + + @Override + public void onError(Exception error) { + Log.e(TAG, "ReadVendorID failure " + error); + new Handler(Looper.getMainLooper()) + .post( + () -> { + TextView vendorIdResult = getView().findViewById(R.id.vendorIdResult); + vendorIdResult.setText("Read VendorID result\nError: " + error); + }); + } + }); + }; + return inflater.inflate( + R.layout.fragment_matter_application_basic_read_vendor_id, container, false); + } + + @Override + public void onViewCreated(View view, @Nullable Bundle savedInstanceState) { + super.onViewCreated(view, savedInstanceState); + Log.d(TAG, "ApplicationBasicReadVendorIDExampleFragment.onViewCreated called"); + getView().findViewById(R.id.readVendorIdButton).setOnClickListener(readButtonClickListener); + } +} diff --git a/examples/tv-casting-app/android/App/app/src/main/java/com/matter/casting/ContentLauncherLaunchURLExampleFragment.java b/examples/tv-casting-app/android/App/app/src/main/java/com/matter/casting/ContentLauncherLaunchURLExampleFragment.java index c1bde0f9bb0323..ddf41b349d6890 100644 --- a/examples/tv-casting-app/android/App/app/src/main/java/com/matter/casting/ContentLauncherLaunchURLExampleFragment.java +++ b/examples/tv-casting-app/android/App/app/src/main/java/com/matter/casting/ContentLauncherLaunchURLExampleFragment.java @@ -17,18 +17,23 @@ package com.matter.casting; import android.os.Bundle; +import android.os.Handler; +import android.os.Looper; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; +import android.widget.EditText; +import android.widget.TextView; import androidx.annotation.Nullable; import androidx.fragment.app.Fragment; +import chip.devicecontroller.ChipClusters; import com.R; import com.matter.casting.core.CastingPlayer; import com.matter.casting.core.Endpoint; -import java.util.List; +import java.util.Optional; -/** A {@link Fragment} to send Content Launcher LaunchURL command from the TV Casting App. */ +/** A {@link Fragment} to send Content Launcher LaunchURL command using the TV Casting App. */ public class ContentLauncherLaunchURLExampleFragment extends Fragment { private static final String TAG = ContentLauncherLaunchURLExampleFragment.class.getSimpleName(); private static final Integer SAMPLE_ENDPOINT_VID = 65521; @@ -63,19 +68,61 @@ public View onCreateView( LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { this.launchUrlButtonClickListener = v -> { - Endpoint endpoint = selectEndpoint(); + Endpoint endpoint = + EndpointSelectorExample.selectFirstEndpointByVID(selectedCastingPlayer); if (endpoint == null) { + Log.e(TAG, "No Endpoint with sample vendorID found on CastingPlayer"); + return; + } + + EditText contentUrlEditText = getView().findViewById(R.id.contentUrlEditText); + String contentUrl = contentUrlEditText.getText().toString(); + EditText contentDisplayStringEditText = + getView().findViewById(R.id.contentDisplayStringEditText); + String contentDisplayString = contentDisplayStringEditText.getText().toString(); + + // get ChipClusters.ContentLauncherCluster from the endpoint + ChipClusters.ContentLauncherCluster cluster = + endpoint.getCluster(ChipClusters.ContentLauncherCluster.class); + if (cluster == null) { Log.e( TAG, - "No Endpoint with chosen vendorID: " - + SAMPLE_ENDPOINT_VID - + " found on CastingPlayer"); + "Could not get ContentLauncherCluster for endpoint with ID: " + endpoint.getId()); return; } - // TODO: add command invocation API call + // call launchURL on the cluster object while passing in a + // ChipClusters.ContentLauncherCluster.LauncherResponseCallback and request parameters + cluster.launchURL( + new ChipClusters.ContentLauncherCluster.LauncherResponseCallback() { + @Override + public void onSuccess(Integer status, Optional data) { + Log.d(TAG, "LaunchURL success. Status: " + status + ", Data: " + data); + new Handler(Looper.getMainLooper()) + .post( + () -> { + TextView launcherResult = getView().findViewById(R.id.launcherResult); + launcherResult.setText( + "LaunchURL result\nStatus: " + status + ", Data: " + data); + }); + } + + @Override + public void onError(Exception error) { + Log.e(TAG, "LaunchURL failure " + error); + new Handler(Looper.getMainLooper()) + .post( + () -> { + TextView launcherResult = getView().findViewById(R.id.launcherResult); + launcherResult.setText("LaunchURL result\nError: " + error); + }); + } + }, + contentUrl, + Optional.of(contentDisplayString), + Optional.empty()); }; - return inflater.inflate(R.layout.fragment_content_launcher, container, false); + return inflater.inflate(R.layout.fragment_matter_content_launcher_launch_url, container, false); } @Override @@ -84,22 +131,4 @@ public void onViewCreated(View view, @Nullable Bundle savedInstanceState) { Log.d(TAG, "ContentLauncherLaunchURLExampleFragment.onViewCreated called"); getView().findViewById(R.id.launchUrlButton).setOnClickListener(launchUrlButtonClickListener); } - - private Endpoint selectEndpoint() { - Endpoint endpoint = null; - if (selectedCastingPlayer != null) { - List endpoints = selectedCastingPlayer.getEndpoints(); - if (endpoints == null) { - Log.e(TAG, "No Endpoints found on CastingPlayer"); - } else { - endpoint = - endpoints - .stream() - .filter(e -> SAMPLE_ENDPOINT_VID.equals(e.getVendorId())) - .findFirst() - .get(); - } - } - return endpoint; - } } diff --git a/examples/tv-casting-app/android/App/app/src/main/java/com/matter/casting/EndpointSelectorExample.java b/examples/tv-casting-app/android/App/app/src/main/java/com/matter/casting/EndpointSelectorExample.java new file mode 100644 index 00000000000000..c2932c59117c64 --- /dev/null +++ b/examples/tv-casting-app/android/App/app/src/main/java/com/matter/casting/EndpointSelectorExample.java @@ -0,0 +1,34 @@ +package com.matter.casting; + +import android.util.Log; +import com.matter.casting.core.CastingPlayer; +import com.matter.casting.core.Endpoint; +import java.util.List; + +/** A utility that selects an endpoint based on some criterion */ +public class EndpointSelectorExample { + private static final String TAG = EndpointSelectorExample.class.getSimpleName(); + private static final Integer SAMPLE_ENDPOINT_VID = 65521; + + /** + * Returns the first Endpoint in the list of Endpoints associated with the selectedCastingPlayer + * whose VendorID matches the EndpointSelectorExample.SAMPLE_ENDPOINT_VID + */ + public static Endpoint selectFirstEndpointByVID(CastingPlayer selectedCastingPlayer) { + Endpoint endpoint = null; + if (selectedCastingPlayer != null) { + List endpoints = selectedCastingPlayer.getEndpoints(); + if (endpoints == null) { + Log.e(TAG, "No Endpoints found on CastingPlayer"); + } else { + endpoint = + endpoints + .stream() + .filter(e -> SAMPLE_ENDPOINT_VID.equals(e.getVendorId())) + .findFirst() + .get(); + } + } + return endpoint; + } +} diff --git a/examples/tv-casting-app/android/App/app/src/main/java/com/matter/casting/MediaPlaybackSubscribeToCurrentStateExampleFragment.java b/examples/tv-casting-app/android/App/app/src/main/java/com/matter/casting/MediaPlaybackSubscribeToCurrentStateExampleFragment.java new file mode 100644 index 00000000000000..77f5129b6b9e4d --- /dev/null +++ b/examples/tv-casting-app/android/App/app/src/main/java/com/matter/casting/MediaPlaybackSubscribeToCurrentStateExampleFragment.java @@ -0,0 +1,148 @@ +/* + * Copyright (c) 2024 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.matter.casting; + +import android.os.Bundle; +import android.os.Handler; +import android.os.Looper; +import android.util.Log; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.TextView; +import androidx.annotation.Nullable; +import androidx.fragment.app.Fragment; +import chip.devicecontroller.ChipClusters; +import com.R; +import com.matter.casting.core.CastingApp; +import com.matter.casting.core.CastingPlayer; +import com.matter.casting.core.Endpoint; +import java.util.Date; + +/** + * A {@link Fragment} to subscribe to CurrentState (from MediaPLayback cluster) using the TV Casting + * App. + */ +public class MediaPlaybackSubscribeToCurrentStateExampleFragment extends Fragment { + private static final String TAG = + MediaPlaybackSubscribeToCurrentStateExampleFragment.class.getSimpleName(); + + private final CastingPlayer selectedCastingPlayer; + + private View.OnClickListener subscribeButtonClickListener; + private View.OnClickListener shutdownSubscriptionsButtonClickListener; + + public MediaPlaybackSubscribeToCurrentStateExampleFragment(CastingPlayer selectedCastingPlayer) { + this.selectedCastingPlayer = selectedCastingPlayer; + } + + /** + * Use this factory method to create a new instance of this fragment using the provided + * parameters. + * + * @param selectedCastingPlayer CastingPlayer that the casting app connected to + * @return A new instance of fragment MediaPlaybackSubscribeToCurrentStateExampleFragment. + */ + public static MediaPlaybackSubscribeToCurrentStateExampleFragment newInstance( + CastingPlayer selectedCastingPlayer) { + return new MediaPlaybackSubscribeToCurrentStateExampleFragment(selectedCastingPlayer); + } + + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + } + + @Override + public View onCreateView( + LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { + Endpoint endpoint = EndpointSelectorExample.selectFirstEndpointByVID(selectedCastingPlayer); + if (endpoint == null) { + Log.e(TAG, "No Endpoint with sample vendorID found on CastingPlayer"); + return inflater.inflate( + R.layout.fragment_matter_media_playback_subscribe_current_state, container, false); + } + + this.subscribeButtonClickListener = + v -> { + // get ChipClusters.MediaPlaybackCluster from the endpoint + ChipClusters.MediaPlaybackCluster cluster = + endpoint.getCluster(ChipClusters.MediaPlaybackCluster.class); + if (cluster == null) { + Log.e( + TAG, + "Could not get ApplicationBasicCluster for endpoint with ID: " + endpoint.getId()); + return; + } + + // call subscribeCurrentStateAttribute on the cluster object while passing in a + // ChipClusters.IntegerAttributeCallback and [0, 1] for min and max interval params + cluster.subscribeCurrentStateAttribute( + new ChipClusters.IntegerAttributeCallback() { + @Override + public void onSuccess(int value) { + Log.d(TAG, "Read success on subscription. Value: " + value + " @ " + new Date()); + new Handler(Looper.getMainLooper()) + .post( + () -> { + TextView currentStateResult = + getView().findViewById(R.id.currentStateResult); + currentStateResult.setText("Current State result\nValue: " + value); + }); + } + + @Override + public void onError(Exception error) { + Log.e(TAG, "Read failure on subscription: " + error); + new Handler(Looper.getMainLooper()) + .post( + () -> { + TextView currentStateResult = + getView().findViewById(R.id.currentStateResult); + currentStateResult.setText("Current State result\nError: " + error); + }); + } + }, + 0, + 1); + }; + + this.shutdownSubscriptionsButtonClickListener = + new View.OnClickListener() { + @Override + public void onClick(View v) { + Log.d(TAG, "Shutting down subscriptions"); + CastingApp.getInstance().shutdownAllSubscriptions(); + } + }; + + return inflater.inflate( + R.layout.fragment_matter_media_playback_subscribe_current_state, container, false); + } + + @Override + public void onViewCreated(View view, @Nullable Bundle savedInstanceState) { + super.onViewCreated(view, savedInstanceState); + Log.d(TAG, "MediaPlaybackSubscribeToCurrentStateExampleFragment.onViewCreated called"); + getView() + .findViewById(R.id.subscribeToCurrentStateButton) + .setOnClickListener(subscribeButtonClickListener); + getView() + .findViewById(R.id.shutdownSubscriptionsButton) + .setOnClickListener(shutdownSubscriptionsButtonClickListener); + } +} diff --git a/examples/tv-casting-app/android/App/app/src/main/jni/com/matter/casting/core/Endpoint.java b/examples/tv-casting-app/android/App/app/src/main/jni/com/matter/casting/core/Endpoint.java index 6d1b63555aad08..f906b80235700c 100644 --- a/examples/tv-casting-app/android/App/app/src/main/jni/com/matter/casting/core/Endpoint.java +++ b/examples/tv-casting-app/android/App/app/src/main/jni/com/matter/casting/core/Endpoint.java @@ -17,9 +17,11 @@ package com.matter.casting.core; +import chip.devicecontroller.ChipClusters; import com.matter.casting.support.DeviceTypeStruct; import java.util.List; +/** This represents an Endpoint on a CastingPlayer e.g. a Speaker or a Matter Content App */ public interface Endpoint { int getId(); @@ -29,5 +31,9 @@ public interface Endpoint { List getDeviceTypeList(); + /** Get an instance of a cluster based on its Class */ + T getCluster(Class clusterClass); + + /** Get the CastingPlayer that this Endpoint is a part of. */ CastingPlayer getCastingPlayer(); } diff --git a/examples/tv-casting-app/android/App/app/src/main/jni/com/matter/casting/core/MatterEndpoint.java b/examples/tv-casting-app/android/App/app/src/main/jni/com/matter/casting/core/MatterEndpoint.java index b9dd564d6ff95f..86d0eb016958a7 100644 --- a/examples/tv-casting-app/android/App/app/src/main/jni/com/matter/casting/core/MatterEndpoint.java +++ b/examples/tv-casting-app/android/App/app/src/main/jni/com/matter/casting/core/MatterEndpoint.java @@ -16,12 +16,23 @@ */ package com.matter.casting.core; +import android.util.Log; +import chip.devicecontroller.ChipClusters; import com.matter.casting.support.DeviceTypeStruct; +import com.matter.casting.support.MatterCallback; +import com.matter.casting.support.MatterError; +import java.lang.reflect.Constructor; +import java.lang.reflect.InvocationTargetException; import java.util.List; import java.util.Objects; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; public class MatterEndpoint implements Endpoint { private static final String TAG = MatterEndpoint.class.getSimpleName(); + private static final long MAX_WAIT_FOR_DEVICE_PROXY_MS = 5000; protected long _cppEndpoint; @Override @@ -36,6 +47,27 @@ public class MatterEndpoint implements Endpoint { @Override public native List getDeviceTypeList(); + @Override + public T getCluster(Class clusterClass) { + try { + Constructor constructor = clusterClass.getDeclaredConstructor(long.class, int.class); + Long deviceProxy = getDeviceProxy(); + if (deviceProxy == null) { + Log.e(TAG, "Could not get DeviceProxy while constructing cluster object"); + return null; + } + return constructor.newInstance(deviceProxy, getId()); + } catch (InstantiationException + | IllegalAccessException + | InvocationTargetException + | NoSuchMethodException e) { + Log.e( + TAG, + "Could not create cluster object for " + clusterClass.getSimpleName() + " exc: " + e); + return null; + } + } + @Override public native CastingPlayer getCastingPlayer(); @@ -56,4 +88,32 @@ public boolean equals(Object o) { public int hashCode() { return Objects.hash(getId()); } + + private Long getDeviceProxy() { + CompletableFuture deviceProxyFuture = new CompletableFuture<>(); + getDeviceProxy( + new MatterCallback() { + @Override + public void handle(Long deviceProxy) { + deviceProxyFuture.complete(deviceProxy); + } + }, + new MatterCallback() { + @Override + public void handle(MatterError response) { + deviceProxyFuture.completeExceptionally( + new RuntimeException("Failed on getDeviceProxy: " + response)); + } + }); + + try { + return deviceProxyFuture.get(MAX_WAIT_FOR_DEVICE_PROXY_MS, TimeUnit.MILLISECONDS); + } catch (ExecutionException | InterruptedException | TimeoutException e) { + Log.e(TAG, "Exception while waiting on getDeviceProxy future: " + e); + return null; + } + } + + protected native void getDeviceProxy( + MatterCallback successCallback, MatterCallback failureCallback); } diff --git a/examples/tv-casting-app/android/App/app/src/main/jni/cpp/core/MatterEndpoint-JNI.cpp b/examples/tv-casting-app/android/App/app/src/main/jni/cpp/core/MatterEndpoint-JNI.cpp index 2e28b873599a9a..e0c41ebc92d260 100644 --- a/examples/tv-casting-app/android/App/app/src/main/jni/cpp/core/MatterEndpoint-JNI.cpp +++ b/examples/tv-casting-app/android/App/app/src/main/jni/cpp/core/MatterEndpoint-JNI.cpp @@ -19,7 +19,6 @@ #include "MatterEndpoint-JNI.h" #include "../JNIDACProvider.h" -#include "../support/Converters-JNI.h" #include "../support/MatterCallback-JNI.h" #include "../support/RotatingDeviceIdUniqueIdProvider-JNI.h" #include "clusters/Clusters.h" // from tv-casting-common @@ -86,6 +85,30 @@ JNI_METHOD(jobject, getCastingPlayer) return support::convertCastingPlayerFromCppToJava(std::shared_ptr(endpoint->GetCastingPlayer())); } +JNI_METHOD(void, getDeviceProxy) +(JNIEnv * env, jobject thiz, jobject jSuccessCallback, jobject jFailureCallback) +{ + chip::DeviceLayer::StackLock lock; + ChipLogProgress(AppServer, "MatterEndpoint-JNI::getDeviceProxy() called"); + Endpoint * endpoint = support::convertEndpointFromJavaToCpp(thiz); + VerifyOrReturn(endpoint != nullptr, ChipLogError(AppServer, "MatterEndpoint-JNI::getDeviceProxy() endpoint == nullptr")); + + ReturnOnFailure(MatterEndpointJNIMgr().mGetDeviceProxySuccessHandler.SetUp(env, jSuccessCallback)); + ReturnOnFailure(MatterEndpointJNIMgr().mGetDeviceProxyFailureHandler.SetUp(env, jFailureCallback)); + + endpoint->GetCastingPlayer()->FindOrEstablishSession( + nullptr, + [](void * context, chip::Messaging::ExchangeManager & exchangeMgr, const chip::SessionHandle & sessionHandle) { + ChipLogProgress(AppServer, "MatterEndpointJNI FindOrEstablishSession success"); + OperationalDeviceProxy * device = new OperationalDeviceProxy(&exchangeMgr, sessionHandle); // TODO: delete *device + MatterEndpointJNIMgr().mGetDeviceProxySuccessHandler.Handle(device); + }, + [](void * context, const chip::ScopedNodeId & peerId, CHIP_ERROR error) { + ChipLogError(AppServer, "MatterEndpointJNI FindOrEstablishSession failure %" CHIP_ERROR_FORMAT, error.Format()); + MatterEndpointJNIMgr().mGetDeviceProxyFailureHandler.Handle(error); + }); +} + }; // namespace core }; // namespace casting }; // namespace matter diff --git a/examples/tv-casting-app/android/App/app/src/main/jni/cpp/core/MatterEndpoint-JNI.h b/examples/tv-casting-app/android/App/app/src/main/jni/cpp/core/MatterEndpoint-JNI.h index f9534435ab1903..2c65ca448b6f29 100644 --- a/examples/tv-casting-app/android/App/app/src/main/jni/cpp/core/MatterEndpoint-JNI.h +++ b/examples/tv-casting-app/android/App/app/src/main/jni/cpp/core/MatterEndpoint-JNI.h @@ -18,8 +18,11 @@ #pragma once +#include "../support/Converters-JNI.h" +#include "../support/MatterCallback-JNI.h" #include "core/Endpoint.h" // from tv-casting-common +#include #include #include #include @@ -30,6 +33,15 @@ namespace core { class MatterEndpointJNI { +public: + MatterEndpointJNI() : + mGetDeviceProxySuccessHandler([](chip::DeviceProxy * device) -> jobject { + return support::convertLongFromCppToJava(reinterpret_cast(device)); + }) + {} + support::MatterCallbackJNI mGetDeviceProxySuccessHandler; + support::MatterFailureCallbackJNI mGetDeviceProxyFailureHandler; + private: friend MatterEndpointJNI & MatterEndpointJNIMgr(); static MatterEndpointJNI sInstance; diff --git a/examples/tv-casting-app/android/App/app/src/main/jni/cpp/support/Converters-JNI.cpp b/examples/tv-casting-app/android/App/app/src/main/jni/cpp/support/Converters-JNI.cpp index 9798f2b48b9359..aa5ef2b25f0096 100644 --- a/examples/tv-casting-app/android/App/app/src/main/jni/cpp/support/Converters-JNI.cpp +++ b/examples/tv-casting-app/android/App/app/src/main/jni/cpp/support/Converters-JNI.cpp @@ -25,6 +25,30 @@ namespace support { using namespace chip; +jobject convertLongFromCppToJava(jlong value) +{ + ChipLogProgress(AppServer, "convertLongFromCppToJava called"); + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + VerifyOrReturnValue(env != nullptr, nullptr, ChipLogError(AppServer, "Could not get JNIEnv for current thread")); + + jclass responseTypeClass = env->FindClass("java/lang/Long"); + if (responseTypeClass == nullptr) + { + ChipLogError(AppServer, "ConvertToJObject: Class for Response Type not found!"); + env->ExceptionClear(); + return nullptr; + } + + jmethodID constructor = env->GetMethodID(responseTypeClass, "", "(J)V"); + if (constructor == nullptr) + { + ChipLogError(AppServer, "Failed to access Long constructor"); + env->ExceptionClear(); + return nullptr; + } + return env->NewObject(responseTypeClass, constructor, value); +} + jobject convertMatterErrorFromCppToJava(CHIP_ERROR inErr) { ChipLogProgress(AppServer, "convertMatterErrorFromCppToJava() called"); diff --git a/examples/tv-casting-app/android/App/app/src/main/jni/cpp/support/Converters-JNI.h b/examples/tv-casting-app/android/App/app/src/main/jni/cpp/support/Converters-JNI.h index ecc3a95d15bd74..aa96af0668f5d4 100644 --- a/examples/tv-casting-app/android/App/app/src/main/jni/cpp/support/Converters-JNI.h +++ b/examples/tv-casting-app/android/App/app/src/main/jni/cpp/support/Converters-JNI.h @@ -29,6 +29,8 @@ namespace matter { namespace casting { namespace support { +jobject convertLongFromCppToJava(jlong value); + jobject convertMatterErrorFromCppToJava(CHIP_ERROR inErr); /** diff --git a/examples/tv-casting-app/android/App/app/src/main/jni/cpp/support/MatterCallback-JNI.h b/examples/tv-casting-app/android/App/app/src/main/jni/cpp/support/MatterCallback-JNI.h index 3c56c426359d5c..82894e075ea912 100644 --- a/examples/tv-casting-app/android/App/app/src/main/jni/cpp/support/MatterCallback-JNI.h +++ b/examples/tv-casting-app/android/App/app/src/main/jni/cpp/support/MatterCallback-JNI.h @@ -43,6 +43,7 @@ class MatterCallbackJNI ChipLogProgress(AppServer, "MatterCallbackJNI::SetUp called"); VerifyOrReturnError(env != nullptr, CHIP_JNI_ERROR_NO_ENV, ChipLogError(AppServer, "JNIEnv was null!")); + mCallbackObject.Reset(); ReturnErrorOnFailure(mCallbackObject.Init(inCallback)); jclass mClazz = env->GetObjectClass(mCallbackObject.ObjectRef()); @@ -53,7 +54,7 @@ class MatterCallbackJNI VerifyOrReturnError(mSuperClazz != nullptr, CHIP_JNI_ERROR_TYPE_NOT_FOUND, ChipLogError(AppServer, "Failed to get callback's parent's Java class")); - mMethod = env->GetMethodID(mClazz, "handleInternal", mMethodSignature); + mMethod = env->GetMethodID(mSuperClazz, "handleInternal", mMethodSignature); VerifyOrReturnError( mMethod != nullptr, CHIP_JNI_ERROR_METHOD_NOT_FOUND, ChipLogError(AppServer, "Failed to access 'handleInternal' method with signature %s", mMethodSignature)); diff --git a/examples/tv-casting-app/android/App/app/src/main/res/layout/fragment_matter_action_selector.xml b/examples/tv-casting-app/android/App/app/src/main/res/layout/fragment_matter_action_selector.xml index ae61681a0bbf2f..1969c5eeb13212 100644 --- a/examples/tv-casting-app/android/App/app/src/main/res/layout/fragment_matter_action_selector.xml +++ b/examples/tv-casting-app/android/App/app/src/main/res/layout/fragment_matter_action_selector.xml @@ -27,6 +27,24 @@ android:layout_marginRight="10sp" android:layout_below="@id/action_selector_heading" /> +